@projectcaluma/ember-distribution 11.0.0-beta.35 → 11.0.0-beta.37

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.
@@ -57,12 +57,9 @@ export default class InquiryAbility extends Ability {
57
57
  get canEdit() {
58
58
  return (
59
59
  this.hasBasePermission &&
60
- // Since editing in the status ready has the same character as sending an
61
- // inquiry, we need to make sure that permission would be given
62
- (this.isSuspended ||
63
- (this.isReady &&
64
- this.hasCustomPermission("sendInquiry", this.model))) &&
65
- this.isControlling
60
+ (this.isSuspended || this.isReady) &&
61
+ this.isControlling &&
62
+ this.hasCustomPermission("editInquiry", this.model)
66
63
  );
67
64
  }
68
65
 
@@ -5,7 +5,7 @@
5
5
  ({{group-name @group}})
6
6
  {{/if}}
7
7
  {{#if @status}}
8
- <UkLabel @label={{@status}} class="uk-margin-left uk-text-default" />
8
+ <UkLabel @label={{@status}} class="uk-margin-left" />
9
9
  {{/if}}
10
10
  </div>
11
11
  {{yield}}
@@ -7,10 +7,7 @@
7
7
  >
8
8
  {{group-name @inquiry.controllingGroups}}
9
9
  {{#if this.status}}
10
- <UkLabel
11
- @label={{this.status}}
12
- class="uk-margin-left uk-text-default"
13
- />
10
+ <UkLabel @label={{this.status}} class="uk-margin-left" />
14
11
  {{/if}}
15
12
  </div>
16
13
  {{else if (eq @type "answer")}}
@@ -33,10 +33,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
33
33
 
34
34
  const inquiry = this.args.inquiry;
35
35
 
36
- if (
37
- inquiry.status === "SUSPENDED" &&
38
- this.abilities.can("edit inquiry", inquiry)
39
- ) {
36
+ if (inquiry.status === "SUSPENDED") {
40
37
  return this.intl.t("caluma.distribution.status.draft");
41
38
  } else if (this.abilities.can("answer inquiry", inquiry)) {
42
39
  return this.answerStatus;
@@ -84,6 +84,8 @@ export default class CdInquiryDialogComponent extends Component {
84
84
 
85
85
  yield this.distribution.createInquiry.perform([this.args.to]);
86
86
 
87
+ yield getObservable(this._inquiries.value).refetch();
88
+
87
89
  this.router.transitionTo(
88
90
  "inquiry.detail.index",
89
91
  {
@@ -16,6 +16,7 @@
16
16
  {{#if
17
17
  (and
18
18
  (cannot "send inquiry" this.inquiry)
19
+ (can "edit inquiry" this.inquiry)
19
20
  (eq this.inquiry.status "SUSPENDED")
20
21
  )
21
22
  }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "11.0.0-beta.35",
3
+ "version": "11.0.0-beta.37",
4
4
  "description": "Ember engine for the Caluma distribution module.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -23,9 +23,9 @@
23
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.35",
27
- "@projectcaluma/ember-form": "^11.0.0-beta.35",
28
- "@projectcaluma/ember-workflow": "^11.0.0-beta.35",
26
+ "@projectcaluma/ember-core": "^11.0.0-beta.37",
27
+ "@projectcaluma/ember-form": "^11.0.0-beta.37",
28
+ "@projectcaluma/ember-workflow": "^11.0.0-beta.37",
29
29
  "ember-apollo-client": "~4.0.2",
30
30
  "ember-auto-import": "^2.4.3",
31
31
  "ember-can": "^4.2.0",
@@ -36,14 +36,14 @@
36
36
  "ember-fetch": "^8.1.2",
37
37
  "ember-flatpickr": "^3.2.3",
38
38
  "ember-intl": "^5.7.2",
39
- "ember-resources": "^5.5.0",
39
+ "ember-resources": "^5.6.0",
40
40
  "ember-svg-jar": "^2.4.2",
41
41
  "ember-test-selectors": "^6.0.0",
42
- "ember-uikit": "^6.1.0",
42
+ "ember-uikit": "^6.1.1",
43
43
  "graphql": "^15.8.0",
44
44
  "graphql-tag": "^2.12.6",
45
45
  "lodash.merge": "^4.6.2",
46
- "luxon": "^3.0.4",
46
+ "luxon": "^3.1.0",
47
47
  "tracked-toolbox": "^1.2.3"
48
48
  },
49
49
  "devDependencies": {
@@ -51,7 +51,7 @@
51
51
  "@ember/test-helpers": "2.7.0",
52
52
  "@embroider/test-setup": "1.8.3",
53
53
  "@faker-js/faker": "7.6.0",
54
- "@projectcaluma/ember-testing": "11.0.0-beta.35",
54
+ "@projectcaluma/ember-testing": "11.0.0-beta.37",
55
55
  "broccoli-asset-rev": "3.0.0",
56
56
  "ember-cli": "4.8.0",
57
57
  "ember-cli-code-coverage": "1.0.3",
@@ -66,16 +66,16 @@
66
66
  "ember-load-initializers": "2.1.2",
67
67
  "ember-qunit": "6.0.0",
68
68
  "ember-resolver": "8.0.3",
69
- "ember-source": "4.8.0",
69
+ "ember-source": "4.8.2",
70
70
  "ember-source-channel-url": "3.0.0",
71
71
  "ember-try": "2.0.0",
72
72
  "loader.js": "4.7.0",
73
- "miragejs": "0.1.45",
73
+ "miragejs": "0.1.46",
74
74
  "npm-run-all": "4.1.5",
75
75
  "qunit": "2.19.3",
76
76
  "qunit-dom": "2.0.0",
77
- "sass": "1.55.0",
78
- "webpack": "5.74.0"
77
+ "sass": "1.56.1",
78
+ "webpack": "5.75.0"
79
79
  },
80
80
  "engines": {
81
81
  "node": "14.* || 16.* || >= 18"