ember-ebau-gwr 6.0.3 → 6.1.0
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 +16 -0
- package/addon/components/model-form/date.hbs +10 -11
- package/addon/components/model-form/date.js +16 -25
- package/addon/components/quarterly-closure/error-list/project-errors.js +3 -0
- package/addon/components/search.js +3 -3
- package/addon/controllers/search-project.js +4 -3
- package/addon/services/gwr.js +1 -1
- package/package.json +17 -24
- package/addon/modifiers/pikaday.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [6.1.0](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.4...v6.1.0) (2022-10-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **date:** use flatpickr instead of deprecated pikaday ([705a879](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/705a8799cde6ab6062ebe05a8e25eed1c9e1f7a5))
|
|
7
|
+
|
|
8
|
+
## [6.0.4](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.3...v6.0.4) (2022-10-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **qc:** sort projects in quarterly closure by creation date ([b162f30](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/b162f305705cd632a07494e459de68634564f24e))
|
|
14
|
+
* **search:** prevent project link query for empty search results ([f22664b](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/f22664b273892cadcae42a288e9cc1e4b23238ba))
|
|
15
|
+
* **search:** start pagination at index 0 ([c37b411](https://github.com/adfinis-sygroup/ember-ebau-gwr/commit/c37b41150b8b405582c6e4d19672fc7647c356e1))
|
|
16
|
+
|
|
1
17
|
## [6.0.3](https://github.com/adfinis-sygroup/ember-ebau-gwr/compare/v6.0.2...v6.0.3) (2022-09-29)
|
|
2
18
|
|
|
3
19
|
|
|
@@ -22,11 +22,10 @@
|
|
|
22
22
|
type="button"
|
|
23
23
|
class="uk-form-icon uk-form-icon-flip"
|
|
24
24
|
uk-icon="icon: close; ratio: 0.7"
|
|
25
|
-
{{on "click"
|
|
25
|
+
{{on "click" (fn @update null)}}
|
|
26
26
|
/>
|
|
27
27
|
{{/if}}
|
|
28
|
-
<
|
|
29
|
-
type="text"
|
|
28
|
+
<EmberFlatpickr
|
|
30
29
|
class="uk-input uk-width-1
|
|
31
30
|
{{if @isInvalid 'uk-form-danger'}}
|
|
32
31
|
{{if @isValid 'uk-form-success'}}"
|
|
@@ -34,14 +33,14 @@
|
|
|
34
33
|
required={{@required}}
|
|
35
34
|
placeholder={{t "ember-gwr.components.modelForm.datePlaceholder"}}
|
|
36
35
|
...attributes
|
|
37
|
-
{{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}}
|
|
36
|
+
@date={{or @value null}}
|
|
37
|
+
@minDate={{this.minDate}}
|
|
38
|
+
@maxDate={{this.maxDate}}
|
|
39
|
+
@allowInput={{true}}
|
|
40
|
+
@altInput={{true}}
|
|
41
|
+
@altFormat="d.m.Y"
|
|
42
|
+
@dateFormat="Y-m-d"
|
|
43
|
+
@onChange={{this.onChange}}
|
|
45
44
|
/>
|
|
46
45
|
</div>
|
|
47
46
|
{{/if}}
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
import { action } from "@ember/object";
|
|
2
2
|
import { inject as service } from "@ember/service";
|
|
3
3
|
import Component from "@glimmer/component";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
// put the last element to the front of the array
|
|
7
|
-
const shift = (array) => [...array.slice(-1), ...array.slice(0, -1)];
|
|
4
|
+
import { DateTime } from "luxon";
|
|
8
5
|
|
|
9
6
|
export default class ModelFormDateComponent extends Component {
|
|
10
7
|
@service intl;
|
|
11
8
|
|
|
12
|
-
get
|
|
13
|
-
|
|
9
|
+
get locale() {
|
|
10
|
+
return this.intl.primaryLocale.split("-")[0];
|
|
11
|
+
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
nextMonth: this.intl.t("ember-gwr.nextMonth"),
|
|
18
|
-
months: Info.months("long", { locale }),
|
|
19
|
-
weekdays: shift(Info.weekdays("long", { locale })),
|
|
20
|
-
weekdaysShort: shift(Info.weekdays("short", { locale })),
|
|
21
|
-
};
|
|
13
|
+
get minDate() {
|
|
14
|
+
return new Date(2000, 0, 1);
|
|
22
15
|
}
|
|
23
16
|
|
|
24
|
-
get
|
|
25
|
-
return
|
|
17
|
+
get maxDate() {
|
|
18
|
+
return DateTime.now().endOf("year").toJSDate();
|
|
26
19
|
}
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return this.intl.formatDate(value, {
|
|
31
|
-
day: "2-digit",
|
|
32
|
-
month: "2-digit",
|
|
33
|
-
year: "numeric",
|
|
34
|
-
});
|
|
21
|
+
get yearRange() {
|
|
22
|
+
return [2000, new Date().getFullYear()];
|
|
35
23
|
}
|
|
36
24
|
|
|
37
25
|
@action
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
onChange(dates) {
|
|
27
|
+
if (!dates.length) {
|
|
28
|
+
this.args.update(null);
|
|
29
|
+
} else {
|
|
30
|
+
this.args.update(DateTime.fromJSDate(dates[0]).toISODate());
|
|
31
|
+
}
|
|
41
32
|
}
|
|
42
33
|
}
|
|
@@ -9,6 +9,7 @@ export default class SurveyDepartmentErrors extends Component {
|
|
|
9
9
|
@service constructionProject;
|
|
10
10
|
@service notification;
|
|
11
11
|
@service intl;
|
|
12
|
+
@service config;
|
|
12
13
|
|
|
13
14
|
@tracked errors = trackedFunction(this, async () => {
|
|
14
15
|
try {
|
|
@@ -16,6 +17,8 @@ export default class SurveyDepartmentErrors extends Component {
|
|
|
16
17
|
constructionSurveyDeptNumber:
|
|
17
18
|
this.quarterlyClosure.constructionSurveyDeptNumber,
|
|
18
19
|
hasError: true,
|
|
20
|
+
sortColumn: this.config.quarterlyClosureSortColumn,
|
|
21
|
+
sortDirection: this.config.quarterlyClosureSortDirection,
|
|
19
22
|
});
|
|
20
23
|
} catch (error) {
|
|
21
24
|
console.error(error);
|
|
@@ -7,7 +7,7 @@ import { dropTask } from "ember-concurrency";
|
|
|
7
7
|
import ExtendedSearchValidations from "ember-ebau-gwr/validations/extended-search-fields";
|
|
8
8
|
|
|
9
9
|
export default class SearchComponent extends Component {
|
|
10
|
-
@tracked page =
|
|
10
|
+
@tracked page = 0;
|
|
11
11
|
@tracked searchResults = null;
|
|
12
12
|
@tracked hasMoreResults = false;
|
|
13
13
|
@tracked rawQuery = {};
|
|
@@ -82,7 +82,7 @@ export default class SearchComponent extends Component {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
this.searchResults =
|
|
85
|
-
this.page ===
|
|
85
|
+
this.page === 0 ? _results : this.searchResults.concat(_results);
|
|
86
86
|
|
|
87
87
|
yield this.args.onSearch?.(this.searchResults);
|
|
88
88
|
} catch (error) {
|
|
@@ -96,7 +96,7 @@ export default class SearchComponent extends Component {
|
|
|
96
96
|
@dropTask
|
|
97
97
|
*onSubmit(args) {
|
|
98
98
|
this.searchResults = [];
|
|
99
|
-
this.page =
|
|
99
|
+
this.page = 0;
|
|
100
100
|
yield this.search.perform(args);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -36,13 +36,14 @@ export default class SearchProjectController extends Controller {
|
|
|
36
36
|
@lastValue("fetchInstanceLinks") links;
|
|
37
37
|
@dropTask
|
|
38
38
|
*fetchInstanceLinks(projects) {
|
|
39
|
-
if (!projects)
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
39
|
+
if (!projects?.length) return [];
|
|
42
40
|
|
|
43
41
|
const links = yield this.store.query("gwr-link", {
|
|
44
42
|
eproid__in: projects.map(({ EPROID }) => EPROID).join(","),
|
|
45
43
|
});
|
|
44
|
+
|
|
45
|
+
if (!links.length) return [];
|
|
46
|
+
|
|
46
47
|
const instanceLinks = yield this.config.fetchInstanceLinks(
|
|
47
48
|
links.map(({ localId }) => localId)
|
|
48
49
|
);
|
package/addon/services/gwr.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-ebau-gwr",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Ember engine to integrate ebau-gwr into an ember app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:ember-compatibility": "ember try:each"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"ember-engines": ">= 8"
|
|
31
|
+
"ember-engines": ">= 0.8"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ember/render-modifiers": "^2.0.4",
|
|
@@ -37,23 +37,24 @@
|
|
|
37
37
|
"@fortawesome/free-solid-svg-icons": "^6.2.0",
|
|
38
38
|
"@glimmer/component": "^1.1.2",
|
|
39
39
|
"@glimmer/tracking": "^1.1.2",
|
|
40
|
-
"ember-auto-import": "^2.4.
|
|
41
|
-
"ember-changeset": "^4.1.
|
|
40
|
+
"ember-auto-import": "^2.4.3",
|
|
41
|
+
"ember-changeset": "^4.1.2",
|
|
42
42
|
"ember-changeset-validations": "^4.1.0",
|
|
43
43
|
"ember-cli-babel": "^7.26.11",
|
|
44
44
|
"ember-cli-htmlbars": "^6.1.1",
|
|
45
45
|
"ember-composable-helpers": "^5.0.0",
|
|
46
46
|
"ember-concurrency": "^2.3.7",
|
|
47
|
+
"ember-data": "^3.28.12",
|
|
47
48
|
"ember-engines-router-service": "0.3.0",
|
|
49
|
+
"ember-flatpickr": "^3.2.3",
|
|
48
50
|
"ember-intl": "^5.7.2",
|
|
49
|
-
"ember-pikaday": "^4.0.0",
|
|
50
51
|
"ember-power-select": "^6.0.1",
|
|
51
|
-
"ember-resources": "^5.
|
|
52
|
+
"ember-resources": "^5.5.0",
|
|
52
53
|
"ember-truth-helpers": "^3.1.1",
|
|
53
54
|
"ember-uikit": "^6.1.0",
|
|
54
|
-
"ember-validated-form": "^6.1.
|
|
55
|
+
"ember-validated-form": "^6.1.2",
|
|
55
56
|
"handlebars": "^4.7.7",
|
|
56
|
-
"luxon": "^3.0.
|
|
57
|
+
"luxon": "^3.0.4"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@adfinis-sygroup/eslint-config": "1.5.0",
|
|
@@ -63,30 +64,29 @@
|
|
|
63
64
|
"@embroider/test-setup": "1.8.3",
|
|
64
65
|
"babel-eslint": "10.1.0",
|
|
65
66
|
"broccoli-asset-rev": "3.0.0",
|
|
66
|
-
"ember-cli": "3.28.
|
|
67
|
+
"ember-cli": "3.28.6",
|
|
67
68
|
"ember-cli-dependency-checker": "3.3.1",
|
|
68
69
|
"ember-cli-inject-live-reload": "2.1.0",
|
|
69
70
|
"ember-cli-mirage": "3.0.0-alpha.3",
|
|
70
71
|
"ember-cli-sass": "11.0.1",
|
|
71
72
|
"ember-cli-sri": "2.1.1",
|
|
72
73
|
"ember-cli-terser": "4.0.2",
|
|
73
|
-
"ember-data": "3.28.12",
|
|
74
74
|
"ember-disable-prototype-extensions": "1.1.3",
|
|
75
|
-
"ember-engines": "
|
|
75
|
+
"ember-engines": "0.8.23",
|
|
76
76
|
"ember-export-application-global": "2.0.1",
|
|
77
77
|
"ember-load-initializers": "2.1.2",
|
|
78
78
|
"ember-maybe-import-regenerator": "^1.0.0",
|
|
79
|
-
"ember-qunit": "
|
|
79
|
+
"ember-qunit": "6.0.0",
|
|
80
80
|
"ember-resolver": "8.0.3",
|
|
81
81
|
"ember-source": "3.28.9",
|
|
82
82
|
"ember-source-channel-url": "3.0.0",
|
|
83
|
-
"ember-template-lint": "4.
|
|
83
|
+
"ember-template-lint": "4.16.1",
|
|
84
84
|
"ember-template-lint-plugin-prettier": "4.0.0",
|
|
85
85
|
"ember-test-selectors": "6.0.0",
|
|
86
86
|
"ember-try": "2.0.0",
|
|
87
87
|
"eslint": "7.32.0",
|
|
88
88
|
"eslint-config-prettier": "8.5.0",
|
|
89
|
-
"eslint-plugin-ember": "11.0
|
|
89
|
+
"eslint-plugin-ember": "11.2.0",
|
|
90
90
|
"eslint-plugin-import": "2.26.0",
|
|
91
91
|
"eslint-plugin-node": "11.1.0",
|
|
92
92
|
"eslint-plugin-prettier": "4.2.1",
|
|
@@ -96,14 +96,11 @@
|
|
|
96
96
|
"miragejs": "0.1.45",
|
|
97
97
|
"npm-run-all": "4.1.5",
|
|
98
98
|
"prettier": "2.7.1",
|
|
99
|
-
"qunit": "2.19.
|
|
99
|
+
"qunit": "2.19.3",
|
|
100
100
|
"qunit-dom": "2.0.0",
|
|
101
|
-
"sass": "1.
|
|
101
|
+
"sass": "1.55.0",
|
|
102
102
|
"webpack": "5.74.0"
|
|
103
103
|
},
|
|
104
|
-
"//": [
|
|
105
|
-
"TODO: remove ember-engines exotic dependency when https://github.com/ember-engines/ember-engines/pull/794 is released"
|
|
106
|
-
],
|
|
107
104
|
"engines": {
|
|
108
105
|
"node": "12.* || 14.* || >= 16"
|
|
109
106
|
},
|
|
@@ -114,10 +111,6 @@
|
|
|
114
111
|
"configPath": "tests/dummy/config"
|
|
115
112
|
},
|
|
116
113
|
"release": {
|
|
117
|
-
"extends": "@adfinis-sygroup/semantic-release-config"
|
|
118
|
-
"branches": [
|
|
119
|
-
"main",
|
|
120
|
-
"cherry-release"
|
|
121
|
-
]
|
|
114
|
+
"extends": "@adfinis-sygroup/semantic-release-config"
|
|
122
115
|
}
|
|
123
116
|
}
|