@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.
Files changed (54) hide show
  1. package/addon/abilities/distribution.js +9 -0
  2. package/addon/abilities/inquiry.js +1 -1
  3. package/addon/components/cd-document-header.hbs +3 -12
  4. package/addon/components/cd-inquiry-answer-form.hbs +140 -57
  5. package/addon/components/cd-inquiry-answer-form.js +20 -2
  6. package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +5 -10
  7. package/addon/components/cd-inquiry-dialog/inquiry-deadline.js +14 -0
  8. package/addon/components/cd-inquiry-dialog/inquiry-part.hbs +116 -89
  9. package/addon/components/cd-inquiry-dialog.js +11 -15
  10. package/addon/components/cd-inquiry-edit-form.hbs +12 -4
  11. package/addon/components/cd-inquiry-edit-form.js +2 -2
  12. package/addon/components/cd-inquiry-new-form/bulk-edit.hbs +20 -0
  13. package/addon/components/cd-inquiry-new-form/bulk-edit.js +116 -0
  14. package/addon/components/cd-inquiry-new-form/select.hbs +71 -0
  15. package/addon/components/cd-inquiry-new-form/select.js +76 -0
  16. package/addon/components/cd-inquiry-new-form.hbs +29 -86
  17. package/addon/components/cd-inquiry-new-form.js +1 -100
  18. package/addon/components/cd-navigation/controls.hbs +112 -66
  19. package/addon/components/cd-navigation/controls.js +29 -14
  20. package/addon/components/cd-navigation/item.hbs +22 -11
  21. package/addon/components/cd-navigation/section.hbs +15 -21
  22. package/addon/components/cd-navigation/section.js +5 -13
  23. package/addon/components/cd-navigation.hbs +4 -9
  24. package/addon/config.js +19 -0
  25. package/addon/gql/fragments/inquiry-answer.graphql +57 -0
  26. package/addon/gql/fragments/inquiry-request.graphql +26 -0
  27. package/addon/gql/mutations/complete-inquiry-work-item.graphql +24 -13
  28. package/addon/gql/mutations/reopen-inquiry.graphql +3 -13
  29. package/addon/gql/queries/{control-work-items.graphql → controls.graphql} +18 -1
  30. package/addon/gql/queries/incomplete-inquiries.graphql +1 -1
  31. package/addon/gql/queries/inquiry-answer.graphql +5 -1
  32. package/addon/gql/queries/inquiry-dialog.graphql +31 -2
  33. package/addon/gql/queries/inquiry-form.graphql +26 -0
  34. package/addon/gql/queries/{inquiry-navigation.graphql → navigation.graphql} +24 -6
  35. package/addon/routes/application.js +7 -0
  36. package/addon/routes/index.js +15 -28
  37. package/addon/routes/inquiry/index.js +1 -4
  38. package/addon/routes/new.js +1 -5
  39. package/addon/services/distribution.js +81 -9
  40. package/addon/templates/application.hbs +7 -5
  41. package/addon/templates/index.hbs +1 -5
  42. package/addon/templates/inquiry/index.hbs +1 -5
  43. package/addon/templates/new.hbs +0 -1
  44. package/addon/utils/inquiry-deadline.js +3 -1
  45. package/app/components/cd-inquiry-new-form/bulk-edit.js +1 -0
  46. package/app/components/cd-inquiry-new-form/select.js +1 -0
  47. package/app/styles/_answer-form.scss +4 -0
  48. package/package.json +17 -17
  49. package/translations/de.yaml +31 -9
  50. package/translations/en.yaml +31 -10
  51. package/translations/fr.yaml +31 -9
  52. package/addon/components/cd-navigation.js +0 -53
  53. package/addon/gql/fragments/inquiry.graphql +0 -117
  54. package/addon/modifiers/pikaday.js +0 -2
@@ -1,17 +1,20 @@
1
1
  caluma:
2
2
  distribution:
3
3
  empty: "No inquiries have been created yet."
4
- start: "Start"
4
+ start: "Start circulation"
5
5
  send: "Send pending inquiries"
6
6
  complete: "Complete circulation"
7
7
  skip: "Skip circulation"
8
- send-confirm: "Do you really want to send all pending inquiries?"
9
8
  reopen: "Reopen circulation"
