@projectcaluma/ember-distribution 11.0.0-beta.30 → 11.0.0-beta.32

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.
Files changed (42) hide show
  1. package/addon/abilities/inquiry.js +18 -2
  2. package/addon/components/cd-document-header.hbs +3 -12
  3. package/addon/components/cd-inquiry-answer-form.hbs +136 -76
  4. package/addon/components/cd-inquiry-answer-form.js +20 -2
  5. package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +5 -10
  6. package/addon/components/cd-inquiry-dialog/inquiry-deadline.js +14 -0
  7. package/addon/components/cd-inquiry-dialog/inquiry-part.hbs +118 -89
  8. package/addon/components/cd-inquiry-dialog.js +11 -15
  9. package/addon/components/cd-inquiry-edit-form.hbs +0 -3
  10. package/addon/components/cd-inquiry-edit-form.js +2 -2
  11. package/addon/components/cd-inquiry-new-form/bulk-edit.js +9 -6
  12. package/addon/components/cd-navigation/section.hbs +1 -1
  13. package/addon/components/cd-navigation/section.js +5 -13
  14. package/addon/components/cd-navigation.hbs +3 -10
  15. package/addon/config.js +17 -0
  16. package/addon/gql/fragments/inquiry-answer.graphql +57 -0
  17. package/addon/gql/fragments/inquiry-request.graphql +26 -0
  18. package/addon/gql/mutations/complete-inquiry-work-item.graphql +24 -13
  19. package/addon/gql/mutations/reopen-inquiry.graphql +3 -13
  20. package/addon/gql/queries/{control-work-items.graphql → controls.graphql} +1 -1
  21. package/addon/gql/queries/incomplete-inquiries.graphql +1 -1
  22. package/addon/gql/queries/inquiry-answer.graphql +5 -1
  23. package/addon/gql/queries/inquiry-dialog.graphql +31 -2
  24. package/addon/gql/queries/inquiry-form.graphql +1 -1
  25. package/addon/gql/queries/{inquiry-navigation.graphql → navigation.graphql} +24 -6
  26. package/addon/routes/application.js +7 -0
  27. package/addon/routes/index.js +15 -28
  28. package/addon/routes/inquiry/index.js +1 -4
  29. package/addon/routes/new.js +1 -5
  30. package/addon/services/distribution.js +71 -9
  31. package/addon/templates/application.hbs +1 -1
  32. package/addon/templates/inquiry/index.hbs +1 -5
  33. package/addon/templates/new.hbs +0 -1
  34. package/addon/utils/inquiry-deadline.js +3 -1
  35. package/app/styles/_answer-form.scss +4 -0
  36. package/package.json +10 -10
  37. package/translations/de.yaml +10 -1
  38. package/translations/en.yaml +11 -2
  39. package/translations/fr.yaml +10 -1
  40. package/addon/components/cd-navigation.js +0 -53
  41. package/addon/gql/fragments/inquiry.graphql +0 -117
  42. package/addon/modifiers/pikaday.js +0 -2
@@ -21,11 +21,27 @@ export default class InquiryAbility extends Ability {
21
21
  }
22
22
 
23
23
  get canSend() {
24
- return this.config.permissions.sendInquiry?.(this.model) ?? true;
24
+ return (
25
+ !this.config.ui.readonly &&
26
+ this.model?.task.slug === this.config.inquiry.task &&
27
+ this.model?.status === "SUSPENDED" &&
28
+ (this.config.permissions.sendInquiry?.(this.model) ?? true) &&
29
+ this.model?.controllingGroups
30
+ .map(String)
31
+ .includes(String(this.calumaOptions.currentGroupId))
32
+ );
25
33
  }
26
34
 
27
35
  get canWithdraw() {
28
- return this.config.permissions.withdrawInquiry?.(this.model) ?? true;
36
+ return (
37
+ !this.config.ui.readonly &&
38
+ this.model?.task.slug === this.config.inquiry.task &&
39
+ this.model?.status === "SUSPENDED" &&
40
+ (this.config.permissions.withdrawInquiry?.(this.model) ?? true) &&
41
+ this.model?.controllingGroups
42
+ .map(String)
43
+ .includes(String(this.calumaOptions.currentGroupId))
44
+ );
29
45
  }
