@projectcaluma/ember-distribution 11.0.0-beta.29 → 11.0.0-beta.30
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/addon/abilities/distribution.js +9 -0
- package/addon/abilities/inquiry.js +1 -1
- package/addon/components/cd-inquiry-answer-form.hbs +28 -5
- package/addon/components/cd-inquiry-edit-form.hbs +12 -1
- package/addon/components/cd-inquiry-new-form/bulk-edit.hbs +20 -0
- package/addon/components/cd-inquiry-new-form/bulk-edit.js +113 -0
- package/addon/components/cd-inquiry-new-form/select.hbs +71 -0
- package/addon/components/cd-inquiry-new-form/select.js +76 -0
- package/addon/components/cd-inquiry-new-form.hbs +29 -86
- package/addon/components/cd-inquiry-new-form.js +1 -100
- package/addon/components/cd-navigation/controls.hbs +112 -66
- package/addon/components/cd-navigation/controls.js +29 -14
- package/addon/components/cd-navigation/item.hbs +22 -11
- package/addon/components/cd-navigation/section.hbs +15 -21
- package/addon/components/cd-navigation.hbs +6 -4
- package/addon/config.js +2 -0
- package/addon/gql/queries/control-work-items.graphql +17 -0
- package/addon/gql/queries/inquiry-form.graphql +26 -0
- package/addon/services/distribution.js +11 -1
- package/addon/templates/application.hbs +7 -5
- package/addon/templates/index.hbs +1 -5
- package/app/components/cd-inquiry-new-form/bulk-edit.js +1 -0
- package/app/components/cd-inquiry-new-form/select.js +1 -0
- package/package.json +13 -13
- package/translations/de.yaml +21 -8
- package/translations/en.yaml +21 -9
- package/translations/fr.yaml +21 -8
| @@ -1,67 +1,113 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
               | 
| 3 | 
            -
                 | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
                     | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 1 | 
            +
            {{#if
         | 
| 2 | 
            +
              (or
         | 
| 3 | 
            +
                (can "send inquiries of distribution")
         | 
| 4 | 
            +
                (can "create inquiry of distribution")
         | 
| 5 | 
            +
                (can "complete distribution")
         | 
| 6 | 
            +
                (can "reopen distribution")
         | 
| 7 | 
            +
              )
         | 
| 8 | 
            +
            }}
         | 
