@projectcaluma/ember-distribution 11.0.0-beta.29 → 11.0.0-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/abilities/distribution.js +9 -0
- package/addon/abilities/inquiry.js +1 -1
- package/addon/components/cd-document-header.hbs +3 -12
- package/addon/components/cd-inquiry-answer-form.hbs +140 -57
- package/addon/components/cd-inquiry-answer-form.js +20 -2
- package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +5 -10
- package/addon/components/cd-inquiry-dialog/inquiry-deadline.js +14 -0
- package/addon/components/cd-inquiry-dialog/inquiry-part.hbs +116 -89
- package/addon/components/cd-inquiry-dialog.js +11 -15
- package/addon/components/cd-inquiry-edit-form.hbs +12 -4
- package/addon/components/cd-inquiry-edit-form.js +2 -2
- package/addon/components/cd-inquiry-new-form/bulk-edit.hbs +20 -0
- package/addon/components/cd-inquiry-new-form/bulk-edit.js +116 -0
- package/addon/components/cd-inquiry-new-form/select.hbs +71 -0
- package/addon/components/cd-inquiry-new-form/select.js +76 -0
- package/addon/components/cd-inquiry-new-form.hbs +29 -86
- package/addon/components/cd-inquiry-new-form.js +1 -100
- package/addon/components/cd-navigation/controls.hbs +112 -66
- package/addon/components/cd-navigation/controls.js +29 -14
- package/addon/components/cd-navigation/item.hbs +22 -11
- package/addon/components/cd-navigation/section.hbs +15 -21
- package/addon/components/cd-navigation/section.js +5 -13
- package/addon/components/cd-navigation.hbs +4 -9
- package/addon/config.js +19 -0
- package/addon/gql/fragments/inquiry-answer.graphql +57 -0
- package/addon/gql/fragments/inquiry-request.graphql +26 -0
- package/addon/gql/mutations/complete-inquiry-work-item.graphql +24 -13
- package/addon/gql/mutations/reopen-inquiry.graphql +3 -13
- package/addon/gql/queries/{control-work-items.graphql → controls.graphql} +18 -1
- package/addon/gql/queries/incomplete-inquiries.graphql +1 -1
- package/addon/gql/queries/inquiry-answer.graphql +5 -1
- package/addon/gql/queries/inquiry-dialog.graphql +31 -2
- package/addon/gql/queries/inquiry-form.graphql +26 -0
- package/addon/gql/queries/{inquiry-navigation.graphql → navigation.graphql} +24 -6
- package/addon/routes/application.js +7 -0
- package/addon/routes/index.js +15 -28
- package/addon/routes/inquiry/index.js +1 -4
- package/addon/routes/new.js +1 -5
- package/addon/services/distribution.js +81 -9
- package/addon/templates/application.hbs +7 -5
- package/addon/templates/index.hbs +1 -5
- package/addon/templates/inquiry/index.hbs +1 -5
- package/addon/templates/new.hbs +0 -1
- package/addon/utils/inquiry-deadline.js +3 -1
- package/app/components/cd-inquiry-new-form/bulk-edit.js +1 -0
- package/app/components/cd-inquiry-new-form/select.js +1 -0
- package/app/styles/_answer-form.scss +4 -0
- package/package.json +17 -17
- package/translations/de.yaml +31 -9
- package/translations/en.yaml +31 -10
- package/translations/fr.yaml +31 -9
- package/addon/components/cd-navigation.js +0 -53
- package/addon/gql/fragments/inquiry.graphql +0 -117
- package/addon/modifiers/pikaday.js +0 -2
|
@@ -1,67 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
{{#if
|
|
2
|
+
(or
|
|
3
|
+
(can "send inquiries of distribution")
|
|
4
|
+
(can "create inquiry of distribution")
|
|
5
|
+
(can "complete distribution")
|
|
6
|
+
(can "reopen distribution")
|
|
7
|
+
)
|
|
8
|
+
}}
|
|
9
|
+
{{#if @useButtons}}
|
|
10
|
+
{{#if (can "create inquiry of distribution")}}
|
|
11
|
+
<LinkTo
|
|
12
|
+
@route="new"
|
|
13
|
+
class="uk-button uk-button-primary"
|
|
14
|
+
data-test-new-inquiry
|
|
15
|
+
>
|
|
16
|
+
{{t "caluma.distribution.start"}}
|
|
17
|
+
</LinkTo>
|
|
18
|
+
{{/if}}
|
|
19
|
+
{{#if (can "complete distribution")}}
|
|
20
|
+
<UkButton
|
|
21
|
+
@onClick={{perform this.completeDistribution}}
|
|
22
|
+
@label={{t "caluma.distribution.skip"}}
|
|
23
|
+
@loading={{this.completeDistribution.isRunning}}
|
|
24
|
+
@disabled={{this.completeDistribution.isRunning}}
|
|
25
|
+
data-test-complete-distribution
|
|
26
|
+
/>
|
|
27
|
+
{{/if}}
|
|
28
|
+
{{#if (can "reopen distribution")}}
|
|
29
|
+
<UkButton
|
|
30
|
+
@onClick={{perform this.reopenDistribution}}
|
|
31
|
+
@label={{t "caluma.distribution.reopen"}}
|
|
32
|
+
@loading={{this.reopenDistribution.isRunning}}
|
|
33
|
+
@disabled={{this.reopenDistribution.isRunning}}
|
|
34
|
+
data-test-reopen-distribution
|
|
35
|
+
/>
|
|
36
|
+
{{/if}}
|
|
37
|
+
{{else}}
|
|
38
|
+
<li class="uk-margin-small">
|
|
39
|
+
<div class="uk-text-center">
|
|
40
|
+
{{#if (can "send inquiries of distribution")}}
|
|
41
|
+
<button
|
|
42
|
+
type="button"
|
|
43
|
+
class="uk-icon-button uk-button-primary"
|
|
44
|
+
{{uk-tooltip (t "caluma.distribution.send")}}
|
|
45
|
+
data-test-send-pending-inquiries
|
|
46
|
+
{{on "click" (perform this.sendInquiries)}}
|
|
47
|
+
>
|
|
48
|
+
{{#if this.sendInquiries.isRunning}}
|
|
49
|
+
<UkSpinner @ratio={{0.6}} />
|
|
50
|
+
{{else}}
|
|
51
|
+
<UkIcon @icon="comment" />
|
|
52
|
+
{{/if}}
|
|
53
|
+
</button>
|
|
54
|
+
{{/if}}
|
|
55
|
+
{{#if (can "create inquiry of distribution")}}
|
|
56
|
+
<LinkTo
|
|
57
|
+
@route="new"
|
|
58
|
+
class="uk-icon-button"
|
|
59
|
+
{{uk-tooltip (t "caluma.distribution.new.title")}}
|
|
60
|
+
data-test-new-inquiry
|
|
61
|
+
>
|
|
62
|
+
<UkIcon @icon="plus" />
|
|
63
|
+
</LinkTo>
|
|
64
|
+
{{/if}}
|
|
65
|
+
{{#if (can "check inquiries of distribution")}}
|
|
66
|
+
<button
|
|
67
|
+
type="button"
|
|
68
|
+
class="uk-icon-button"
|
|
69
|
+
{{uk-tooltip (t "caluma.distribution.check-inquiries")}}
|
|
70
|
+
data-test-check-inquiries
|
|
71
|
+
{{on "click" (perform this.checkInquiries)}}
|
|
72
|
+
>
|
|
73
|
+
{{#if this.checkInquiries.isRunning}}
|
|
74
|
+
<UkSpinner @ratio={{0.6}} />
|
|
75
|
+
{{else}}
|
|
76
|
+
<UkIcon @icon="check" />
|
|
77
|
+
{{/if}}
|
|
78
|
+
</button>
|
|
79
|
+
{{/if}}
|
|
80
|
+
{{#if (can "complete distribution")}}
|
|
81
|
+
<button
|
|
82
|
+
type="button"
|
|
83
|
+
class="uk-icon-button"
|
|
84
|
+
{{uk-tooltip (t "caluma.distribution.complete")}}
|
|
85
|
+
data-test-complete-distribution
|
|
86
|
+
{{on "click" (perform this.completeDistribution)}}
|
|
87
|
+
>
|
|
88
|
+
{{#if this.completeDistribution.isRunning}}
|
|
89
|
+
<UkSpinner @ratio={{0.6}} />
|
|
90
|
+
{{else}}
|
|
91
|
+
<UkIcon @icon="lock" />
|
|
92
|
+
{{/if}}
|
|
93
|
+
</button>
|
|
94
|
+
{{/if}}
|
|
95
|
+
{{#if (can "reopen distribution")}}
|
|
96
|
+
<button
|
|
97
|
+
type="button"
|
|
98
|
+
class="uk-icon-button"
|
|
99
|
+
{{uk-tooltip (t "caluma.distribution.reopen")}}
|
|
100
|
+
data-test-reopen-distribution
|
|
101
|
+
{{on "click" (perform this.reopenDistribution)}}
|
|
102
|
+
>
|
|
103
|
+
{{#if this.reopenDistribution.isRunning}}
|
|
104
|
+
<UkSpinner @ratio={{0.6}} />
|
|
105
|
+
{{else}}
|
|
106
|
+
<UkIcon @icon="refresh" />
|
|
107
|
+
{{/if}}
|
|
108
|
+
</button>
|
|
109
|
+
{{/if}}
|
|
110
|
+
</div>
|
|
111
|
+
</li>
|
|
16
112
|
{{/if}}
|
|
17
|
-
|
|
18
|
-
<LinkTo
|
|
19
|
-
@route="new"
|
|
20
|
-
class="uk-icon-button"
|
|
21
|
-
{{uk-tooltip (t "caluma.distribution.new.title")}}
|
|
22
|
-
data-test-new-inquiry
|
|
23
|
-
>
|
|
24
|
-
<UkIcon @icon="plus" />
|
|
25
|
-
</LinkTo>
|
|
26
|
-
{{/if}}
|
|
27
|
-
{{#if (can "complete distribution")}}
|
|
28
|
-
<button
|
|
29
|
-
type="button"
|
|
30
|
-
class="uk-icon-button"
|
|
31
|
-
{{uk-tooltip
|
|
32
|
-
(t
|
|
33
|
-
(if
|
|
34
|
-
this.hasInquiries
|
|
35
|
-
"caluma.distribution.complete"
|
|
36
|
-
"caluma.distribution.skip"
|
|
37
|
-
)
|
|
38
|
-
)
|
|
39
|
-
}}
|
|
40
|
-
data-test-complete-distribution
|
|
41
|
-
{{on "click" (perform this.completeDistribution)}}
|
|
42
|
-
>
|
|
43
|
-
{{#if this.completeDistribution.isRunning}}
|
|
44
|
-
<UkSpinner @ratio={{0.6}} />
|
|
45
|
-
{{else if this.hasInquiries}}
|
|
46
|
-
<UkIcon @icon="lock" />
|
|
47
|
-
{{else}}
|
|
48
|
-
<UkIcon @icon="forward" />
|
|
49
|
-
{{/if}}
|
|
50
|
-
</button>
|
|
51
|
-
{{/if}}
|
|
52
|
-
{{#if (can "reopen distribution")}}
|
|
53
|
-
<button
|
|
54
|
-
type="button"
|
|
55
|
-
class="uk-icon-button"
|
|
56
|
-
{{uk-tooltip (t "caluma.distribution.reopen")}}
|
|
57
|
-
data-test-reopen-distribution
|
|
58
|
-
{{on "click" (perform this.reopenDistribution)}}
|
|
59
|
-
>
|
|
60
|
-
{{#if this.reopenDistribution.isRunning}}
|
|
61
|
-
<UkSpinner @ratio={{0.6}} />
|
|
62
|
-
{{else}}
|
|
63
|
-
<UkIcon @icon="refresh" />
|
|
64
|
-
{{/if}}
|
|
65
|
-
</button>
|
|
66
|
-
{{/if}}
|
|
67
|
-
</div>
|
|
113
|
+
{{/if}}
|
|
@@ -20,20 +20,12 @@ export default class CdNavigationControlsComponent extends Component {
|
|
|
20
20
|
@queryManager apollo;
|
|
21
21
|
@config config;
|
|
22
22
|
|
|
23
|
-
get hasInquiries() {
|
|
24
|
-
return (
|
|
25
|
-
this.distribution.navigation.value?.addressed.edges.length > 0 ||
|
|
26
|
-
this.distribution.navigation.value?.controlling.edges.length > 0 ||
|
|
27
|
-
this.distribution.navigation.value?.more.edges.length > 0
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
23
|
@dropTask
|
|
32
24
|
*completeDistribution() {
|
|
33
25
|
try {
|
|
34
26
|
let confirmText = this.intl.t("caluma.distribution.skip-confirm");
|
|
35
27
|
|
|
36
|
-
if (this.hasInquiries) {
|
|
28
|
+
if (this.distribution.hasInquiries) {
|
|
37
29
|
const incompleteInquiries = yield this.apollo.query(
|
|
38
30
|
{
|
|
39
31
|
query: incompleteInquiriesQuery,
|
|
@@ -104,15 +96,20 @@ export default class CdNavigationControlsComponent extends Component {
|
|
|
104
96
|
|
|
105
97
|
@dropTask
|
|
106
98
|
*sendInquiries() {
|
|
107
|
-
|
|
99
|
+
const ids = this.distribution.controls.value.send.edges
|
|
100
|
+
.filter((edge) => edge.node.status === "SUSPENDED")
|
|
101
|
+
.map((edge) => decodeId(edge.node.id));
|
|
102
|
+
|
|
103
|
+
if (
|
|
104
|
+
ids.length &&
|
|
105
|
+
!(yield confirm(
|
|
106
|
+
this.intl.t("caluma.distribution.send-confirm", { count: ids.length })
|
|
107
|
+
))
|
|
108
|
+
) {
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
try {
|
|
112
|
-
const ids = this.distribution.controls.value.send.edges.map((edge) =>
|
|
113
|
-
decodeId(edge.node.id)
|
|
114
|
-
);
|
|
115
|
-
|
|
116
113
|
const mutations = ids.map(
|
|
117
114
|
(id, index) => `
|
|
118
115
|
sendInquiry${index}: resumeWorkItem(input: { id: "${id}" }) {
|
|
@@ -131,4 +128,22 @@ export default class CdNavigationControlsComponent extends Component {
|
|
|
131
128
|
this.notification.danger(this.intl.t("caluma.distribution.send-error"));
|
|
132
129
|
}
|
|
133
130
|
}
|
|
131
|
+
|
|
132
|
+
@dropTask
|
|
133
|
+
*checkInquiries() {
|
|
134
|
+
try {
|
|
135
|
+
yield this.apollo.mutate({
|
|
136
|
+
mutation: completeWorkItemMutation,
|
|
137
|
+
variables: {
|
|
138
|
+
workItem: decodeId(
|
|
139
|
+
this.distribution.controls.value?.check.edges[0]?.node.id
|
|
140
|
+
),
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
} catch (e) {
|
|
144
|
+
this.notification.danger(
|
|
145
|
+
this.intl.t("caluma.distribution.check-inquiries-error")
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
134
149
|
}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
<li class="uk-width-auto {{if this.isActive 'uk-active'}}">
|
|
2
2
|
<LinkTo @route="inquiry" @model={{this.model}}>
|
|
3
|
-
{{#
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{{
|
|
3
|
+
{{#if (eq @type "addressed")}}
|
|
4
|
+
<span
|
|
5
|
+
class="uk-width-expand uk-text-truncate"
|
|
6
|
+
title={{t
|
|
7
|
+
"caluma.distribution.attention-to"
|
|
8
|
+
subject=@inquiry.controllingGroupName
|
|
9
|
+
abbr=false
|
|
10
|
+
}}
|
|
11
|
+
>
|
|
12
|
+
{{t
|
|
13
|
+
"caluma.distribution.attention-to"
|
|
14
|
+
subject=@inquiry.controllingGroupName
|
|
15
|
+
abbr=true
|
|
16
|
+
}}
|
|
13
17
|
</span>
|
|
14
|
-
{{
|
|
18
|
+
{{else}}
|
|
19
|
+
<span
|
|
20
|
+
class="uk-width-expand uk-text-truncate"
|
|
21
|
+
title={{@inquiry.addressedGroupName}}
|
|
22
|
+
>
|
|
23
|
+
{{@inquiry.addressedGroupName}}
|
|
24
|
+
</span>
|
|
25
|
+
{{/if}}
|
|
15
26
|
|
|
16
27
|
<CdNavigation::StatusIndicator @inquiry={{@inquiry}} @type={{@type}} />
|
|
17
28
|
</LinkTo>
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
class="uk-margin-small
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</a>
|
|
1
|
+
{{#if this.inquiries.length}}
|
|
2
|
+
<li class="uk-margin-small uk-width-auto {{if this.isActive 'uk-active'}}">
|
|
3
|
+
<a href="" {{on "click" this.toggle}}>
|
|
4
|
+
<span class="uk-width-expand">
|
|
5
|
+
{{t (concat "caluma.distribution.types." @type)}}
|
|
6
|
+
</span>
|
|
7
|
+
{{#if this.expanded}}
|
|
8
|
+
<UkIcon @icon="chevron-down" />
|
|
9
|
+
{{else}}
|
|
10
|
+
<UkIcon @icon="chevron-right" />
|
|
11
|
+
{{/if}}
|
|
12
|
+
</a>
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
{{#if @inquiries.length}}
|
|
14
|
+
{{#if this.expanded}}
|
|
17
15
|
<ul class="uk-tab uk-tab-left uk-margin-left uk-width-auto">
|
|
18
16
|
{{#each this.inquiries as |inquiry|}}
|
|
19
17
|
<CdNavigation::Item @inquiry={{inquiry}} @type={{@type}} />
|
|
20
18
|
{{/each}}
|
|
21
19
|
</ul>
|
|
22
20
|
{{/if}}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<CdNavigation::Controls />
|
|
26
|
-
{{/if}}
|
|
27
|
-
{{/if}}
|
|
28
|
-
</li>
|
|
21
|
+
</li>
|
|
22
|
+
{{/if}}
|
|
@@ -4,6 +4,7 @@ import Component from "@glimmer/component";
|
|
|
4
4
|
import { tracked } from "@glimmer/tracking";
|
|
5
5
|
|
|
6
6
|
export default class CdNavigationSectionComponent extends Component {
|
|
7
|
+
@service distribution;
|
|
7
8
|
@service router;
|
|
8
9
|
|
|
9
10
|
@tracked expanded = true;
|
|
@@ -19,23 +20,14 @@ export default class CdNavigationSectionComponent extends Component {
|
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
get inquiries() {
|
|
24
|
+
return this.distribution.inquiries?.[this.args.type] ?? [];
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
@action
|
|
23
28
|
toggle(e) {
|
|
24
29
|
e.preventDefault();
|
|
25
30
|
|
|
26
31
|
this.expanded = !this.expanded;
|
|
27
32
|
}
|
|
28
|
-
|
|
29
|
-
get inquiries() {
|
|
30
|
-
const sortProperty =
|
|
31
|
-
this.args.type === "addressed"
|
|
32
|
-
? "controllingGroupName"
|
|
33
|
-
: "addressedGroupName";
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
this.args.inquiries?.sort((a, b) =>
|
|
37
|
-
a[sortProperty].localeCompare(b[sortProperty])
|
|
38
|
-
) ?? []
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
33
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<ul class="uk-tab uk-tab-left uk-margin-remove-bottom uk-width-auto">
|
|
2
|
-
<CdNavigation::
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/>
|
|
6
|
-
<CdNavigation::Section
|
|
7
|
-
@type="addressed"
|
|
8
|
-
@inquiries={{this.inquiries.addressed}}
|
|
9
|
-
/>
|
|
10
|
-
<CdNavigation::Section @type="more" @inquiries={{this.inquiries.more}} />
|
|
2
|
+
<CdNavigation::Controls />
|
|
3
|
+
<CdNavigation::Section @type="addressed" />
|
|
4
|
+
<CdNavigation::Section @type="controlling" />
|
|
5
|
+
<CdNavigation::Section @type="more" />
|
|
11
6
|
</ul>
|
package/addon/config.js
CHANGED
|
@@ -20,6 +20,7 @@ export default function config(target, property) {
|
|
|
20
20
|
controls: {
|
|
21
21
|
createTask: "create-inquiry",
|
|
22
22
|
completeTask: "complete-distribution",
|
|
23
|
+
checkTask: "check-inquiries",
|
|
23
24
|
},
|
|
24
25
|
warningPeriod: 3,
|
|
25
26
|
inquiry: {
|
|
@@ -56,9 +57,27 @@ export default function config(target, property) {
|
|
|
56
57
|
status: "caluma.distribution.answer.buttons.adjust.status",
|
|
57
58
|
},
|
|
58
59
|
},
|
|
60
|
+
details: (inquiry) => [
|
|
61
|
+
{
|
|
62
|
+
label: "caluma.distribution.inquiry.created-at",
|
|
63
|
+
value: inquiry.createdAt,
|
|
64
|
+
type: "date",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "caluma.distribution.inquiry.assigned-user",
|
|
68
|
+
value: inquiry.assignedUsers,
|
|
69
|
+
type: "user",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "caluma.distribution.inquiry.closed-at",
|
|
73
|
+
value: inquiry.closedAt,
|
|
74
|
+
type: "date",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
59
77
|
},
|
|
60
78
|
},
|
|
61
79
|
new: {
|
|
80
|
+
defaultDeadlineLeadTime: 30,
|
|
62
81
|
defaultTypes: ["suggestions"],
|
|
63
82
|
types: {
|
|
64
83
|
suggestions: {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
fragment InquiryAnswerStatus on Document {
|
|
2
|
+
status: answers(filter: [{ question: $statusQuestion }]) {
|
|
3
|
+
edges {
|
|
4
|
+
node {
|
|
5
|
+
id
|
|
6
|
+
... on StringAnswer {
|
|
7
|
+
value
|
|
8
|
+
selectedOption {
|
|
9
|
+
slug
|
|
10
|
+
label
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
fragment InquiryAnswerButtons on Case {
|
|
19
|
+
workItems(
|
|
20
|
+
filter: [
|
|
21
|
+
{ tasks: $buttonTasks }
|
|
22
|
+
{ status: CANCELED, invert: true }
|
|
23
|
+
{ status: SKIPPED, invert: true }
|
|
24
|
+
]
|
|
25
|
+
) {
|
|
26
|
+
edges {
|
|
27
|
+
node {
|
|
28
|
+
id
|
|
29
|
+
status
|
|
30
|
+
closedAt
|
|
31
|
+
task {
|
|
32
|
+
id
|
|
33
|
+
slug
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
fragment InquiryAnswer on Document {
|
|
41
|
+
...InquiryAnswerStatus
|
|
42
|
+
info: answers(filter: [{ questions: $answerInfoQuestions }]) {
|
|
43
|
+
edges {
|
|
44
|
+
node {
|
|
45
|
+
id
|
|
46
|
+
question {
|
|
47
|
+
id
|
|
48
|
+
label
|
|
49
|
+
slug
|
|
50
|
+
}
|
|
51
|
+
... on StringAnswer {
|
|
52
|
+
value
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
fragment InquiryRequestDeadline on Document {
|
|
2
|
+
deadline: answers(filter: [{ question: $deadlineQuestion }]) {
|
|
3
|
+
edges {
|
|
4
|
+
node {
|
|
5
|
+
id
|
|
6
|
+
... on DateAnswer {
|
|
7
|
+
value
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
fragment InquiryRequest on Document {
|
|
15
|
+
...InquiryRequestDeadline
|
|
16
|
+
info: answers(filter: [{ question: $infoQuestion }]) {
|
|
17
|
+
edges {
|
|
18
|
+
node {
|
|
19
|
+
id
|
|
20
|
+
... on StringAnswer {
|
|
21
|
+
value
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
#import
|
|
1
|
+
# import InquiryAnswer, InquiryAnswerButtons, InquiryAnswerStatus from '../fragments/inquiry-answer.graphql'
|
|
2
2
|
|
|
3
3
|
mutation CompleteInquiryWorkItem(
|
|
4
4
|
$workItem: ID!
|
|
5
5
|
$statusQuestion: ID!
|
|
6
6
|
$buttonTasks: [String]!
|
|
7
|
+
$checkTask: ID!
|
|
8
|
+
$currentGroup: String!
|
|
9
|
+
$answerInfoQuestions: [ID]!
|
|
7
10
|
) {
|
|
8
11
|
completeWorkItem(input: { id: $workItem }) {
|
|
9
12
|
workItem {
|
|
@@ -13,23 +16,31 @@ mutation CompleteInquiryWorkItem(
|
|
|
13
16
|
id
|
|
14
17
|
document {
|
|
15
18
|
id
|
|
16
|
-
...
|
|
17
|
-
}
|
|
18
|
-
workItems(filter: [{ tasks: $buttonTasks }, { status: READY }]) {
|
|
19
|
-
edges {
|
|
20
|
-
node {
|
|
21
|
-
id
|
|
22
|
-
task {
|
|
23
|
-
id
|
|
24
|
-
slug
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
19
|
+
...InquiryAnswer
|
|
28
20
|
}
|
|
21
|
+
...InquiryAnswerButtons
|
|
29
22
|
parentWorkItem {
|
|
30
23
|
id
|
|
31
24
|
status
|
|
32
25
|
isRedoable
|
|
26
|
+
# This is needed to remove the check inquiries button if that work
|
|
27
|
+
# item is closed automatically after completing an inquiry.
|
|
28
|
+
case {
|
|
29
|
+
id
|
|
30
|
+
workItems(
|
|
31
|
+
filter: [
|
|
32
|
+
{ task: $checkTask }
|
|
33
|
+
{ addressedGroups: [$currentGroup] }
|
|
34
|
+
]
|
|
35
|
+
) {
|
|
36
|
+
edges {
|
|
37
|
+
node {
|
|
38
|
+
id
|
|
39
|
+
status
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#import
|
|
1
|
+
# import InquiryAnswerButtons, InquiryAnswerStatus from '../fragments/inquiry-answer.graphql'
|
|
2
2
|
|
|
3
3
|
mutation ReopenInquiry(
|
|
4
4
|
$workItem: ID!
|
|
@@ -14,19 +14,9 @@ mutation ReopenInquiry(
|
|
|
14
14
|
id
|
|
15
15
|
document {
|
|
16
16
|
id
|
|
17
|
-
...
|
|
18
|
-
}
|
|
19
|
-
workItems(filter: [{ tasks: $buttonTasks }, { status: READY }]) {
|
|
20
|
-
edges {
|
|
21
|
-
node {
|
|
22
|
-
id
|
|
23
|
-
task {
|
|
24
|
-
id
|
|
25
|
-
slug
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
17
|
+
...InquiryAnswerStatus
|
|
29
18
|
}
|
|
19
|
+
...InquiryAnswerButtons
|
|
30
20
|
}
|
|
31
21
|
}
|
|
32
22
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
query
|
|
1
|
+
query Controls(
|
|
2
2
|
$createTask: ID!
|
|
3
3
|
$completeTask: ID!
|
|
4
4
|
$inquiryTask: ID!
|
|
5
|
+
$checkTask: ID!
|
|
5
6
|
$caseId: ID!
|
|
6
7
|
$currentGroup: String!
|
|
7
8
|
) {
|
|
@@ -50,6 +51,22 @@ query ControlWorkItems(
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
54
|
+
check: allWorkItems(
|
|
55
|
+
filter: [
|
|
56
|
+
{ case: $caseId }
|
|
57
|
+
{ task: $checkTask }
|
|
58
|
+
{ status: READY }
|
|
59
|
+
{ hasDeadline: true }
|
|
60
|
+
{ addressedGroups: [$currentGroup] }
|
|
61
|
+
]
|
|
62
|
+
) {
|
|
63
|
+
edges {
|
|
64
|
+
node {
|
|
65
|
+
id
|
|
66
|
+
status
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
53
70
|
case: allCases(filter: [{ id: $caseId }]) {
|
|
54
71
|
edges {
|
|
55
72
|
node {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
#import InquiryAnswerButtons
|
|
1
|
+
# import InquiryAnswerButtons from '../fragments/inquiry-answer.graphql'
|
|
2
|
+
# import InquiryRequest, InquiryRequestDeadline from '../fragments/inquiry-request.graphql'
|
|
2
3
|
|
|
3
4
|
query InquiryAnswer(
|
|
4
5
|
$inquiry: ID!
|
|
@@ -13,6 +14,8 @@ query InquiryAnswer(
|
|
|
13
14
|
status
|
|
14
15
|
addressedGroups
|
|
15
16
|
controllingGroups
|
|
17
|
+
assignedUsers
|
|
18
|
+
closedByUser
|
|
16
19
|
createdAt
|
|
17
20
|
closedAt
|
|
18
21
|
task {
|
|
@@ -20,6 +23,7 @@ query InquiryAnswer(
|
|
|
20
23
|
slug
|
|
21
24
|
}
|
|
22
25
|
document {
|
|
26
|
+
id
|
|
23
27
|
...InquiryRequest
|
|
24
28
|
}
|
|
25
29
|
childCase {
|