@projectcaluma/ember-distribution 1.0.0-beta.4 → 1.0.0-beta.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/addon/abilities/distribution.js +8 -6
  3. package/addon/components/cd-icon-button.hbs +27 -0
  4. package/addon/components/{icon-button.js → cd-icon-button.js} +1 -1
  5. package/addon/components/{inquiry-answer-form.hbs → cd-inquiry-answer-form.hbs} +1 -1
  6. package/addon/components/{inquiry-answer-form.js → cd-inquiry-answer-form.js} +1 -1
  7. package/addon/components/cd-inquiry-dialog/inquiry-deadline.hbs +28 -0
  8. package/addon/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-deadline.js +5 -1
  9. package/addon/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-divider.hbs +2 -1
  10. package/addon/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-divider.js +1 -1
  11. package/addon/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-part.hbs +16 -2
  12. package/addon/components/cd-inquiry-dialog/inquiry-part.js +59 -0
  13. package/addon/components/cd-inquiry-dialog/inquiry.hbs +16 -0
  14. package/addon/components/cd-inquiry-dialog/inquiry.js +11 -0
  15. package/addon/components/{inquiry-dialog.hbs → cd-inquiry-dialog.hbs} +2 -2
  16. package/addon/components/cd-inquiry-dialog.js +65 -0
  17. package/addon/components/{inquiry-edit-form.hbs → cd-inquiry-edit-form.hbs} +1 -1
  18. package/addon/components/{inquiry-edit-form.js → cd-inquiry-edit-form.js} +2 -1
  19. package/addon/components/{inquiry-new-form.hbs → cd-inquiry-new-form.hbs} +3 -3
  20. package/addon/components/{inquiry-new-form.js → cd-inquiry-new-form.js} +20 -28
  21. package/addon/components/{distribution-navigation → cd-navigation}/controls.hbs +10 -5
  22. package/addon/components/cd-navigation/controls.js +95 -0
  23. package/addon/components/{distribution-navigation → cd-navigation}/item.hbs +3 -6
  24. package/addon/components/{distribution-navigation → cd-navigation}/item.js +1 -1
  25. package/addon/components/{distribution-navigation → cd-navigation}/section.hbs +2 -2
  26. package/addon/components/{distribution-navigation → cd-navigation}/section.js +1 -1
  27. package/addon/components/{distribution-navigation → cd-navigation}/status-indicator.hbs +2 -1
  28. package/addon/components/{distribution-navigation → cd-navigation}/status-indicator.js +1 -1
  29. package/addon/components/{distribution-navigation.hbs → cd-navigation.hbs} +3 -6
  30. package/addon/components/cd-navigation.js +53 -0
  31. package/addon/components/{notfound.hbs → cd-notfound.hbs} +0 -0
  32. package/addon/config.js +1 -1
  33. package/addon/gql/mutations/complete-work-item.graphql +8 -0
  34. package/addon/gql/mutations/withdraw-inquiry.graphql +8 -0
  35. package/addon/gql/queries/incomplete-inquiries.graphql +13 -0
  36. package/addon/gql/queries/inquiry-navigation.graphql +2 -0
  37. package/addon/services/distribution.js +82 -0
  38. package/addon/templates/application.hbs +1 -1
  39. package/addon/templates/index.hbs +7 -4
  40. package/addon/templates/inquiry/detail/answer.hbs +1 -1
  41. package/addon/templates/inquiry/detail/index.hbs +1 -1
  42. package/addon/templates/inquiry/index.hbs +1 -1
  43. package/addon/templates/new.hbs +1 -1
  44. package/addon/templates/notfound.hbs +1 -1
  45. package/addon/utils/unique-by-groups.js +1 -0
  46. package/app/components/{inquiry-dialog.js → cd-icon-button.js} +1 -1
  47. package/app/components/{inquiry-dialog/inquiry.js → cd-inquiry-answer-form.js} +1 -1
  48. package/app/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-deadline.js +1 -1
  49. package/app/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-divider.js +1 -1
  50. package/app/components/{inquiry-dialog → cd-inquiry-dialog}/inquiry-part.js +1 -1
  51. package/app/components/{distribution-navigation.js → cd-inquiry-dialog/inquiry.js} +1 -1
  52. package/app/components/{inquiry-edit-form.js → cd-inquiry-dialog.js} +1 -1
  53. package/app/components/cd-inquiry-edit-form.js +1 -0
  54. package/app/components/{inquiry-answer-form.js → cd-inquiry-new-form.js} +1 -1
  55. package/app/components/cd-navigation/controls.js +1 -0
  56. package/app/components/{inquiry-new-form.js → cd-navigation/item.js} +1 -1
  57. package/app/components/cd-navigation/section.js +1 -0
  58. package/app/components/{distribution-navigation/item.js → cd-navigation/status-indicator.js} +1 -1
  59. package/app/components/{icon-button.js → cd-navigation.js} +1 -1
  60. package/app/components/{notfound.js → cd-notfound.js} +1 -1
  61. package/app/services/{caluma-distribution-controls.js → distribution.js} +1 -1
  62. package/app/styles/_inquiry-divider.scss +22 -0
  63. package/index.js +14 -13
  64. package/package.json +23 -20
  65. package/public/assets/distribution.svg +1 -0
  66. package/translations/de.yaml +16 -2
  67. package/translations/en.yaml +17 -2
  68. package/translations/fr.yaml +16 -2
  69. package/addon/components/distribution-navigation/controls.js +0 -9
  70. package/addon/components/distribution-navigation.js +0 -81
  71. package/addon/components/icon-button.hbs +0 -20
  72. package/addon/components/inquiry-dialog/inquiry-deadline.hbs +0 -6
  73. package/addon/components/inquiry-dialog/inquiry-part.js +0 -20
  74. package/addon/components/inquiry-dialog/inquiry.hbs +0 -13
  75. package/addon/components/inquiry-dialog/inquiry.js +0 -7
  76. package/addon/components/inquiry-dialog.js +0 -42
  77. package/addon/services/caluma-distribution-controls.js +0 -37
  78. package/app/components/distribution-navigation/controls.js +0 -1
  79. package/app/components/distribution-navigation/section.js +0 -1
  80. package/app/components/distribution-navigation/status-indicator.js +0 -1
