@projectcaluma/ember-workflow 11.0.0-beta.2 → 11.0.0-beta.5
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/CHANGELOG.md +22 -0
- package/addon/components/task-button.hbs +26 -28
- package/addon/components/task-button.js +9 -8
- package/addon/gql/mutations/cancel-work-item.graphql +4 -1
- package/addon/gql/mutations/complete-work-item.graphql +8 -1
- package/addon/gql/mutations/skip-work-item.graphql +8 -1
- package/addon/gql/queries/all-work-items.graphql +1 -1
- package/package.json +14 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# [@projectcaluma/ember-workflow-v11.0.0-beta.5](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-workflow-v11.0.0-beta.4...@projectcaluma/ember-workflow-v11.0.0-beta.5) (2022-03-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **workflow:** return case status on complete / skip work-item mutation ([524453c](https://github.com/projectcaluma/ember-caluma/commit/524453c1189b4375ca792fca7d35056b916696f8))
|
|
7
|
+
|
|
8
|
+
# [@projectcaluma/ember-workflow-v11.0.0-beta.4](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-workflow-v11.0.0-beta.3...@projectcaluma/ember-workflow-v11.0.0-beta.4) (2022-02-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **work-item-button:** always fetch work item from network ([1a6bea7](https://github.com/projectcaluma/ember-caluma/commit/1a6bea7837899cc96e120b7cb0d6da3fb26d373e))
|
|
14
|
+
|
|
15
|
+
# [@projectcaluma/ember-workflow-v11.0.0-beta.3](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-workflow-v11.0.0-beta.2...@projectcaluma/ember-workflow-v11.0.0-beta.3) (2022-02-01)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **task-button:** remove wrapping div around task button ([50746ec](https://github.com/projectcaluma/ember-caluma/commit/50746ecda69f46f9d72631778fb4fa37f123159c))
|
|
21
|
+
* **work-item-button:** update status of work item in cache after mutation ([d8c1e2a](https://github.com/projectcaluma/ember-caluma/commit/d8c1e2a4db8cf3d3bb5891be705782c6e39c8e60))
|
|
22
|
+
|
|
1
23
|
# [@projectcaluma/ember-workflow-v11.0.0-beta.2](https://github.com/projectcaluma/ember-caluma/compare/@projectcaluma/ember-workflow-v11.0.0-beta.1...@projectcaluma/ember-workflow-v11.0.0-beta.2) (2022-01-24)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{{
|
|
20
|
-
|
|
21
|
-
{{
|
|
22
|
-
|
|
23
|
-
{{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{{/if}}
|
|
28
|
-
</div>
|
|
1
|
+
{{#if this.workItem.value}}
|
|
2
|
+
<WorkItemButton
|
|
3
|
+
...attributes
|
|
4
|
+
@mutation={{@mutation}}
|
|
5
|
+
@label={{@label}}
|
|
6
|
+
@workItemId={{decode-id this.workItem.value.id}}
|
|
7
|
+
@type={{@type}}
|
|
8
|
+
@disabled={{@disabled}}
|
|
9
|
+
@active={{@active}}
|
|
10
|
+
@loading={{@loading}}
|
|
11
|
+
@color={{@color}}
|
|
12
|
+
@size={{@size}}
|
|
13
|
+
@title={{@title}}
|
|
14
|
+
@onSuccess={{@onSuccess}}
|
|
15
|
+
@onError={{@onError}}
|
|
16
|
+
@beforeMutate={{@beforeMutate}}
|
|
17
|
+
>
|
|
18
|
+
{{#if (has-block)}}
|
|
19
|
+
{{yield}}
|
|
20
|
+
{{else if @label}}
|
|
21
|
+
{{@label}}
|
|
22
|
+
{{else}}
|
|
23
|
+
{{t (concat "caluma.mutate-work-item." @mutation)}}
|
|
24
|
+
{{/if}}
|
|
25
|
+
</WorkItemButton>
|
|
26
|
+
{{/if}}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { inject as service } from "@ember/service";
|
|
2
2
|
import Component from "@glimmer/component";
|
|
3
3
|
import { queryManager } from "ember-apollo-client";
|
|
4
|
-
import {
|
|
4
|
+
import { dropTask } from "ember-concurrency";
|
|
5
|
+
import { useTask } from "ember-resources";
|
|
5
6
|
|
|
6
7
|
import allWorkItems from "@projectcaluma/ember-workflow/gql/queries/all-work-items.graphql";
|
|
7
8
|
|
|
@@ -34,20 +35,20 @@ export default class TaskButtonComponent extends Component {
|
|
|
34
35
|
@service notification;
|
|
35
36
|
@service intl;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
workItem = useTask(this, this.fetchWorkItem, () => [
|
|
39
|
+
this.args.task,
|
|
40
|
+
this.args.filters,
|
|
41
|
+
]);
|
|
38
42
|
|
|
39
43
|
@dropTask
|
|
40
|
-
*fetchWorkItem() {
|
|
44
|
+
*fetchWorkItem(task, filters) {
|
|
41
45
|
try {
|
|
42
46
|
const response = yield this.apollo.query(
|
|
43
47
|
{
|
|
44
48
|
query: allWorkItems,
|
|
49
|
+
fetchPolicy: "network-only",
|
|
45
50
|
variables: {
|
|
46
|
-
filter: [
|
|
47
|
-
{ task: this.args.task },
|
|
48
|
-
{ status: "READY" },
|
|
49
|
-
...(this.args.filters || []),
|
|
50
|
-
],
|
|
51
|
+
filter: [{ task }, { status: "READY" }, ...(filters ?? [])],
|
|
51
52
|
},
|
|
52
53
|
},
|
|
53
54
|
"allWorkItems.edges"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectcaluma/ember-workflow",
|
|
3
|
-
"version": "11.0.0-beta.
|
|
3
|
+
"version": "11.0.0-beta.5",
|
|
4
4
|
"description": "Ember addon for Caluma workflow tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -14,33 +14,34 @@
|
|
|
14
14
|
"test:ember-compatibility": "ember try:each"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ember/render-modifiers": "^2.0.3",
|
|
18
17
|
"@glimmer/component": "^1.0.4",
|
|
19
|
-
"@
|
|
20
|
-
"@projectcaluma/ember-core": "^11.0.0-beta.2",
|
|
18
|
+
"@projectcaluma/ember-core": "^11.0.0-beta.5",
|
|
21
19
|
"ember-apollo-client": "^3.2.0",
|
|
22
20
|
"ember-auto-import": "^2.4.0",
|
|
23
21
|
"ember-cli-babel": "^7.26.11",
|
|
24
22
|
"ember-cli-htmlbars": "^6.0.1",
|
|
25
23
|
"ember-composable-helpers": "^5.0.0",
|
|
24
|
+
"ember-concurrency": "^2.2.1",
|
|
26
25
|
"ember-fetch": "^8.1.1",
|
|
26
|
+
"ember-intl": "^5.7.2",
|
|
27
|
+
"ember-resources": "^4.4.0",
|
|
27
28
|
"ember-truth-helpers": "^3.0.0",
|
|
28
|
-
"ember-uikit": "^5.0.0
|
|
29
|
-
"graphql": "^15.8.0"
|
|
30
|
-
"moment": "^2.29.1"
|
|
29
|
+
"ember-uikit": "^5.0.0",
|
|
30
|
+
"graphql": "^15.8.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@ember/optional-features": "2.0.0",
|
|
34
34
|
"@ember/test-helpers": "2.6.0",
|
|
35
|
-
"@embroider/test-setup": "1.
|
|
36
|
-
"@faker-js/faker": "6.0.0-
|
|
37
|
-
"@
|
|
35
|
+
"@embroider/test-setup": "1.5.0",
|
|
36
|
+
"@faker-js/faker": "6.0.0-beta.0",
|
|
37
|
+
"@glimmer/tracking": "1.0.4",
|
|
38
|
+
"@projectcaluma/ember-testing": "11.0.0-beta.4",
|
|
38
39
|
"broccoli-asset-rev": "3.0.0",
|
|
39
40
|
"ember-cli": "3.28.5",
|
|
40
41
|
"ember-cli-code-coverage": "1.0.3",
|
|
41
42
|
"ember-cli-dependency-checker": "3.2.0",
|
|
42
43
|
"ember-cli-inject-live-reload": "2.1.0",
|
|
43
|
-
"ember-cli-mirage": "
|
|
44
|
+
"ember-cli-mirage": "3.0.0-alpha.2",
|
|
44
45
|
"ember-cli-sri": "2.1.1",
|
|
45
46
|
"ember-cli-terser": "4.0.2",
|
|
46
47
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
@@ -54,9 +55,9 @@
|
|
|
54
55
|
"ember-try": "2.0.0",
|
|
55
56
|
"loader.js": "4.7.0",
|
|
56
57
|
"npm-run-all": "4.1.5",
|
|
57
|
-
"qunit": "2.
|
|
58
|
+
"qunit": "2.18.0",
|
|
58
59
|
"qunit-dom": "2.0.0",
|
|
59
|
-
"webpack": "5.
|
|
60
|
+
"webpack": "5.70.0"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": "12.* || 14.* || >= 16"
|