9
+ check-inquiries: "Mark inquiries as checked"
10
+ send-confirm:
11
+ "Do you really want to send <b>{count, plural, =1 {one pending inquiry}
12
+ other {{count} pending inquiries}}</b>?"
10
13
  complete-confirm:
11
- "There {count, plural, =1 {is} other {are}} <b>{count} pending
12
- {count, plural, =1 {inquiry} other {inquiries}}</b> on the current
13
- distribution. Completing the distribution will cause all remaining
14
- pending inquiries to be canceled. Would you like to continue?"
14
+ "There {count, plural, =1 {is <b>one pending inquiry} other {are
15
+ <b>{count} pending inquiries}}</b> on the current distribution.
16
+ Completing the distribution will cause all remaining pending inquiries to
17
+ be canceled. Would you like to continue?"
15
18
  complete-confirm-empty: "Do you really want to complete the distribution?"
16
19
  skip-confirm: "Do you really want to skip the distribution?"
17
20
  reopen-confirm: "Do you really want to reopen the distribution?"
@@ -19,21 +22,33 @@ caluma:
19
22
  complete-error: "Error while completing the distribution"
20
23
  skip-error: "Error while skipping the distribution"
21
24
  reopen-error: "Error while reopening the distribution"
25
+ check-inquiries-error: "Error while marking the inquiries as checked"
26
+
27
+ attention-to: "{abbr, select, true {attn.} other {attention to}} {subject}"
22
28
 
23
29
  more: "more"
24
30
  less: "less"
25
31
 
26
- last-modified: "Last modified by {user} on {date} at {time}"
27
32
  details: "Details"
28
33
  not-allowed-hint:
29
34
  "However, you can edit the form and the input will be saved
30
35
  automatically."
31
36
 
37
+ inquiry:
38
+ created-at: "Created at"
39
+ closed-at: "Answered at"
40
+ deadline: "Deadline"
41
+ assigned-user: "Assigned user"
42
+
32
43
  edit:
33
44
  link: "Edit"
34
45
  send: "Send current inquiry"
35
46
  send-error: "Error while sending the inquiry"
36
47
  send-not-allowed: "You are not allowed to send this inquiry."
48
+ edit-sent:
49
+ "<b>Warning:</b> You are editing an inquiry which has already been sent.
50
+ If you fundamentally change the details, the addressed group may not
51
+ notice it as they won't be informed."
37
52
 
38
53
  answer:
39
54
  link: "Answer"
@@ -54,6 +69,10 @@ caluma:
54
69
  revise:
55
70
  label: "Revise"
56
71
 
72
+ details:
73
+ show: "Show details"
74
+ hide: "Hide details"
75
+
57
76
  new:
58
77
  title: "New inquiry"
59
78
  search: "Search..."
@@ -63,6 +82,8 @@ caluma:
63
82
  selected: "{count, plural, other {selected}}"
64
83
  reset: "Reset"
65
84
  create-draft: "Create draft"
85
+ continue: "Continue"
86
+ back: "Back"
66
87
  error: "Error while creating the {count, plural, =1 {inquiry} other {inquiries}}"
67
88
 
68
89
  reminder:
@@ -74,9 +95,9 @@ caluma:
74
95
  error: "Error while sending the reminder"
75
96
 
76
97
  types:
77
- controlling: "Requested"
78
- addressed: "To answer"
79
- more: "More"
98
+ controlling: "Requested inquiries"
99
+ addressed: "Own inquiries"
100
+ more: "More inquiries"
80
101
 
81
102
  status:
82
103
  draft: "Draft"
@@ -1,16 +1,20 @@
1
1
  caluma:
2
2
  distribution:
3
3
  empty: "Aucune demande n'a encore été créée."
4
- start: "Lancer"
4
+ start: "Lancer la procédure de circulation"
5
5
  send: "Envoyer les demandes ouvertes"
6
6
  complete: "Clore la circulation"
7
7
  skip: "Sauter la procédure de circulation"
8
- send-confirm: "Voulez-vous vraiment envoyer toutes les demandes ouvertes ?"
9
8
  reopen: "Rouvrir la procédure de circulation"
