Skip to content

Commit

Permalink
refactor(frontend): use extends instead of EmberObject.extend
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Sep 20, 2024
1 parent f29532a commit 499f2be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
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`;
}
}
8 changes: 4 additions & 4 deletions frontend/app/serializers/attendance.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ApplicationSerializer from "timed/serializers/application";
* @extends ApplicationSerializer
* @public
*/
export default ApplicationSerializer.extend({
export default class AttendanceSerializer extends ApplicationSerializer {
/**
* The attribute mapping
*
Expand All @@ -24,8 +24,8 @@ export default ApplicationSerializer.extend({
* @property {String} to
* @public
*/
attrs: {
attrs = {
from: "from-time",
to: "to-time",
},
});
};
}
8 changes: 4 additions & 4 deletions frontend/app/serializers/employment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ApplicationSerializer from "timed/serializers/application";
* @extends ApplicationSerializer
* @public
*/
export default ApplicationSerializer.extend({
export default class EmploymentSerializer extends ApplicationSerializer {
/**
* The attribute mapping
*
Expand All @@ -24,8 +24,8 @@ export default ApplicationSerializer.extend({
* @property {String} end
* @public
*/
attrs: {
attrs = {
start: "start-date",
end: "end-date",
},
});
};
}

0 comments on commit 499f2be

Please sign in to comment.