From 4dac67e615b44efb9b4fa1f3140bdeb2f97bcbd1 Mon Sep 17 00:00:00 2001 From: ThomasFont3721 Date: Tue, 31 Mar 2020 09:29:40 +0200 Subject: [PATCH] new object --- app/models/developer.js | 1 + app/models/project.js | 1 + app/models/story.js | 3 +++ app/templates/projects.hbs | 5 +++++ 4 files changed, 10 insertions(+) diff --git a/app/models/developer.js b/app/models/developer.js index 462e44b..7ccc14c 100644 --- a/app/models/developer.js +++ b/app/models/developer.js @@ -9,6 +9,7 @@ export default Model.extend({ ownerProjects: DS.hasMany('project', {inverse: 'owner'}), projects: DS.hasMany('project', {inverse: 'developers'}), stories: DS.hasMany('story'), + follow: DS.hasMany('developer'), fullName: computed('name', 'fname', function () { return this.get('name')+" "+this.get('fname'); }) diff --git a/app/models/project.js b/app/models/project.js index d39db9b..c2fcd96 100644 --- a/app/models/project.js +++ b/app/models/project.js @@ -8,6 +8,7 @@ export default Model.extend({ description: DS.attr(), startDate: DS.attr('utc'), endDate: DS.attr('utc'), + modificationDate: DS.attr('utc'), stories: DS.hasMany('story'), owner: DS.belongsTo('developer'), developers: DS.hasMany('developer'), diff --git a/app/models/story.js b/app/models/story.js index ddfc868..0859025 100644 --- a/app/models/story.js +++ b/app/models/story.js @@ -13,6 +13,9 @@ export default Model.extend({ tasks: DS.hasMany('task'), step: DS.belongsTo('step'), estimate: DS.attr('number'), + createDate: DS.attr('utc'), + endDate: DS.attr('utc'), + modificationDate: DS.attr('utc'), ratioTasks: computed('tasks.@each.finished', function () { let tasks = this.get('tasks'); var finished = 0; diff --git a/app/templates/projects.hbs b/app/templates/projects.hbs index 163fdf4..a2702f4 100644 --- a/app/templates/projects.hbs +++ b/app/templates/projects.hbs @@ -19,6 +19,11 @@
{{project.description}}
+
+

+ Vertically fitted segment +

+
{{pluralize project.stories.length "No stories" "1 story" " stories"}}