@valtimo/choice-field 4.15.2 → 4.16.0-next-main.19
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/bundles/valtimo-choice-field.umd.js +113 -57
- package/bundles/valtimo-choice-field.umd.js.map +1 -1
- package/bundles/valtimo-choice-field.umd.min.js +1 -1
- package/bundles/valtimo-choice-field.umd.min.js.map +1 -1
- package/esm2015/lib/choice-field-create/choice-field-create.component.js +3 -3
- package/esm2015/lib/choice-field-detail/choice-field-detail.component.js +8 -7
- package/esm2015/lib/choice-field-list/choice-field-list.component.js +11 -10
- package/esm2015/lib/choice-field-routing.module.js +15 -18
- package/esm2015/lib/choice-field-value-create/choice-field-value-create.component.js +3 -3
- package/esm2015/lib/choice-field-value-detail/choice-field-value-detail.component.js +3 -3
- package/esm2015/lib/choice-field-value-list/choice-field-value-list.component.js +15 -11
- package/esm2015/lib/choice-field.module.js +4 -4
- package/esm2015/lib/choice-field.service.js +7 -4
- package/esm2015/lib/models/choice-field.model.js +16 -0
- package/esm2015/lib/models/choicefield-value.model.js +16 -0
- package/esm2015/lib/models/index.js +20 -0
- package/esm2015/public_api.js +2 -1
- package/esm2015/valtimo-choice-field.js +1 -1
- package/fesm2015/valtimo-choice-field.js +110 -55
- package/fesm2015/valtimo-choice-field.js.map +1 -1
- package/lib/choice-field-detail/choice-field-detail.component.d.ts +1 -1
- package/lib/choice-field-list/choice-field-list.component.d.ts +1 -1
- package/lib/choice-field-value-create/choice-field-value-create.component.d.ts +1 -1
- package/lib/choice-field-value-detail/choice-field-value-detail.component.d.ts +1 -1
- package/lib/choice-field-value-list/choice-field-value-list.component.d.ts +1 -1
- package/lib/models/choice-field.model.d.ts +14 -0
- package/lib/models/choicefield-value.model.d.ts +20 -0
- package/lib/models/index.d.ts +2 -0
- package/package.json +1 -4
- package/public_api.d.ts +1 -0
- package/valtimo-choice-field.metadata.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ɵɵdefineInjectable, ɵɵinject, Injectable, Component, NgModule } from '@angular/core';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { ConfigService } from '@valtimo/config';
|
|
3
|
+
import { ConfigService, ROLE_ADMIN } from '@valtimo/config';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { FormControl, Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import { AlertService, ListModule, WidgetModule, FieldAutoFocusModule, AlertModule } from '@valtimo/components';
|
|
@@ -8,9 +8,58 @@ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
|
8
8
|
import { AuthGuardService } from '@valtimo/security';
|
|
9
9
|
import { Subscription } from 'rxjs';
|
|
10
10
|
import { first } from 'rxjs/operators';
|
|
11
|
-
import { ROLE_ADMIN } from '@valtimo/contract';
|
|
12
11
|
import { TranslateModule } from '@ngx-translate/core';
|
|
13
12
|
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
15
|
+
*
|
|
16
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
17
|
+
* you may not use this file except in compliance with the License.
|
|
18
|
+
* You may obtain a copy of the License at
|
|
19
|
+
*
|
|
20
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
21
|
+
*
|
|
22
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
23
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
24
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
25
|
+
* See the License for the specific language governing permissions and
|
|
26
|
+
* limitations under the License.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
31
|
+
*
|
|
32
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
33
|
+
* you may not use this file except in compliance with the License.
|
|
34
|
+
* You may obtain a copy of the License at
|
|
35
|
+
*
|
|
36
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
37
|
+
*
|
|
38
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
39
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
40
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
41
|
+
* See the License for the specific language governing permissions and
|
|
42
|
+
* limitations under the License.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
*
|
|
47
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
48
|
+
* *
|
|
49
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
50
|
+
* * you may not use this file except in compliance with the License.
|
|
51
|
+
* * You may obtain a copy of the License at
|
|
52
|
+
* *
|
|
53
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
54
|
+
* *
|
|
55
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
56
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
57
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
58
|
+
* * See the License for the specific language governing permissions and
|
|
59
|
+
* * limitations under the License.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
|
|
14
63
|
/*
|
|
15
64
|
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
16
65
|
*
|
|
@@ -33,7 +82,10 @@ class ChoiceFieldService {
|
|
|
33
82
|
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
34
83
|
}
|
|
35
84
|
query(params) {
|
|
36
|
-
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-fields`, {
|
|
85
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-fields`, {
|
|
86
|
+
observe: 'response',
|
|
87
|
+
params: params,
|
|
88
|
+
});
|
|
37
89
|
}
|
|
38
90
|
get(id) {
|
|
39
91
|
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-fields/${id}`);
|
|
@@ -55,7 +107,7 @@ class ChoiceFieldService {
|
|
|
55
107
|
}
|
|
56
108
|
updateValue(choiceFieldValue, choiceFieldName) {
|
|
57
109
|
return this.http.put(`${this.valtimoApiConfig.endpointUri}choice-field-values`, choiceFieldValue, {
|
|
58
|
-
params: { choice_field_name: choiceFieldName }
|
|
110
|
+
params: { choice_field_name: choiceFieldName },
|
|
59
111
|
});
|
|
60
112
|
}
|
|
61
113
|
createValue(choiceFieldValue, choiceFieldName) {
|
|
@@ -65,7 +117,7 @@ class ChoiceFieldService {
|
|
|
65
117
|
ChoiceFieldService.ɵprov = ɵɵdefineInjectable({ factory: function ChoiceFieldService_Factory() { return new ChoiceFieldService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: ChoiceFieldService, providedIn: "root" });
|
|
66
118
|
ChoiceFieldService.decorators = [
|
|
67
119
|
{ type: Injectable, args: [{
|
|
68
|
-
providedIn: 'root'
|
|
120
|
+
providedIn: 'root',
|
|
69
121
|
},] }
|
|
70
122
|
];
|
|
71
123
|
ChoiceFieldService.ctorParameters = () => [
|
|
@@ -97,24 +149,25 @@ class ChoiceFieldListComponent {
|
|
|
97
149
|
collectionSize: 0,
|
|
98
150
|
page: 1,
|
|
99
151
|
size: 10,
|
|
100
|
-
maxPaginationItemSize: 5
|
|
152
|
+
maxPaginationItemSize: 5,
|
|
101
153
|
};
|
|
102
154
|
this.pageParam = 0;
|
|
103
|
-
this.fields = [
|
|
155
|
+
this.fields = [
|
|
156
|
+
{
|
|
104
157
|
key: 'id',
|
|
105
|
-
label: 'ID'
|
|
158
|
+
label: 'ID',
|
|
106
159
|
},
|
|
107
160
|
{
|
|
108
161
|
key: 'keyName',
|
|
109
|
-
label: 'Key'
|
|
162
|
+
label: 'Key',
|
|
110
163
|
},
|
|
111
164
|
{
|
|
112
165
|
key: 'title',
|
|
113
|
-
label: 'Title'
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
ngOnInit() {
|
|
166
|
+
label: 'Title',
|
|
167
|
+
},
|
|
168
|
+
];
|
|
117
169
|
}
|
|
170
|
+
ngOnInit() { }
|
|
118
171
|
paginationSet() {
|
|
119
172
|
this.initData();
|
|
120
173
|
}
|
|
@@ -135,7 +188,7 @@ class ChoiceFieldListComponent {
|
|
|
135
188
|
ChoiceFieldListComponent.decorators = [
|
|
136
189
|
{ type: Component, args: [{
|
|
137
190
|
selector: 'valtimo-choice-field-list',
|
|
138
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> \n <span>{{ 'Create new Choice field' | translate }}</span>\n </button>\n </div>\n </div>\n
|
|
191
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> \n <span>{{ 'Create new Choice field' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFields\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n paginationIdentifier=\"choiceFieldList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice fields' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Choice fields' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n",
|
|
139
192
|
styles: [""]
|
|
140
193
|
},] }
|
|
141
194
|
];
|
|
@@ -197,7 +250,7 @@ class ChoiceFieldDetailComponent {
|
|
|
197
250
|
return this.formBuilder.group({
|
|
198
251
|
id: new FormControl('', Validators.required),
|
|
199
252
|
keyName: new FormControl('', Validators.required),
|
|
200
|
-
title: new FormControl('', Validators.required)
|
|
253
|
+
title: new FormControl('', Validators.required),
|
|
201
254
|
});
|
|
202
255
|
}
|
|
203
256
|
reset() {
|
|
@@ -214,16 +267,17 @@ class ChoiceFieldDetailComponent {
|
|
|
214
267
|
{
|
|
215
268
|
label: 'Cancel',
|
|
216
269
|
class: 'btn btn-default',
|
|
217
|
-
value: false
|
|
270
|
+
value: false,
|
|
218
271
|
},
|
|
219
272
|
{
|
|
220
273
|
label: 'Delete',
|
|
221
274
|
class: 'btn btn-primary',
|
|
222
|
-
value: true
|
|
223
|
-
}
|
|
275
|
+
value: true,
|
|
276
|
+
},
|
|
224
277
|
];
|
|
225
278
|
this.alertService.notification(mssg, confirmations);
|
|
226
|
-
this.alertSub = this.alertService
|
|
279
|
+
this.alertSub = this.alertService
|
|
280
|
+
.getAlertConfirmChangeEmitter()
|
|
227
281
|
.pipe(first())
|
|
228
282
|
.subscribe(alert => {
|
|
229
283
|
if (alert.confirm === true) {
|
|
@@ -247,7 +301,7 @@ class ChoiceFieldDetailComponent {
|
|
|
247
301
|
ChoiceFieldDetailComponent.decorators = [
|
|
248
302
|
{ type: Component, args: [{
|
|
249
303
|
selector: 'valtimo-choice-field-detail',
|
|
250
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
304
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n <button class=\"btn btn-space btn-danger\" type=\"button\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<div class=\"page-head\">\n <h2 class=\"page-head-title\">Choice field values</h2>\n</div>\n<valtimo-choice-field-value-list></valtimo-choice-field-value-list>\n",
|
|
251
305
|
styles: [""]
|
|
252
306
|
},] }
|
|
253
307
|
];
|
|
@@ -290,7 +344,7 @@ class ChoiceFieldCreateComponent {
|
|
|
290
344
|
createFormGroup() {
|
|
291
345
|
return this.formBuilder.group({
|
|
292
346
|
keyName: new FormControl('', Validators.required),
|
|
293
|
-
title: new FormControl('', Validators.required)
|
|
347
|
+
title: new FormControl('', Validators.required),
|
|
294
348
|
});
|
|
295
349
|
}
|
|
296
350
|
onSubmit() {
|
|
@@ -306,7 +360,7 @@ class ChoiceFieldCreateComponent {
|
|
|
306
360
|
ChoiceFieldCreateComponent.decorators = [
|
|
307
361
|
{ type: Component, args: [{
|
|
308
362
|
selector: 'valtimo-choice-field-create',
|
|
309
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div>\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"keyName\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
363
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div>\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"keyName\"\n >Key</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"keyName\"\n formControlName=\"keyName\"\n class=\"form-control\"\n placeholder=\"Choice field key name\"\n [ngClass]=\"{\n 'is-valid': formControls.keyName.touched && formControls.keyName.valid,\n 'is-invalid': formControls.keyName.touched && formControls.keyName.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.keyName.touched && formControls.keyName.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.keyName.errors.required\">Key name is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
|
|
310
364
|
styles: [""]
|
|
311
365
|
},] }
|
|
312
366
|
];
|
|
@@ -353,7 +407,7 @@ class ChoiceFieldValueCreateComponent {
|
|
|
353
407
|
name: new FormControl('', Validators.required),
|
|
354
408
|
value: new FormControl('', Validators.required),
|
|
355
409
|
sortOrder: new FormControl('', Validators.required),
|
|
356
|
-
deprecated: new FormControl('', Validators.required)
|
|
410
|
+
deprecated: new FormControl('', Validators.required),
|
|
357
411
|
});
|
|
358
412
|
}
|
|
359
413
|
initData(id) {
|
|
@@ -382,7 +436,7 @@ class ChoiceFieldValueCreateComponent {
|
|
|
382
436
|
ChoiceFieldValueCreateComponent.decorators = [
|
|
383
437
|
{ type: Component, args: [{
|
|
384
438
|
selector: 'valtimo-choice-field-value-create',
|
|
385
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
439
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
|
|
386
440
|
styles: [""]
|
|
387
441
|
},] }
|
|
388
442
|
];
|
|
@@ -438,7 +492,7 @@ class ChoiceFieldValueDetailComponent {
|
|
|
438
492
|
name: new FormControl('', Validators.required),
|
|
439
493
|
value: new FormControl('', Validators.required),
|
|
440
494
|
sortOrder: new FormControl('', Validators.required),
|
|
441
|
-
deprecated: new FormControl('', Validators.required)
|
|
495
|
+
deprecated: new FormControl('', Validators.required),
|
|
442
496
|
});
|
|
443
497
|
}
|
|
444
498
|
setValues() {
|
|
@@ -465,7 +519,7 @@ class ChoiceFieldValueDetailComponent {
|
|
|
465
519
|
ChoiceFieldValueDetailComponent.decorators = [
|
|
466
520
|
{ type: Component, args: [{
|
|
467
521
|
selector: 'valtimo-choice-field-value-detail',
|
|
468
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 pt-3\">\n <strong>Choice field value</strong>\n <hr />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceFieldValue.id }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
522
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 pt-3\">\n <strong>Choice field value</strong>\n <hr />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceFieldValue.id }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
|
|
469
523
|
styles: [""]
|
|
470
524
|
},] }
|
|
471
525
|
];
|
|
@@ -494,61 +548,58 @@ ChoiceFieldValueDetailComponent.ctorParameters = () => [
|
|
|
494
548
|
*/
|
|
495
549
|
const ɵ0 = {
|
|
496
550
|
title: 'Choice fields',
|
|
497
|
-
roles: [ROLE_ADMIN]
|
|
551
|
+
roles: [ROLE_ADMIN],
|
|
498
552
|
}, ɵ1 = {
|
|
499
553
|
title: 'Choice field details',
|
|
500
|
-
roles: [ROLE_ADMIN]
|
|
554
|
+
roles: [ROLE_ADMIN],
|
|
501
555
|
}, ɵ2 = {
|
|
502
556
|
title: 'Create new Choice field',
|
|
503
|
-
roles: [ROLE_ADMIN]
|
|
557
|
+
roles: [ROLE_ADMIN],
|
|
504
558
|
}, ɵ3 = {
|
|
505
559
|
title: 'Create new Choice field value',
|
|
506
|
-
roles: [ROLE_ADMIN]
|
|
560
|
+
roles: [ROLE_ADMIN],
|
|
507
561
|
}, ɵ4 = {
|
|
508
562
|
title: 'Choice field value details',
|
|
509
|
-
roles: [ROLE_ADMIN]
|
|
563
|
+
roles: [ROLE_ADMIN],
|
|
510
564
|
};
|
|
511
565
|
const routes = [
|
|
512
566
|
{
|
|
513
567
|
path: 'choice-fields',
|
|
514
568
|
data: ɵ0,
|
|
515
569
|
component: ChoiceFieldListComponent,
|
|
516
|
-
canActivate: [AuthGuardService]
|
|
570
|
+
canActivate: [AuthGuardService],
|
|
517
571
|
},
|
|
518
572
|
{
|
|
519
573
|
path: 'choice-fields/field/:id',
|
|
520
574
|
data: ɵ1,
|
|
521
575
|
component: ChoiceFieldDetailComponent,
|
|
522
|
-
canActivate: [AuthGuardService]
|
|
576
|
+
canActivate: [AuthGuardService],
|
|
523
577
|
},
|
|
524
578
|
{
|
|
525
579
|
path: 'choice-fields/create',
|
|
526
580
|
data: ɵ2,
|
|
527
581
|
component: ChoiceFieldCreateComponent,
|
|
528
|
-
canActivate: [AuthGuardService]
|
|
582
|
+
canActivate: [AuthGuardService],
|
|
529
583
|
},
|
|
530
584
|
{
|
|
531
585
|
path: 'choice-fields/field/:id/create-value',
|
|
532
586
|
data: ɵ3,
|
|
533
587
|
component: ChoiceFieldValueCreateComponent,
|
|
534
|
-
canActivate: [AuthGuardService]
|
|
588
|
+
canActivate: [AuthGuardService],
|
|
535
589
|
},
|
|
536
590
|
{
|
|
537
591
|
path: 'choice-fields/field/:id/value/:valueId',
|
|
538
592
|
data: ɵ4,
|
|
539
593
|
component: ChoiceFieldValueDetailComponent,
|
|
540
|
-
canActivate: [AuthGuardService]
|
|
541
|
-
}
|
|
594
|
+
canActivate: [AuthGuardService],
|
|
595
|
+
},
|
|
542
596
|
];
|
|
543
597
|
class ChoiceFieldRoutingModule {
|
|
544
598
|
}
|
|
545
599
|
ChoiceFieldRoutingModule.decorators = [
|
|
546
600
|
{ type: NgModule, args: [{
|
|
547
|
-
imports: [
|
|
548
|
-
|
|
549
|
-
RouterModule.forChild(routes),
|
|
550
|
-
],
|
|
551
|
-
exports: [RouterModule]
|
|
601
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
602
|
+
exports: [RouterModule],
|
|
552
603
|
},] }
|
|
553
604
|
];
|
|
554
605
|
|
|
@@ -578,29 +629,31 @@ class ChoiceFieldValueListComponent {
|
|
|
578
629
|
collectionSize: 0,
|
|
579
630
|
page: 1,
|
|
580
631
|
size: 10,
|
|
581
|
-
maxPaginationItemSize: 5
|
|
632
|
+
maxPaginationItemSize: 5,
|
|
582
633
|
};
|
|
583
634
|
this.pageParam = 0;
|
|
584
|
-
this.fields = [
|
|
635
|
+
this.fields = [
|
|
636
|
+
{
|
|
585
637
|
key: 'id',
|
|
586
|
-
label: 'ID'
|
|
638
|
+
label: 'ID',
|
|
587
639
|
},
|
|
588
640
|
{
|
|
589
641
|
key: 'value',
|
|
590
|
-
label: 'Key'
|
|
642
|
+
label: 'Key',
|
|
591
643
|
},
|
|
592
644
|
{
|
|
593
645
|
key: 'name',
|
|
594
|
-
label: 'Title'
|
|
646
|
+
label: 'Title',
|
|
595
647
|
},
|
|
596
648
|
{
|
|
597
649
|
key: 'deprecatedDisplayString',
|
|
598
|
-
label: 'Deprecated'
|
|
650
|
+
label: 'Deprecated',
|
|
599
651
|
},
|
|
600
652
|
{
|
|
601
653
|
key: 'sortOrder',
|
|
602
|
-
label: 'Sequence'
|
|
603
|
-
}
|
|
654
|
+
label: 'Sequence',
|
|
655
|
+
},
|
|
656
|
+
];
|
|
604
657
|
const snapshot = this.route.snapshot.paramMap;
|
|
605
658
|
this.id = snapshot.get('id');
|
|
606
659
|
}
|
|
@@ -613,7 +666,9 @@ class ChoiceFieldValueListComponent {
|
|
|
613
666
|
initData(id) {
|
|
614
667
|
this.service.get(id).subscribe(result => {
|
|
615
668
|
this.choiceField = result;
|
|
616
|
-
this.service
|
|
669
|
+
this.service
|
|
670
|
+
.queryValues(this.choiceField.keyName, { page: this.pageParam, size: this.pagination.size })
|
|
671
|
+
.subscribe(values => {
|
|
617
672
|
this.pagination.collectionSize = values.headers.get('x-total-count');
|
|
618
673
|
this.choiceFieldValues = values.body;
|
|
619
674
|
this.choiceFieldValues.forEach(choiceFieldValue => {
|
|
@@ -633,7 +688,7 @@ class ChoiceFieldValueListComponent {
|
|
|
633
688
|
ChoiceFieldValueListComponent.decorators = [
|
|
634
689
|
{ type: Component, args: [{
|
|
635
690
|
selector: 'valtimo-choice-field-value-list',
|
|
636
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create-value'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> \n <span>{{ 'Create new Choice field value' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list
|
|
691
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create-value'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> \n <span>{{ 'Create new Choice field value' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFieldValues\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"choiceFieldValueList\"\n (paginationClicked)=\"paginationClicked($event)\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice field values' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all Choice field values' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n",
|
|
637
692
|
styles: [""]
|
|
638
693
|
},] }
|
|
639
694
|
];
|
|
@@ -669,7 +724,7 @@ ChoiceFieldModule.decorators = [
|
|
|
669
724
|
ChoiceFieldCreateComponent,
|
|
670
725
|
ChoiceFieldValueListComponent,
|
|
671
726
|
ChoiceFieldValueCreateComponent,
|
|
672
|
-
ChoiceFieldValueDetailComponent
|
|
727
|
+
ChoiceFieldValueDetailComponent,
|
|
673
728
|
],
|
|
674
729
|
imports: [
|
|
675
730
|
CommonModule,
|
|
@@ -680,9 +735,9 @@ ChoiceFieldModule.decorators = [
|
|
|
680
735
|
ReactiveFormsModule,
|
|
681
736
|
ChoiceFieldRoutingModule,
|
|
682
737
|
AlertModule,
|
|
683
|
-
TranslateModule
|
|
738
|
+
TranslateModule,
|
|
684
739
|
],
|
|
685
|
-
exports: []
|
|
740
|
+
exports: [],
|
|
686
741
|
},] }
|
|
687
742
|
];
|
|
688
743
|
|