@projectcaluma/ember-distribution 1.0.0-beta.8 → 11.0.0-beta.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/addon/abilities/distribution.js +19 -0
  3. package/addon/abilities/inquiry.js +20 -0
  4. package/addon/components/cd-document-header.hbs +20 -0
  5. package/addon/components/cd-inquiry-answer-form.hbs +34 -9
  6. package/addon/components/cd-inquiry-answer-form.js +30 -12
  7. package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +7 -13
  8. package/addon/components/cd-inquiry-dialog/inquiry-divider.hbs +1 -1
  9. package/addon/components/cd-inquiry-dialog/inquiry-part.hbs +107 -44
  10. package/addon/components/cd-inquiry-dialog/inquiry-part.js +25 -8
  11. package/addon/components/cd-inquiry-dialog/inquiry.hbs +8 -4
  12. package/addon/components/cd-inquiry-dialog.hbs +19 -0
  13. package/addon/components/cd-inquiry-dialog.js +32 -3
  14. package/addon/components/cd-inquiry-edit-form.hbs +36 -17
  15. package/addon/components/cd-inquiry-edit-form.js +2 -2
  16. package/addon/components/cd-inquiry-new-form.hbs +35 -31
  17. package/addon/components/cd-inquiry-new-form.js +17 -45
  18. package/addon/components/cd-navigation/controls.hbs +47 -18
  19. package/addon/components/cd-navigation/controls.js +34 -9
  20. package/addon/components/cd-navigation/item.hbs +14 -11
  21. package/addon/components/cd-navigation/section.hbs +4 -4
  22. package/addon/components/cd-navigation/status-indicator.hbs +10 -15
  23. package/addon/components/cd-navigation.hbs +11 -14
  24. package/addon/components/cd-truncated.hbs +8 -0
  25. package/addon/components/cd-truncated.js +32 -0
  26. package/addon/config.js +12 -8
  27. package/addon/controllers/application.js +3 -0
  28. package/addon/controllers/new.js +1 -1
  29. package/addon/engine.js +3 -1
  30. package/addon/gql/fragments/inquiry.graphql +40 -14
  31. package/addon/gql/mutations/complete-inquiry-work-item.graphql +1 -1
  32. package/addon/gql/mutations/redo-work-item.graphql +8 -0
  33. package/addon/gql/queries/control-work-items.graphql +11 -0
  34. package/addon/gql/queries/inquiry-answer.graphql +17 -12
  35. package/addon/gql/queries/inquiry-dialog.graphql +3 -2
  36. package/addon/gql/queries/inquiry-edit.graphql +2 -0
  37. package/addon/gql/queries/inquiry-navigation.graphql +2 -1
  38. package/addon/services/distribution.js +42 -4
  39. package/addon/templates/application.hbs +17 -6
  40. package/addon/utils/inquiry-answer-status.js +34 -0
  41. package/addon/utils/inquiry-deadline.js +5 -7
  42. package/addon/utils/inquiry-status.js +12 -7
  43. package/app/components/cd-document-header.js +1 -0
  44. package/app/components/{cd-icon-button.js → cd-truncated.js} +1 -1
  45. package/app/styles/@projectcaluma/ember-distribution.scss +3 -2
  46. package/app/styles/_answer-form.scss +4 -0
  47. package/app/styles/_group-list.scss +7 -0
  48. package/app/styles/_inquiry-divider.scss +1 -1
  49. package/app/styles/_truncated.scss +3 -0
  50. package/app/utils/inquiry-answer-status.js +1 -0
  51. package/index.js +1 -6
  52. package/package.json +28 -29
  53. package/translations/de.yaml +30 -8
  54. package/translations/en.yaml +31 -9
  55. package/translations/fr.yaml +31 -9
  56. package/addon/components/cd-icon-button.hbs +0 -27
  57. package/addon/components/cd-icon-button.js +0 -22
  58. package/app/styles/_icon-button.scss +0 -13
  59. package/app/styles/_status-indicator.scss +0 -31
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "1.0.0-beta.8",
3
+ "version": "11.0.0-beta.25",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -19,65 +19,64 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@ember/string": "^3.0.0",
22
- "@embroider/macros": "^1.6.0",
23
- "@glimmer/component": "^1.1.1",
24
- "@glimmer/tracking": "^1.1.1",
25
- "@projectcaluma/ember-core": "^11.0.0-beta.6",
26
- "@projectcaluma/ember-form": "^11.0.0-beta.17",
27
- "@projectcaluma/ember-workflow": "^11.0.0-beta.6",
28
- "ember-apollo-client": "^4.0.2",
29
- "ember-auto-import": "^2.4.1",
22
+ "@embroider/macros": "^1.8.3",
23
+ "@glimmer/component": "^1.1.2",
24
+ "@glimmer/tracking": "^1.1.2",
25
+ "@projectcaluma/ember-core": "^11.0.0-beta.25",
26
+ "@projectcaluma/ember-form": "^11.0.0-beta.25",
27
+ "@projectcaluma/ember-workflow": "^11.0.0-beta.25",
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.1",
33
- "ember-concurrency": "^2.2.1",
32
+ "ember-cli-htmlbars": "^6.1.0",
33
+ "ember-concurrency": "^2.3.2",
34
34
  "ember-engines-router-service": "^0.3.0",
