@projectcaluma/ember-distribution 14.6.0 → 14.7.1

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.
@@ -3,7 +3,7 @@ import { inject as service } from "@ember/service";
3
3
  import Component from "@glimmer/component";
4
4
  import { tracked } from "@glimmer/tracking";
5
5
  import { queryManager } from "ember-apollo-client";
6
- import { dropTask } from "ember-concurrency";
6
+ import { task } from "ember-concurrency";
7
7
  import { trackedTask } from "reactiveweb/ember-concurrency";
8
8
 
9
9
  import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
@@ -26,10 +26,6 @@ export default class CdInquiryAnswerFormComponent extends Component {
26
26
  @inquiryAnswerStatus({ inquiryProperty: "inquiry" }) answerStatus;
27
27
  @tracked isExpanded = !this.config.ui.small;
28
28
 
29
- _inquiry = trackedTask(this, this.fetchInquiryAnswer, () => [
30
- this.args.inquiry,
31
- ]);
32
-
33
29
  get inquiry() {
34
30
  return this._inquiry.value?.[0]?.node;
35
31
  }
@@ -68,9 +64,8 @@ export default class CdInquiryAnswerFormComponent extends Component {
68
64
  this.isExpanded = !this.isExpanded;
69
65
  }
70
66
 
71
- @dropTask
72
- *fetchInquiryAnswer(inquiry) {
73
- return yield this.apollo.watchQuery(
67
+ fetchInquiryAnswer = task({ drop: true }, async (inquiry) => {
68
+ return await this.apollo.watchQuery(
74
69
  {
75
70
  query: inquiryAnswerQuery,
76
71
  variables: {
@@ -82,33 +77,39 @@ export default class CdInquiryAnswerFormComponent extends Component {
82
77
  },
83
78
  "allWorkItems.edges",
84
79
  );
85
- }
80
+ });
86
81
 
87
- @dropTask
88
- *completeWorkItem(workItem, willCompleteInquiry, validate = () => true) {
89
- try {
90
- if (typeof validate === "function" && !(yield validate())) return;
82
+ _inquiry = trackedTask(this, this.fetchInquiryAnswer, () => [
83
+ this.args.inquiry,
84
+ ]);
91
85
 
92
- yield this.apollo.mutate({
93
- mutation: completeInquiryWorkItemMutation,
94
- variables: {
95
- workItem,
96
- statusQuestion: this.config.inquiry.answer.statusQuestion,
97
- buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
98
- checkTask: this.config.controls.checkTask,
99
- createTask: this.config.controls.createTask,
100
- inquiryTask: this.config.inquiry.task,
101
- currentGroup: String(this.calumaOptions.currentGroupId),
102
- answerInfoQuestions: this.config.inquiry.answer.infoQuestions,
103
- willCompleteInquiry,
104
- },
105
- });
86
+ completeWorkItem = task(
87
+ { drop: true },
88
+ async (workItem, willCompleteInquiry, validate = () => true) => {
89
+ try {
90
+ if (typeof validate === "function" && !(await validate())) return;
106
91
 
107
- yield this.router.transitionTo("inquiry.index");
108
- } catch {
109
- this.notification.danger(
110
- this.intl.t("caluma.distribution.answer.complete-error"),
111
- );
112
- }
113
- }
92
+ await this.apollo.mutate({
93
+ mutation: completeInquiryWorkItemMutation,
94
+ variables: {
95
+ workItem,
96
+ statusQuestion: this.config.inquiry.answer.statusQuestion,
97
+ buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
98
+ checkTask: this.config.controls.checkTask,
99
+ createTask: this.config.controls.createTask,
100
+ inquiryTask: this.config.inquiry.task,
101
+ currentGroup: String(this.calumaOptions.currentGroupId),
102
+ answerInfoQuestions: this.config.inquiry.answer.infoQuestions,
103
+ willCompleteInquiry,
104
+ },
105
+ });
106
+
107
+ await this.router.transitionTo("inquiry.index");
108
+ } catch {
109
+ this.notification.danger(
110
+ this.intl.t("caluma.distribution.answer.complete-error"),
111
+ );
112
+ }
113
+ },
114
+ );
114
115
  }
@@ -2,7 +2,7 @@ import { inject as service } from "@ember/service";
2
2
  import { isEmpty } from "@ember/utils";
3
3
  import Component from "@glimmer/component";
4
4
  import { queryManager } from "ember-apollo-client";
5
- import { dropTask } from "ember-concurrency";
5
+ import { task } from "ember-concurrency";
6
6
  import { confirm } from "ember-uikit";
7
7
  import { DateTime } from "luxon";
8
8
 
@@ -81,17 +81,16 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
81
81
  : null;
82
82
  }
83
83
 
84
- @dropTask
85
- *withdraw(e) {
84
+ withdraw = task({ drop: true }, async (e) => {
86
85
  e.preventDefault();
87
86
 
88
87
  /* istanbul ignore next */
89
- if (!(yield confirm(this.intl.t("caluma.distribution.withdraw.confirm")))) {
88
+ if (!(await confirm(this.intl.t("caluma.distribution.withdraw.confirm")))) {
90
89
  return;
91
90
  }
92
91
 
93
92
  try {
94
- yield this.apollo.mutate({
93
+ await this.apollo.mutate({
95
94
  mutation: withdrawInquiryMutation,
96
95
  variables: {
97
96
  workItem: decodeId(this.args.inquiry.id),
@@ -102,15 +101,14 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
102
101
  this.intl.t("caluma.distribution.withdraw.error"),
103
102
  );
104
103
  }
105
- }
104
+ });
106
105
 
107
- @dropTask
108
- *reopen(e) {
106
+ reopen = task({ drop: true }, async (e) => {
109
107
  e.preventDefault();
110
108
 
111
109
  /* istanbul ignore next */
112
110
  if (
113
- !(yield confirm(
111
+ !(await confirm(
114
112
  this.intl.t("caluma.distribution.reopen-inquiry.confirm"),
115
113
  ))
116
114
  ) {
@@ -118,7 +116,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
118
116
  }
119
117
 
120
118
  try {
121
- yield this.apollo.mutate({
119
+ await this.apollo.mutate({
122
120
  mutation: reopenInquiryMutation,
123
121
  variables: {
124
122
  workItem: decodeId(this.args.inquiry.id),
@@ -131,18 +129,17 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
131
129
  this.intl.t("caluma.distribution.reopen-inquiry.error"),
132
130
  );
133
131
  }
134
- }
132
+ });
135
133
 
136
- @dropTask
137
- *sendReminder(e) {
134
+ sendReminder = task({ drop: true }, async (e) => {
138
135
  e.preventDefault();
139
136
 
140
- if (!(yield confirm(this.intl.t("caluma.distribution.reminder.confirm")))) {
137
+ if (!(await confirm(this.intl.t("caluma.distribution.reminder.confirm")))) {
141
138
  return;
142
139
  }
143
140
 
144
141
  try {
145
- yield this.calumaOptions.sendReminderDistributionInquiry(
142
+ await this.calumaOptions.sendReminderDistributionInquiry(
146
143
  decodeId(this.args.inquiry.id),
147
144
  );
148
145
 
@@ -150,7 +147,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
150
147
  this.intl.t("caluma.distribution.reminder.success"),
151
148
  );
152
149
 
153
- yield this.apollo.mutate({
150
+ await this.apollo.mutate({
154
151
  mutation: updateInquiryMetaMutation,
155
152
  variables: {
156
153
  inquiry: decodeId(this.args.inquiry.id),
@@ -168,5 +165,5 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
168
165
  this.intl.t("caluma.distribution.reminder.error"),
169
166
  );
170
167
  }
171
- }
168
+ });
172
169
  }
@@ -1,7 +1,8 @@
1
+ import { next } from "@ember/runloop";
1
2
  import { inject as service } from "@ember/service";
2
3
  import Component from "@glimmer/component";
3
4
  import { queryManager, getObservable } from "ember-apollo-client";
4
- import { dropTask } from "ember-concurrency";
5
+ import { task } from "ember-concurrency";
5
6
  import { trackedTask } from "reactiveweb/ember-concurrency";
6
7
 
7
8
  import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
@@ -32,16 +33,8 @@ export default class CdInquiryDialogComponent extends Component {
32
33
  );
33
34
  }
34
35
 
35
- _inquiries = trackedTask(this, this.fetchDialog, () => [
36
- this.args.from,
37
- this.args.to,
38
- this.distribution.caseId,
39
- this.config,
40
- ]);
41
-
42
- @dropTask
43
- *fetchDialog(from, to, caseId, config) {
44
- const response = yield this.apollo.watchQuery({
36
+ fetchDialog = task({ drop: true }, async (from, to, caseId, config) => {
37
+ const response = await this.apollo.watchQuery({
45
38
  query: inquiryDialogQuery,
46
39
  fetchPolicy: "cache-and-network",
47
40
  variables: {
@@ -76,16 +69,26 @@ export default class CdInquiryDialogComponent extends Component {
76
69
  });
77
70
 
78
71
  return response;
79
- }
72
+ });
80
73
 
81
- @dropTask
82
- *createInquiry(e) {
74
+ _inquiries = trackedTask(this, this.fetchDialog, () => [
75
+ this.args.from,
76
+ this.args.to,
77
+ this.distribution.caseId,
78
+ this.config,
79
+ ]);
80
+
81
+ createInquiry = task({ drop: true }, async (e) => {
83
82
  e.preventDefault();
84
83
 
85
- yield this.distribution.createInquiry.perform([this.args.to]);
84
+ await this.distribution.createInquiry.perform([this.args.to]);
85
+
86
+ await getObservable(this._inquiries.value).refetch();
86
87
 
87
- yield getObservable(this._inquiries.value).refetch();
88
+ next(this, "transitionToLatestInquiry");
89
+ });
88
90
 
91
+ transitionToLatestInquiry() {
89
92
  this.router.transitionTo(
90
93
  "inquiry.detail.index",
91
94
  {
@@ -1,7 +1,7 @@
1
1
  import { inject as service } from "@ember/service";
2
2
  import Component from "@glimmer/component";
3
3
  import { queryManager } from "ember-apollo-client";
4
- import { dropTask } from "ember-concurrency";
4
+ import { task } from "ember-concurrency";
5
5
  import { trackedTask } from "reactiveweb/ember-concurrency";
6
6
 
7
7
  import config from "@projectcaluma/ember-distribution/config";
@@ -18,40 +18,38 @@ export default class CdInquiryEditFormComponent extends Component {
18
18
 
19
19
  @queryManager apollo;
20
20
 
21
- _inquiry = trackedTask(this, this.fetchInquiry, () => [this.args.inquiry]);
22
-
23
21
  get inquiry() {
24
22
  return this._inquiry.value?.[0]?.node;
25
23
  }
26
24
 
27
- @dropTask
28
- *fetchInquiry(inquiry) {
29
- return yield this.apollo.watchQuery(
25
+ fetchInquiry = task({ drop: true }, async (inquiry) => {
26
+ return await this.apollo.watchQuery(
30
27
  {
31
28
  query: inquiryEditQuery,
32
29
  variables: { inquiry },
33
30
  },
34
31
  "allWorkItems.edges",
35
32
  );
36
- }
33
+ });
37
34
 
38
- @dropTask
39
- *send(validate) {
35
+ _inquiry = trackedTask(this, this.fetchInquiry, () => [this.args.inquiry]);
36
+
37
+ send = task({ drop: true }, async (validate) => {
40
38
  try {
41
- if (!(yield validate()) || this.distribution.sendAllInquiries.isRunning) {
39
+ if (!(await validate()) || this.distribution.sendAllInquiries.isRunning) {
42
40
  return;
43
41
  }
44
42
 
45
- yield this.apollo.mutate({
43
+ await this.apollo.mutate({
46
44
  mutation: resumeWorkItemMutation,
47
45
  variables: { workItem: this.args.inquiry },
48
46
  });
49
47
 
50
- yield this.router.transitionTo("inquiry.index");
48
+ await this.router.transitionTo("inquiry.index");
51
49
  } catch {
52
50
  this.notification.danger(
53
51
  this.intl.t("caluma.distribution.edit.send-error"),
54
52
  );
55
53
  }
56
- }
54
+ });
57
55
  }
@@ -5,7 +5,7 @@ import { next } from "@ember/runloop";
5
5
  import { inject as service } from "@ember/service";
6
6
  import Component from "@glimmer/component";
7
7
  import { queryManager } from "ember-apollo-client";
8
- import { dropTask } from "ember-concurrency";
8
+ import { task } from "ember-concurrency";
9
9
  import { trackedFunction } from "reactiveweb/function";
10
10
 
11
11
  import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
@@ -90,18 +90,17 @@ export default class CdInquiryNewFormBulkEditComponent extends Component {
90
90
  this.answers[field.question.slug] = value;
91
91
  }
92
92
 
93
- @dropTask
94
- *submit(validate, e) {
93
+ submit = task({ drop: true }, async (validate, e) => {
95
94
  e.preventDefault();
96
95
 
97
- if (!this.args.selectedGroups.length || !(yield validate())) return;
96
+ if (!this.args.selectedGroups.length || !(await validate())) return;
98
97
 
99
- yield this.distribution.createInquiry.perform(this.args.selectedGroups, {
98
+ await this.distribution.createInquiry.perform(this.args.selectedGroups, {
100
99
  answers: this.answers,
101
100
  });
102
101
 
103
102
  next(this, "transitionToFirstInquiryOfGroup", this.args.selectedGroups[0]);
104
- }
103
+ });
105
104
 
106
105
  transitionToFirstInquiryOfGroup(group) {
107
106
  const firstCreated = this.distribution.navigation.value.controlling.edges
@@ -2,7 +2,7 @@ import { action } from "@ember/object";
2
2
  import { inject as service } from "@ember/service";
3
3
  import { macroCondition, isTesting } from "@embroider/macros";
4
4
  import Component from "@glimmer/component";
5
- import { timeout, restartableTask } from "ember-concurrency";
5
+ import { timeout, task } from "ember-concurrency";
6
6
  import { trackedTask } from "reactiveweb/ember-concurrency";
7
7
 
8
8
  import config from "@projectcaluma/ember-distribution/config";
@@ -37,14 +37,6 @@ export default class CdInquiryNewFormSelectComponent extends Component {
37
37
  }));
38
38
  }
39
39
 
40
- groups = trackedTask(this, this.fetchGroups, () => [
41
- // if we want to show all services we need to fetch all groups
42
- this.showAllServices
43
- ? Object.keys(this.config.new.types)
44
- : this.args.selectedTypes,
45
- this.args.search,
46
- ]);
47
-
48
40
  @action
49
41
  updateSelectedTypes(type, e) {
50
42
  e.preventDefault();
@@ -59,26 +51,24 @@ export default class CdInquiryNewFormSelectComponent extends Component {
59
51
  );
60
52
  }
61
53
 
62
- @restartableTask
63
- *updateSearch(e) {
54
+ updateSearch = task({ restartable: true }, async (e) => {
64
55
  e.preventDefault();
65
56
 
66
57
  /* istanbul ignore next */
67
58
  if (macroCondition(isTesting())) {
68
59
  // no timeout
69
60
  } else {
70
- yield timeout(500);
61
+ await timeout(500);
71
62
  }
72
63
 
73
64
  this.args.onChangeSearch(e.target.value);
74
- }
65
+ });
75
66
 
76
- @restartableTask
77
- *fetchGroups(types, search) {
67
+ fetchGroups = task({ restartable: true }, async (types, search) => {
78
68
  // https://github.com/ember-cli/eslint-plugin-ember/issues/1413
79
- yield Promise.resolve();
69
+ await Promise.resolve();
80
70
 
81
- const typedGroups = yield this.calumaOptions.fetchTypedGroups(
71
+ const typedGroups = await this.calumaOptions.fetchTypedGroups(
82
72
  types,
83
73
  search,
84
74
  );
@@ -93,5 +83,13 @@ export default class CdInquiryNewFormSelectComponent extends Component {
93
83
  }));
94
84
  })
95
85
  .sort((a, b) => a.name.localeCompare(b.name));
96
- }
86
+ });
87
+
88
+ groups = trackedTask(this, this.fetchGroups, () => [
89
+ // if we want to show all services we need to fetch all groups
90
+ this.showAllServices
91
+ ? Object.keys(this.config.new.types)
92
+ : this.args.selectedTypes,
93
+ this.args.search,
94
+ ]);
97
95
  }
@@ -1,7 +1,7 @@
1
1
  import { inject as service } from "@ember/service";
2
2
  import Component from "@glimmer/component";
3
3
  import { queryManager } from "ember-apollo-client";
4
- import { dropTask } from "ember-concurrency";
4
+ import { task } from "ember-concurrency";
5
5
  import { confirm } from "ember-uikit";
6
6
 
7
7
  import { decodeId } from "@projectcaluma/ember-core/helpers/decode-id";
@@ -19,13 +19,12 @@ export default class CdNavigationControlsComponent extends Component {
19
19
  @queryManager apollo;
20
20
  @config config;
21
21
 
22
- @dropTask
23
- *completeDistribution() {
22
+ completeDistribution = task({ drop: true }, async () => {
24
23
  try {
25
24
  let confirmText = this.intl.t("caluma.distribution.skip-confirm");
26
25
 
27
26
  if (this.distribution.hasInquiries) {
28
- const incompleteInquiries = yield this.apollo.query(
27
+ const incompleteInquiries = await this.apollo.query(
29
28
  {
30
29
  query: incompleteInquiriesQuery,
31
30
  variables: {
@@ -44,35 +43,34 @@ export default class CdNavigationControlsComponent extends Component {
44
43
  });
45
44
  }
46
45
 
47
- if (!(yield confirm(confirmText))) {
46
+ if (!(await confirm(confirmText))) {
48
47
  return;
49
48
  }
50
49
 
51
50
  const completeDistributionWorkItem =
52
51
  this.distribution.controls.value.complete.edges?.[0]?.node.id;
53
52
 
54
- yield this.apollo.mutate({
53
+ await this.apollo.mutate({
55
54
  mutation: completeWorkItemMutation,
56
55
  variables: {
57
56
  workItem: completeDistributionWorkItem,
58
57
  },
59
58
  });
60
59
 
61
- yield this.config.hooks.postCompleteDistribution?.();
60
+ await this.config.hooks.postCompleteDistribution?.();
62
61
 
63
- yield this.distribution.refetch();
62
+ await this.distribution.refetch();
64
63
  this.router.transitionTo("index");
65
64
  } catch {
66
65
  this.notification.danger(
67
66
  this.intl.t("caluma.distribution.complete-error"),
68
67
  );
69
68
  }
70
- }
69
+ });
71
70
 
72
- @dropTask
73
- *reopenDistribution() {
71
+ reopenDistribution = task({ drop: true }, async () => {
74
72
  try {
75
- if (!(yield confirm(this.intl.t("caluma.distribution.reopen-confirm")))) {
73
+ if (!(await confirm(this.intl.t("caluma.distribution.reopen-confirm")))) {
76
74
  return;
77
75
  }
78
76
 
@@ -80,23 +78,22 @@ export default class CdNavigationControlsComponent extends Component {
80
78
  this.distribution.controls.value?.case.edges[0]?.node.parentWorkItem.id,
81
79
  );
82
80
 
83
- yield this.apollo.mutate({
81
+ await this.apollo.mutate({
84
82
  mutation: reopenDistributionMutation,
85
83
  variables: {
86
84
  workItem: distributionWorkItemId,
87
85
  },
88
86
  });
89
87
 
90
- yield this.distribution.refetchControls();
88
+ await this.distribution.refetchControls();
91
89
  } catch {
92
90
  this.notification.danger(this.intl.t("caluma.distribution.reopen-error"));
93
91
  }
94
- }
92
+ });
95
93
 
96
- @dropTask
97
- *checkInquiries() {
94
+ checkInquiries = task({ drop: true }, async () => {
98
95
  try {
99
- yield this.apollo.mutate({
96
+ await this.apollo.mutate({
100
97
  mutation: completeWorkItemMutation,
101
98
  variables: {
102
99
  workItem: decodeId(
@@ -109,5 +106,5 @@ export default class CdNavigationControlsComponent extends Component {
109
106
  this.intl.t("caluma.distribution.check-inquiries-error"),
110
107
  );
111
108
  }
112
- }
109
+ });
113
110
  }
@@ -1,7 +1,7 @@
1
1
  import Service, { inject as service } from "@ember/service";
2
2
  import { tracked } from "@glimmer/tracking";
3
3
  import { queryManager, getObservable } from "ember-apollo-client";
4
- import { dropTask } from "ember-concurrency";
4
+ import { task } from "ember-concurrency";
5
5
  import { confirm } from "ember-uikit";
6
6
  import { gql } from "graphql-tag";
7
7
  import { trackedTask } from "reactiveweb/ember-concurrency";
@@ -35,9 +35,6 @@ export default class DistributionService extends Service {
35
35
  );
36
36
  }
37
37
 
38
- controls = trackedTask(this, this.fetchControls, () => [this.caseId]);
39
- navigation = trackedTask(this, this.fetchNavigation, () => [this.caseId]);
40
-
41
38
  async refetch() {
42
39
  await this.refetchControls();
43
40
  await this.refetchNavigation();
@@ -51,9 +48,8 @@ export default class DistributionService extends Service {
51
48
  await getObservable(this.controls.value)?.refetch();
52
49
  }
53
50
 
54
- @dropTask
55
- *fetchControls(caseId) {
56
- return yield this.apollo.watchQuery({
51
+ fetchControls = task({ drop: true }, async (caseId) => {
52
+ return await this.apollo.watchQuery({
57
53
  query: controlsQuery,
58
54
  variables: {
59
55
  caseId,
@@ -64,11 +60,10 @@ export default class DistributionService extends Service {
64
60
  checkTask: this.config.controls.checkTask,
65
61
  },
66
62
  });
67
- }
63
+ });
68
64
 
69
- @dropTask
70
- *fetchNavigation(caseId) {
71
- const response = yield this.apollo.watchQuery({
65
+ fetchNavigation = task({ drop: true }, async (caseId) => {
66
+ const response = await this.apollo.watchQuery({
72
67
  query: navigationQuery,
73
68
  variables: {
74
69
  caseId,
@@ -101,16 +96,18 @@ export default class DistributionService extends Service {
101
96
  });
102
97
 
103
98
  return response;
104
- }
99
+ });
105
100
 
106
- @dropTask
107
- *createInquiry(groups, context = {}) {
101
+ controls = trackedTask(this, this.fetchControls, () => [this.caseId]);
102
+ navigation = trackedTask(this, this.fetchNavigation, () => [this.caseId]);
103
+
104
+ createInquiry = task({ drop: true }, async (groups, context = {}) => {
108
105
  try {
109
106
  // get create inquiry work item to complete
110
107
  const createId = decodeId(this.controls.value?.create.edges[0].node.id);
111
108
 
112
109
  // create new inquiries
113
- yield this.apollo.mutate({
110
+ await this.apollo.mutate({
114
111
  mutation: createInquiryMutation,
115
112
  variables: {
116
113
  id: createId,
@@ -122,13 +119,13 @@ export default class DistributionService extends Service {
122
119
  });
123
120
 
124
121
  // refetch navigation and controls data
125
- yield this.refetch();
122
+ await this.refetch();
126
123
  } catch {
127
124
  this.notification.danger(
128
125
  this.intl.t("caluma.distribution.new.error", { count: groups.length }),
129
126
  );
130
127
  }
131
- }
128
+ });
132
129
 
133
130
  @cached
134
131
  get inquiries() {
@@ -175,15 +172,14 @@ export default class DistributionService extends Service {
175
172
  );
176
173
  }
177
174
 
178
- @dropTask
179
- *sendAllInquiries() {
175
+ sendAllInquiries = task({ drop: true }, async () => {
180
176
  const ids = this.controls.value.send.edges
181
177
  .filter((edge) => edge.node.status === "SUSPENDED")
182
178
  .map((edge) => decodeId(edge.node.id));
183
179
 
184
180
  if (
185
181
  ids.length &&
186
- !(yield confirm(
182
+ !(await confirm(
187
183
  this.intl.t("caluma.distribution.send-confirm", { count: ids.length }),
188
184
  ))
189
185
  ) {
@@ -204,9 +200,9 @@ export default class DistributionService extends Service {
204
200
 
205
201
  const mutation = gql`mutation SendInquiries {${mutations.join("\n")}}`;
206
202
 
207
- yield this.apollo.mutate({ mutation });
203
+ await this.apollo.mutate({ mutation });
208
204
  } catch {
209
205
  this.notification.danger(this.intl.t("caluma.distribution.send-error"));
210
206
  }
211
- }
207
+ });
212
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "14.6.0",
3
+ "version": "14.7.1",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -18,7 +18,7 @@
18
18
  "ember-can": "^7.0.0",
19
19
  "ember-cli-babel": "^8.2.0",
20
20
  "ember-cli-htmlbars": "^6.3.0",
21
- "ember-concurrency": "^4.0.2",
21
+ "ember-concurrency": "^4.0.2 || ^5.1.0",
22
22
  "ember-engines-router-service": "^0.6.0",
23
23
  "ember-flatpickr": "^8.0.1",
24
24
  "ember-intl": "^7.1.1",
@@ -35,15 +35,15 @@
35
35
  "luxon": "^3.5.0",
36
36
  "reactiveweb": "^1.3.0",
37
37
  "tracked-toolbox": "^2.0.0",
38
- "@projectcaluma/ember-core": "^14.6.0",
39
- "@projectcaluma/ember-workflow": "^14.6.0",
40
- "@projectcaluma/ember-form": "^14.6.0"
38
+ "@projectcaluma/ember-form": "^14.7.1",
39
+ "@projectcaluma/ember-workflow": "^14.7.1",
40
+ "@projectcaluma/ember-core": "^14.7.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@ember/optional-features": "2.2.0",
43
+ "@ember/optional-features": "2.3.0",
44
44
  "@ember/test-helpers": "4.0.4",
45
45
  "@embroider/test-setup": "4.0.0",
46
- "@faker-js/faker": "10.0.0",
46
+ "@faker-js/faker": "10.2.0",
47
47
  "@glimmer/component": "1.1.2",
48
48
  "@glimmer/tracking": "1.1.2",
49
49
  "broccoli-asset-rev": "3.0.0",
@@ -63,12 +63,12 @@
63
63
  "ember-try": "4.0.0",
64
64
  "loader.js": "4.7.0",
65
65
  "miragejs": "0.1.48",
66
- "qunit": "2.24.1",
66
+ "qunit": "2.25.0",
67
67
  "qunit-dom": "3.5.0",
68
- "sass": "1.93.2",
69
- "uikit": "3.23.13",
70
- "webpack": "5.101.3",
71
- "@projectcaluma/ember-testing": "14.6.0"
68
+ "sass": "1.97.3",
69
+ "uikit": "3.25.6",
70
+ "webpack": "5.104.1",
71
+ "@projectcaluma/ember-testing": "14.7.1"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "ember-engines": "^0.11.0",