Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(frontend): use extends instead of Thing.extends #548

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions frontend/app/adapters/activity-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ApplicationAdapter from "timed/adapters/application";
* @extends ApplicationAdapter
* @public
*/
export default ApplicationAdapter.extend({
export default class ActivityBlockAdapter extends ApplicationAdapter {
/**
* Custom url for updating records
*
Expand All @@ -24,8 +24,8 @@ export default ApplicationAdapter.extend({
* @public
*/
urlForUpdateRecord(...args) {
return `${this._super(...args)}?include=activity`;
},
return `${super.urlForUpdateRecord(...args)}?include=activity`;
}

/**
* Custom url for creating records
Expand All @@ -38,6 +38,6 @@ export default ApplicationAdapter.extend({
* @public
*/
urlForCreateRecord(...args) {
return `${this._super(...args)}?include=activity`;
},
});
return `${super.urlForCreateRecord(...args)}?include=activity`;
}
}
13 changes: 4 additions & 9 deletions frontend/app/serializers/attendance.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ import ApplicationSerializer from "timed/serializers/application";
* @extends ApplicationSerializer
* @public
*/
export default ApplicationSerializer.extend({
export default class AttendanceSerializer extends ApplicationSerializer {
/**
* The attribute mapping
*
* This mapps some properties of the response to another
* property name of the model
*
* @property {Object} attrs
* @property {String} from
* @property {String} to
* @public
*/
attrs: {
attrs = {
from: "from-time",
to: "to-time",
},
});
};
}
13 changes: 4 additions & 9 deletions frontend/app/serializers/employment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ import ApplicationSerializer from "timed/serializers/application";
* @extends ApplicationSerializer
* @public
*/
export default ApplicationSerializer.extend({
export default class EmploymentSerializer extends ApplicationSerializer {
/**
* The attribute mapping
*
* This mapps some properties of the response to another
* property name of the model
*
* @property {Object} attrs
* @property {String} start
* @property {String} end
* @public
*/
attrs: {
attrs = {
start: "start-date",
end: "end-date",
},
});
};
}
Loading