35
- "ember-fetch": "^8.1.1",
35
+ "ember-fetch": "^8.1.2",
36
36
  "ember-intl": "^5.7.2",
37
37
  "ember-pikaday": "^4.0.0",
38
- "ember-resources": "^4.4.0",
38
+ "ember-resources": "^5.3.0",
39
39
  "ember-svg-jar": "^2.3.4",
40
40
  "ember-test-selectors": "^6.0.0",
41
- "ember-uikit": "^5.1.1",
41
+ "ember-uikit": "^6.0.0",
42
42
  "graphql": "^15.8.0",
43
43
  "graphql-tag": "^2.12.6",
44
- "ionicons": "^6.0.1",
45
44
  "lodash.merge": "^4.6.2",
46
- "luxon": "^2.3.1",
45
+ "luxon": "^3.0.2",
47
46
  "tracked-toolbox": "^1.2.3"
48
47
  },
49
48
  "devDependencies": {
50
49
  "@ember/optional-features": "2.0.0",
51
- "@ember/test-helpers": "2.7.0",
52
- "@embroider/test-setup": "1.6.0",
53
- "@faker-js/faker": "6.1.2",
54
- "@projectcaluma/ember-testing": "11.0.0-beta.6",
50
+ "@ember/test-helpers": "2.8.1",
51
+ "@embroider/test-setup": "1.8.3",
52
+ "@faker-js/faker": "7.4.0",
53
+ "@projectcaluma/ember-testing": "11.0.0-beta.25",
55
54
  "broccoli-asset-rev": "3.0.0",
56
55
  "ember-cli": "3.28.5",
57
56
  "ember-cli-code-coverage": "1.0.3",
58
- "ember-cli-dependency-checker": "3.2.0",
57
+ "ember-cli-dependency-checker": "3.3.1",
59
58
  "ember-cli-inject-live-reload": "2.1.0",
60
- "ember-cli-mirage": "3.0.0-alpha.2",
61
- "ember-cli-sass": "10.0.1",
59
+ "ember-cli-mirage": "3.0.0-alpha.3",
60
+ "ember-cli-sass": "11.0.1",
62
61
  "ember-cli-sri": "2.1.1",
63
62
  "ember-cli-terser": "4.0.2",
64
63
  "ember-disable-prototype-extensions": "1.1.3",
65
- "ember-engines": "0.8.20",
64
+ "ember-engines": "0.8.23",
66
65
  "ember-export-application-global": "2.0.1",
67
66
  "ember-load-initializers": "2.1.2",
68
67
  "ember-maybe-import-regenerator": "1.0.0",
69
68
  "ember-qunit": "5.1.5",
70
69
  "ember-resolver": "8.0.3",
71
- "ember-source": "3.28.8",
70
+ "ember-source": "3.28.9",
72
71
  "ember-source-channel-url": "3.0.0",
73
72
  "ember-try": "2.0.0",
74
73
  "loader.js": "4.7.0",
75
- "miragejs": "0.1.43",
74
+ "miragejs": "0.1.45",
76
75
  "npm-run-all": "4.1.5",
77
- "qunit": "2.18.1",
76
+ "qunit": "2.19.1",
78
77
  "qunit-dom": "2.0.0",
79
- "sass": "1.50.0",
80
- "webpack": "5.72.0"
78
+ "sass": "1.54.5",
79
+ "webpack": "5.74.0"
81
80
  },
