@projectcaluma/ember-distribution 11.0.0-beta.31 → 11.0.0-beta.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,11 +21,27 @@ export default class InquiryAbility extends Ability {
21
21
  }
22
22
 
23
23
  get canSend() {
24
- return this.config.permissions.sendInquiry?.(this.model) ?? true;
24
+ return (
25
+ !this.config.ui.readonly &&
26
+ this.model?.task.slug === this.config.inquiry.task &&
27
+ this.model?.status === "SUSPENDED" &&
28
+ (this.config.permissions.sendInquiry?.(this.model) ?? true) &&
29
+ this.model?.controllingGroups
30
+ .map(String)
31
+ .includes(String(this.calumaOptions.currentGroupId))
32
+ );
25
33
  }
26
34
 
27
35
  get canWithdraw() {
28
- return this.config.permissions.withdrawInquiry?.(this.model) ?? true;
36
+ return (
37
+ !this.config.ui.readonly &&
38
+ this.model?.task.slug === this.config.inquiry.task &&
39
+ this.model?.status === "SUSPENDED" &&
40
+ (this.config.permissions.withdrawInquiry?.(this.model) ?? true) &&
41
+ this.model?.controllingGroups
42
+ .map(String)
43
+ .includes(String(this.calumaOptions.currentGroupId))
44
+ );
29
45
  }
30
46
 
31
47
  get canAnswer() {
@@ -128,7 +128,7 @@
128
128
  >
129
129
  {{#if (and (eq @type "answer") @inquiry.assignedUsers.length)}}
130
130
  <li {{uk-tooltip (t "caluma.distribution.inquiry.assigned-user")}}>
131
- {{user-name @inquiry.assignedUsers}}
131
+ <span>{{user-name @inquiry.assignedUsers}}</span>
132
132
  </li>
133
133
  {{/if}}
134
134
  <li
@@ -140,8 +140,10 @@
140
140
  )
141
141
  }}
142
142
  >
143
- {{format-date this.date}}
144
- {{format-time this.date hour="2-digit" minute="2-digit"}}
143
+ <span>
144
+ {{format-date this.date}}
145
+ {{format-time this.date hour="2-digit" minute="2-digit"}}
146
+ </span>
145
147
  </li>
146
148
  </ul>
147
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-distribution",
3
- "version": "11.0.0-beta.31",
3
+ "version": "11.0.0-beta.32",
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.31",
27
- "@projectcaluma/ember-form": "^11.0.0-beta.31",
28
- "@projectcaluma/ember-workflow": "^11.0.0-beta.31",
26
+ "@projectcaluma/ember-core": "^11.0.0-beta.32",
27
+ "@projectcaluma/ember-form": "^11.0.0-beta.32",
28
+ "@projectcaluma/ember-workflow": "^11.0.0-beta.32",
29
29
  "ember-apollo-client": "~4.0.2",
30
30
  "ember-auto-import": "^2.4.3",
31
31
  "ember-can": "^4.2.0",
@@ -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.31",
54
+ "@projectcaluma/ember-testing": "11.0.0-beta.32",
55
55
  "broccoli-asset-rev": "3.0.0",
56
56
  "ember-cli": "4.8.0",
57
57
  "ember-cli-code-coverage": "1.0.3",