30
46
 
31
47
  get canAnswer() {
@@ -1,4 +1,4 @@
1
- <p class="uk-text-large uk-margin-remove uk-flex uk-flex-middle">
1
+ <div class="uk-text-large uk-flex uk-flex-middle" data-test-document-header>
2
2
  <div class="uk-width-expand">
3
3
  {{@name}}
4
4
  {{#if @group}}
@@ -9,15 +9,6 @@
9
9
  {{/if}}
10
10
  </div>
11
11
  {{yield}}
12
- </p>
12
+ </div>
13
13
 
14
- {{#if (and @modifiedBy @modifiedAt)}}
15
- <p class="uk-text-meta uk-margin-remove-bottom uk-margin-small-top">
16
- {{t
17
- "caluma.distribution.last-modified"
18
- user=(user-name @modifiedBy)
19
- date=(format-date @modifiedAt)
20
- time=(format-time @modifiedAt hour="2-digit" minute="2-digit")
21
- }}
22
- </p>
23
- {{/if}}
14
+ <hr />
@@ -5,92 +5,152 @@
5
5
  >
6
6
  <:default as |content|>
7
7
 
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>
8
+ <div uk-grid class="uk-grid uk-grid-small uk-grid-divider">
9
+ <div class="uk-width-expand">
10
+ <CdDocumentHeader
11
+ @name={{content.document.rootForm.raw.name}}
12
+ @status={{if (eq this.inquiry.status "READY") this.answerStatus}}
13
+ >
14
+ <CdInquiryDialog::InquiryDeadline @inquiry={{this.inquiry}} />
16
15
 
17
- <hr />
16
+ {{#if this.inquiryDetails.length}}
17
+ <button
18
+ class="uk-icon-button uk-margin-left"
19
+ type="button"
20
+ {{uk-tooltip
21
+ (if
22
+ this.isExpanded
23
+ (t "caluma.distribution.answer.details.hide")
24
+ (t "caluma.distribution.answer.details.show")
25
+ )
26
+ }}
27
+ {{on "click" this.toggle}}
28
+ >
29
+ <UkIcon
30
+ @icon={{if
31
+ this.isExpanded
32
+ "chevron-double-right"
33
+ "chevron-double-left"
34
+ }}
35
+ />
36
+ </button>
37
+ {{/if}}
38
+ </CdDocumentHeader>
18
39
 
19
- <div class="uk-margin uk-text-italic inquiry-answer-form__request">
20
- <CdInquiryDialog::InquiryPart
21
- @inquiry={{this.inquiry}}
22
- @type="request"
23
- @disabled={{true}}
24
- />
25
- </div>
40
+ <div class="uk-margin uk-text-italic inquiry-answer-form__request">
41
+ <CdInquiryDialog::InquiryPart
42
+ @inquiry={{this.inquiry}}
43
+ @type="request"
44
+ @disabled={{true}}
45
+ />
46
+ </div>
26
47
 
27
- {{#if
28
- (and
29
- (not this.buttons.length)
30
- (can "edit answer form of inquiry" this.inquiry)
31
- )
32
- }}
33
- <div class="uk-alert uk-alert-warning uk-flex uk-flex-middle">
34
- <UkIcon @icon="warning" class="uk-margin-small-right uk-flex-none" />
35
- {{t "caluma.distribution.answer.complete-not-allowed"}}
36
- {{t "caluma.distribution.not-allowed-hint"}}
37
- </div>
38
- {{/if}}
48
+ {{#if
49
+ (and
50
+ (not this.buttons.length)
51
+ (can "edit answer form of inquiry" this.inquiry)
52
+ )
53
+ }}
54
+ <div class="uk-alert uk-alert-warning uk-flex uk-flex-middle">
55
+ <UkIcon
56
+ @icon="warning"
57
+ class="uk-margin-small-right uk-flex-none"
58
+ />
59
+ {{t "caluma.distribution.answer.complete-not-allowed"}}
60
+ {{t "caluma.distribution.not-allowed-hint"}}
61
+ </div>
62
+ {{/if}}
39
63
 
40
- <content.form />
64
+ <content.form />
41
65
 
42
- {{#each this.buttons as |buttonConfig|}}
43
- {{#if buttonConfig.isFormButton}}
44
- <DocumentValidity @document={{content.document}} as |isValid validate|>
45
- <UkButton
46
- @type="submit"
47
- @color={{buttonConfig.color}}
48
- @disabled={{or
49
- (not isValid)
50
- (and
66
+ {{#each this.buttons as |buttonConfig|}}
67
+ {{#if buttonConfig.isFormButton}}
68
+ <DocumentValidity
69
+ @document={{content.document}}
70
+ as |isValid validate|
71
+ >
72
+ <UkButton
73
+ @type="submit"
74
+ @color={{buttonConfig.color}}
75
+ @disabled={{or
76
+ (not isValid)
77
+ (and
78
+ this.completeWorkItem.isRunning
79
+ (includes
80
+ buttonConfig.workItemId
81
+ this.completeWorkItem.lastRunning.args
82
+ )
83
+ )
84
+ }}
85
+ @loading={{and
86
+ this.completeWorkItem.isRunning
87
+ (includes
88
+ buttonConfig.workItemId
89
+ this.completeWorkItem.lastRunning.args
90
+ )
91
+ }}
92
+ @onClick={{fn
93
+ (perform this.completeWorkItem)
94
+ buttonConfig.workItemId
95
+ validate
96
+ }}
97
+ >{{buttonConfig.label}}</UkButton>
98
+ </DocumentValidity>
99
+ {{else}}
100
+ <UkButton
101
+ @type="button"
102
+ @color={{buttonConfig.color}}
103
+ @disabled={{and
51
104
  this.completeWorkItem.isRunning
52
105
  (includes
53
106
  buttonConfig.workItemId this.completeWorkItem.lastRunning.args
54
107
  )
55
- )
56
- }}
57
- @loading={{and
58
- this.completeWorkItem.isRunning
59
- (includes
60
- buttonConfig.workItemId this.completeWorkItem.lastRunning.args
61
- )
62
- }}
63
- @onClick={{fn
64
- (perform this.completeWorkItem)
65
- buttonConfig.workItemId
66
- validate
67
- }}
68
- >{{buttonConfig.label}}</UkButton>
69
- </DocumentValidity>
70
- {{else}}
71
- <UkButton
72
- @type="button"
73
- @color={{buttonConfig.color}}
74
- @disabled={{and
75
- this.completeWorkItem.isRunning
76
- (includes
77
- buttonConfig.workItemId this.completeWorkItem.lastRunning.args
78
- )
79
- }}
80
- @loading={{and
81
- this.completeWorkItem.isRunning
82
- (includes
83
- buttonConfig.workItemId this.completeWorkItem.lastRunning.args
84
- )
85
- }}
86
- @onClick={{fn
87
- (perform this.completeWorkItem)
88
- buttonConfig.workItemId
89
- null
90
- }}
91
- >{{buttonConfig.label}}</UkButton>
108
+ }}
109
+ @loading={{and
110
+ this.completeWorkItem.isRunning
111
+ (includes
112
+ buttonConfig.workItemId this.completeWorkItem.lastRunning.args
113
+ )
114
+ }}
115
+ @onClick={{fn
116
+ (perform this.completeWorkItem)
117
+ buttonConfig.workItemId
118
+ null
119
+ }}
120
+ >{{buttonConfig.label}}</UkButton>
121
+ {{/if}}
122
+ {{/each}}
123
+ </div>
124
+
125
+ {{#if (and this.isExpanded this.inquiryDetails.length)}}
126
+ <div class="inquiry-answer-form__side-bar">
127
+ <dl
128
+ class="uk-description-list uk-text-break
129
+ {{unless
130
+ this.config.ui.small
131
+ 'uk-margin-small-left uk-margin-small-right'
132
+ }}"
133
+ >
134
+ {{#each this.inquiryDetails as |data|}}
135
+ <dt>{{t data.label}}</dt>
136
+ <dd>
137
+ {{#if (not data.value)}}
138
+ -
139
+ {{else if (eq data.type "date")}}
140
+ {{format-date data.value}}
141
+ {{format-time data.value hour="2-digit" minute="2-digit"}}
142
+ {{else if (eq data.type "user")}}
143
+ {{user-name data.value}}
144
+ {{else}}
145
+ {{data.value}}
146
+ {{/if}}
147
+ </dd>
148
+ {{/each}}
149
+ </dl>
150
+ </div>
92
151
  {{/if}}
93
- {{/each}}
152
+
153
+ </div>
94
154
  </:default>
95
155
  <:notfound><CdNotfound /></:notfound>
96
156
  </CfContent>
@@ -1,5 +1,7 @@
1
+ import { action } from "@ember/object";
1
2
  import { inject as service } from "@ember/service";
2
3
  import Component from "@glimmer/component";
4
+ import { tracked } from "@glimmer/tracking";
3
5
  import { queryManager, getObservable } from "ember-apollo-client";
4
6
  import { dropTask } from "ember-concurrency";
5
7
  import { trackedTask } from "ember-resources/util/ember-concurrency";
@@ -15,12 +17,14 @@ export default class CdInquiryAnswerFormComponent extends Component {
15
17
  @service router;
16
18
  @service abilities;
17
19
  @service notification;
20
+ @service calumaOptions;
18
21
 
19
22
  @config config;
20
23
 
21
24
  @queryManager apollo;
22
25
 
23
26
  @inquiryAnswerStatus({ inquiryProperty: "inquiry" }) answerStatus;
27
+ @tracked isExpanded = !this.config.ui.small;
24
28
 
25
29
  _inquiry = trackedTask(this, this.fetchInquiryAnswer, () => [
26
30
  this.args.inquiry,
@@ -30,8 +34,13 @@ export default class CdInquiryAnswerFormComponent extends Component {
30
34
  return this._inquiry.value?.[0]?.node;
31
35
  }
32
36
 
37
+ get inquiryDetails() {
38
+ return this.config.inquiry.answer.details?.(this.inquiry);
39
+ }
40
+
33
41
  get buttons() {
34
42
  return this.inquiry?.childCase.workItems.edges
43
+ .filter((edge) => edge.node.status === "READY")
35
44
  .map((edge) => {
36
45
  const config = this.config.inquiry.answer.buttons[edge.node.task.slug];
37
46
 
@@ -52,13 +61,19 @@ export default class CdInquiryAnswerFormComponent extends Component {
52
61
  .filter(Boolean);
53
62
  }
54
63
 
64
+ @action
65
+ toggle(e) {
66
+ e.preventDefault();
67
+ this.isExpanded = !this.isExpanded;
68
+ }
69
+
55
70
  @dropTask
56
- *fetchInquiryAnswer() {
71
+ *fetchInquiryAnswer(inquiry) {
57
72
  return yield this.apollo.watchQuery(
58
73
  {
59
74
  query: inquiryAnswerQuery,
60
75
  variables: {
61
- inquiry: this.args.inquiry,
76
+ inquiry,
62
77
  buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
63
78
  infoQuestion: this.config.inquiry.infoQuestion,
64
79
  deadlineQuestion: this.config.inquiry.deadlineQuestion,
@@ -79,6 +94,9 @@ export default class CdInquiryAnswerFormComponent extends Component {
79
94
  workItem,
80
95
  statusQuestion: this.config.inquiry.answer.statusQuestion,
81
96
  buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
97
+ checkTask: this.config.controls.checkTask,
98
+ currentGroup: String(this.calumaOptions.currentGroupId),
99
+ answerInfoQuestions: this.config.inquiry.answer.infoQuestions,
82
100
  },
83
101
  });
84
102
 
@@ -1,20 +1,15 @@
1
1
  {{#if this.deadline.value}}
2
2
  <div
3
- class="uk-flex-inline uk-flex-middle
4
- {{if
5
- this.isWithdrawn
6
- 'uk-text-muted'
7
- (concat 'uk-text-' this.deadline.color)
8
- }}"
3
+ class="uk-flex-inline uk-flex-middle uk-text-{{this.deadline.color}}"
4
+ {{uk-tooltip (t "caluma.distribution.inquiry.deadline")}}
9
5
  data-test-deadline
10
6
  ...attributes
11
7
  >
12
- <UkIcon
13
- @icon={{if this.isWithdrawn "ban" "clock"}}
14
- class="uk-margin-small-right"
15
- />
8
+ <UkIcon @icon={{this.icon}} class="uk-margin-small-right" />
16
9
  {{#if this.isWithdrawn}}
17
10
  {{t "caluma.distribution.withdraw.status"}}
11
+ {{else if this.isSkipped}}
12
+ {{t "caluma.distribution.status.skipped"}}
18
13
  {{else}}
19
14
  {{format-date this.deadline.value}}
20
15
  {{/if}}
@@ -8,7 +8,21 @@ export default class CdInquiryDialogInquiryDeadlineComponent extends Component {
8
8
 
9
9
  @inquiryDeadline deadline;
10
10
 
11
+ get icon() {
12
+ if (this.isWithdrawn) {
13
+ return "ban";
14
+ } else if (this.isSkipped) {
15
+ return "lock";
16
+ }
17
+
18
+ return "clock";
19
+ }
20
+
11
21
  get isWithdrawn() {
12
22
  return this.args.inquiry.status === "CANCELED";
13
23
  }
24
+
25
+ get isSkipped() {
26
+ return this.args.inquiry.status === "SKIPPED";
27
+ }
14
28
  }
@@ -19,106 +19,135 @@
19
19
  {{yield}}
20
20
  </div>
21
21
 
22
- <ul
23
- class="uk-subnav uk-subnav-divider
24
- {{if
25
- this.config.ui.small
26
- 'uk-margin-remove-top uk-margin-small-bottom'
27
- 'uk-margin-small-top'
28
- }}"
29
- >
30
- <li>
31
- <span>
32
- {{format-date this.date}}
33
- {{format-time this.date hour="2-digit" minute="2-digit"}}
34
- </span>
35
- </li>
22
+ <div class="uk-flex uk-flex-between uk-flex-top">
36
23
  {{#unless @disabled}}
37
- {{#if (or (eq @type "answer") (cannot "edit inquiry" @inquiry))}}
38
- <li>
39
- <LinkTo
40
- data-test-details
41
- @route="inquiry.detail.{{if (eq @type 'answer') 'answer' 'index'}}"
42
- @model={{decode-id @inquiry.id}}
43
- >
44
- {{t "caluma.distribution.details"}}
45
- </LinkTo>
46
- </li>
47
- {{/if}}
48
- {{#if (can "edit inquiry" @inquiry)}}
49
- <li>
50
- <LinkTo
51
- data-test-edit
52
- @route="inquiry.detail.index"
53
- @model={{decode-id @inquiry.id}}
54
- >
55
- {{t "caluma.distribution.edit.link"}}
56
- </LinkTo>
57
- </li>
58
- {{#if (can "withdraw inquiry" @inquiry)}}
24
+ <ul
25
+ class="uk-subnav uk-subnav-divider uk-margin-remove-bottom
26
+ {{if
27
+ this.config.ui.small
28
+ 'uk-margin-remove-top'
29
+ 'uk-margin-small-top'
30
+ }}"
31
+ >
32
+ {{#if (or (eq @type "answer") (cannot "edit inquiry" @inquiry))}}
33
+ <li>
34
+ <LinkTo
35
+ data-test-details
36
+ @route="inquiry.detail.{{if
37
+ (eq @type 'answer')
38
+ 'answer'
39
+ 'index'
40
+ }}"
41
+ @model={{decode-id @inquiry.id}}
42
+ >
43
+ {{t "caluma.distribution.details"}}
44
+ </LinkTo>
45
+ </li>
46
+ {{/if}}
47
+ {{#if (can "edit inquiry" @inquiry)}}
48
+ <li>
49
+ <LinkTo
50
+ data-test-edit
51
+ @route="inquiry.detail.index"
52
+ @model={{decode-id @inquiry.id}}
53
+ >
54
+ {{t "caluma.distribution.edit.link"}}
55
+ </LinkTo>
56
+ </li>
57
+ {{#if (can "withdraw inquiry" @inquiry)}}
58
+ <li>
59
+ <a
60
+ href=""
61
+ {{on "click" (perform this.withdraw)}}
62
+ data-test-withdraw
63
+ >
64
+ {{t "caluma.distribution.withdraw.link"}}
65
+ </a>
66
+ </li>
67
+ {{/if}}
68
+ {{else if (can "answer inquiry" @inquiry)}}
69
+ <li>
70
+ <LinkTo
71
+ data-test-answer
72
+ @route="inquiry.detail.answer"
73
+ @model={{decode-id @inquiry.id}}
74
+ >
75
+ {{t "caluma.distribution.answer.link"}}
76
+ </LinkTo>
77
+ </li>
78
+ {{/if}}
79
+ {{#if (and (eq @type "answer") (can "reopen inquiry" @inquiry))}}
80
+ <li>
81
+ <a href="" {{on "click" (perform this.reopen)}} data-test-reopen>
82
+ {{t "caluma.distribution.reopen-inquiry.link"}}
83
+ </a>
84
+ </li>
85
+ {{/if}}
86
+ {{#if (can "send reminder inquiry" @inquiry)}}
59
87
  <li>
60
88
  <a
89
+ data-test-send-reminder
61
90
  href=""
62
- {{on "click" (perform this.withdraw)}}
63
- data-test-withdraw
91
+ {{on "click" (perform this.sendReminder)}}
64
92
  >
65
- {{t "caluma.distribution.withdraw.link"}}
93
+ {{t "caluma.distribution.reminder.link"}}
66
94
  </a>
95
+ <div
96
+ uk-dropdown="mode: hover; pos: bottom"
97
+ class="uk-padding-small uk-width-small"
98
+ >
99
+ <div class="uk-text-center uk-text-bold uk-margin-small-bottom">
100
+ {{t "caluma.distribution.reminder.title"}}
101
+ </div>
102
+ {{#if @inquiry.meta.reminders}}
103
+ <div class="uk-height-max-small uk-overflow-auto">
104
+ {{#each @inquiry.meta.reminders as |reminder|}}
105
+ <div class="uk-text-center uk-text-small uk-text-muted">
106
+ {{format-date reminder}}
107
+ {{format-time reminder hour="2-digit" minute="2-digit"}}
108
+ </div>
109
+ {{/each}}
110
+ </div>
111
+ {{else}}
112
+ <div class="uk-text-center">
113
+ {{t "caluma.distribution.reminder.no-reminders"}}
114
+ </div>
115
+ {{/if}}
116
+ </div>
67
117
  </li>
68
118
  {{/if}}
69
- {{else if (can "answer inquiry" @inquiry)}}
70
- <li>
71
- <LinkTo
72
- data-test-answer
73
- @route="inquiry.detail.answer"
74
- @model={{decode-id @inquiry.id}}
75
- >
76
- {{t "caluma.distribution.answer.link"}}
77
- </LinkTo>
78
- </li>
79
- {{/if}}
80
- {{#if (and (eq @type "answer") (can "reopen inquiry" @inquiry))}}
81
- <li>
82
- <a href="" {{on "click" (perform this.reopen)}} data-test-reopen>
83
- {{t "caluma.distribution.reopen-inquiry.link"}}
84
- </a>
119
+ </ul>
120
+ {{/unless}}
121
+ <ul
122
+ class="uk-subnav uk-subnav-divider uk-margin-remove-bottom
123
+ {{if
124
+ this.config.ui.small
125
+ 'uk-margin-remove-top'
126
+ 'uk-margin-small-top'
127
+ }}"
128
+ >
129
+ {{#if (and (eq @type "answer") @inquiry.assignedUsers.length)}}
130
+ <li {{uk-tooltip (t "caluma.distribution.inquiry.assigned-user")}}>
131
+ <span>{{user-name @inquiry.assignedUsers}}</span>
85
132
  </li>
86
133
  {{/if}}
87
- {{/unless}}
88
- {{#if (can "send reminder inquiry" @inquiry)}}
89
- <li>
90
- <a
91
- data-test-send-reminder
92
- href=""
93
- {{on "click" (perform this.sendReminder)}}
94
- >
95
- {{t "caluma.distribution.reminder.link"}}
96
- </a>
97
- <div
98
- uk-dropdown="mode: hover; pos: bottom"
99
- class="uk-padding-small uk-width-small"
100
- >
101
- <div class="uk-text-center uk-text-bold uk-margin-small-bottom">
102
- {{t "caluma.distribution.reminder.title"}}
103
- </div>
104
- {{#if @inquiry.meta.reminders}}
105
- <div class="uk-height-max-small uk-overflow-auto">
106
- {{#each @inquiry.meta.reminders as |reminder|}}
107
- <div class="uk-text-center uk-text-small uk-text-muted">
108
- {{format-date reminder}}
109
- {{format-time reminder hour="2-digit" minute="2-digit"}}
110
- </div>
111
- {{/each}}
112
- </div>
113
- {{else}}
114
- <div class="uk-text-center">
115
- {{t "caluma.distribution.reminder.no-reminders"}}
116
- </div>
117
- {{/if}}
118
- </div>
134
+ <li
135
+ {{uk-tooltip
136
+ (if
137
+ (eq @type "answer")
138
+ (t "caluma.distribution.inquiry.closed-at")
139
+ (t "caluma.distribution.inquiry.created-at")
140
+ )
141
+ }}
142
+ >
143
+ <span>
144
+ {{format-date this.date}}
145
+ {{format-time this.date hour="2-digit" minute="2-digit"}}
146
+ </span>
119
147
  </li>
120
- {{/if}}
121
- </ul>
148
+ </ul>
149
+
150
+ </div>
122
151
 
123
152
  {{#if this.requestInfo}}
124
153
  <CdTruncated
@@ -30,25 +30,24 @@ export default class CdInquiryDialogComponent extends Component {
30
30
  _inquiries = trackedTask(this, this.fetchDialog, () => [
31
31
  this.args.from,
32
32
  this.args.to,
33
- this.args.caseId,
33
+ this.distribution.caseId,
34
34
  this.config,
35
35
  ]);
36
36
 
37
37
  @dropTask
38
- *fetchDialog() {
38
+ *fetchDialog(from, to, caseId, config) {
39
39
  const response = yield this.apollo.watchQuery({
40
40
  query: inquiryDialogQuery,
41
41
  variables: {
42
- from: this.args.from,
43
- to: this.args.to,
44
- caseId: this.args.caseId,
45
- task: this.config.inquiry.task,
46
- infoQuestion: this.config.inquiry.infoQuestion,
47
- deadlineQuestion: this.config.inquiry.deadlineQuestion,
48
- statusQuestion: this.config.inquiry.answer.statusQuestion,
49
- answerInfoQuestions: this.config.inquiry.answer.infoQuestions,
50
- buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
51
- includeNavigationData: true,
42
+ from,
43
+ to,
44
+ caseId,
45
+ task: config.inquiry.task,
46
+ infoQuestion: config.inquiry.infoQuestion,
47
+ deadlineQuestion: config.inquiry.deadlineQuestion,
48
+ statusQuestion: config.inquiry.answer.statusQuestion,
49
+ answerInfoQuestions: config.inquiry.answer.infoQuestions,
50
+ buttonTasks: Object.keys(config.inquiry.answer.buttons),
52
51
  },
53
52
  });
54
53
 
@@ -79,9 +78,6 @@ export default class CdInquiryDialogComponent extends Component {
79
78
 
80
79
  yield this.distribution.createInquiry.perform([this.args.to]);
81
80
 
82
- // refetch dialog data
83
- yield getObservable(this._inquiries.value).refetch();
84
-
85
81
  this.router.transitionTo(
86
82
  "inquiry.detail.index",
87
83
  {