@@ -3,16 +3,13 @@
3
3
  <div class="uk-flex uk-flex-middle uk-width-1-1">
4
4
  <div class="uk-width-expand uk-text-truncate">
5
5
  {{#if (eq @type "addressed")}}
6
- {{group-name @inquiry.controllingGroups}}
6
+ {{@inquiry.controllingGroupName}}
7
7
  {{else}}
8
- {{group-name @inquiry.addressedGroups}}
8
+ {{@inquiry.addressedGroupName}}
9
9
  {{/if}}
10
10
  </div>
11
11
 
12
- <DistributionNavigation::StatusIndicator
13
- @inquiry={{@inquiry}}
14
- @type={{@type}}
15
- />
12
+ <CdNavigation::StatusIndicator @inquiry={{@inquiry}} @type={{@type}} />
16
13
  </div>
17
14
  </LinkTo>
18
15
  </li>
@@ -1,7 +1,7 @@
1
1
  import { inject as service } from "@ember/service";
2
2
  import Component from "@glimmer/component";
3
3
 
4
- export default class DistributionNavigationItemComponent extends Component {
4
+ export default class CdNavigationItemComponent extends Component {
5
5
  @service router;
6
6
 
7
7
  get model() {
@@ -14,13 +14,13 @@
14
14
  {{#if @inquiries.length}}
15
15
  <ul class="uk-tab uk-tab-left uk-margin-left">
16
16
  {{#each this.inquiries as |inquiry|}}
17
- <DistributionNavigation::Item @inquiry={{inquiry}} @type={{@type}} />
17
+ <CdNavigation::Item @inquiry={{inquiry}} @type={{@type}} />
18
18
  {{/each}}
19
19
  </ul>
20
20
  {{/if}}
21
21
 
22
22
  {{#if (eq @type "controlling")}}
23
- <DistributionNavigation::Controls @caseId={{@caseId}} />
23
+ <CdNavigation::Controls @caseId={{@caseId}} />
24
24
  {{/if}}
25
25
  {{/if}}
26
26
  </li>
@@ -2,7 +2,7 @@ import { action } from "@ember/object";
2
2
  import Component from "@glimmer/component";
3
3
  import { tracked } from "@glimmer/tracking";
4
4
 
5
- export default class DistributionNavigationSectionComponent extends Component {
5
+ export default class CdNavigationSectionComponent extends Component {
6
6
  @tracked expanded = true;
7
7
 
8
8
  @action
@@ -1,10 +1,11 @@
1
1
  {{#if this.showDeadlineIndicator}}
2
2
  <div
3
- class="deadline-indicator uk-flex-uk-flex-middle uk-flex-center uk-margin-small-left uk-text-{{this.deadline.color}}"
3
+ class="deadline-indicator uk-flex uk-flex-middle uk-flex-center uk-margin-small-left uk-text-{{this.deadline.color}}"
4
4
  >
5
5
  {{svg-jar
6
6
  "notifications-outline"
7
7
  height=16
8
+ width=16
8
9
  title=(format-date this.deadline.value)
9
10
  }}
10
11
  </div>
@@ -5,7 +5,7 @@ import config from "@projectcaluma/ember-distribution/config";
5
5
  import inquiryDeadline from "@projectcaluma/ember-distribution/utils/inquiry-deadline";
6
6
  import inquiryStatus from "@projectcaluma/ember-distribution/utils/inquiry-status";
7
7
 
8
- export default class DistributionNavigationStatusIndicatorComponent extends Component {
8
+ export default class CdNavigationStatusIndicatorComponent extends Component {
9
9
  @service intl;
10
10
 
11
11
  @config config;
@@ -1,17 +1,14 @@
1
1
  <aside>
2
2
  <ul class="uk-tab uk-tab-left uk-margin-remove-bottom">
3
- <DistributionNavigation::Section
3
+ <CdNavigation::Section
4
4
  @type="controlling"
5
5
  @inquiries={{this.inquiries.controlling}}
6
6
  @caseId={{@caseId}}
7
7
  />
8
- <DistributionNavigation::Section
8
+ <CdNavigation::Section
9
9
  @type="addressed"
10
10
  @inquiries={{this.inquiries.addressed}}
11
11
  />
12
- <DistributionNavigation::Section
13
- @type="more"
14
- @inquiries={{this.inquiries.more}}
15
- />
12
+ <CdNavigation::Section @type="more" @inquiries={{this.inquiries.more}} />
16
13
  </ul>
17
14
  </aside>
@@ -0,0 +1,53 @@
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
+ }
package/addon/config.js CHANGED
@@ -15,7 +15,7 @@ export default function config(target, property) {
15
15
  get() {
16
16
  return merge(
17
17
  {
18
- ui: { stack: false },
18
+ ui: { stack: false, small: false },
19
19
  controls: {
20
20
  createTask: "create-inquiry",
21
21
  completeTask: "complete-distribution",
@@ -0,0 +1,8 @@
1
+ mutation CompleteWorkItem($workItem: ID!) {
2
+ completeWorkItem(input: { id: $workItem }) {
3
+ workItem {
4
+ id
5
+ status
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ mutation WithdrawInquiry($workItem: ID!) {
2
+ cancelWorkItem(input: { id: $workItem }) {
3
+ workItem {
4
+ id
5
+ status
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,13 @@
1
+ query InquiryIncomplete($caseId: ID!, $task: ID!) {
2
+ allWorkItems(
3
+ filter: [
4
+ { case: $caseId }
5
+ { task: $task }
6
+ { status: CANCELED, invert: true }
7
+ { status: COMPLETED, invert: true }
8
+ { status: SKIPPED, invert: true }
9
+ ]
10
+ ) {
11
+ totalCount
12
+ }
13
+ }
@@ -13,6 +13,7 @@ query InquiryNavigation(
13
13
  { case: $caseId }
14
14
  { task: $task }
15
15
  { controllingGroups: [$currentGroup] }
16
+ { status: CANCELED, invert: true }
16
17
  ]
17
18
  order: [{ attribute: CREATED_AT, direction: DESC }]
18
19
  ) {
@@ -28,6 +29,7 @@ query InquiryNavigation(
28
29
  { task: $task }
29
30
  { addressedGroups: [$currentGroup] }
30
31
  { status: SUSPENDED, invert: true }
32
+ { status: CANCELED, invert: true }
31
33
  ]
32
34
  order: [{ attribute: CREATED_AT, direction: DESC }]
33
35
  ) {
@@ -0,0 +1,82 @@
1
+ import { getOwner } from "@ember/application";
2
+ import Service, { inject as service } from "@ember/service";
3
+ import { queryManager, getObservable } from "ember-apollo-client";
4
+ import { dropTask } from "ember-concurrency";
5
+ import { useTask } from "ember-resources";
6
+
7
+ import config from "@projectcaluma/ember-distribution/config";
8
+ import controlWorkItemsQuery from "@projectcaluma/ember-distribution/gql/queries/control-work-items.graphql";
9
+ import inquiryNavigationQuery from "@projectcaluma/ember-distribution/gql/queries/inquiry-navigation.graphql";
10
+
11
+ export default class DistributionService extends Service {
12
+ @service("-scheduler") scheduler;
13
+ @service calumaOptions;
14
+ @service router;
15
+
16
+ @queryManager apollo;
17
+
18
+ @config config;
19
+
20
+ get caseId() {
21
+ return getOwner(this).lookup("route:application").currentModel;
22
+ }
23
+
24
+ controls = useTask(this, this.fetchControls, () => [this.caseId]);
25
+ navigation = useTask(this, this.fetchNavigation, () => [this.caseId]);
26
+
27
+ async refetch() {
28
+ await getObservable(this.controls.value)?.refetch();
29
+ await getObservable(this.navigation.value)?.refetch();
30
+ }
31
+
32
+ @dropTask
33
+ *fetchControls(caseId) {
34
+ return yield this.apollo.watchQuery({
35
+ query: controlWorkItemsQuery,
36
+ variables: {
37
+ caseId,
38
+ currentGroup: String(this.calumaOptions.currentGroupId),
39
+ createTask: this.config.controls.createTask,
40
+ completeTask: this.config.controls.completeTask,
41
+ inquiryTask: this.config.inquiry.task,
42
+ },
43
+ });
44
+ }
45
+
46
+ @dropTask
47
+ *fetchNavigation(caseId) {
48
+ const response = yield this.apollo.watchQuery({
49
+ query: inquiryNavigationQuery,
50
+ variables: {
51
+ caseId,
52
+ task: this.config.inquiry.task,
53
+ currentGroup: String(this.calumaOptions.currentGroupId),
54
+ statusQuestion: this.config.inquiry.answer.statusQuestion,
55
+ deadlineQuestion: this.config.inquiry.deadlineQuestion,
56
+ includeNavigationData: true,
57
+ },
58
+ });
59
+
60
+ getObservable(response).subscribe(({ data }) => {
61
+ const groupIds = [
62
+ ...new Set(
63
+ Object.values(data)
64
+ .map((inquiries) => {
65
+ return inquiries.edges.map((edge) => [
66
+ ...edge.node.addressedGroups,
67
+ ...edge.node.controllingGroups,
68
+ ]);
69
+ })
70
+ .flat(2)
71
+ ),
72
+ ];
73
+
74
+ // Resolve all involved groups with the scheduler each time the query is
75
+ // updated. This will only trigger requests for new groups that are not in
76
+ // the cache.
77
+ this.scheduler.resolve(groupIds, "group");
78
+ });
79
+
80
+ return response;
81
+ }
82
+ }
@@ -1,6 +1,6 @@
1
1
  <div uk-grid class={{if this.config.ui.stack "uk-grid-small"}}>
2
2
  <div class={{if this.config.ui.stack "uk-width-1-1" "uk-width-1-3"}}>
3
- <DistributionNavigation @caseId={{@model}} />
3
+ <CdNavigation @caseId={{@model}} />
4
4
  </div>
5
5
  <div class={{if this.config.ui.stack "uk-width-1-1" "uk-width-2-3"}}>
6
6
  {{outlet}}
@@ -1,8 +1,11 @@
1
- <div class="uk-text-center">
2
- <p class="uk-text-muted">{{t "caluma.distribution.empty"}}</p>
1
+ <div class="uk-text-center uk-text-muted">
2
+ {{svg-jar "distribution" class="uk-inline" width=200}}
3
+ <p class="uk-margin-medium uk-margin-remove-horizontal">
4
+ {{t "caluma.distribution.empty"}}
5
+ </p>
3
6
  {{#if (can "create inquiry of distribution")}}
4
- <LinkTo @route="new" class="uk-margin-top">
5
- {{t "caluma.distribution.create"}}
7
+ <LinkTo @route="new" class="uk-button uk-button-primary">
8
+ {{t "caluma.distribution.start"}}
6
9
  </LinkTo>
7
10
  {{/if}}
8
11
  </div>
@@ -1 +1 @@
1
- <InquiryAnswerForm @inquiry={{@model}} />
1
+ <CdInquiryAnswerForm @inquiry={{@model}} />
@@ -1 +1 @@
1
- <InquiryEditForm @inquiry={{@model}} />
1
+ <CdInquiryEditForm @inquiry={{@model}} />
@@ -1,4 +1,4 @@
1
- <InquiryDialog
1
+ <CdInquiryDialog
2
2
  @from={{@model.from}}
3
3
  @to={{@model.to}}
4
4
  @caseId={{@model.case}}
@@ -1,4 +1,4 @@
1
- <InquiryNewForm
1
+ <CdInquiryNewForm
2
2
  @selectedTypes={{this.selectedTypes}}
3
3
  @search={{this.search}}
4
4
  @caseId={{@model}}
@@ -1 +1 @@
1
- <Notfound />
1
+ <CdNotfound />
@@ -2,6 +2,7 @@ export default function uniqueByGroups(workItems) {
2
2
  return [
3
3
  ...new Map(
4
4
  workItems
5
+ .filter((workItem) => workItem.status !== "CANCELED")
5
6
  .map((workItem) => {
6
7
  return [
7
8
  JSON.stringify({
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-dialog";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-icon-button";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-dialog/inquiry";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-answer-form";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-dialog/inquiry-deadline";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-dialog/inquiry-deadline";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-dialog/inquiry-divider";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-dialog/inquiry-divider";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-dialog/inquiry-part";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-dialog/inquiry-part";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/distribution-navigation";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-dialog/inquiry";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-edit-form";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-dialog";
@@ -0,0 +1 @@
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-edit-form";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-answer-form";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-new-form";
@@ -0,0 +1 @@
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-navigation/controls";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/inquiry-new-form";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-navigation/item";
@@ -0,0 +1 @@
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-navigation/section";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/distribution-navigation/item";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-navigation/status-indicator";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/icon-button";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-navigation";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/components/notfound";
1
+ export { default } from "@projectcaluma/ember-distribution/components/cd-notfound";
@@ -1 +1 @@
1
- export { default } from "@projectcaluma/ember-distribution/services/caluma-distribution-controls";
1
+ export { default } from "@projectcaluma/ember-distribution/services/distribution";
@@ -3,6 +3,9 @@
3
3
  $size: 36px;
4
4
  $iconSize: $size * 0.6;
5
5
 
6
+ $sizeSmall: 24px;
7
+ $iconSizeSmall: $sizeSmall * 0.6;
8
+
6
9
  $colors: (
7
10
  muted: $text-muted-color,
8
11
  emphasis: $text-emphasis-color,
@@ -47,3 +50,22 @@ $colors: (
47
50
  }
48
51
  }
49
52
  }
53
+ .inquiry-divider--small {
54
+ &::before,
55
+ &::after {
56
+ height: 1px;
57
+ width: calc(50% - #{$sizeSmall * 0.5});
58
+ }
59
+
60
+ .inquiry-divider__icon {
61
+ width: $sizeSmall;
62
+ height: $sizeSmall;
63
+
64
+ border-width: 1px;
65
+
66
+ > svg {
67
+ width: $iconSizeSmall;
68
+ height: $iconSizeSmall;
69
+ }
70
+ }
71
+ }
package/index.js CHANGED
@@ -3,20 +3,21 @@
3
3
  // eslint-disable-next-line node/no-unpublished-require
4
4
  const { buildEngine } = require("ember-engines/lib/engine-addon");
5
5
 
6
- const ioniconsBase = require
7
- .resolve("ionicons")
8
- .split("/")
9
- .slice(0, -1)
10
- .join("/");
6
+ const name = require("./package").name;
11
7
 
12
- module.exports = buildEngine({
13
- name: require("./package").name,
8
+ const ioniconAssets = [
9
+ ...require.resolve("ionicons").split("/").slice(0, -1),
10
+ "svg",
11
+ ].join("/");
14
12
 
15
- lazyLoading: {
16
- enabled: false,
17
- },
13
+ const publicAssets = [
14
+ ...require.resolve(name).split("/").slice(0, -1),
15
+ "public",
16
+ "assets",
17
+ ].join("/");
18
18
 
19
- svgJar: {
20
- sourceDirs: [`${ioniconsBase}/svg`],
21
- },
19
+ module.exports = buildEngine({
20
+ name,
21
+ lazyLoading: { enabled: false },
22
+ svgJar: { sourceDirs: [ioniconAssets, publicAssets] },
22
23
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.7",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -18,14 +18,16 @@
18
18
  "ember-engines": ">= 0.8"
19
19
  },
20
20
  "dependencies": {
21
- "@glimmer/component": "^1.0.4",
22
- "@glimmer/tracking": "^1.0.4",
23
- "@projectcaluma/ember-core": "^11.0.0-beta.4",
24
- "@projectcaluma/ember-form": "^11.0.0-beta.11",
25
- "@projectcaluma/ember-workflow": "^11.0.0-beta.4",
26
- "ember-apollo-client": "^3.2.0",
27
- "ember-auto-import": "^2.4.0",
28
- "ember-can": "^4.1.0",
21
+ "@ember/string": "^3.0.0",
22
+ "@embroider/macros": "^1.5.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",
30
+ "ember-can": "^4.2.0",
29
31
  "ember-cli-babel": "^7.26.11",
30
32
  "ember-cli-htmlbars": "^6.0.1",
31
33
  "ember-concurrency": "^2.2.1",
@@ -33,28 +35,29 @@
33
35
  "ember-fetch": "^8.1.1",
34
36
  "ember-intl": "^5.7.2",
35
37
  "ember-pikaday": "^4.0.0",
36
- "ember-resources": "^4.3.1",
38
+ "ember-resources": "^4.4.0",
37
39
  "ember-svg-jar": "^2.3.4",
38
40
  "ember-test-selectors": "^6.0.0",
39
- "ember-uikit": "^5.0.0",
41
+ "ember-uikit": "^5.1.1",
40
42
  "graphql": "^15.8.0",
43
+ "graphql-tag": "^2.12.6",
41
44
  "ionicons": "^6.0.1",
42
45
  "lodash.merge": "^4.6.2",
43
- "luxon": "^2.3.0",
46
+ "luxon": "^2.3.1",
44
47
  "tracked-toolbox": "^1.2.3"
45
48
  },
46
49
  "devDependencies": {
47
50
  "@ember/optional-features": "2.0.0",
48
- "@ember/test-helpers": "2.6.0",
49
- "@embroider/test-setup": "1.2.0",
50
- "@faker-js/faker": "6.0.0-alpha.6",
51
- "@projectcaluma/ember-testing": "11.0.0-beta.3",
51
+ "@ember/test-helpers": "2.7.0",
52
+ "@embroider/test-setup": "1.5.0",
53
+ "@faker-js/faker": "6.1.2",
54
+ "@projectcaluma/ember-testing": "11.0.0-beta.6",
52
55
  "broccoli-asset-rev": "3.0.0",
53
56
  "ember-cli": "3.28.5",
54
57
  "ember-cli-code-coverage": "1.0.3",
55
58
  "ember-cli-dependency-checker": "3.2.0",
56
59
  "ember-cli-inject-live-reload": "2.1.0",
57
- "ember-cli-mirage": "2.4.0",
60
+ "ember-cli-mirage": "3.0.0-alpha.2",
58
61
  "ember-cli-sass": "10.0.1",
59
62
  "ember-cli-sri": "2.1.1",
60
63
  "ember-cli-terser": "4.0.2",
@@ -71,10 +74,10 @@
71
74
  "loader.js": "4.7.0",
72
75
  "miragejs": "0.1.43",
73
76
  "npm-run-all": "4.1.5",
74
- "qunit": "2.17.2",
77
+ "qunit": "2.18.1",
75
78
  "qunit-dom": "2.0.0",
76
- "sass": "1.49.7",
77
- "webpack": "5.69.0"
79
+ "sass": "1.50.0",
80
+ "webpack": "5.71.0"
78
81
  },
79
82
  "engines": {
80
83
  "node": "12.* || 14.* || >= 16"
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 512 512" viewBox="0 0 512 512"><path d="M477.867 102.4c-18.825 0-34.133 15.309-34.133 34.133s15.309 34.133 34.133 34.133S512 155.358 512 136.533c0-18.824-15.309-34.133-34.133-34.133zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067s17.067 7.654 17.067 17.067c-.001 9.413-7.655 17.067-17.067 17.067zM34.133 384C15.309 384 0 399.309 0 418.133s15.309 34.133 34.133 34.133c18.825 0 34.133-15.309 34.133-34.133S52.958 384 34.133 384zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067s7.654-17.067 17.067-17.067c9.412 0 17.067 7.654 17.067 17.067S43.546 435.2 34.133 435.2z"/><path d="m461.321 113.186-73.617-35.541c-4.25-2.057-9.344-.265-11.392 3.977-2.048 4.241-.265 9.344 3.977 11.392l73.617 35.541c1.195.58 2.458.853 3.703.853 3.174 0 6.221-1.775 7.688-4.83 2.048-4.241.265-9.344-3.976-11.392zM384 443.733c-18.825 0-34.133 15.309-34.133 34.133S365.175 512 384 512c18.825 0 34.133-15.309 34.133-34.133S402.825 443.733 384 443.733zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067S374.588 460.8 384 460.8c9.412 0 17.067 7.654 17.067 17.067s-7.655 17.066-17.067 17.066z"/><path d="m367.454 454.52-73.617-35.541c-4.25-2.057-9.344-.273-11.392 3.977-2.048 4.241-.265 9.344 3.977 11.392l73.617 35.541c1.195.58 2.458.853 3.703.853 3.174 0 6.221-1.775 7.689-4.83 2.047-4.242.264-9.344-3.977-11.392zM256 230.4c-18.825 0-34.133 15.309-34.133 34.133 0 18.825 15.309 34.133 34.133 34.133 18.825 0 34.133-15.309 34.133-34.133 0-18.824-15.308-34.133-34.133-34.133zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067 9.412 0 17.067 7.654 17.067 17.067S265.412 281.6 256 281.6z"/><path d="m240.998 242.142-56.55-44.075c-3.721-2.876-9.079-2.236-11.981 1.485-2.893 3.721-2.236 9.079 1.485 11.981l56.55 44.075c1.562 1.212 3.405 1.801 5.24 1.801 2.543 0 5.052-1.126 6.741-3.285 2.893-3.722 2.236-9.081-1.485-11.982zM409.6 221.867c-51.755 0-93.867 42.112-93.867 93.867s42.112 93.867 93.867 93.867 93.867-42.112 93.867-93.867-42.112-93.867-93.867-93.867zm0 170.666c-42.351 0-76.8-34.449-76.8-76.8s34.449-76.8 76.8-76.8 76.8 34.449 76.8 76.8-34.449 76.8-76.8 76.8z"/><path d="M409.6 256c-18.825 0-34.133 15.309-34.133 34.133 0 18.825 15.309 34.133 34.133 34.133 18.825 0 34.133-15.309 34.133-34.133S428.425 256 409.6 256zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067 9.412 0 17.067 7.654 17.067 17.067S419.012 307.2 409.6 307.2zM434.355 341.333h-49.51c-14.583 0-26.445 11.546-26.445 25.728v22.494c0 3.046 1.621 5.862 4.258 7.39C376.96 405.222 393.19 409.6 409.6 409.6s32.64-4.378 46.942-12.655c2.637-1.519 4.258-4.344 4.258-7.381V367.07c0-14.191-11.861-25.737-26.445-25.737zm9.378 43.136c-21.239 10.581-47.027 10.581-68.267 0V367.07c0-4.779 4.207-8.67 9.378-8.67h49.51c5.171 0 9.378 3.891 9.378 8.67v17.399zM204.8 324.267c-51.755 0-93.867 42.112-93.867 93.867S153.045 512 204.8 512s93.867-42.112 93.867-93.867-42.112-93.866-93.867-93.866zm0 170.666c-42.351 0-76.8-34.449-76.8-76.8s34.449-76.8 76.8-76.8 76.8 34.449 76.8 76.8-34.449 76.8-76.8 76.8z"/><path d="M204.8 358.4c-18.825 0-34.133 15.309-34.133 34.133 0 18.825 15.309 34.133 34.133 34.133s34.133-15.309 34.133-34.133c0-18.824-15.308-34.133-34.133-34.133zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067 9.412 0 17.067 7.654 17.067 17.067S214.212 409.6 204.8 409.6zM229.555 443.733h-49.51c-14.583 0-26.445 11.546-26.445 25.728v22.494c0 3.046 1.621 5.862 4.258 7.39C172.16 507.622 188.39 512 204.8 512s32.64-4.378 46.942-12.655c2.637-1.519 4.258-4.343 4.258-7.381V469.47c0-14.191-11.861-25.737-26.445-25.737zm9.378 43.136c-21.24 10.581-47.027 10.581-68.267 0V469.47c0-4.779 4.207-8.67 9.378-8.67h49.51c5.171 0 9.378 3.891 9.378 8.67v17.399zM93.867 110.933C42.112 110.933 0 153.045 0 204.8s42.112 93.867 93.867 93.867 93.867-42.112 93.867-93.867c-.001-51.755-42.113-93.867-93.867-93.867zm0 170.667c-42.351 0-76.8-34.449-76.8-76.8s34.449-76.8 76.8-76.8 76.8 34.449 76.8 76.8-34.449 76.8-76.8 76.8z"/><path d="M93.867 145.067c-18.825 0-34.133 15.309-34.133 34.133s15.309 34.133 34.133 34.133c18.825 0 34.133-15.309 34.133-34.133s-15.309-34.133-34.133-34.133zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067s7.654-17.067 17.067-17.067c9.412 0 17.067 7.654 17.067 17.067s-7.655 17.067-17.067 17.067zM118.622 230.4h-49.51c-14.583 0-26.445 11.546-26.445 25.728v22.494c0 3.046 1.621 5.862 4.258 7.39 14.302 8.277 30.532 12.655 46.942 12.655s32.64-4.378 46.942-12.655c2.637-1.519 4.258-4.344 4.258-7.381v-22.494c0-14.191-11.862-25.737-26.445-25.737zM128 273.536c-21.239 10.581-47.027 10.581-68.267 0v-17.399c0-4.779 4.207-8.67 9.378-8.67h49.51c5.171 0 9.378 3.891 9.378 8.67v17.399zM298.667 0C246.912 0 204.8 42.112 204.8 93.867s42.112 93.867 93.867 93.867 93.867-42.112 93.867-93.867C392.533 42.112 350.421 0 298.667 0zm0 170.667c-42.351 0-76.8-34.449-76.8-76.8s34.449-76.8 76.8-76.8 76.8 34.449 76.8 76.8-34.449 76.8-76.8 76.8z"/><path d="M298.667 34.133c-18.825 0-34.133 15.309-34.133 34.133s15.309 34.133 34.133 34.133S332.8 87.091 332.8 68.267s-15.309-34.134-34.133-34.134zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067s17.067 7.654 17.067 17.067c-.001 9.413-7.655 17.067-17.067 17.067zM323.422 119.467h-49.51c-14.583 0-26.445 11.546-26.445 25.728v22.494c0 3.046 1.621 5.862 4.258 7.39 14.302 8.277 30.532 12.655 46.942 12.655s32.64-4.378 46.942-12.655c2.637-1.519 4.258-4.344 4.258-7.381v-22.494c0-14.192-11.862-25.737-26.445-25.737zm9.378 43.136c-21.239 10.581-47.027 10.581-68.267 0v-17.399c0-4.779 4.207-8.67 9.378-8.67h49.51c5.171 0 9.378 3.891 9.378 8.67v17.399zM219.827 88.311c-3.063-3.567-8.448-3.994-12.032-.93l-59.136 50.603c-3.584 3.063-4.002 8.448-.939 12.032 1.69 1.971 4.079 2.987 6.485 2.987 1.963 0 3.934-.674 5.547-2.057l59.136-50.603c3.585-3.063 4.003-8.448.939-12.032z"/><path d="m407.893 225.289-51.2-68.267c-2.825-3.78-8.175-4.523-11.947-1.707-3.772 2.825-4.531 8.175-1.707 11.938l51.2 68.267c1.681 2.236 4.241 3.413 6.835 3.413 1.775 0 3.576-.555 5.112-1.707 3.772-2.824 4.532-8.174 1.707-11.937zM337.86 343.953c-2.825-3.772-8.175-4.531-11.947-1.707l-47.667 35.746c-3.772 2.825-4.531 8.175-1.707 11.938 1.681 2.236 4.241 3.413 6.835 3.413 1.783 0 3.575-.563 5.112-1.707l47.667-35.746c3.772-2.823 4.532-8.174 1.707-11.937zM119.467 409.6H59.733c-4.71 0-8.533 3.814-8.533 8.533s3.823 8.533 8.533 8.533h59.733c4.71 0 8.533-3.814 8.533-8.533s-3.822-8.533-8.532-8.533zM93.867 0C75.042 0 59.733 15.309 59.733 34.133c0 18.825 15.309 34.133 34.133 34.133 18.825 0 34.133-15.309 34.133-34.133C128 15.309 112.691 0 93.867 0zm0 51.2c-9.412 0-17.067-7.654-17.067-17.067 0-9.412 7.654-17.067 17.067-17.067 9.412 0 17.067 7.654 17.067 17.067-.001 9.413-7.655 17.067-17.067 17.067z"/><path d="M93.867 51.2c-4.71 0-8.533 3.814-8.533 8.533v59.733c0 4.719 3.823 8.533 8.533 8.533 4.71 0 8.533-3.814 8.533-8.533V59.733c0-4.719-3.823-8.533-8.533-8.533z"/></svg>
@@ -1,7 +1,15 @@
1
1
  caluma:
2
2
  distribution:
3
- empty: "Es gibt noch keine Anfragen."
4
- create: "Erstellen Sie die Erste jetzt!"
3
+ empty: "Es wurden noch keine Anfragen erstellt."
4
+ start: "Starten"
5
+ send: "Offene Anfragen versenden"
6
+ send-confirm: "Wollen Sie wirklich alle offenen Anfragen versenden?"
7
+ complete-confirm:
8
+ "Es gibt noch <b>{count} offene {count, plural, =1 {Anfrage} other {Anfragen}}</b>
9
+ in der aktuellen Zirkulation. Wenn Sie die Zirkulation abschliessen, werden
10
+ alle verbleibenden offenen Anfragen abgebrochen. Möchten Sie fortfahren?"
11
+ send-error: "Fehler beim Versenden der offenen Anfragen"
12
+ complete-error: "Fehler beim Abschliessen der Zirkulation"
5
13
 
6
14
  edit:
7
15
  title: "Anfrage bearbeiten"
@@ -49,3 +57,9 @@ caluma:
49
57
  subtitle: "Seite nicht gefunden!"
50
58
  back: "Zurück zur"
51
59
  link: "Startseite"
60
+
61
+ withdraw:
62
+ link: "Zurückziehen"
63
+ confirm: "Wollen Sie die Anfrage wirklich zurückziehen?"
64
+ error: "Fehler beim Zurückziehen der Anfrage"
65
+ status: "Zurückgezogen"