82
81
  "engines": {
83
82
  "node": "12.* || 14.* || >= 16"
@@ -3,31 +3,52 @@ caluma:
3
3
  empty: "Es wurden noch keine Anfragen erstellt."
4
4
  start: "Starten"
5
5
  send: "Offene Anfragen versenden"
6
+ complete: "Zirkulation abschliessen"
7
+ reopen: "Zirkulation wiedereröffnen"
6
8
  send-confirm: "Wollen Sie wirklich alle offenen Anfragen versenden?"
7
9
  complete-confirm:
8
10
  "Es gibt noch <b>{count} offene {count, plural, =1 {Anfrage} other {Anfragen}}</b>
9
11
  in der aktuellen Zirkulation. Wenn Sie die Zirkulation abschliessen, werden
10
12
  alle verbleibenden offenen Anfragen abgebrochen. Möchten Sie fortfahren?"
13
+ complete-confirm-empty: "Möchten Sie die Zirkulation wirklich abschliessen?"
14
+ reopen-confirm: "Wollen Sie die Zirkulation wirklich wiedereröffnen?"
11
15
  send-error: "Fehler beim Versenden der offenen Anfragen"
12
16
  complete-error: "Fehler beim Abschliessen der Zirkulation"
17
+ reopen-error: "Fehler beim Wiedereröffnen der Zirkulation"
18
+
19
+ more: "mehr"
20
+ less: "weniger"
21
+
22
+ last-modified: "Zuletzt bearbeitet von {user} am {date} um {time}"
23
+ details: "Details"
24
+ not-allowed-hint:
25
+ "Sie können jedoch das Formular bearbeiten und die Eingabedaten werden
26
+ automatisch gespeichert."
13
27
 
14
28
  edit:
15
- title: "Anfrage bearbeiten"
16
29
  link: "Bearbeiten"
17
-
18
30
  send: "Senden"
19
31
  send-error: "Fehler beim Senden der Anfrage"
32
+ send-not-allowed: "Sie sind nicht berechtigt diese Anfrage zu versenden."
20
33
 
21
34
  answer:
22
- title: "Anfrage beantworten"
23
35
  link: "Beantworten"
24
36
 
25
- release-for-review: "Zur Kontrolle freigeben"
26
- release-adjustment-for-review: "Anpassung zur Kontrolle freigeben"
27
- confirm: "Bestätigen"
28
- revise: "Überarbeiten"
29
-
30
37
  complete-error: "Fehler beim Abschliessen der Aufgabe"
38
+ complete-not-allowed: "Sie sind nicht berechtigt diese Antwort zu versenden."
39
+
40
+ buttons:
41
+ compose:
42
+ label: "Zur Kontrolle freigeben"
43
+ status: "In Bearbeitung"
44
+ adjust:
45
+ label: "Anpassung zur Kontrolle freigeben"
46
+ status: "In Überarbeitung"
47
+ confirm:
48
+ label: "Bestätigen"
49
+ status: "In Prüfung"
50
+ revise:
51
+ label: "Überarbeiten"
31
52
 
32
53
  new:
33
54
  title: "Neue Anfrage"
@@ -47,6 +68,7 @@ caluma:
47
68
 
48
69
  status:
49
70
  draft: "Entwurf"
71
+ skipped: "Vorzeitig beendet"
50
72
  sent: "Versendet"
51
73
  positive: "Positiv"
52
74
  negative: "Negativ"
@@ -3,32 +3,53 @@ caluma:
3
3
  empty: "No inquiries have been created yet."
4
4
  start: "Start"
5
5
  send: "Send pending inquiries"
6
+ complete: "Complete circulation"
6
7
  send-confirm: "Do you really want to send all pending inquiries?"
8
+ reopen: "Reopen circulation"
7
9
  complete-confirm:
8
10
  "There {count, plural, =1 {is} other {are}} <b>{count} pending
9
11
  {count, plural, =1 {inquiry} other {inquiries}}</b> on the current
10
12
  distribution. Completing the distribution will cause all remaining
11
13
  pending inquiries to be canceled. Would you like to continue?"
14
+ complete-confirm-empty: "Do you really want to complete the distribution?"
15
+ reopen-confirm: "Do you really want to reopen the distribution?"
12
16
  send-error: "Error while sending pending inquiries"
13
- complete-error: "Error while completing distribution"
17
+ complete-error: "Error while completing the distribution"
18
+ reopen-error: "Error while reopening the distribution"
19
+
20
+ more: "more"
21
+ less: "less"
22
+
23
+ last-modified: "Last modified by {user} on {date} at {time}"
24
+ details: "Details"
25
+ not-allowed-hint:
26
+ "However, you can edit the form and the input will be saved
27
+ automatically."
14
28
 
15
29
  edit:
16
- title: "Edit inquiry"
17
30
  link: "Edit"
18
-
19
31
  send: "Send"
20
32
  send-error: "Error while sending the inquiry"
33
+ send-not-allowed: "You are not allowed to send this inquiry."
21
34
 
22
35
  answer:
23
- title: "Answer inquiry"
24
36
  link: "Answer"
25
37
 
26
- release-for-review: "Release for review"
27
- release-adjustment-for-review: "Release adjustment for review"
28
- confirm: "Confirm"
29
- revise: "Revise"
30
-
31
38
  complete-error: "Error while completing the work item"
39
+ complete-not-allowed: "You are not allowed to send this inquiry answer."
40
+
41
+ buttons:
42
+ compose:
43
+ label: "Release for review"
44
+ status: "In progress"
45
+ adjust:
46
+ label: "Release adjustment for review"
47
+ status: "In revision"
48
+ confirm:
49
+ label: "Confirm"
50
+ status: "In review"
51
+ revise:
52
+ label: "Revise"
32
53
 
33
54
  new:
34
55
  title: "New inquiry"
@@ -48,6 +69,7 @@ caluma:
48
69
 
49
70
  status:
50
71
  draft: "Draft"
72
+ skipped: "Aborted"
51
73
  sent: "Sent"
52
74
  positive: "Positive"
53
75
  negative: "Negative"
@@ -3,31 +3,52 @@ caluma:
3
3
  empty: "Aucune demande n'a encore été créée."
4
4
  start: "Lancer"
5
5
  send: "Envoyer les demandes ouvertes"
6
+ complete: "Terminer la circulation"
6
7
  send-confirm: "Voulez-vous vraiment envoyer toutes les demandes ouvertes ?"
8
+ reopen: "Rouvrir la procédure de circulation"
7
9
  complete-confirm:
8
10
  "Il y a <b>{count} {count, plural, =1 {demande} other {demandes}} en
9
11
  attente</b> sur la distribution actuelle. Si vous terminez la distribution,
10
12
  toutes les demandes en attente seront annulées. Voulez-vous continuer ?"
13
+ complete-confirm-empty: "Vous voulez vraiment fermer la circulation ?"
14
+ reopen-confirm: "Vous voulez vraiment rouvrir la circulation ?"
11
15
  send-error: "Erreur lors de l'envoi des demandes ouvertes"
12
- complete-error: "Erreur lors de la terminaison de la distribution"
16
+ complete-error: "Erreur lors de la terminaison de la circulation"
17
+ reopen-error: "Erreur lors de la réouverture de la circulation"
18
+
19
+ more: "plus"
20
+ less: "moins"
21
+
22
+ last-modified: "Dernière modification par {user} le {date} à {time}"
23
+ details: "Détails"
24
+ not-allowed-hint:
25
+ "Vous pouvez toutefois modifier le formulaire et les données seront
26
+ automatiquement enregistrées."
13
27
 
14
28
  edit:
15
- title: "Modifier la demande"
16
29
  link: "Modifier"
17
-
18
30
  send: "Envoyer"
19
31
  send-error: "Erreur lors de l'envoi de la demande"
32
+ send-not-allowed: "Vous n'êtes pas autorisé à envoyer cette demande."
20
33
 
21
34
  answer:
22
- title: "Répondre à la demande"
23
35
  link: "Répondre"
24
36
 
25
- release-for-review: "Valider pour vérification"
26
- release-adjustment-for-review: "Valider la révision pour vérification"
27
- confirm: "Confirmer"
28
- revise: "Réviser"
29
-
30
37
  complete-error: "Erreur lors de la clôture de la tâche"
38
+ complete-not-allowed: "Vous n'êtes pas autorisé à envoyer cette réponse."
39
+
40
+ buttons:
41
+ compose:
42
+ label: "Valider pour vérification"
43
+ status: "En cours"
44
+ adjust:
45
+ label: "Valider la révision pour vérification"
46
+ status: "En révision"
47
+ confirm:
48
+ label: "Confirmer"
49
+ status: "En examen"
50
+ revise:
51
+ label: "Réviser"
31
52
 
32
53
  new:
33
54
  title: "Nouvelle demande"
@@ -47,6 +68,7 @@ caluma:
47
68
 
48
69
  status:
49
70
  draft: "Brouillon"
71
+ skipped: "Terminé prématurément"
50
72
  sent: "Envoyé"
51
73
  positive: "Positif"
52
74
  negative: "Negatif"
@@ -1,27 +0,0 @@
1
- {{#if @route}}
2
- <LinkTo @route={{@route}} class={{this.class}} title={{@title}} ...attributes>
3
- {{#if @loading}}
4
- <UkSpinner @ratio={{0.6}} />
5
- {{else if @fromSvgJar}}
6
- {{svg-jar @icon title=@title width="20" height="20"}}
7
- {{else}}
8
- <UkIcon @icon={{@icon}} />
9
- {{/if}}
10
- </LinkTo>
11
- {{else}}
12
- <button
13
- type="button"
14
- class={{this.class}}
15
- title={{@title}}
16
- ...attributes
17
- {{on "click" @onClick}}
18
- >
19
- {{#if @loading}}
20
- <UkSpinner @ratio={{0.6}} />
21
- {{else if @fromSvgJar}}
22
- {{svg-jar @icon title=@title width="20" height="20"}}
23
- {{else}}
24
- <UkIcon @icon={{@icon}} />
25
- {{/if}}
26
- </button>
27
- {{/if}}
@@ -1,22 +0,0 @@
1
- import { dasherize } from "@ember/string";
2
- import Component from "@glimmer/component";
3
-
4
- export default class CdIconButtonComponent extends Component {
5
- get class() {
6
- const gutters = [
7
- "gutter",
8
- "gutterTop",
9
- "gutterRight",
10
- "gutterBottom",
11
- "gutterLeft",
12
- ]
13
- .map((arg) =>
14
- this.args[arg]
15
- ? `uk-icon-button--${dasherize(arg)}-${this.args[arg]}`
16
- : null
17
- )
18
- .filter(Boolean);
19
-
20
- return ["uk-icon-button", ...gutters].join(" ");
21
- }
22
- }
@@ -1,13 +0,0 @@
1
- @import "ember-uikit/variables-theme";
2
-
3
- @for $i from 1 through 8 {
4
- @each $side in "top", "right", "bottom", "left" {
5
- .uk-icon-button--gutter-#{$side}-#{$i} > svg {
6
- margin-#{$side}: #{$i}px !important;
7
- }
8
- }
9
-
10
- .uk-icon-button--gutter-#{$i} > svg {
11
- margin: #{$i}px;
12
- }
13
- }
@@ -1,31 +0,0 @@
1
- @import "ember-uikit/variables-theme";
2
-
3
- $size: $global-small-font-size * 1.2;
4
- $iconSize: $global-small-font-size * 0.9;
5
-
6
- $colors: (
7
- muted: $text-muted-color,
8
- emphasis: $text-emphasis-color,
9
- success: $text-success-color,
10
- danger: $text-danger-color,
11
- warning: $text-warning-color,
12
- );
13
-
14
- .status-indicator {
15
- width: $size;
16
- height: $size;
17
- border-width: 1px;
18
- border-style: solid;
19
-
20
- > svg {
21
- width: $iconSize;
22
- height: $iconSize;
23
- }
24
-
25
- @each $colorName, $color in $colors {
26
- &.uk-text-#{$colorName} {
27
- color: darken($color, 20%);
28
- border-color: $color;
29
- }
30
- }
31
- }