@projectcaluma/ember-distribution 1.0.0-beta.11 → 1.0.0-beta.14
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +40 -0
- package/addon/components/cd-document-header.hbs +8 -8
- package/addon/components/cd-inquiry-answer-form.hbs +8 -13
- package/addon/components/cd-inquiry-answer-form.js +5 -1
- package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +3 -8
- package/addon/components/cd-inquiry-dialog/inquiry-part.hbs +14 -4
- package/addon/components/cd-inquiry-dialog/inquiry-part.js +10 -0
- package/addon/components/cd-inquiry-dialog/inquiry.hbs +8 -4
- package/addon/components/cd-inquiry-dialog.js +1 -0
- package/addon/components/cd-inquiry-edit-form.hbs +4 -1
- package/addon/components/cd-inquiry-new-form.hbs +32 -28
- package/addon/components/cd-inquiry-new-form.js +1 -3
- package/addon/config.js +7 -5
- package/addon/gql/fragments/inquiry.graphql +21 -4
- package/addon/gql/mutations/complete-inquiry-work-item.graphql +1 -1
- package/addon/gql/queries/inquiry-answer.graphql +3 -12
- package/addon/gql/queries/inquiry-dialog.graphql +2 -1
- package/addon/templates/application.hbs +1 -0
- package/addon/utils/inquiry-answer-status.js +34 -0
- package/addon/utils/inquiry-status.js +1 -1
- package/app/styles/@projectcaluma/ember-distribution.scss +1 -0
- package/app/styles/_group-list.scss +7 -0
- package/app/styles/_inquiry-divider.scss +1 -1
- package/app/utils/inquiry-answer-status.js +1 -0
- package/package.json +14 -14
- package/translations/de.yaml +13 -4
- package/translations/en.yaml +13 -4
- package/translations/fr.yaml +13 -4
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,43 @@
|
|
1
|
+
# [@projectcaluma/ember-distribution-v1.0.0-beta.14](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.13...@projectcaluma/ember-distribution-v1.0.0-beta.14) (2022-07-06)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **distribution:** fix title and deadline alignment and icon size ([eb6f495](https://github.com/projectcaluma/ember-caluma/commit/eb6f495408decdf7d735ad2dbc702ee7e4e0ede5))
|
7
|
+
* **distribution:** fix title layout with status ([dc49b82](https://github.com/projectcaluma/ember-caluma/commit/dc49b82b3d2f3b9962e9373506e286b4b7ca7225))
|
8
|
+
* **distribution:** order answers by configured question order ([668383f](https://github.com/projectcaluma/ember-caluma/commit/668383f5526403187ee66b4ac85cc8ace4ad061a))
|
9
|
+
|
10
|
+
|
11
|
+
### Features
|
12
|
+
|
13
|
+
* **distribution:** change needs-interaction status icon to text file ([695c6db](https://github.com/projectcaluma/ember-caluma/commit/695c6db4b7d87af87e334da7aece7e0f4b17129e))
|
14
|
+
|
15
|
+
# [@projectcaluma/ember-distribution-v1.0.0-beta.13](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.12...@projectcaluma/ember-distribution-v1.0.0-beta.13) (2022-06-09)
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* **caluma:** use new filter syntax of caluma ([7a00c03](https://github.com/projectcaluma/ember-caluma/commit/7a00c03a103933d9e48dd88adb7382441a298742))
|
21
|
+
|
22
|
+
|
23
|
+
### BREAKING CHANGES
|
24
|
+
|
25
|
+
* **caluma:** `ember-caluma` now requires Caluma version >=
|
26
|
+
8.0.0-beta.6
|
27
|
+
|
28
|
+
# [@projectcaluma/ember-distribution-v1.0.0-beta.12](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.11...@projectcaluma/ember-distribution-v1.0.0-beta.12) (2022-06-09)
|
29
|
+
|
30
|
+
|
31
|
+
### Bug Fixes
|
32
|
+
|
33
|
+
* **distribution:** fix selection of groups with the checkbox ([9f028dc](https://github.com/projectcaluma/ember-caluma/commit/9f028dc6ec16214249f43e519280397131006e7c))
|
34
|
+
* **distribution:** refetch inquiry answer after work-item completion ([60cfaca](https://github.com/projectcaluma/ember-caluma/commit/60cfaca04d94a44efc4950eeb1aecee767b4eeb5))
|
35
|
+
|
36
|
+
|
37
|
+
### Features
|
38
|
+
|
39
|
+
* **distribution:** add configurable status for unanswered inquiries ([e08247f](https://github.com/projectcaluma/ember-caluma/commit/e08247f6e2b73f859011f4eac7ffff71f101f546))
|
40
|
+
|
1
41
|
# [@projectcaluma/ember-distribution-v1.0.0-beta.11](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.10...@projectcaluma/ember-distribution-v1.0.0-beta.11) (2022-05-13)
|
2
42
|
|
3
43
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<p class="uk-text-large uk-margin-remove">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
@label={{
|
6
|
-
|
7
|
-
|
8
|
-
{{
|
1
|
+
<p class="uk-text-large uk-margin-remove uk-flex uk-flex-middle">
|
2
|
+
<div class="uk-width-expand">
|
3
|
+
{{@name}}
|
4
|
+
{{#if @status}}
|
5
|
+
<UkLabel @label={{@status}} class="uk-margin-left" />
|
6
|
+
{{/if}}
|
7
|
+
</div>
|
8
|
+
{{yield}}
|
9
9
|
</p>
|
10
10
|
|
11
11
|
{{#if (and @modifiedBy @modifiedAt)}}
|
@@ -5,19 +5,14 @@
|
|
5
5
|
>
|
6
6
|
<:default as |content|>
|
7
7
|
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
/>
|
15
|
-
|
16
|
-
<CdInquiryDialog::InquiryDeadline
|
17
|
-
@inquiry={{this.inquiry}}
|
18
|
-
class="uk-margin-remove uk-position-center-right"
|
19
|
-
/>
|
20
|
-
</div>
|
8
|
+
<CdDocumentHeader
|
9
|
+
@name={{content.document.rootForm.raw.name}}
|
10
|
+
@status={{if (eq this.inquiry.status "READY") this.answerStatus}}
|
11
|
+
@modifiedAt={{this.inquiry.childCase.document.modifiedContentAt}}
|
12
|
+
@modifiedBy={{this.inquiry.childCase.document.modifiedContentByUser}}
|
13
|
+
>
|
14
|
+
<CdInquiryDialog::InquiryDeadline @inquiry={{this.inquiry}} />
|
15
|
+
</CdDocumentHeader>
|
21
16
|
|
22
17
|
<hr />
|
23
18
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { inject as service } from "@ember/service";
|
2
2
|
import Component from "@glimmer/component";
|
3
|
-
import { queryManager } from "ember-apollo-client";
|
3
|
+
import { queryManager, getObservable } from "ember-apollo-client";
|
4
4
|
import { dropTask } from "ember-concurrency";
|
5
5
|
import { trackedTask } from "ember-resources/util/ember-concurrency";
|
6
6
|
|
@@ -8,6 +8,7 @@ import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
|
|
8
8
|
import config from "@projectcaluma/ember-distribution/config";
|
9
9
|
import completeInquiryWorkItemMutation from "@projectcaluma/ember-distribution/gql/mutations/complete-inquiry-work-item.graphql";
|
10
10
|
import inquiryAnswerQuery from "@projectcaluma/ember-distribution/gql/queries/inquiry-answer.graphql";
|
11
|
+
import inquiryAnswerStatus from "@projectcaluma/ember-distribution/utils/inquiry-answer-status";
|
11
12
|
|
12
13
|
export default class CdInquiryAnswerFormComponent extends Component {
|
13
14
|
@service intl;
|
@@ -19,6 +20,8 @@ export default class CdInquiryAnswerFormComponent extends Component {
|
|
19
20
|
|
20
21
|
@queryManager apollo;
|
21
22
|
|
23
|
+
@inquiryAnswerStatus({ inquiryProperty: "inquiry" }) answerStatus;
|
24
|
+
|
22
25
|
_inquiry = trackedTask(this, this.fetchInquiryAnswer, () => [
|
23
26
|
this.args.inquiry,
|
24
27
|
]);
|
@@ -79,6 +82,7 @@ export default class CdInquiryAnswerFormComponent extends Component {
|
|
79
82
|
},
|
80
83
|
});
|
81
84
|
|
85
|
+
yield getObservable(this._inquiry.value)?.refetch();
|
82
86
|
yield this.router.transitionTo("inquiry.index");
|
83
87
|
} catch (error) {
|
84
88
|
this.notification.danger(
|
@@ -1,17 +1,12 @@
|
|
1
1
|
{{#if this.deadline.value}}
|
2
2
|
<div
|
3
|
-
class="uk-
|
4
|
-
{{if
|
5
|
-
this.config.ui.small
|
6
|
-
'uk-margin-top uk-margin-right'
|
7
|
-
'uk-margin-medium-top uk-margin-medium-right'
|
8
|
-
}}
|
3
|
+
class="uk-flex-inline uk-flex-middle
|
9
4
|
{{if
|
10
5
|
this.isWithdrawn
|
11
6
|
'uk-text-muted'
|
12
7
|
(concat 'uk-text-' this.deadline.color)
|
13
|
-
}}
|
14
|
-
|
8
|
+
}}"
|
9
|
+
data-test-deadline
|
15
10
|
...attributes
|
16
11
|
>
|
17
12
|
<UkIcon
|
@@ -1,13 +1,23 @@
|
|
1
1
|
<div class="uk-margin-remove-last-child">
|
2
|
-
<
|
2
|
+
<div class="uk-flex uk-flex-middle uk-text-large" data-test-title>
|
3
3
|
{{#if (eq @type "request")}}
|
4
4
|
<UkIcon @icon="forward" class="uk-margin-small-right" />
|
5
|
-
|
5
|
+
<div class="uk-width-expand uk-margin-small-right">
|
6
|
+
{{group-name @inquiry.controllingGroups}}
|
7
|
+
{{#if
|
8
|
+
(and
|
9
|
+
(can "answer inquiry" @inquiry) (not @disabled) this.answerStatus
|
10
|
+
)
|
11
|
+
}}
|
12
|
+
<UkLabel @label={{this.answerStatus}} class="uk-margin-left" />
|
13
|
+
{{/if}}
|
14
|
+
</div>
|
6
15
|
{{else if (eq @type "answer")}}
|
7
16
|
<UkIcon @icon="reply" class="uk-margin-small-right" />
|
8
|
-
{{group-name @inquiry.addressedGroups}}
|
17
|
+
<div class="uk-width-expand">{{group-name @inquiry.addressedGroups}}</div>
|
9
18
|
{{/if}}
|
10
|
-
|
19
|
+
{{yield}}
|
20
|
+
</div>
|
11
21
|
|
12
22
|
<ul
|
13
23
|
class="uk-subnav uk-subnav-divider
|
@@ -8,6 +8,7 @@ import { confirm } from "ember-uikit";
|
|
8
8
|
import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
|
9
9
|
import config from "@projectcaluma/ember-distribution/config";
|
10
10
|
import withdrawInquiryMutation from "@projectcaluma/ember-distribution/gql/mutations/withdraw-inquiry.graphql";
|
11
|
+
import inquiryAnswerStatus from "@projectcaluma/ember-distribution/utils/inquiry-answer-status";
|
11
12
|
|
12
13
|
export default class CdInquiryDialogInquiryPartComponent extends Component {
|
13
14
|
@service notification;
|
@@ -18,6 +19,8 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
|
|
18
19
|
|
19
20
|
@config config;
|
20
21
|
|
22
|
+
@inquiryAnswerStatus answerStatus;
|
23
|
+
|
21
24
|
get date() {
|
22
25
|
const key = this.args.type === "request" ? "createdAt" : "closedAt";
|
23
26
|
|
@@ -31,9 +34,16 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
|
|
31
34
|
}
|
32
35
|
|
33
36
|
get answerInfo() {
|
37
|
+
const questions = this.config.inquiry.answer.infoQuestions ?? [];
|
38
|
+
|
34
39
|
return this.args.type === "answer"
|
35
40
|
? this.args.inquiry.childCase.document.info.edges
|
36
41
|
.filter((edge) => !isEmpty(edge.node.value))
|
42
|
+
.sort(
|
43
|
+
(a, b) =>
|
44
|
+
questions.indexOf(a.node.question.slug) -
|
45
|
+
questions.indexOf(b.node.question.slug)
|
46
|
+
)
|
37
47
|
.map((edge) => ({
|
38
48
|
question: edge.node.question.label,
|
39
49
|
value: edge.node.value,
|
@@ -3,14 +3,18 @@
|
|
3
3
|
{{if this.config.ui.small 'uk-card-small'}}"
|
4
4
|
>
|
5
5
|
<div class="uk-card-body">
|
6
|
-
<CdInquiryDialog::InquiryDeadline @inquiry={{@inquiry}} />
|
7
|
-
|
8
6
|
{{#if this.hasAnswer}}
|
9
|
-
<CdInquiryDialog::InquiryPart @inquiry={{@inquiry}} @type="answer"
|
7
|
+
<CdInquiryDialog::InquiryPart @inquiry={{@inquiry}} @type="answer">
|
8
|
+
<CdInquiryDialog::InquiryDeadline @inquiry={{@inquiry}} />
|
9
|
+
</CdInquiryDialog::InquiryPart>
|
10
10
|
|
11
11
|
<CdInquiryDialog::InquiryDivider @inquiry={{@inquiry}} />
|
12
12
|
{{/if}}
|
13
13
|
|
14
|
-
<CdInquiryDialog::InquiryPart @inquiry={{@inquiry}} @type="request"
|
14
|
+
<CdInquiryDialog::InquiryPart @inquiry={{@inquiry}} @type="request">
|
15
|
+
{{#unless this.hasAnswer}}
|
16
|
+
<CdInquiryDialog::InquiryDeadline @inquiry={{@inquiry}} />
|
17
|
+
{{/unless}}
|
18
|
+
</CdInquiryDialog::InquiryPart>
|
15
19
|
</div>
|
16
20
|
</article>
|
@@ -47,6 +47,7 @@ export default class CdInquiryDialogComponent extends Component {
|
|
47
47
|
deadlineQuestion: this.config.inquiry.deadlineQuestion,
|
48
48
|
statusQuestion: this.config.inquiry.answer.statusQuestion,
|
49
49
|
answerInfoQuestions: this.config.inquiry.answer.infoQuestions,
|
50
|
+
buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
|
50
51
|
includeNavigationData: true,
|
51
52
|
},
|
52
53
|
});
|
@@ -6,7 +6,10 @@
|
|
6
6
|
<:default as |content|>
|
7
7
|
<CdDocumentHeader
|
8
8
|
@name={{content.document.rootForm.raw.name}}
|
9
|
-
@
|
9
|
+
@status={{if
|
10
|
+
(eq this.inquiry.status "SUSPENDED")
|
11
|
+
(t "caluma.distribution.status.draft")
|
12
|
+
}}
|
10
13
|
@modifiedAt={{this.inquiry.document.modifiedContentAt}}
|
11
14
|
@modifiedBy={{this.inquiry.document.modifiedContentByUser}}
|
12
15
|
/>
|
@@ -80,34 +80,38 @@
|
|
80
80
|
<UkSpinner @ratio={{2}} />
|
81
81
|
</div>
|
82
82
|
{{else if this.groups.value.length}}
|
83
|
-
<
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
83
|
+
<table
|
84
|
+
class="uk-table uk-table-striped uk-table-hover uk-table-small uk-table-middle group-list"
|
85
|
+
>
|
86
|
+
<tbody>
|
87
|
+
{{#each this.groups.value as |group|}}
|
88
|
+
{{! template-lint-disable require-presentational-children }}
|
89
|
+
<tr
|
90
|
+
role="checkbox"
|
91
|
+
data-test-group={{group.identifier}}
|
92
|
+
{{on "click" (fn this.updateSelectedGroups group.identifier)}}
|
93
|
+
>
|
94
|
+
<td class="uk-padding-remove-right">
|
95
|
+
{{! template-lint-disable require-input-label no-nested-interactive }}
|
96
|
+
<input
|
97
|
+
type="checkbox"
|
98
|
+
class="uk-checkbox"
|
99
|
+
checked={{includes group.identifier this.selectedGroups}}
|
100
|
+
/>
|
101
|
+
</td>
|
102
|
+
<td class="uk-width-expand">{{group-name group.identifier}}</td>
|
103
|
+
<td class="uk-text-right">
|
104
|
+
{{#if group.config.icon}}
|
105
|
+
<UkIcon
|
106
|
+
@icon={{group.config.icon}}
|
107
|
+
class="uk-display-block uk-text-{{group.config.iconColor}}"
|
108
|
+
/>
|
109
|
+
{{/if}}
|
110
|
+
</td>
|
111
|
+
</tr>
|
112
|
+
{{/each}}
|
113
|
+
</tbody>
|
114
|
+
</table>
|
111
115
|
{{else}}
|
112
116
|
<div class="uk-text-center">
|
113
117
|
<UkIcon @icon="search" @ratio={{10}} class="uk-margin-top" />
|
@@ -44,9 +44,7 @@ export default class CdInquiryNewFormComponent extends Component {
|
|
44
44
|
}
|
45
45
|
|
46
46
|
@action
|
47
|
-
updateSelectedGroups(identifier
|
48
|
-
e.preventDefault();
|
49
|
-
|
47
|
+
updateSelectedGroups(identifier) {
|
50
48
|
this.selectedGroups = toggle(identifier, this.selectedGroups);
|
51
49
|
}
|
52
50
|
|
package/addon/config.js
CHANGED
@@ -38,20 +38,22 @@ export default function config(target, property) {
|
|
38
38
|
buttons: {
|
39
39
|
"compose-inquiry-answer": {
|
40
40
|
color: "primary",
|
41
|
-
label: "caluma.distribution.answer.
|
41
|
+
label: "caluma.distribution.answer.buttons.compose.label",
|
42
|
+
status: "caluma.distribution.answer.buttons.compose.status",
|
42
43
|
},
|
43
44
|
"confirm-inquiry-answer": {
|
44
45
|
color: "primary",
|
45
|
-
label: "caluma.distribution.answer.confirm",
|
46
|
+
label: "caluma.distribution.answer.buttons.confirm.label",
|
47
|
+
status: "caluma.distribution.answer.buttons.confirm.status",
|
46
48
|
},
|
47
49
|
"revise-inquiry-answer": {
|
48
50
|
color: "default",
|
49
|
-
label: "caluma.distribution.answer.revise",
|
51
|
+
label: "caluma.distribution.answer.buttons.revise.label",
|
50
52
|
},
|
51
53
|
"adjust-inquiry-answer": {
|
52
54
|
color: "primary",
|
53
|
-
label:
|
54
|
-
|
55
|
+
label: "caluma.distribution.answer.buttons.adjust.label",
|
56
|
+
status: "caluma.distribution.answer.buttons.adjust.status",
|
55
57
|
},
|
56
58
|
},
|
57
59
|
},
|
@@ -1,6 +1,21 @@
|
|
1
|
+
fragment InquiryAnswerButtons on Case {
|
2
|
+
workItems(filter: [{ tasks: $buttonTasks }, { status: READY }]) {
|
3
|
+
edges {
|
4
|
+
node {
|
5
|
+
id
|
6
|
+
status
|
7
|
+
task {
|
8
|
+
id
|
9
|
+
slug
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
1
16
|
fragment InquiryDeadlineDocument on Document {
|
2
17
|
id
|
3
|
-
deadline: answers(question: $deadlineQuestion) {
|
18
|
+
deadline: answers(filter: [{ question: $deadlineQuestion }]) {
|
4
19
|
edges {
|
5
20
|
node {
|
6
21
|
id
|
@@ -14,7 +29,7 @@ fragment InquiryDeadlineDocument on Document {
|
|
14
29
|
|
15
30
|
fragment InquiryStatusDocument on Document {
|
16
31
|
id
|
17
|
-
status: answers(question: $statusQuestion) {
|
32
|
+
status: answers(filter: [{ question: $statusQuestion }]) {
|
18
33
|
edges {
|
19
34
|
node {
|
20
35
|
id
|
@@ -33,7 +48,7 @@ fragment InquiryStatusDocument on Document {
|
|
33
48
|
fragment InquiryRequest on Document {
|
34
49
|
id
|
35
50
|
...InquiryDeadlineDocument
|
36
|
-
info: answers(question: $infoQuestion) {
|
51
|
+
info: answers(filter: [{ question: $infoQuestion }]) {
|
37
52
|
edges {
|
38
53
|
node {
|
39
54
|
id
|
@@ -61,15 +76,17 @@ fragment InquiryDialog on WorkItem {
|
|
61
76
|
}
|
62
77
|
childCase {
|
63
78
|
id
|
79
|
+
...InquiryAnswerButtons
|
64
80
|
document {
|
65
81
|
...InquiryStatusDocument
|
66
|
-
info: answers(questions: $answerInfoQuestions) {
|
82
|
+
info: answers(filter: [{ questions: $answerInfoQuestions }]) {
|
67
83
|
edges {
|
68
84
|
node {
|
69
85
|
id
|
70
86
|
question {
|
71
87
|
id
|
72
88
|
label
|
89
|
+
slug
|
73
90
|
}
|
74
91
|
... on StringAnswer {
|
75
92
|
value
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#import InquiryDeadlineDocument, InquiryRequest from '../fragments/inquiry.graphql'
|
1
|
+
#import InquiryAnswerButtons, InquiryDeadlineDocument, InquiryRequest from '../fragments/inquiry.graphql'
|
2
2
|
|
3
3
|
query InquiryAnswer(
|
4
4
|
$inquiry: ID!
|
@@ -14,6 +14,7 @@ query InquiryAnswer(
|
|
14
14
|
addressedGroups
|
15
15
|
controllingGroups
|
16
16
|
createdAt
|
17
|
+
closedAt
|
17
18
|
task {
|
18
19
|
id
|
19
20
|
slug
|
@@ -29,17 +30,7 @@ query InquiryAnswer(
|
|
29
30
|
modifiedContentAt
|
30
31
|
modifiedContentByUser
|
31
32
|
}
|
32
|
-
|
33
|
-
edges {
|
34
|
-
node {
|
35
|
-
id
|
36
|
-
task {
|
37
|
-
id
|
38
|
-
slug
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
33
|
+
...InquiryAnswerButtons
|
43
34
|
}
|
44
35
|
}
|
45
36
|
}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
#import InquiryDialog, InquiryDeadlineDocument, InquiryStatusDocument, InquiryRequest from '../fragments/inquiry.graphql'
|
1
|
+
#import InquiryAnswerButtons, InquiryDialog, InquiryDeadlineDocument, InquiryStatusDocument, InquiryRequest from '../fragments/inquiry.graphql'
|
2
2
|
|
3
3
|
query InquiryDialog(
|
4
4
|
$task: ID!
|
5
|
+
$buttonTasks: [String]!
|
5
6
|
$statusQuestion: ID!
|
6
7
|
$deadlineQuestion: ID!
|
7
8
|
$infoQuestion: ID!
|
@@ -11,6 +11,7 @@
|
|
11
11
|
<div class={{if this.config.ui.stack "uk-width-1-1" "uk-width-1-3"}}>
|
12
12
|
<CdNavigation @caseId={{@model}} />
|
13
13
|
</div>
|
14
|
+
{{#if this.config.ui.stack}}<div class="uk-width-1-1"><hr /></div>{{/if}}
|
14
15
|
<div class={{if this.config.ui.stack "uk-width-1-1" "uk-width-2-3"}}>
|
15
16
|
{{outlet}}
|
16
17
|
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { assert } from "@ember/debug";
|
2
|
+
import { get } from "@ember/object";
|
3
|
+
|
4
|
+
import { createDecorator } from "@projectcaluma/ember-distribution/-private/decorator";
|
5
|
+
|
6
|
+
function decorator(
|
7
|
+
target,
|
8
|
+
key,
|
9
|
+
desc,
|
10
|
+
{ inquiryProperty = "args.inquiry" } = {}
|
11
|
+
) {
|
12
|
+
assert(
|
13
|
+
`The @projectcaluma/ember-distribution config must be injected in order to use @inquiryAnswerStatus: \`@config config\``,
|
14
|
+
Object.prototype.hasOwnProperty.call(target, "config")
|
15
|
+
);
|
16
|
+
|
17
|
+
return {
|
18
|
+
get() {
|
19
|
+
const inquiry = get(this, inquiryProperty);
|
20
|
+
const readyWorkItems =
|
21
|
+
inquiry.childCase?.workItems.edges
|
22
|
+
.filter((edge) => edge.node.status === "READY")
|
23
|
+
.map((edge) => edge.node.task.slug) ?? [];
|
24
|
+
|
25
|
+
const buttonConfig = Object.entries(
|
26
|
+
this.config.inquiry.answer.buttons
|
27
|
+
).find(([task]) => readyWorkItems.includes(task))?.[1];
|
28
|
+
|
29
|
+
return buttonConfig?.status ? this.intl.t(buttonConfig.status) : null;
|
30
|
+
},
|
31
|
+
};
|
32
|
+
}
|
33
|
+
|
34
|
+
export default createDecorator(decorator);
|
@@ -10,7 +10,7 @@ export const ICON_MAP = {
|
|
10
10
|
[INQUIRY_STATUS.SENT]: "comment",
|
11
11
|
[INQUIRY_STATUS.POSITIVE]: "check",
|
12
12
|
[INQUIRY_STATUS.NEGATIVE]: "close",
|
13
|
-
[INQUIRY_STATUS.NEEDS_INTERACTION]: "
|
13
|
+
[INQUIRY_STATUS.NEEDS_INTERACTION]: "file-text",
|
14
14
|
};
|
15
15
|
|
16
16
|
export const COLOR_MAP = {
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "@projectcaluma/ember-distribution/utils/inquiry-answer-status";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@projectcaluma/ember-distribution",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.14",
|
4
4
|
"description": "Ember engine for the Caluma distribution module.",
|
5
5
|
"keywords": [
|
6
6
|
"ember-addon",
|
@@ -19,23 +19,23 @@
|
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"@ember/string": "^3.0.0",
|
22
|
-
"@embroider/macros": "^1.
|
22
|
+
"@embroider/macros": "^1.8.3",
|
23
23
|
"@glimmer/component": "^1.1.2",
|
24
24
|
"@glimmer/tracking": "^1.1.2",
|
25
25
|
"@projectcaluma/ember-core": "^11.0.0-beta.7",
|
26
|
-
"@projectcaluma/ember-form": "^11.0.0-beta.
|
26
|
+
"@projectcaluma/ember-form": "^11.0.0-beta.21",
|
27
27
|
"@projectcaluma/ember-workflow": "^11.0.0-beta.7",
|
28
|
-
"ember-apollo-client": "
|
29
|
-
"ember-auto-import": "^2.4.
|
28
|
+
"ember-apollo-client": "~4.0.2",
|
29
|
+
"ember-auto-import": "^2.4.2",
|
30
30
|
"ember-can": "^4.2.0",
|
31
31
|
"ember-cli-babel": "^7.26.11",
|
32
|
-
"ember-cli-htmlbars": "^6.0
|
32
|
+
"ember-cli-htmlbars": "^6.1.0",
|
33
33
|
"ember-concurrency": "^2.2.1",
|
34
34
|
"ember-engines-router-service": "^0.3.0",
|
35
35
|
"ember-fetch": "^8.1.1",
|
36
36
|
"ember-intl": "^5.7.2",
|
37
37
|
"ember-pikaday": "^4.0.0",
|
38
|
-
"ember-resources": "^
|
38
|
+
"ember-resources": "^5.0.2",
|
39
39
|
"ember-svg-jar": "^2.3.4",
|
40
40
|
"ember-test-selectors": "^6.0.0",
|
41
41
|
"ember-uikit": "^5.1.3",
|
@@ -47,10 +47,10 @@
|
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
49
|
"@ember/optional-features": "2.0.0",
|
50
|
-
"@ember/test-helpers": "2.
|
51
|
-
"@embroider/test-setup": "1.
|
52
|
-
"@faker-js/faker": "
|
53
|
-
"@projectcaluma/ember-testing": "11.0.0-beta.
|
50
|
+
"@ember/test-helpers": "2.8.1",
|
51
|
+
"@embroider/test-setup": "1.8.3",
|
52
|
+
"@faker-js/faker": "7.3.0",
|
53
|
+
"@projectcaluma/ember-testing": "11.0.0-beta.9",
|
54
54
|
"broccoli-asset-rev": "3.0.0",
|
55
55
|
"ember-cli": "3.28.5",
|
56
56
|
"ember-cli-code-coverage": "1.0.3",
|
@@ -71,12 +71,12 @@
|
|
71
71
|
"ember-source-channel-url": "3.0.0",
|
72
72
|
"ember-try": "2.0.0",
|
73
73
|
"loader.js": "4.7.0",
|
74
|
-
"miragejs": "0.1.
|
74
|
+
"miragejs": "0.1.45",
|
75
75
|
"npm-run-all": "4.1.5",
|
76
76
|
"qunit": "2.19.1",
|
77
77
|
"qunit-dom": "2.0.0",
|
78
|
-
"sass": "1.
|
79
|
-
"webpack": "5.
|
78
|
+
"sass": "1.53.0",
|
79
|
+
"webpack": "5.73.0"
|
80
80
|
},
|
81
81
|
"engines": {
|
82
82
|
"node": "12.* || 14.* || >= 16"
|
package/translations/de.yaml
CHANGED
@@ -29,14 +29,23 @@ caluma:
|
|
29
29
|
|
30
30
|
answer:
|
31
31
|
link: "Beantworten"
|
32
|
-
release-for-review: "Zur Kontrolle freigeben"
|
33
|
-
release-adjustment-for-review: "Anpassung zur Kontrolle freigeben"
|
34
|
-
confirm: "Bestätigen"
|
35
|
-
revise: "Überarbeiten"
|
36
32
|
|
37
33
|
complete-error: "Fehler beim Abschliessen der Aufgabe"
|
38
34
|
complete-not-allowed: "Sie sind nicht berechtigt diese Antwort zu versenden."
|
39
35
|
|
36
|
+
buttons:
|
37
|
+
compose:
|
38
|
+
label: "Zur Kontrolle freigeben"
|
39
|
+
status: "In Bearbeitung"
|
40
|
+
adjust:
|
41
|
+
label: "Anpassung zur Kontrolle freigeben"
|
42
|
+
status: "In Überarbeitung"
|
43
|
+
confirm:
|
44
|
+
label: "Bestätigen"
|
45
|
+
status: "In Prüfung"
|
46
|
+
revise:
|
47
|
+
label: "Überarbeiten"
|
48
|
+
|
40
49
|
new:
|
41
50
|
title: "Neue Anfrage"
|
42
51
|
search: "Suchen..."
|
package/translations/en.yaml
CHANGED
@@ -30,14 +30,23 @@ caluma:
|
|
30
30
|
|
31
31
|
answer:
|
32
32
|
link: "Answer"
|
33
|
-
release-for-review: "Release for review"
|
34
|
-
release-adjustment-for-review: "Release adjustment for review"
|
35
|
-
confirm: "Confirm"
|
36
|
-
revise: "Revise"
|
37
33
|
|
38
34
|
complete-error: "Error while completing the work item"
|
39
35
|
complete-not-allowed: "You are not allowed to send this inquiry answer."
|
40
36
|
|
37
|
+
buttons:
|
38
|
+
compose:
|
39
|
+
label: "Release for review"
|
40
|
+
status: "In progress"
|
41
|
+
adjust:
|
42
|
+
label: "Release adjustment for review"
|
43
|
+
status: "In revision"
|
44
|
+
confirm:
|
45
|
+
label: "Confirm"
|
46
|
+
status: "In review"
|
47
|
+
revise:
|
48
|
+
label: "Revise"
|
49
|
+
|
41
50
|
new:
|
42
51
|
title: "New inquiry"
|
43
52
|
search: "Search..."
|
package/translations/fr.yaml
CHANGED
@@ -29,14 +29,23 @@ caluma:
|
|
29
29
|
|
30
30
|
answer:
|
31
31
|
link: "Répondre"
|
32
|
-
release-for-review: "Valider pour vérification"
|
33
|
-
release-adjustment-for-review: "Valider la révision pour vérification"
|
34
|
-
confirm: "Confirmer"
|
35
|
-
revise: "Réviser"
|
36
32
|
|
37
33
|
complete-error: "Erreur lors de la clôture de la tâche"
|
38
34
|
complete-not-allowed: "Vous n'êtes pas autorisé à envoyer cette réponse."
|
39
35
|
|
36
|
+
buttons:
|
37
|
+
compose:
|
38
|
+
label: "Valider pour vérification"
|
39
|
+
status: "En cours"
|
40
|
+
adjust:
|
41
|
+
label: "Valider la révision pour vérification"
|
42
|
+
status: "En révision"
|
43
|
+
confirm:
|
44
|
+
label: "Confirmer"
|
45
|
+
status: "En examen"
|
46
|
+
revise:
|
47
|
+
label: "Réviser"
|
48
|
+
|
40
49
|
new:
|
41
50
|
title: "Nouvelle demande"
|
42
51
|
search: "Chercher..."
|