@projectcaluma/ember-distribution 1.0.0-beta.13 → 1.0.0-beta.16

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/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ # [@projectcaluma/ember-distribution-v1.0.0-beta.16](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.15...@projectcaluma/ember-distribution-v1.0.0-beta.16) (2022-08-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * **distribution:** always show confirmation dialog when completing ([507e062](https://github.com/projectcaluma/ember-caluma/commit/507e062afa32e7d4b8d64a2016a4c795a6e632cf))
7
+
8
+ # [@projectcaluma/ember-distribution-v1.0.0-beta.15](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-distribution-v1.0.0-beta.14...@projectcaluma/ember-distribution-v1.0.0-beta.15) (2022-07-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **distribution:** include fetch service dependency ([841c233](https://github.com/projectcaluma/ember-caluma/commit/841c23320f07968a8181bfc9273f592652049516))
14
+ * **distribution:** only show permission info for suspended inquiries ([bd594f8](https://github.com/projectcaluma/ember-caluma/commit/bd594f8ac026af8bf0579dc947862710363ac028))
15
+
16
+ # [@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)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **distribution:** fix title and deadline alignment and icon size ([eb6f495](https://github.com/projectcaluma/ember-caluma/commit/eb6f495408decdf7d735ad2dbc702ee7e4e0ede5))
22
+ * **distribution:** fix title layout with status ([dc49b82](https://github.com/projectcaluma/ember-caluma/commit/dc49b82b3d2f3b9962e9373506e286b4b7ca7225))
23
+ * **distribution:** order answers by configured question order ([668383f](https://github.com/projectcaluma/ember-caluma/commit/668383f5526403187ee66b4ac85cc8ace4ad061a))
24
+
25
+
26
+ ### Features
27
+
28
+ * **distribution:** change needs-interaction status icon to text file ([695c6db](https://github.com/projectcaluma/ember-caluma/commit/695c6db4b7d87af87e334da7aece7e0f4b17129e))
29
+
1
30
  # [@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)
2
31
 
3
32
 
@@ -1,8 +1,11 @@
1
- <p class="uk-text-large uk-margin-remove">
2
- {{@name}}
3
- {{#if @status}}
4
- <UkLabel @label={{@status}} class="uk-margin-left" />
5
- {{/if}}
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}}
6
9
  </p>
7
10
 
8
11
  {{#if (and @modifiedBy @modifiedAt)}}
@@ -5,19 +5,14 @@
5
5
  >
6
6
  <:default as |content|>
7
7
 
8
- <div class="uk-position-relative">
9
- <CdDocumentHeader
10
- @name={{content.document.rootForm.raw.name}}
11
- @status={{if (eq this.inquiry.status "READY") this.answerStatus}}
12
- @modifiedAt={{this.inquiry.childCase.document.modifiedContentAt}}
13
- @modifiedBy={{this.inquiry.childCase.document.modifiedContentByUser}}
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,17 +1,12 @@
1
1
  {{#if this.deadline.value}}
2
2
  <div
3
- class="uk-position-top-right
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
- uk-flex-inline uk-flex-middle"
8
+ }}"
9
+ data-test-deadline
15
10
  ...attributes
16
11
  >
17
12
  <UkIcon
@@ -1,21 +1,23 @@
1
1
  <div class="uk-margin-remove-last-child">
2
- <p
3
- class="uk-flex uk-flex-middle uk-text-large uk-margin-remove"
4
- data-test-title
5
- >
2
+ <div class="uk-flex uk-flex-middle uk-text-large" data-test-title>
6
3
  {{#if (eq @type "request")}}
7
4
  <UkIcon @icon="forward" class="uk-margin-small-right" />
8
- {{group-name @inquiry.controllingGroups}}
9
- {{#if
10
- (and (can "answer inquiry" @inquiry) (not @disabled) this.answerStatus)
11
- }}
12
- <UkLabel @label={{this.answerStatus}} class="uk-margin-left" />
13
- {{/if}}
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>
14
15
  {{else if (eq @type "answer")}}
15
16
  <UkIcon @icon="reply" class="uk-margin-small-right" />
16
- {{group-name @inquiry.addressedGroups}}
17
+ <div class="uk-width-expand">{{group-name @inquiry.addressedGroups}}</div>
17
18
  {{/if}}
18
- </p>
19
+ {{yield}}
20
+ </div>
19
21
 
20
22
  <ul
21
23
  class="uk-subnav uk-subnav-divider
@@ -34,9 +34,16 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
34
34
  }
35
35
 
36
36
  get answerInfo() {
37
+ const questions = this.config.inquiry.answer.infoQuestions ?? [];
38
+
37
39
  return this.args.type === "answer"
38
40
  ? this.args.inquiry.childCase.document.info.edges
39
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
+ )
40
47
  .map((edge) => ({
41
48
  question: edge.node.question.label,
42
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>
@@ -15,8 +15,12 @@
15
15
  />
16
16
 
17
17
  <hr />
18
-
19
- {{#if (cannot "send inquiry" this.inquiry)}}
18
+ {{#if
19
+ (and
20
+ (cannot "send inquiry" this.inquiry)
21
+ (eq this.inquiry.status "SUSPENDED")
22
+ )
23
+ }}
20
24
  <div class="uk-alert uk-alert-warning uk-flex uk-flex-middle">
21
25
  <UkIcon @icon="warning" class="uk-margin-small-right" />
22
26
  {{t "caluma.distribution.edit.send-not-allowed"}}
@@ -33,14 +33,14 @@ export default class CdNavigationControlsComponent extends Component {
33
33
  "allWorkItems.totalCount"
34
34
  );
35
35
 
36
- if (
37
- incompleteInquiries > 0 &&
38
- !(yield confirm(
39
- this.intl.t("caluma.distribution.complete-confirm", {
40
- count: incompleteInquiries,
41
- })
42
- ))
43
- ) {
36
+ const confirmText =
37
+ incompleteInquiries === 0
38
+ ? this.intl.t("caluma.distribution.complete-confirm-empty")
39
+ : this.intl.t("caluma.distribution.complete-confirm", {
40
+ count: incompleteInquiries,
41
+ });
42
+
43
+ if (!(yield confirm(confirmText))) {
44
44
  return;
45
45
  }
46
46
 
package/addon/engine.js CHANGED
@@ -17,6 +17,7 @@ export default class DistributionEngine extends Engine {
17
17
  "intl",
18
18
  "caluma-options",
19
19
  "store", // this is just in case that a custom form widget uses the store
20
+ "fetch",
20
21
  ],
21
22
  };
22
23
  }
@@ -86,6 +86,7 @@ fragment InquiryDialog on WorkItem {
86
86
  question {
87
87
  id
88
88
  label
89
+ slug
89
90
  }
90
91
  ... on StringAnswer {
91
92
  value
@@ -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>
@@ -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]: "refresh",
13
+ [INQUIRY_STATUS.NEEDS_INTERACTION]: "file-text",
14
14
  };
15
15
 
16
16
  export const COLOR_MAP = {
@@ -3,7 +3,7 @@
3
3
  $size: 36px;
4
4
  $iconSize: $size * 0.6;
5
5
 
6
- $sizeSmall: 24px;
6
+ $sizeSmall: 32px;
7
7
  $iconSizeSmall: $sizeSmall * 0.6;
8
8
 
9
9
  $colors: (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "1.0.0-beta.13",
3
+ "version": "1.0.0-beta.16",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -19,38 +19,38 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@ember/string": "^3.0.0",
22
- "@embroider/macros": "^1.7.1",
22
+ "@embroider/macros": "^1.8.3",
23
23
  "@glimmer/component": "^1.1.2",
24
24
  "@glimmer/tracking": "^1.1.2",
25
- "@projectcaluma/ember-core": "^11.0.0-beta.7",
26
- "@projectcaluma/ember-form": "^11.0.0-beta.21",
25
+ "@projectcaluma/ember-core": "^11.0.0-beta.9",
26
+ "@projectcaluma/ember-form": "^11.0.0-beta.23",
27
27
  "@projectcaluma/ember-workflow": "^11.0.0-beta.7",
28
- "ember-apollo-client": "^4.0.2",
28
+ "ember-apollo-client": "~4.0.2",
29
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.1",
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": "^4.8.2",
38
+ "ember-resources": "^5.2.1",
39
39
  "ember-svg-jar": "^2.3.4",
40
40
  "ember-test-selectors": "^6.0.0",
41
41
  "ember-uikit": "^5.1.3",
42
42
  "graphql": "^15.8.0",
43
43
  "graphql-tag": "^2.12.6",
44
44
  "lodash.merge": "^4.6.2",
45
- "luxon": "^2.4.0",
45
+ "luxon": "^3.0.1",
46
46
  "tracked-toolbox": "^1.2.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@ember/optional-features": "2.0.0",
50
50
  "@ember/test-helpers": "2.8.1",
51
- "@embroider/test-setup": "1.7.1",
52
- "@faker-js/faker": "7.2.0",
53
- "@projectcaluma/ember-testing": "11.0.0-beta.9",
51
+ "@embroider/test-setup": "1.8.3",
52
+ "@faker-js/faker": "7.4.0",
53
+ "@projectcaluma/ember-testing": "11.0.0-beta.11",
54
54
  "broccoli-asset-rev": "3.0.0",
55
55
  "ember-cli": "3.28.5",
56
56
  "ember-cli-code-coverage": "1.0.3",
@@ -61,7 +61,7 @@
61
61
  "ember-cli-sri": "2.1.1",
62
62
  "ember-cli-terser": "4.0.2",
63
63
  "ember-disable-prototype-extensions": "1.1.3",
64
- "ember-engines": "0.8.22",
64
+ "ember-engines": "0.8.23",
65
65
  "ember-export-application-global": "2.0.1",
66
66
  "ember-load-initializers": "2.1.2",
67
67
  "ember-maybe-import-regenerator": "1.0.0",
@@ -75,8 +75,8 @@
75
75
  "npm-run-all": "4.1.5",
76
76
  "qunit": "2.19.1",
77
77
  "qunit-dom": "2.0.0",
78
- "sass": "1.52.3",
79
- "webpack": "5.73.0"
78
+ "sass": "1.54.4",
79
+ "webpack": "5.74.0"
80
80
  },
81
81
  "engines": {
82
82
  "node": "12.* || 14.* || >= 16"
@@ -9,6 +9,7 @@ caluma:
9
9
  "Es gibt noch <b>{count} offene {count, plural, =1 {Anfrage} other {Anfragen}}</b>
10
10
  in der aktuellen Zirkulation. Wenn Sie die Zirkulation abschliessen, werden
11
11
  alle verbleibenden offenen Anfragen abgebrochen. Möchten Sie fortfahren?"
12
+ complete-confirm-empty: "Möchten Sie die Zirkulation wirklich abschliessen?"
12
13
  send-error: "Fehler beim Versenden der offenen Anfragen"
13
14
  complete-error: "Fehler beim Abschliessen der Zirkulation"
14
15
 
@@ -10,6 +10,7 @@ caluma:
10
10
  {count, plural, =1 {inquiry} other {inquiries}}</b> on the current
11
11
  distribution. Completing the distribution will cause all remaining
12
12
  pending inquiries to be canceled. Would you like to continue?"
13
+ complete-confirm-empty: "Do you really want to complete the distribution?"
13
14
  send-error: "Error while sending pending inquiries"
14
15
  complete-error: "Error while completing distribution"
15
16
 
@@ -9,6 +9,7 @@ caluma:
9
9
  "Il y a <b>{count} {count, plural, =1 {demande} other {demandes}} en
10
10
  attente</b> sur la distribution actuelle. Si vous terminez la distribution,
11
11
  toutes les demandes en attente seront annulées. Voulez-vous continuer ?"
12
+ complete-confirm-empty: "Vous voulez vraiment fermer la circulation ?"
12
13
  send-error: "Erreur lors de l'envoi des demandes ouvertes"
13
14
  complete-error: "Erreur lors de la terminaison de la distribution"
14
15