@projectcaluma/ember-distribution 14.4.4 → 14.5.0

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.
@@ -9,8 +9,23 @@
9
9
  />
10
10
  {{/if}}
11
11
 
12
- <UkIcon
13
- @icon={{this.status.icon}}
14
- class="uk-text-{{this.status.color}}"
15
- {{uk-tooltip this.status.label pos=(if this.config.ui.stack "left" "top")}}
16
- />
12
+ <div class="uk-position-relative uk-flex uk-flex-middle">
13
+ <UkIcon
14
+ @icon={{this.status.icon}}
15
+ class="uk-text-{{this.status.color}}"
16
+ {{uk-tooltip this.status.label pos=(if this.config.ui.stack "left" "top")}}
17
+ />
18
+ {{#if this.showPendingIndicator}}
19
+ <span
20
+ class="pending-indicator"
21
+ {{uk-tooltip
22
+ (t
23
+ "caluma.distribution.pending-indicator"
24
+ completed=@inquiry.answeredCount
25
+ all=@inquiry.totalCount
26
+ )
27
+ }}
28
+ >
29
+ </span>
30
+ {{/if}}
31
+ </div>
@@ -19,4 +19,11 @@ export default class CdNavigationStatusIndicatorComponent extends Component {
19
19
  (this.deadline.isOverdue || this.deadline.isWarning)
20
20
  );
21
21
  }
22
+
23
+ get showPendingIndicator() {
24
+ return (
25
+ this.args.inquiry.totalCount > 1 &&
26
+ this.args.inquiry.totalCount !== this.args.inquiry.answeredCount
27
+ );
28
+ }
22
29
  }
@@ -1,15 +1,31 @@
1
1
  export default function uniqueByGroups(workItems) {
2
+ const relevantWorkItems = workItems
3
+ .filter((workItem) => workItem.status !== "CANCELED")
4
+ .map((workItem) => ({
5
+ ...workItem,
6
+ identifier: JSON.stringify({
7
+ from: workItem.controllingGroups,
8
+ to: workItem.addressedGroups,
9
+ }),
10
+ }));
11
+
2
12
  return [
3
13
  ...new Map(
4
- workItems
5
- .filter((workItem) => workItem.status !== "CANCELED")
14
+ relevantWorkItems
6
15
  .map((workItem) => {
16
+ const workItemsWithSameIdentifier = relevantWorkItems.filter(
17
+ (otherWorkItem) => otherWorkItem.identifier === workItem.identifier,
18
+ );
19
+
7
20
  return [
8
- JSON.stringify({
9
- from: workItem.controllingGroups,
10
- to: workItem.addressedGroups,
11
- }),
12
- workItem,
21
+ workItem.identifier,
22
+ {
23
+ ...workItem,
24
+ totalCount: workItemsWithSameIdentifier.length,
25
+ answeredCount: workItemsWithSameIdentifier.filter((wi) =>
26
+ ["COMPLETED", "SKIPPED"].includes(wi.status),
27
+ ).length,
28
+ },
13
29
  ];
14
30
  })
15
31
  .reverse(),
@@ -2,3 +2,4 @@
2
2
  @import "../group-list";
3
3
  @import "../inquiry-divider";
4
4
  @import "../truncated";
5
+ @import "../pending-indicator";
@@ -0,0 +1,28 @@
1
+ $hitbox-size: 12px;
2
+ $indicator-size: 6px;
3
+
4
+ .pending-indicator {
5
+ position: absolute;
6
+ left: 0;
7
+ top: 0;
8
+ z-index: 1;
9
+ width: $hitbox-size;
10
+ height: $hitbox-size;
11
+ transform: translate(
12
+ calc(-50% - #{$indicator-size / 2}),
13
+ calc(-50% - #{$indicator-size / 2})
14
+ );
15
+
16
+ &::before {
17
+ content: "";
18
+ position: absolute;
19
+ background-color: #c00;
20
+ display: block;
21
+ width: $indicator-size;
22
+ height: $indicator-size;
23
+ border-radius: 50%;
24
+ top: 50%;
25
+ left: 50%;
26
+ transform: translate(-50%, -50%);
27
+ }
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "14.4.4",
3
+ "version": "14.5.0",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -39,9 +39,9 @@
39
39
  "luxon": "^3.5.0",
40
40
  "reactiveweb": "^1.3.0",
41
41
  "tracked-toolbox": "^2.0.0",
42
- "@projectcaluma/ember-workflow": "^14.4.4",
43
- "@projectcaluma/ember-core": "^14.4.4",
44
- "@projectcaluma/ember-form": "^14.4.4"
42
+ "@projectcaluma/ember-core": "^14.5.0",
43
+ "@projectcaluma/ember-form": "^14.5.0",
44
+ "@projectcaluma/ember-workflow": "^14.5.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@ember/optional-features": "2.2.0",
@@ -70,7 +70,7 @@
70
70
  "sass": "1.93.2",
71
71
  "uikit": "3.23.13",
72
72
  "webpack": "5.101.3",
73
- "@projectcaluma/ember-testing": "14.4.4"
73
+ "@projectcaluma/ember-testing": "14.5.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "ember-engines": "^0.11.0",
@@ -8,6 +8,7 @@ caluma:
8
8
  skip: "Zirkulation überspringen"
9
9
  reopen: "Zirkulation wiedereröffnen"
10
10
  check-inquiries: "Stellungnahmen als geprüft markieren"
11
+ pending-indicator: "{completed} von {all} Stellungnahmen beantwortet"
11
12
  send-confirm:
12
13
  "Wollen Sie wirklich <b>{count, plural, =1 {eine offene Anfrage} other
13
14
  {{count} offene Anfragen}}</b> versenden?"
@@ -8,6 +8,7 @@ caluma:
8
8
  skip: "Skip circulation"
9
9
  reopen: "Reopen circulation"
10
10
  check-inquiries: "Mark inquiries as checked"
11
+ pending-indicator: "{completed} of {all} inquiries were answered"
11
12
  send-confirm:
12
13
  "Do you really want to send <b>{count, plural, =1 {one pending inquiry}
13
14
  other {{count} pending inquiries}}</b>?"
@@ -8,6 +8,7 @@ caluma:
8
8
  skip: "Sauter la procédure de circulation"
9
9
  reopen: "Réouvrir la procédure de circulation"
10
10
  check-inquiries: "Marquer les prises de position comme vérifiées"
11
+ pending-indicator: "{completed} réponse sur {all} avis"
11
12
  send-confirm:
12
13
  "Voulez-vous vraiment envoyer <b>{count, plural, =1 {une demande ouverte}
13
14
  other {{count} demandes ouvertes}}</b> ?"
@@ -8,6 +8,7 @@ caluma:
8
8
  skip: "Ignora circolazione"
9
9
  reopen: "Riavvia circolazione"
10
10
  check-inquiries: "Segna le prese di posizione come verificate"
11
+ pending-indicator: "{completed} su {all} risposte fornite"
11
12
  send-confirm: "Inviare davvero <b>{count, plural, =1 {una richiesta in corso} other {{count} richieste in corso}}</b>?"
12
13
  complete-confirm: "Nella circolazione attuale <b>{count, plural, =1 {vi è una richiesta in corso} other {vi sono {count} richieste in corso}}</b. Concludendo la circolazione vengono interrotte tutte le rimanenti richieste in corso. Desidera continuare?"
13
14
  complete-confirm-empty: "Concludere davvero la circolazione?"