| 9 | 
            +
              {{#if @useButtons}}
         | 
| 10 | 
            +
                {{#if (can "create inquiry of distribution")}}
         | 
| 11 | 
            +
                  <LinkTo
         | 
| 12 | 
            +
                    @route="new"
         | 
| 13 | 
            +
                    class="uk-button uk-button-primary"
         | 
| 14 | 
            +
                    data-test-new-inquiry
         | 
| 15 | 
            +
                  >
         | 
| 16 | 
            +
                    {{t "caluma.distribution.start"}}
         | 
| 17 | 
            +
                  </LinkTo>
         | 
| 18 | 
            +
                {{/if}}
         | 
| 19 | 
            +
                {{#if (can "complete distribution")}}
         | 
| 20 | 
            +
                  <UkButton
         | 
| 21 | 
            +
                    @onClick={{perform this.completeDistribution}}
         | 
| 22 | 
            +
                    @label={{t "caluma.distribution.skip"}}
         | 
| 23 | 
            +
                    @loading={{this.completeDistribution.isRunning}}
         | 
| 24 | 
            +
                    @disabled={{this.completeDistribution.isRunning}}
         | 
| 25 | 
            +
                    data-test-complete-distribution
         | 
| 26 | 
            +
                  />
         | 
| 27 | 
            +
                {{/if}}
         | 
| 28 | 
            +
                {{#if (can "reopen distribution")}}
         | 
| 29 | 
            +
                  <UkButton
         | 
| 30 | 
            +
                    @onClick={{perform this.reopenDistribution}}
         | 
| 31 | 
            +
                    @label={{t "caluma.distribution.reopen"}}
         | 
| 32 | 
            +
                    @loading={{this.reopenDistribution.isRunning}}
         | 
| 33 | 
            +
                    @disabled={{this.reopenDistribution.isRunning}}
         | 
| 34 | 
            +
                    data-test-reopen-distribution
         | 
| 35 | 
            +
                  />
         | 
| 36 | 
            +
                {{/if}}
         | 
| 37 | 
            +
              {{else}}
         | 
| 38 | 
            +
                <li class="uk-margin-small">
         | 
| 39 | 
            +
                  <div class="uk-text-center">
         | 
| 40 | 
            +
                    {{#if (can "send inquiries of distribution")}}
         | 
| 41 | 
            +
                      <button
         | 
| 42 | 
            +
                        type="button"
         | 
| 43 | 
            +
                        class="uk-icon-button uk-button-primary"
         | 
| 44 | 
            +
                        {{uk-tooltip (t "caluma.distribution.send")}}
         | 
| 45 | 
            +
                        data-test-send-pending-inquiries
         | 
| 46 | 
            +
                        {{on "click" (perform this.sendInquiries)}}
         | 
| 47 | 
            +
                      >
         | 
| 48 | 
            +
                        {{#if this.sendInquiries.isRunning}}
         | 
| 49 | 
            +
                          <UkSpinner @ratio={{0.6}} />
         | 
| 50 | 
            +
                        {{else}}
         | 
| 51 | 
            +
                          <UkIcon @icon="comment" />
         | 
| 52 | 
            +
                        {{/if}}
         | 
| 53 | 
            +
                      </button>
         | 
| 54 | 
            +
                    {{/if}}
         | 
| 55 | 
            +
                    {{#if (can "create inquiry of distribution")}}
         | 
| 56 | 
            +
                      <LinkTo
         | 
| 57 | 
            +
                        @route="new"
         | 
| 58 | 
            +
                        class="uk-icon-button"
         | 
| 59 | 
            +
                        {{uk-tooltip (t "caluma.distribution.new.title")}}
         | 
| 60 | 
            +
                        data-test-new-inquiry
         | 
| 61 | 
            +
                      >
         | 
| 62 | 
            +
                        <UkIcon @icon="plus" />
         | 
| 63 | 
            +
                      </LinkTo>
         | 
| 64 | 
            +
                    {{/if}}
         | 
| 65 | 
            +
                    {{#if (can "check inquiries of distribution")}}
         | 
| 66 | 
            +
                      <button
         | 
| 67 | 
            +
                        type="button"
         | 
| 68 | 
            +
                        class="uk-icon-button"
         | 
| 69 | 
            +
                        {{uk-tooltip (t "caluma.distribution.check-inquiries")}}
         | 
| 70 | 
            +
                        data-test-check-inquiries
         | 
| 71 | 
            +
                        {{on "click" (perform this.checkInquiries)}}
         | 
| 72 | 
            +
                      >
         | 
| 73 | 
            +
                        {{#if this.checkInquiries.isRunning}}
         | 
| 74 | 
            +
                          <UkSpinner @ratio={{0.6}} />
         | 
| 75 | 
            +
                        {{else}}
         | 
| 76 | 
            +
                          <UkIcon @icon="check" />
         | 
| 77 | 
            +
                        {{/if}}
         | 
| 78 | 
            +
                      </button>
         | 
| 79 | 
            +
                    {{/if}}
         | 
| 80 | 
            +
                    {{#if (can "complete distribution")}}
         | 
| 81 | 
            +
                      <button
         | 
| 82 | 
            +
                        type="button"
         | 
| 83 | 
            +
                        class="uk-icon-button"
         | 
| 84 | 
            +
                        {{uk-tooltip (t "caluma.distribution.complete")}}
         | 
| 85 | 
            +
                        data-test-complete-distribution
         | 
| 86 | 
            +
                        {{on "click" (perform this.completeDistribution)}}
         | 
| 87 | 
            +
                      >
         | 
| 88 | 
            +
                        {{#if this.completeDistribution.isRunning}}
         | 
| 89 | 
            +
                          <UkSpinner @ratio={{0.6}} />
         | 
| 90 | 
            +
                        {{else}}
         | 
| 91 | 
            +
                          <UkIcon @icon="lock" />
         | 
| 92 | 
            +
                        {{/if}}
         | 
| 93 | 
            +
                      </button>
         | 
| 94 | 
            +
                    {{/if}}
         | 
| 95 | 
            +
                    {{#if (can "reopen distribution")}}
         | 
| 96 | 
            +
                      <button
         | 
| 97 | 
            +
                        type="button"
         | 
| 98 | 
            +
                        class="uk-icon-button"
         | 
| 99 | 
            +
                        {{uk-tooltip (t "caluma.distribution.reopen")}}
         | 
| 100 | 
            +
                        data-test-reopen-distribution
         | 
| 101 | 
            +
                        {{on "click" (perform this.reopenDistribution)}}
         | 
| 102 | 
            +
                      >
         | 
| 103 | 
            +
                        {{#if this.reopenDistribution.isRunning}}
         | 
| 104 | 
            +
                          <UkSpinner @ratio={{0.6}} />
         | 
| 105 | 
            +
                        {{else}}
         | 
| 106 | 
            +
                          <UkIcon @icon="refresh" />
         | 
| 107 | 
            +
                        {{/if}}
         | 
| 108 | 
            +
                      </button>
         | 
| 109 | 
            +
                    {{/if}}
         | 
| 110 | 
            +
                  </div>
         | 
| 111 | 
            +
                </li>
         | 
| 16 112 | 
             
              {{/if}}
         | 
| 17 | 
            -
             | 
| 18 | 
            -
                <LinkTo
         | 
| 19 | 
            -
                  @route="new"
         | 
| 20 | 
            -
                  class="uk-icon-button"
         | 
| 21 | 
            -
                  {{uk-tooltip (t "caluma.distribution.new.title")}}
         | 
| 22 | 
            -
                  data-test-new-inquiry
         | 
| 23 | 
            -
                >
         | 
| 24 | 
            -
                  <UkIcon @icon="plus" />
         | 
| 25 | 
            -
                </LinkTo>
         | 
| 26 | 
            -
              {{/if}}
         | 
| 27 | 
            -
              {{#if (can "complete distribution")}}
         | 
| 28 | 
            -
                <button
         | 
| 29 | 
            -
                  type="button"
         | 
| 30 | 
            -
                  class="uk-icon-button"
         | 
| 31 | 
            -
                  {{uk-tooltip
         | 
| 32 | 
            -
                    (t
         | 
| 33 | 
            -
                      (if
         | 
| 34 | 
            -
                        this.hasInquiries
         | 
| 35 | 
            -
                        "caluma.distribution.complete"
         | 
| 36 | 
            -
                        "caluma.distribution.skip"
         | 
| 37 | 
            -
                      )
         | 
| 38 | 
            -
                    )
         | 
| 39 | 
            -
                  }}
         | 
| 40 | 
            -
                  data-test-complete-distribution
         | 
| 41 | 
            -
                  {{on "click" (perform this.completeDistribution)}}
         | 
| 42 | 
            -
                >
         | 
| 43 | 
            -
                  {{#if this.completeDistribution.isRunning}}
         | 
| 44 | 
            -
                    <UkSpinner @ratio={{0.6}} />
         | 
| 45 | 
            -
                  {{else if this.hasInquiries}}
         | 
| 46 | 
            -
                    <UkIcon @icon="lock" />
         | 
| 47 | 
            -
                  {{else}}
         | 
| 48 | 
            -
                    <UkIcon @icon="forward" />
         | 
| 49 | 
            -
                  {{/if}}
         | 
| 50 | 
            -
                </button>
         | 
| 51 | 
            -
              {{/if}}
         | 
| 52 | 
            -
              {{#if (can "reopen distribution")}}
         | 
| 53 | 
            -
                <button
         | 
| 54 | 
            -
                  type="button"
         | 
| 55 | 
            -
                  class="uk-icon-button"
         | 
| 56 | 
            -
                  {{uk-tooltip (t "caluma.distribution.reopen")}}
         | 
| 57 | 
            -
                  data-test-reopen-distribution
         | 
| 58 | 
            -
                  {{on "click" (perform this.reopenDistribution)}}
         | 
| 59 | 
            -
                >
         | 
| 60 | 
            -
                  {{#if this.reopenDistribution.isRunning}}
         | 
| 61 | 
            -
                    <UkSpinner @ratio={{0.6}} />
         | 
| 62 | 
            -
                  {{else}}
         | 
| 63 | 
            -
                    <UkIcon @icon="refresh" />
         | 
| 64 | 
            -
                  {{/if}}
         | 
| 65 | 
            -
                </button>
         | 
| 66 | 
            -
              {{/if}}
         | 
| 67 | 
            -
            </div>
         | 
| 113 | 
            +
            {{/if}}
         | 
| @@ -20,20 +20,12 @@ export default class CdNavigationControlsComponent extends Component { | |
| 20 20 | 
             
              @queryManager apollo;
         | 
| 21 21 | 
             
              @config config;
         | 
| 22 22 |  | 
| 23 | 
            -
              get hasInquiries() {
         | 
| 24 | 
            -
                return (
         | 
| 25 | 
            -
                  this.distribution.navigation.value?.addressed.edges.length > 0 ||
         | 
| 26 | 
            -
                  this.distribution.navigation.value?.controlling.edges.length > 0 ||
         | 
| 27 | 
            -
                  this.distribution.navigation.value?.more.edges.length > 0
         | 
| 28 | 
            -
                );
         | 
| 29 | 
            -
              }
         | 
| 30 | 
            -
             | 
| 31 23 | 
             
              @dropTask
         | 
| 32 24 | 
             
              *completeDistribution() {
         | 
| 33 25 | 
             
                try {
         | 
| 34 26 | 
             
                  let confirmText = this.intl.t("caluma.distribution.skip-confirm");
         | 
| 35 27 |  | 
| 36 | 
            -
                  if (this.hasInquiries) {
         | 
| 28 | 
            +
                  if (this.distribution.hasInquiries) {
         | 
| 37 29 | 
             
                    const incompleteInquiries = yield this.apollo.query(
         | 
| 38 30 | 
             
                      {
         | 
| 39 31 | 
             
                        query: incompleteInquiriesQuery,
         | 
| @@ -104,15 +96,20 @@ export default class CdNavigationControlsComponent extends Component { | |
| 104 96 |  | 
| 105 97 | 
             
              @dropTask
         | 
| 106 98 | 
             
              *sendInquiries() {
         | 
| 107 | 
            -
                 | 
| 99 | 
            +
                const ids = this.distribution.controls.value.send.edges
         | 
| 100 | 
            +
                  .filter((edge) => edge.node.status === "SUSPENDED")
         | 
| 101 | 
            +
                  .map((edge) => decodeId(edge.node.id));
         | 
| 102 | 
            +
             | 
| 103 | 
            +
                if (
         | 
| 104 | 
            +
                  ids.length &&
         | 
| 105 | 
            +
                  !(yield confirm(
         | 
| 106 | 
            +
                    this.intl.t("caluma.distribution.send-confirm", { count: ids.length })
         | 
| 107 | 
            +
                  ))
         | 
| 108 | 
            +
                ) {
         | 
| 108 109 | 
             
                  return;
         | 
| 109 110 | 
             
                }
         | 
| 110 111 |  | 
| 111 112 | 
             
                try {
         | 
| 112 | 
            -
                  const ids = this.distribution.controls.value.send.edges.map((edge) =>
         | 
| 113 | 
            -
                    decodeId(edge.node.id)
         | 
| 114 | 
            -
                  );
         | 
| 115 | 
            -
             | 
| 116 113 | 
             
                  const mutations = ids.map(
         | 
| 117 114 | 
             
                    (id, index) => `
         | 
| 118 115 | 
             
                    sendInquiry${index}: resumeWorkItem(input: { id: "${id}" }) {
         | 
| @@ -131,4 +128,22 @@ export default class CdNavigationControlsComponent extends Component { | |
| 131 128 | 
             
                  this.notification.danger(this.intl.t("caluma.distribution.send-error"));
         | 
| 132 129 | 
             
                }
         | 
| 133 130 | 
             
              }
         | 
| 131 | 
            +
             | 
| 132 | 
            +
              @dropTask
         | 
| 133 | 
            +
              *checkInquiries() {
         | 
| 134 | 
            +
                try {
         | 
| 135 | 
            +
                  yield this.apollo.mutate({
         | 
| 136 | 
            +
                    mutation: completeWorkItemMutation,
         | 
| 137 | 
            +
                    variables: {
         | 
| 138 | 
            +
                      workItem: decodeId(
         | 
| 139 | 
            +
                        this.distribution.controls.value?.check.edges[0]?.node.id
         | 
| 140 | 
            +
                      ),
         | 
| 141 | 
            +
                    },
         | 
| 142 | 
            +
                  });
         | 
| 143 | 
            +
                } catch (e) {
         | 
| 144 | 
            +
                  this.notification.danger(
         | 
| 145 | 
            +
                    this.intl.t("caluma.distribution.check-inquiries-error")
         | 
| 146 | 
            +
                  );
         | 
| 147 | 
            +
                }
         | 
| 148 | 
            +
              }
         | 
| 134 149 | 
             
            }
         | 
| @@ -1,17 +1,28 @@ | |
| 1 1 | 
             
            <li class="uk-width-auto {{if this.isActive 'uk-active'}}">
         | 
| 2 2 | 
             
              <LinkTo @route="inquiry" @model={{this.model}}>
         | 
| 3 | 
            -
                {{# | 
| 4 | 
            -
                   | 
| 5 | 
            -
                     | 
| 6 | 
            -
                     | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
                   | 
| 12 | 
            -
                    {{ | 
| 3 | 
            +
                {{#if (eq @type "addressed")}}
         | 
| 4 | 
            +
                  <span
         | 
| 5 | 
            +
                    class="uk-width-expand uk-text-truncate"
         | 
| 6 | 
            +
                    title={{t
         | 
| 7 | 
            +
                      "caluma.distribution.attention-to"
         | 
| 8 | 
            +
                      subject=@inquiry.controllingGroupName
         | 
| 9 | 
            +
                      abbr=false
         | 
| 10 | 
            +
                    }}
         | 
| 11 | 
            +
                  >
         | 
| 12 | 
            +
                    {{t
         | 
| 13 | 
            +
                      "caluma.distribution.attention-to"
         | 
| 14 | 
            +
                      subject=@inquiry.controllingGroupName
         | 
| 15 | 
            +
                      abbr=true
         | 
| 16 | 
            +
                    }}
         | 
| 13 17 | 
             
                  </span>
         | 
| 14 | 
            -
                {{ | 
| 18 | 
            +
                {{else}}
         | 
| 19 | 
            +
                  <span
         | 
| 20 | 
            +
                    class="uk-width-expand uk-text-truncate"
         | 
| 21 | 
            +
                    title={{@inquiry.addressedGroupName}}
         | 
| 22 | 
            +
                  >
         | 
| 23 | 
            +
                    {{@inquiry.addressedGroupName}}
         | 
| 24 | 
            +
                  </span>
         | 
| 25 | 
            +
                {{/if}}
         | 
| 15 26 |  | 
| 16 27 | 
             
                <CdNavigation::StatusIndicator @inquiry={{@inquiry}} @type={{@type}} />
         | 
| 17 28 | 
             
              </LinkTo>
         | 
| @@ -1,28 +1,22 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              class="uk-margin-small | 
| 3 | 
            -
            >
         | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
                   | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
                   | 
| 10 | 
            -
             | 
| 11 | 
            -
                   | 
| 12 | 
            -
                 | 
| 13 | 
            -
              </a>
         | 
| 1 | 
            +
            {{#if @inquiries.length}}
         | 
| 2 | 
            +
              <li class="uk-margin-small uk-width-auto {{if this.isActive 'uk-active'}}">
         | 
| 3 | 
            +
                <a href="" {{on "click" this.toggle}}>
         | 
| 4 | 
            +
                  <span class="uk-width-expand">
         | 
| 5 | 
            +
                    {{t (concat "caluma.distribution.types." @type)}}
         | 
| 6 | 
            +
                  </span>
         | 
| 7 | 
            +
                  {{#if this.expanded}}
         | 
| 8 | 
            +
                    <UkIcon @icon="chevron-down" />
         | 
| 9 | 
            +
                  {{else}}
         | 
| 10 | 
            +
                    <UkIcon @icon="chevron-right" />
         | 
| 11 | 
            +
                  {{/if}}
         | 
| 12 | 
            +
                </a>
         | 
| 14 13 |  | 
| 15 | 
            -
             | 
| 16 | 
            -
                {{#if @inquiries.length}}
         | 
| 14 | 
            +
                {{#if this.expanded}}
         | 
| 17 15 | 
             
                  <ul class="uk-tab uk-tab-left uk-margin-left uk-width-auto">
         | 
| 18 16 | 
             
                    {{#each this.inquiries as |inquiry|}}
         | 
| 19 17 | 
             
                      <CdNavigation::Item @inquiry={{inquiry}} @type={{@type}} />
         | 
| 20 18 | 
             
                    {{/each}}
         | 
| 21 19 | 
             
                  </ul>
         | 
| 22 20 | 
             
                {{/if}}
         | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                  <CdNavigation::Controls />
         | 
| 26 | 
            -
                {{/if}}
         | 
| 27 | 
            -
              {{/if}}
         | 
| 28 | 
            -
            </li>
         | 
| 21 | 
            +
              </li>
         | 
| 22 | 
            +
            {{/if}}
         | 
| @@ -1,11 +1,13 @@ | |
| 1 1 | 
             
            <ul class="uk-tab uk-tab-left uk-margin-remove-bottom uk-width-auto">
         | 
| 2 | 
            -
              <CdNavigation:: | 
| 3 | 
            -
             | 
| 4 | 
            -
                @inquiries={{this.inquiries.controlling}}
         | 
| 5 | 
            -
              />
         | 
| 2 | 
            +
              <CdNavigation::Controls />
         | 
| 3 | 
            +
             | 
| 6 4 | 
             
              <CdNavigation::Section
         | 
| 7 5 | 
             
                @type="addressed"
         | 
| 8 6 | 
             
                @inquiries={{this.inquiries.addressed}}
         | 
| 9 7 | 
             
              />
         | 
| 8 | 
            +
              <CdNavigation::Section
         | 
| 9 | 
            +
                @type="controlling"
         | 
| 10 | 
            +
                @inquiries={{this.inquiries.controlling}}
         | 
| 11 | 
            +
              />
         | 
| 10 12 | 
             
              <CdNavigation::Section @type="more" @inquiries={{this.inquiries.more}} />
         | 
| 11 13 | 
             
            </ul>
         | 
    
        package/addon/config.js
    CHANGED
    
    | @@ -20,6 +20,7 @@ export default function config(target, property) { | |
| 20 20 | 
             
                      controls: {
         | 
| 21 21 | 
             
                        createTask: "create-inquiry",
         | 
| 22 22 | 
             
                        completeTask: "complete-distribution",
         | 
| 23 | 
            +
                        checkTask: "check-inquiries",
         | 
| 23 24 | 
             
                      },
         | 
| 24 25 | 
             
                      warningPeriod: 3,
         | 
| 25 26 | 
             
                      inquiry: {
         | 
| @@ -59,6 +60,7 @@ export default function config(target, property) { | |
| 59 60 | 
             
                        },
         | 
| 60 61 | 
             
                      },
         | 
| 61 62 | 
             
                      new: {
         | 
| 63 | 
            +
                        defaultDeadlineLeadTime: 30,
         | 
| 62 64 | 
             
                        defaultTypes: ["suggestions"],
         | 
| 63 65 | 
             
                        types: {
         | 
| 64 66 | 
             
                          suggestions: {
         | 
| @@ -2,6 +2,7 @@ query ControlWorkItems( | |
| 2 2 | 
             
              $createTask: ID!
         | 
| 3 3 | 
             
              $completeTask: ID!
         | 
| 4 4 | 
             
              $inquiryTask: ID!
         | 
| 5 | 
            +
              $checkTask: ID!
         | 
| 5 6 | 
             
              $caseId: ID!
         | 
| 6 7 | 
             
              $currentGroup: String!
         | 
| 7 8 | 
             
            ) {
         | 
| @@ -50,6 +51,22 @@ query ControlWorkItems( | |
| 50 51 | 
             
                  }
         | 
| 51 52 | 
             
                }
         | 
| 52 53 | 
             
              }
         | 
| 54 | 
            +
              check: allWorkItems(
         | 
| 55 | 
            +
                filter: [
         | 
| 56 | 
            +
                  { case: $caseId }
         | 
| 57 | 
            +
                  { task: $checkTask }
         | 
| 58 | 
            +
                  { status: READY }
         | 
| 59 | 
            +
                  { hasDeadline: true }
         | 
| 60 | 
            +
                  { addressedGroups: [$currentGroup] }
         | 
| 61 | 
            +
                ]
         | 
| 62 | 
            +
              ) {
         | 
| 63 | 
            +
                edges {
         | 
| 64 | 
            +
                  node {
         | 
| 65 | 
            +
                    id
         | 
| 66 | 
            +
                    status
         | 
| 67 | 
            +
                  }
         | 
| 68 | 
            +
                }
         | 
| 69 | 
            +
              }
         | 
| 53 70 | 
             
              case: allCases(filter: [{ id: $caseId }]) {
         | 
| 54 71 | 
             
                edges {
         | 
| 55 72 | 
             
                  node {
         | 
| @@ -0,0 +1,26 @@ | |
| 1 | 
            +
            #import FieldQuestion, FieldTableQuestion, SimpleQuestion from '@projectcaluma/ember-form/gql/fragments/field.graphql'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            query InquiryForm($inquiryTask: String!) {
         | 
| 4 | 
            +
              allTasks(filter: [{ slug: $inquiryTask }], first: 1) {
         | 
| 5 | 
            +
                edges {
         | 
| 6 | 
            +
                  node {
         | 
| 7 | 
            +
                    id
         | 
| 8 | 
            +
                    ... on CompleteTaskFormTask {
         | 
| 9 | 
            +
                      form {
         | 
| 10 | 
            +
                        id
         | 
| 11 | 
            +
                        slug
         | 
| 12 | 
            +
                        name
         | 
| 13 | 
            +
                        meta
         | 
| 14 | 
            +
                        questions {
         | 
| 15 | 
            +
                          edges {
         | 
| 16 | 
            +
                            node {
         | 
| 17 | 
            +
                              ...FieldQuestion
         | 
| 18 | 
            +
                            }
         | 
| 19 | 
            +
                          }
         | 
| 20 | 
            +
                        }
         | 
| 21 | 
            +
                      }
         | 
| 22 | 
            +
                    }
         | 
| 23 | 
            +
                  }
         | 
| 24 | 
            +
                }
         | 
| 25 | 
            +
              }
         | 
| 26 | 
            +
            }
         | 
| @@ -25,6 +25,14 @@ export default class DistributionService extends Service { | |
| 25 25 | 
             
                return getOwner(this).lookup("route:application").currentModel;
         | 
| 26 26 | 
             
              }
         | 
| 27 27 |  | 
| 28 | 
            +
              get hasInquiries() {
         | 
| 29 | 
            +
                return (
         | 
| 30 | 
            +
                  this.navigation.value?.addressed.edges.length > 0 ||
         | 
| 31 | 
            +
                  this.navigation.value?.controlling.edges.length > 0 ||
         | 
| 32 | 
            +
                  this.navigation.value?.more.edges.length > 0
         | 
| 33 | 
            +
                );
         | 
| 34 | 
            +
              }
         | 
| 35 | 
            +
             | 
| 28 36 | 
             
              controls = trackedTask(this, this.fetchControls, () => [this.caseId]);
         | 
| 29 37 | 
             
              navigation = trackedTask(this, this.fetchNavigation, () => [this.caseId]);
         | 
| 30 38 |  | 
| @@ -51,6 +59,7 @@ export default class DistributionService extends Service { | |
| 51 59 | 
             
                    createTask: this.config.controls.createTask,
         | 
| 52 60 | 
             
                    completeTask: this.config.controls.completeTask,
         | 
| 53 61 | 
             
                    inquiryTask: this.config.inquiry.task,
         | 
| 62 | 
            +
                    checkTask: this.config.controls.checkTask,
         | 
| 54 63 | 
             
                  },
         | 
| 55 64 | 
             
                });
         | 
| 56 65 | 
             
              }
         | 
| @@ -93,7 +102,7 @@ export default class DistributionService extends Service { | |
| 93 102 | 
             
              }
         | 
| 94 103 |  | 
| 95 104 | 
             
              @dropTask
         | 
| 96 | 
            -
              *createInquiry(groups) {
         | 
| 105 | 
            +
              *createInquiry(groups, context = {}) {
         | 
| 97 106 | 
             
                try {
         | 
| 98 107 | 
             
                  // get create inquiry work item to complete
         | 
| 99 108 | 
             
                  const createId = decodeId(this.controls.value?.create.edges[0].node.id);
         | 
| @@ -104,6 +113,7 @@ export default class DistributionService extends Service { | |
| 104 113 | 
             
                    variables: {
         | 
| 105 114 | 
             
                      id: createId,
         | 
| 106 115 | 
             
                      context: JSON.stringify({
         | 
| 116 | 
            +
                        ...context,
         | 
| 107 117 | 
             
                        addressed_groups: groups.map(String),
         | 
| 108 118 | 
             
                      }),
         | 
| 109 119 | 
             
                    },
         | 
| @@ -8,11 +8,13 @@ | |
| 8 8 | 
             
              </div>
         | 
| 9 9 | 
             
            {{else}}
         | 
| 10 10 | 
             
              <div uk-grid class={{if this.config.ui.stack "uk-grid-small"}}>
         | 
| 11 | 
            -
                 | 
| 12 | 
            -
                  < | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 11 | 
            +
                {{#if this.distribution.hasInquiries}}
         | 
| 12 | 
            +
                  <div class={{if this.config.ui.stack "uk-width-1-1" "uk-width-1-3"}}>
         | 
| 13 | 
            +
                    <CdNavigation @caseId={{@model}} />
         | 
| 14 | 
            +
                  </div>
         | 
| 15 | 
            +
                  {{#if this.config.ui.stack}}<div class="uk-width-1-1"><hr /></div>{{/if}}
         | 
| 16 | 
            +
                {{/if}}
         | 
| 17 | 
            +
                <div class="uk-width-expand">
         | 
| 16 18 | 
             
                  {{outlet}}
         | 
| 17 19 | 
             
                </div>
         | 
| 18 20 | 
             
              </div>
         | 
| @@ -3,9 +3,5 @@ | |
| 3 3 | 
             
              <p class="uk-margin-medium uk-margin-remove-horizontal">
         | 
| 4 4 | 
             
                {{t "caluma.distribution.empty"}}
         | 
| 5 5 | 
             
              </p>
         | 
| 6 | 
            -
              {{ | 
| 7 | 
            -
                <LinkTo @route="new" class="uk-button uk-button-primary">
         | 
| 8 | 
            -
                  {{t "caluma.distribution.start"}}
         | 
| 9 | 
            -
                </LinkTo>
         | 
| 10 | 
            -
              {{/if}}
         | 
| 6 | 
            +
              <CdNavigation::Controls @useButtons={{true}} />
         | 
| 11 7 | 
             
            </div>
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-new-form/bulk-edit";
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            export { default } from "@projectcaluma/ember-distribution/components/cd-inquiry-new-form/select";
         | 
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@projectcaluma/ember-distribution",
         | 
| 3 | 
            -
              "version": "11.0.0-beta. | 
| 3 | 
            +
              "version": "11.0.0-beta.30",
         | 
| 4 4 | 
             
              "description": "Ember engine for the Caluma distribution module.",
         | 
| 5 5 | 
             
              "keywords": [
         | 
| 6 6 | 
             
                "ember-addon",
         | 
| @@ -20,14 +20,14 @@ | |
| 20 20 | 
             
              "dependencies": {
         | 
| 21 21 | 
             
                "@ember/legacy-built-in-components": "^0.4.1",
         | 
| 22 22 | 
             
                "@ember/string": "^3.0.0",
         | 
| 23 | 
            -
                "@embroider/macros": "^1. | 
| 23 | 
            +
                "@embroider/macros": "^1.9.0",
         | 
| 24 24 | 
             
                "@glimmer/component": "^1.1.2",
         | 
| 25 25 | 
             
                "@glimmer/tracking": "^1.1.2",
         | 
| 26 | 
            -
                "@projectcaluma/ember-core": "^11.0.0-beta. | 
| 27 | 
            -
                "@projectcaluma/ember-form": "^11.0.0-beta. | 
| 28 | 
            -
                "@projectcaluma/ember-workflow": "^11.0.0-beta. | 
| 26 | 
            +
                "@projectcaluma/ember-core": "^11.0.0-beta.30",
         | 
| 27 | 
            +
                "@projectcaluma/ember-form": "^11.0.0-beta.30",
         | 
| 28 | 
            +
                "@projectcaluma/ember-workflow": "^11.0.0-beta.30",
         | 
| 29 29 | 
             
                "ember-apollo-client": "~4.0.2",
         | 
| 30 | 
            -
                "ember-auto-import": "^2.4. | 
| 30 | 
            +
                "ember-auto-import": "^2.4.3",
         | 
| 31 31 | 
             
                "ember-can": "^4.2.0",
         | 
| 32 32 | 
             
                "ember-cli-babel": "^7.26.11",
         | 
| 33 33 | 
             
                "ember-cli-htmlbars": "^6.1.1",
         | 
| @@ -37,21 +37,21 @@ | |
| 37 37 | 
             
                "ember-intl": "^5.7.2",
         | 
| 38 38 | 
             
                "ember-pikaday": "^4.0.0",
         | 
| 39 39 | 
             
                "ember-resources": "^5.4.0",
         | 
| 40 | 
            -
                "ember-svg-jar": "^2. | 
| 40 | 
            +
                "ember-svg-jar": "^2.4.0",
         | 
| 41 41 | 
             
                "ember-test-selectors": "^6.0.0",
         | 
| 42 42 | 
             
                "ember-uikit": "^6.1.0",
         | 
| 43 43 | 
             
                "graphql": "^15.8.0",
         | 
| 44 44 | 
             
                "graphql-tag": "^2.12.6",
         | 
| 45 45 | 
             
                "lodash.merge": "^4.6.2",
         | 
| 46 | 
            -
                "luxon": "^3.0. | 
| 46 | 
            +
                "luxon": "^3.0.4",
         | 
| 47 47 | 
             
                "tracked-toolbox": "^1.2.3"
         | 
| 48 48 | 
             
              },
         | 
| 49 49 | 
             
              "devDependencies": {
         | 
| 50 50 | 
             
                "@ember/optional-features": "2.0.0",
         | 
| 51 51 | 
             
                "@ember/test-helpers": "2.7.0",
         | 
| 52 52 | 
             
                "@embroider/test-setup": "1.8.3",
         | 
| 53 | 
            -
                "@faker-js/faker": "7. | 
| 54 | 
            -
                "@projectcaluma/ember-testing": "11.0.0-beta. | 
| 53 | 
            +
                "@faker-js/faker": "7.6.0",
         | 
| 54 | 
            +
                "@projectcaluma/ember-testing": "11.0.0-beta.30",
         | 
| 55 55 | 
             
                "broccoli-asset-rev": "3.0.0",
         | 
| 56 56 | 
             
                "ember-cli": "4.7.0",
         | 
| 57 57 | 
             
                "ember-cli-code-coverage": "1.0.3",
         | 
| @@ -64,15 +64,15 @@ | |
| 64 64 | 
             
                "ember-disable-prototype-extensions": "1.1.3",
         | 
| 65 65 | 
             
                "ember-engines": "0.8.23",
         | 
| 66 66 | 
             
                "ember-load-initializers": "2.1.2",
         | 
| 67 | 
            -
                "ember-qunit": " | 
| 67 | 
            +
                "ember-qunit": "6.0.0",
         | 
| 68 68 | 
             
                "ember-resolver": "8.0.3",
         | 
| 69 | 
            -
                "ember-source": "4. | 
| 69 | 
            +
                "ember-source": "4.8.0",
         | 
| 70 70 | 
             
                "ember-source-channel-url": "3.0.0",
         | 
| 71 71 | 
             
                "ember-try": "2.0.0",
         | 
| 72 72 | 
             
                "loader.js": "4.7.0",
         | 
| 73 73 | 
             
                "miragejs": "0.1.45",
         | 
| 74 74 | 
             
                "npm-run-all": "4.1.5",
         | 
| 75 | 
            -
                "qunit": "2.19. | 
| 75 | 
            +
                "qunit": "2.19.2",
         | 
| 76 76 | 
             
                "qunit-dom": "2.0.0",
         | 
| 77 77 | 
             
                "sass": "1.55.0",
         | 
| 78 78 | 
             
                "webpack": "5.74.0"
         | 
    
        package/translations/de.yaml
    CHANGED
    
    | @@ -1,16 +1,20 @@ | |
| 1 1 | 
             
            caluma:
         | 
| 2 2 | 
             
              distribution:
         | 
| 3 3 | 
             
                empty: "Es wurden noch keine Anfragen erstellt."
         | 
| 4 | 
            -
                start: " | 
| 4 | 
            +
                start: "Zirkulation starten"
         | 
| 5 5 | 
             
                send: "Offene Anfragen versenden"
         | 
| 6 6 | 
             
                complete: "Zirkulation abschliessen"
         | 
| 7 7 | 
             
                skip: "Zirkulation überspringen"
         | 
| 8 8 | 
             
                reopen: "Zirkulation wiedereröffnen"
         | 
| 9 | 
            -
                 | 
| 9 | 
            +
                check-inquiries: "Stellungnahmen als geprüft markieren"
         | 
| 10 | 
            +
                send-confirm:
         | 
| 11 | 
            +
                  "Wollen Sie wirklich <b>{count, plural, =1 {eine offene Anfrage} other
         | 
| 12 | 
            +
                  {{count} offene Anfragen}}</b> versenden?"
         | 
| 10 13 | 
             
                complete-confirm:
         | 
| 11 | 
            -
                  "Es gibt noch <b>{count | 
| 12 | 
            -
                  in der aktuellen Zirkulation. Wenn Sie die | 
| 13 | 
            -
                  alle verbleibenden offenen Anfragen | 
| 14 | 
            +
                  "Es gibt noch <b>{count, plural, =1 {eine offene Anfrage} other {{count}
         | 
| 15 | 
            +
                  offene Anfragen}}</b> in der aktuellen Zirkulation. Wenn Sie die
         | 
| 16 | 
            +
                  Zirkulation abschliessen, werden alle verbleibenden offenen Anfragen
         | 
| 17 | 
            +
                  abgebrochen. Möchten Sie fortfahren?"
         | 
| 14 18 | 
             
                complete-confirm-empty: "Möchten Sie die Zirkulation wirklich abschliessen?"
         | 
| 15 19 | 
             
                skip-confirm: "Wollen Sie die Zirkulation wirklich überspringen?"
         | 
| 16 20 | 
             
                reopen-confirm: "Wollen Sie die Zirkulation wirklich wiedereröffnen?"
         | 
| @@ -18,6 +22,9 @@ caluma: | |
| 18 22 | 
             
                complete-error: "Fehler beim Abschliessen der Zirkulation"
         | 
| 19 23 | 
             
                skip-error: "Fehler beim Überspringen der Zirkulation"
         | 
| 20 24 | 
             
                reopen-error: "Fehler beim Wiedereröffnen der Zirkulation"
         | 
| 25 | 
            +
                check-inquiries-error: "Fehler beim Markieren der Stellungnahmen als geprüft"
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                attention-to: "{abbr, select, true {z. H.} other {zu Handen}} {subject}"
         | 
| 21 28 |  | 
| 22 29 | 
             
                more: "mehr"
         | 
| 23 30 | 
             
                less: "weniger"
         | 
| @@ -33,6 +40,10 @@ caluma: | |
| 33 40 | 
             
                  send: "Aktuelle Anfrage versenden"
         | 
| 34 41 | 
             
                  send-error: "Fehler beim Senden der Anfrage"
         | 
| 35 42 | 
             
                  send-not-allowed: "Sie sind nicht berechtigt diese Anfrage zu versenden."
         | 
| 43 | 
            +
                  edit-sent:
         | 
| 44 | 
            +
                    "<b>Achtung:</b> Sie bearbeiten eine Anfrage, die bereits versendet
         | 
| 45 | 
            +
                    wurde. Falls Sie die Details grundlegend ändern, kann es sein, dass die
         | 
| 46 | 
            +
                    adressierte Stelle dies nicht bemerkt, da sie nicht informiert wird."
         | 
| 36 47 |  | 
| 37 48 | 
             
                answer:
         | 
| 38 49 | 
             
                  link: "Beantworten"
         | 
| @@ -62,6 +73,8 @@ caluma: | |
| 62 73 | 
             
                  selected: "{count, plural, other {ausgewählt}}"
         | 
| 63 74 | 
             
                  reset: "Zurücksetzen"
         | 
| 64 75 | 
             
                  create-draft: "Entwurf erstellen"
         | 
| 76 | 
            +
                  continue: "Weiter"
         | 
| 77 | 
            +
                  back: "Zurück"
         | 
| 65 78 | 
             
                  error: "Fehler beim Erstellen der {count, plural, =1 {Anfragen} other {Anfrage}}"
         | 
| 66 79 |  | 
| 67 80 | 
             
                reminder:
         | 
| @@ -73,9 +86,9 @@ caluma: | |
| 73 86 | 
             
                  error: "Fehler beim Versenden der Erinnerung"
         | 
| 74 87 |  | 
| 75 88 | 
             
                types:
         | 
| 76 | 
            -
                  controlling: " | 
| 77 | 
            -
                  addressed: " | 
| 78 | 
            -
                  more: "Weitere"
         | 
| 89 | 
            +
                  controlling: "Angeforderte Stellungnahmen"
         | 
| 90 | 
            +
                  addressed: "Eigene Stellungnahmen"
         | 
| 91 | 
            +
                  more: "Weitere Stellungnahmen"
         | 
| 79 92 |  | 
| 80 93 | 
             
                status:
         | 
| 81 94 | 
             
                  draft: "Entwurf"
         |