diff --git a/ember/app/caluma-query/models/work-item.js b/ember/app/caluma-query/models/work-item.js index 079b4b9f..cb2496e9 100644 --- a/ember/app/caluma-query/models/work-item.js +++ b/ember/app/caluma-query/models/work-item.js @@ -10,7 +10,7 @@ export default class CustomWorkItemModel extends WorkItemModel { } get case() { - return this.raw.case.parentWorkItem?.case || this.raw.case; + return this.raw.case; } static fragment = `{ diff --git a/ember/app/cases/detail/work-items/edit/form/controller.js b/ember/app/cases/detail/work-items/edit/form/controller.js index f230e767..69a56252 100644 --- a/ember/app/cases/detail/work-items/edit/form/controller.js +++ b/ember/app/cases/detail/work-items/edit/form/controller.js @@ -1,9 +1,7 @@ import Controller from "@ember/controller"; import { action } from "@ember/object"; import { inject as service } from "@ember/service"; -import completeWorkItem from "caluma-portal-demo/gql/mutations/complete-work-item"; import { queryManager } from "ember-apollo-client"; -import { dropTask } from "ember-concurrency-decorators"; export default class CasesDetailWorkItemsEditFormController extends Controller { @queryManager apollo; @@ -15,16 +13,6 @@ export default class CasesDetailWorkItemsEditFormController extends Controller { return this.model.value[0]; } - @dropTask() - *completeWorkItem() { - yield this.apollo.mutate({ - mutation: completeWorkItem, - variables: { id: this.workItem.id }, - }); - - this.actionButtonOnSuccess(); - } - @action actionButtonOnSuccess() { this.notification.success("workItem.finishSuccess"); diff --git a/ember/app/cases/detail/work-items/edit/form/template.hbs b/ember/app/cases/detail/work-items/edit/form/template.hbs index 81226f37..6467f59a 100644 --- a/ember/app/cases/detail/work-items/edit/form/template.hbs +++ b/ember/app/cases/detail/work-items/edit/form/template.hbs @@ -7,7 +7,6 @@ {{else}} -
+
{{#if this.workItem.isCompleted}} -
- +
+ {{t "workItems.closedBy"}} {{this.workItem.closedByUser.fullName}}
-
- +
+ {{t "workItems.closedAt"}} {{ @@ -81,10 +81,7 @@
- + + {{t "workItems.actions.finish"}} +
{{/if}} diff --git a/ember/app/components/context-menu/template.hbs b/ember/app/components/context-menu/template.hbs index 58f314d0..6f66705d 100644 --- a/ember/app/components/context-menu/template.hbs +++ b/ember/app/components/context-menu/template.hbs @@ -6,9 +6,8 @@ -
-
-
    +
    +
      {{#each @actions as |action|}}
    • {{/each}}
    -
diff --git a/ember/app/components/filters/radio-buttons/template.hbs b/ember/app/components/filters/radio-buttons/template.hbs index 79291bd6..6ed58f7e 100644 --- a/ember/app/components/filters/radio-buttons/template.hbs +++ b/ember/app/components/filters/radio-buttons/template.hbs @@ -1,4 +1,4 @@ -
+
{{#each @options as |option|}} diff --git a/ember/app/components/filters/template.hbs b/ember/app/components/filters/template.hbs index 62fe154e..0129ae50 100644 --- a/ember/app/components/filters/template.hbs +++ b/ember/app/components/filters/template.hbs @@ -1,3 +1,3 @@ -
+
{{yield (hash RadioButtons=(component "filters/radio-buttons"))}}
diff --git a/ember/app/components/nav-bar/template.hbs b/ember/app/components/nav-bar/template.hbs index 373d7681..313b5aa0 100644 --- a/ember/app/components/nav-bar/template.hbs +++ b/ember/app/components/nav-bar/template.hbs @@ -8,7 +8,7 @@ - {{t "nav.cases"}} + {{t "nav.cases"}} {{t "nav.workItems"}} {{t "nav.form-builder"}} {{t "nav.alexandria"}} diff --git a/ember/app/components/work-item-list/template.hbs b/ember/app/components/work-item-list/template.hbs index 0f37976c..156b0463 100644 --- a/ember/app/components/work-item-list/template.hbs +++ b/ember/app/components/work-item-list/template.hbs @@ -7,13 +7,11 @@ />
- - {{ - t - "global.paginationInfo" - count=@query.value.length - total=@query.totalCount - htmlSafe=true - }} - + {{ + t + "global.paginationInfo" + count=@query.value.length + total=@query.totalCount + htmlSafe=true + }}
diff --git a/ember/app/styles/app.scss b/ember/app/styles/app.scss index ae6f895d..eb23edfc 100644 --- a/ember/app/styles/app.scss +++ b/ember/app/styles/app.scss @@ -12,7 +12,6 @@ $modal-z-index: 1; @import "@projectcaluma/ember-form-builder"; @import "components/nav-bar"; -@import "components/filters"; main { display: flex; diff --git a/ember/app/styles/components/filters/_radio-buttons.scss b/ember/app/styles/components/filters/_radio-buttons.scss deleted file mode 100644 index 64c6e3c5..00000000 --- a/ember/app/styles/components/filters/_radio-buttons.scss +++ /dev/null @@ -1,24 +0,0 @@ -.radio-buttons { - display: flex; - - &__button { - display: inline-flex; - margin-right: -1px; - border: 1px solid #666; - border-radius: 3px; - color: #666; - - > label { - display: flex; - @extend .uk-button; - } - - > input[type="radio"] { - display: none; - } - - > input:checked + label { - background-color: #dddddd; - } - } -} diff --git a/ember/app/styles/components/filters/index.scss b/ember/app/styles/components/filters/index.scss deleted file mode 100644 index b481e7db..00000000 --- a/ember/app/styles/components/filters/index.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import "radio-buttons"; - -.filters { - display: flex; - - & > div { - margin-right: 10px; - } -} diff --git a/ember/app/work-items/controller.js b/ember/app/work-items/controller.js index 9291fed2..a6f9d44d 100644 --- a/ember/app/work-items/controller.js +++ b/ember/app/work-items/controller.js @@ -1,5 +1,5 @@ import Controller from "@ember/controller"; -import { action, set } from "@ember/object"; +import { action } from "@ember/object"; import { tracked } from "@glimmer/tracking"; import { useCalumaQuery } from "@projectcaluma/ember-core/caluma-query"; import { allWorkItems } from "@projectcaluma/ember-core/caluma-query/queries"; @@ -7,7 +7,6 @@ import { allWorkItems } from "@projectcaluma/ember-core/caluma-query/queries"; export default class WorkItemsController extends Controller { queryParams = ["order", "status"]; - // Filters @tracked order = "urgent"; @tracked status = "open"; @@ -73,6 +72,6 @@ export default class WorkItemsController extends Controller { @action updateFilter(type, value) { - set(this, type, value); + this[type] = value; } } diff --git a/ember/package.json b/ember/package.json index 2612b514..7c505aa2 100644 --- a/ember/package.json +++ b/ember/package.json @@ -24,7 +24,7 @@ "@ember/optional-features": "2.0.0", "@ember/render-modifiers": "2.0.4", "@ember/test-helpers": "2.6.0", - "@faker-js/faker": "6.0.0", + "@faker-js/faker": "6.1.1", "@glimmer/component": "1.0.4", "@glimmer/tracking": "1.0.4", "@projectcaluma/ember-core": "11.0.0-beta.5", diff --git a/ember/yarn.lock b/ember/yarn.lock index 444e883c..c16e337c 100644 --- a/ember/yarn.lock +++ b/ember/yarn.lock @@ -1448,7 +1448,12 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@faker-js/faker@6.0.0", "@faker-js/faker@^6.0.0": +"@faker-js/faker@6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-6.1.1.tgz#adf002d986e1751daadfcf65d1cc03944dab3ced" + integrity sha512-8yq1LJVGn4GY06riLddIU1LbJm15yjt46hjfkpWNpH/mqdciPOBVzicKOJxzQNrGgVHVBxcdm7sgwjI/Y19MYw== + +"@faker-js/faker@^6.0.0": version "6.0.0" resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-6.0.0.tgz#b613ebf5f5ebb2ab987afb567d8b7fe860199c13" integrity sha512-10zLCKhp3YEmBuko71ivcMoIZcCLXgQVck6aNswX+AWwaek/L8S3yz9i8m3tHigRkcF6F2vI+qtdtyySHK+bGA==