9
+ check-inquiries: "Marquer les prises de position comme vérifiées"
10
+ send-confirm:
11
+ "Voulez-vous vraiment envoyer <b>{count, plural, =1 {une demande ouverte}
12
+ other {{count} demandes ouvertes}}</b> ?"
10
13
  complete-confirm:
11
- "Il y a <b>{count} {count, plural, =1 {demande} other {demandes}} en
12
- attente</b> sur la distribution actuelle. Si vous terminez la distribution,
13
- toutes les demandes en attente seront annulées. Voulez-vous continuer ?"
14
+ "Il y a <b>{count, plural, =1 {une demande ouverte} other {{count}
15
+ demandes ouvertes}} </b> sur la circulation actuelle. Si vous clôturez la
16
+ circulation, toutes les demandes ouvertes seront annulées. Voulez-vous
17
+ continuer ?"
14
18
  complete-confirm-empty: "Vous voulez vraiment fermer la circulation ?"
15
19
  skip-confirm: "Vous voulez vraiment sauter la circulation ?"
16
20
  reopen-confirm: "Vous voulez vraiment rouvrir la circulation ?"
@@ -18,21 +22,33 @@ caluma:
18
22
  complete-error: "Erreur lors de la clôture de la circulation"
19
23
  skip-error: "Erreur lors du saut de la circulation"
20
24
  reopen-error: "Erreur lors de la réouverture de la circulation"
25
+ check-inquiries-error: "Erreur lors du marquage des prises de position comme vérifiées"
26
+
27
+ attention-to: "{abbr, select, true {à l'att. de} other {à l'attention de}} {subject}"
21
28
 
22
29
  more: "plus"
23
30
  less: "moins"
24
31
 
25
- last-modified: "Dernière modification par {user} le {date} à {time}"
26
32
  details: "Détails"
27
33
  not-allowed-hint:
28
34
  "Vous pouvez toutefois modifier le formulaire et les données seront
29
35
  automatiquement enregistrées."
30
36
 
37
+ inquiry:
38
+ created-at: "Créé le"
39
+ closed-at: "Répondu le"
40
+ deadline: "Délai"
41
+ assigned-user: "Personne responsable"
42
+
31
43
  edit:
32
44
  link: "Modifier"
33
45
  send: "Envoyer la demande actuelle"
34
46
  send-error: "Erreur lors de l'envoi de la demande"
35
47
  send-not-allowed: "Vous n'êtes pas autorisé à envoyer cette demande."
48
+ edit-sent:
49
+ "<b>Attention :</b> Vous traitez une demande qui a déjà été envoyée. Si
50
+ vous modifiez fondamentalement les détails, il se peut que le service
51
+ destinataire ne le remarque pas, car il n'en est pas informé."
36
52
 
37
53
  answer:
38
54
  link: "Répondre"
@@ -53,6 +69,10 @@ caluma:
53
69
  revise:
54
70
  label: "Réviser"
55
71
 
72
+ details:
73
+ show: "Afficher les détails"
74
+ hide: "Cacher les détails"
75
+
56
76
  new:
57
77
  title: "Nouvelle demande"
58
78
  search: "Chercher..."
@@ -62,6 +82,8 @@ caluma:
62
82
  selected: "{count, plural, =1 {sélectionné} other {sélectionnés}}"
63
83
  reset: "Réinitialiser"
64
84
  create-draft: "Créer un brouillon"
85
+ continue: "Continuer"
86
+ back: "Retour"
65
87
  error: "Error lors de la création {count, plural, =1 {de la demande} other {des demandes}}"
66
88
 
67
89
  reminder:
@@ -73,9 +95,9 @@ caluma:
73
95
  error: "Erreur lors de l'envoi du rappel"
74
96
 
75
97
  types:
76
- controlling: "Demandé"
77
- addressed: "A répondre"
78
- more: "Plus"
98
+ controlling: "Prises de position demandées"
99
+ addressed: "Propres prises de position"
100
+ more: "Autres prises de position"
79
101
 
80
102
  status:
81
103
  draft: "Brouillon"
@@ -1,53 +0,0 @@
1
- import { inject as service } from "@ember/service";
2
- import Component from "@glimmer/component";
3
- import { queryManager } from "ember-apollo-client";
4
-
5
- import config from "@projectcaluma/ember-distribution/config";
6
- import uniqueByGroups from "@projectcaluma/ember-distribution/utils/unique-by-groups";
7
-
8
- export default class CdNavigationComponent extends Component {
9
- @service("-scheduler") scheduler;
10
- @service calumaOptions;
11
- @service distribution;
12
-
13
- @config config;
14
-
15
- @queryManager apollo;
16
-
17
- get inquiries() {
18
- const findGroupName = (identifiers) => {
19
- const group = this.scheduler.groupCache.find((group) =>
20
- identifiers
21
- .map(String)
22
- .includes(String(group[this.calumaOptions.groupIdentifierProperty]))
23
- );
24
-
25
- return group?.[this.calumaOptions.groupNameProperty] ?? "";
26
- };
27
-
28
- return Object.entries(this.distribution.navigation.value ?? {}).reduce(
29
- (inquiries, [key, objects]) => {
30
- return {
31
- ...inquiries,
32
- // Don't return any data until the internal scheduler has cached
33
- // groups since we don't want to render empty navigation items
34
- [key]: this.scheduler.groupCache.length
35
- ? uniqueByGroups(
36
- objects.edges.map((edge) => ({
37
- ...edge.node,
38
- // Populate the work item with the names of the involved
39
- // groups so the <DistributionNavigation::Section /> component
40
- // can sort by them
41
- addressedGroupName: findGroupName(edge.node.addressedGroups),
42
- controllingGroupName: findGroupName(
43
- edge.node.controllingGroups
44
- ),
45
- }))
46
- )
47
- : [],
48
- };
49
- },
50
- {}
51
- );
52
- }
53
- }
@@ -1,117 +0,0 @@
1
- fragment InquiryAnswerButtons on Case {
2
- workItems(filter: [{ tasks: $buttonTasks }, { status: READY }]) {
3
- edges {
4
- node {
5
- id
6
- status
7
- task {
8
- id
9
- slug
10
- }
11
- }
12
- }
13
- }
14
- }
15
-
16
- fragment InquiryDeadlineDocument on Document {
17
- id
18
- deadline: answers(filter: [{ question: $deadlineQuestion }]) {
19
- edges {
20
- node {
21
- id
22
- ... on DateAnswer {
23
- value
24
- }
25
- }
26
- }
27
- }
28
- }
29
-
30
- fragment InquiryStatusDocument on Document {
31
- id
32
- status: answers(filter: [{ question: $statusQuestion }]) {
33
- edges {
34
- node {
35
- id
36
- ... on StringAnswer {
37
- value
38
- selectedOption {
39
- slug
40
- label
41
- }
42
- }
43
- }
44
- }
45
- }
46
- }
47
-
48
- fragment InquiryRequest on Document {
49
- id
50
- ...InquiryDeadlineDocument
51
- info: answers(filter: [{ question: $infoQuestion }]) {
52
- edges {
53
- node {
54
- id
55
- ... on StringAnswer {
56
- value
57
- }
58
- }
59
- }
60
- }
61
- }
62
-
63
- fragment InquiryDialog on WorkItem {
64
- id
65
- addressedGroups
66
- controllingGroups
67
- createdAt
68
- closedAt
69
- status
70
- isRedoable
71
- task {
72
- id
73
- slug
74
- }
75
- meta
76
- document {
77
- ...InquiryRequest
78
- }
79
- childCase {
80
- id
81
- ...InquiryAnswerButtons
82
- document {
83
- ...InquiryStatusDocument
84
- info: answers(filter: [{ questions: $answerInfoQuestions }]) {
85
- edges {
86
- node {
87
- id
88
- question {
89
- id
90
- label
91
- slug
92
- }
93
- ... on StringAnswer {
94
- value
95
- }
96
- }
97
- }
98
- }
99
- }
100
- }
101
- }
102
-
103
- fragment Inquiry on WorkItem {
104
- id
105
- status
106
- addressedGroups
107
- controllingGroups
108
- document @include(if: $includeNavigationData) {
109
- ...InquiryDeadlineDocument
110
- }
111
- childCase @include(if: $includeNavigationData) {
112
- id
113
- document {
114
- ...InquiryStatusDocument
115
- }
116
- }
117
- }
@@ -1,2 +0,0 @@
1
- import "ember-pikaday/pikaday.css";
2
- export { default } from "ember-pikaday/modifiers/pikaday";