@tsi-developpement/tsi-shared-ui 1.9.1 → 1.9.3
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/esm2022/lib/tsi-components/create-or-edit-entity-informations/create-or-edit-entity-informations.component.mjs +1 -1
- package/esm2022/lib/tsi-components/create-or-edit-modele-import/create-or-edit-modele-import.component.mjs +3 -3
- package/esm2022/lib/tsi-components/input-components/editable-grid/editable-grid.component.mjs +5 -21
- package/esm2022/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.mjs +41 -12
- package/esm2022/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.mjs +15 -5
- package/esm2022/lib/tsi-components/tsi-action-erp-create-or-edit/tsi-action-erp-create-or-edit.component.mjs +1 -1
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs +62 -39
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs.map +1 -1
- package/lib/consts/app-providers.d.ts +1 -1
- package/lib/providers/shared-ui-tsi.provider.d.ts +1 -1
- package/lib/tsi-components/input-components/editable-grid/editable-grid.component.d.ts +1 -7
- package/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.d.ts +24 -3
- package/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.d.ts +7 -1
- package/package.json +1 -1
package/esm2022/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.mjs
CHANGED
|
@@ -8,8 +8,16 @@ import * as i4 from "../../../tsi-directives/auto-select.directive";
|
|
|
8
8
|
export class TsiRateInputComponent extends TsiInputBase {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Governs how the percentage the user sees/edits relates to the value stored in the model.
|
|
13
|
+
* The user always reads and types a percentage; this flag only changes what is persisted.
|
|
14
|
+
*
|
|
15
|
+
* - false (default): "2 %" on screen is stored as the whole percent `2`.
|
|
16
|
+
* - true : "2 %" on screen is stored as the fraction `0.02`.
|
|
17
|
+
*
|
|
18
|
+
* Must match the `isFraction` given to the mirror `Tsi-Rate-Display` so the pair
|
|
19
|
+
* interprets a stored value identically.
|
|
20
|
+
*/
|
|
13
21
|
this.isFraction = false;
|
|
14
22
|
this.numOfDecimal = 2;
|
|
15
23
|
//#endregion
|
|
@@ -19,16 +27,17 @@ export class TsiRateInputComponent extends TsiInputBase {
|
|
|
19
27
|
//#endregion
|
|
20
28
|
this.isValueChanged = false;
|
|
21
29
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The percentage shown in / typed into the p-inputNumber. It is a view-only
|
|
32
|
+
* projection of the stored model value (`inputField`), converted according to
|
|
33
|
+
* `isFraction`. The model remains the single source of truth.
|
|
34
|
+
*/
|
|
35
|
+
get displayValue() {
|
|
36
|
+
return this.toDisplay(this.inputField);
|
|
28
37
|
}
|
|
29
38
|
valueChanged(event) {
|
|
30
39
|
this.isValueChanged = true;
|
|
31
|
-
this.inputField = event;
|
|
40
|
+
this.inputField = this.toModel(event);
|
|
32
41
|
this.isDirty = true;
|
|
33
42
|
}
|
|
34
43
|
onChangeofOptions() {
|
|
@@ -38,12 +47,32 @@ export class TsiRateInputComponent extends TsiInputBase {
|
|
|
38
47
|
this.isValueChanged = false;
|
|
39
48
|
}
|
|
40
49
|
}
|
|
50
|
+
/** stored model value -> on-screen percentage */
|
|
51
|
+
toDisplay(model) {
|
|
52
|
+
if (model == null) {
|
|
53
|
+
return model;
|
|
54
|
+
}
|
|
55
|
+
return this.isFraction ? this.round(model * 100, this.numOfDecimal ?? 0) : model;
|
|
56
|
+
}
|
|
57
|
+
/** on-screen percentage -> stored model value */
|
|
58
|
+
toModel(displayValue) {
|
|
59
|
+
if (displayValue == null) {
|
|
60
|
+
return displayValue;
|
|
61
|
+
}
|
|
62
|
+
// A fraction needs two more decimals than the percentage the user typed.
|
|
63
|
+
return this.isFraction ? this.round(displayValue / 100, (this.numOfDecimal ?? 0) + 2) : displayValue;
|
|
64
|
+
}
|
|
65
|
+
/** Rounds to a fixed number of decimals, guarding against binary-float drift introduced by the x100 conversion. */
|
|
66
|
+
round(value, decimals) {
|
|
67
|
+
const factor = Math.pow(10, decimals);
|
|
68
|
+
return Math.round((value + Number.EPSILON) * factor) / factor;
|
|
69
|
+
}
|
|
41
70
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateInputComponent, selector: "Tsi-Rate-Input", inputs: { required: "required", isFraction: "isFraction", numOfDecimal: "numOfDecimal" }, outputs: { newItemEvent: "newItemEvent", inputFieldChange: "inputFieldChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateInputComponent, selector: "Tsi-Rate-Input", inputs: { required: "required", isFraction: "isFraction", numOfDecimal: "numOfDecimal" }, outputs: { newItemEvent: "newItemEvent", inputFieldChange: "inputFieldChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"displayValue\"\r\n (ngModelChange)=\"valueChanged($event)\"\r\n [required]=\"isRequired\"\r\n (onBlur)=\"onChangeofOptions()\" name=\"{{inputName}}\"\r\n id=\"{{inputId}}\" suffix=\"%\" [minFractionDigits]=\"numOfDecimal ?? 0\" [maxFractionDigits]=\"numOfDecimal ?? 0\"\r\n [locale]=\"locale\">\r\n </p-inputNumber>\r\n <Tsi-Bubble-Info [infoText]=\"infoText\"></Tsi-Bubble-Info>\r\n</div>", styles: [".ColorClass{background-color:#f0f;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i3.TsiBubbleInfoComponent, selector: "Tsi-Bubble-Info", inputs: ["infoText"] }, { kind: "directive", type: i4.AutoSelectDirective, selector: "[autoSelect]" }] }); }
|
|
43
72
|
}
|
|
44
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateInputComponent, decorators: [{
|
|
45
74
|
type: Component,
|
|
46
|
-
args: [{ selector: 'Tsi-Rate-Input', template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"
|
|
75
|
+
args: [{ selector: 'Tsi-Rate-Input', template: "<div class=\"flex h-2rem\">\r\n <p-inputNumber autoSelect class=\"{{myStyleClass}}\" \r\n styleClass=\"{{myStyleClass}} border-radius-7\" \r\n inputStyleClass=\"{{myStyleClass}} {{validationStatusCssClass}}\"\r\n [disabled]=\"disabled\" [ngModel]=\"displayValue\"\r\n (ngModelChange)=\"valueChanged($event)\"\r\n [required]=\"isRequired\"\r\n (onBlur)=\"onChangeofOptions()\" name=\"{{inputName}}\"\r\n id=\"{{inputId}}\" suffix=\"%\" [minFractionDigits]=\"numOfDecimal ?? 0\" [maxFractionDigits]=\"numOfDecimal ?? 0\"\r\n [locale]=\"locale\">\r\n </p-inputNumber>\r\n <Tsi-Bubble-Info [infoText]=\"infoText\"></Tsi-Bubble-Info>\r\n</div>", styles: [".ColorClass{background-color:#f0f;text-align:right}\n"] }]
|
|
47
76
|
}], propDecorators: { required: [{
|
|
48
77
|
type: Input
|
|
49
78
|
}], isFraction: [{
|
|
@@ -55,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
55
84
|
}], inputFieldChange: [{
|
|
56
85
|
type: Output
|
|
57
86
|
}] } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNpLXJhdGUtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHNpLXNoYXJlZC11aS9zcmMvb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CIlXCIgW21pbkZyYWN0aW9uRGlnaXRzXT1cIm51bU9mRGVjaW1hbCA/PyAwXCIgW21heEZyYWN0aW9uRGlnaXRzXT1cIm51bU9mRGVjaW1hbCA/PyAwXCJcclxuICAgICAgICBbbG9jYWxlXT1cImxvY2FsZVwiPlxyXG4gICAgPC9wLWlucHV0TnVtYmVyPlxyXG4gICAgPFRzaS1CdWJibGUtSW5mbyBbaW5mb1RleHRdPVwiaW5mb1RleHRcIj48L1RzaS1CdWJibGUtSW5mbz5cclxuPC9kaXY+Il19
|
package/esm2022/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.mjs
CHANGED
|
@@ -7,22 +7,32 @@ export class TsiRateDisplayComponent {
|
|
|
7
7
|
constructor() {
|
|
8
8
|
this._localizationService = inject(LocalizationService);
|
|
9
9
|
//#region inputs
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* How to interpret `inputData` as a percentage. Must match the `isFraction`
|
|
12
|
+
* of the mirror `Tsi-Rate-Input`.
|
|
13
|
+
* - false (default): `inputData` is a whole percent (`2` shows as "2 %").
|
|
14
|
+
* - true : `inputData` is a fraction (`0.02` shows as "2 %").
|
|
15
|
+
*/
|
|
16
|
+
this.isFraction = false;
|
|
11
17
|
this.numOfDecimal = 2;
|
|
12
18
|
this.locale = this._localizationService.locale;
|
|
13
19
|
}
|
|
14
20
|
getToFraction() {
|
|
15
|
-
|
|
21
|
+
// A non-existent value must stay blank; only a real 0 renders as "0.00%".
|
|
22
|
+
if (this.inputData == null || this.inputData == undefined) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return Number(this.inputData * 0.01);
|
|
16
26
|
}
|
|
17
27
|
getFormat() {
|
|
18
28
|
return `0.${this.numOfDecimal}`;
|
|
19
29
|
}
|
|
20
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateDisplayComponent, selector: "Tsi-Rate-Display", inputs: { isFraction: "isFraction", inputData: "inputData", numOfDecimal: "numOfDecimal" }, ngImport: i0, template: "<span class=\"row flex justify-content-end p-2\">\r\n <div *ngIf=\"isFraction == true; else fElseBlock\">\r\n <span>{{ inputData | percent :
|
|
31
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiRateDisplayComponent, selector: "Tsi-Rate-Display", inputs: { isFraction: "isFraction", inputData: "inputData", numOfDecimal: "numOfDecimal" }, ngImport: i0, template: "<span class=\"row flex justify-content-end p-2\">\r\n <div *ngIf=\"isFraction == true; else fElseBlock\">\r\n <span>{{ inputData | percent : getFormat() : locale }}</span>\r\n </div>\r\n <ng-template #fElseBlock>\r\n <ng-container>\r\n <span>{{ getToFraction() | percent : getFormat() : locale }}</span>\r\n </ng-container>\r\n </ng-template>\r\n</span>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.PercentPipe, name: "percent" }] }); }
|
|
22
32
|
}
|
|
23
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiRateDisplayComponent, decorators: [{
|
|
24
34
|
type: Component,
|
|
25
|
-
args: [{ selector: 'Tsi-Rate-Display', template: "<span class=\"row flex justify-content-end p-2\">\r\n <div *ngIf=\"isFraction == true; else fElseBlock\">\r\n <span>{{ inputData | percent :
|
|
35
|
+
args: [{ selector: 'Tsi-Rate-Display', template: "<span class=\"row flex justify-content-end p-2\">\r\n <div *ngIf=\"isFraction == true; else fElseBlock\">\r\n <span>{{ inputData | percent : getFormat() : locale }}</span>\r\n </div>\r\n <ng-template #fElseBlock>\r\n <ng-container>\r\n <span>{{ getToFraction() | percent : getFormat() : locale }}</span>\r\n </ng-container>\r\n </ng-template>\r\n</span>" }]
|
|
26
36
|
}], ctorParameters: () => [], propDecorators: { isFraction: [{
|
|
27
37
|
type: Input
|
|
28
38
|
}], inputData: [{
|
|
@@ -30,4 +40,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
30
40
|
}], numOfDecimal: [{
|
|
31
41
|
type: Input
|
|
32
42
|
}] } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNpLXJhdGUtZGlzcGxheS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90c2ktc2hhcmVkLXVpL3NyYy9saWIvdHNpLWNvbXBvbmVudHMvb3V0cHV0LWNvbXBvbmVudHMvdHNpLXJhdGUtZGlzcGxheS90c2ktcmF0ZS1kaXNwbGF5LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3RzaS1zaGFyZWQtdWkvc3JjL2xpYi90c2ktY29tcG9uZW50cy9vdXRwdXQtY29tcG9uZW50cy90c2ktcmF0ZS1kaXNwbGF5L3RzaS1yYXRlLWRpc3BsYXkuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHFEQUFxRCxDQUFDOzs7QUFRMUYsTUFBTSxPQUFPLHVCQUF1QjtJQWVsQyxZQUFZO0lBRVo7UUFoQlEseUJBQW9CLEdBQXdCLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxD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XRlPlxyXG48L3NwYW4+Il19
|
|
@@ -382,7 +382,7 @@ export class TsiActionErpCreateOrEditComponent extends TsiFormComponentBaseCompo
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiActionErpCreateOrEditComponent, deps: [{ token: i1.ActionErpService }, { token: i2.NatureActionService }, { token: i1.ErrorResponseManagerService }, { token: i1.TsiNotificationService }, { token: i1.TsiConfirmationService }, { token: i1.EntityConfigurationService }, { token: i3.DialogService }, { token: i1.IdentityManagerService }, { token: i4.LocalizePipe }, { token: i3.DynamicDialogConfig }, { token: i3.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
385
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiActionErpCreateOrEditComponent, selector: "lib-tsi-action-erp-create-or-edit", providers: [...appProviders, DialogService], usesInheritance: true, ngImport: i0, template: "<tsi-form class=\"form-horizontal\" autocomplete=\"off\" (onSubmit)=\"save()\" [isLoading]=\"isloading\">\r\n <Tsi-Modal-Header [inputTitle]=\"header | modalLabel :mode:'shared_action_add_action'\" (onCloseClick)=\"hide()\">\r\n </Tsi-Modal-Header>\r\n\r\n <fieldset [disabled]=\"isDeleteMode() || isConsultMode()\">\r\n <div class=\"col-12\">\r\n <div class=\"grid row-gap-2\">\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_Nature_Action'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getNatureActionMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllNatureActionMinimal()\"\r\n [(bind)]=\"action.natureAction\" id-field=\"uid\" label-field=\"libelle\" [isFiltered]=\"true\"\r\n [inputName]=\"'NatureAction'\" [businessClass]=\"businessClassNames.NatureAction\"\r\n (bindChange)=\"onNatureActionChange($event)\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_numero'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Integer [inputName]=\"'Numero'\" [(inputField)]=\"action.numero\"\r\n [disabled]=\"true\"></Tsi-Integer></div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_utilisateurDemandeur'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getUtilisateurMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllUtilisateurMinimal()\"\r\n [(bind)]=\"action.utilisateurDemandeur\" id-field=\"uid\" label-field=\"nomPrenom\"\r\n [isFiltered]=\"true\" [inputName]=\"'utilisateurDemandeur'\"\r\n [businessClass]=\"businessClassNames.Utilisateur\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_objet'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Text-Area [inputName]=\"'Objet'\" [(inputField)]=\"action.objet\"\r\n [rows]=\"3\"></Tsi-Text-Area></div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_priorite'\"></Tsi-Label></div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [listSourceUrl]=\"administrationEndpoints.allPrioriteActionCRMEnum\"\r\n [(bind)]=\"action.priorite\" id-field=\"key\" label-field=\"value\" [inputName]=\"'Priorite'\"\r\n [showSearchButton]=\"false\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_utilisateurAssigne'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getUtilisateurMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllUtilisateurMinimal()\"\r\n [(bind)]=\"action.utilisateurAssigne\" id-field=\"uid\" label-field=\"nomPrenom\"\r\n [inputName]=\"'UtilisateurAssigne'\" [isFiltered]=\"true\"\r\n [businessClass]=\"businessClassNames.Utilisateur\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_resultat'\"></Tsi-Label></div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [listSourceUrl]=\"administrationEndpoints.allResultatActionCRMEnum\"\r\n [(bind)]=\"action.resultat\" id-field=\"key\" label-field=\"value\" [inputName]=\"'Resultat'\"\r\n [showSearchButton]=\"false\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_lieu'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Text-Area [inputName]=\"'Lieu'\"\r\n [(inputField)]=\"action.lieu\"></Tsi-Text-Area></div>\r\n </div>\r\n\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_ActionPrecedente'\"></Tsi-Label></div>\r\n <div class=\"col-7\"><Tsi-Integer [inputName]=\"'ActionPrecedente'\"\r\n [(inputField)]=\"action.codeActionPrecedente\" [disabled]=\"true\"></Tsi-Integer>\r\n </div>\r\n <div class=\"col-1\">\r\n <Tsi-Button [icon]=\"'pi pi-caret-up'\" [disabled]=\"!action.actionPrecedente\"\r\n (onClick)=\"openActionPrecedentePopup()\">\r\n </Tsi-Button>\r\n \r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <p-tabView>\r\n <p-tabPanel [header]=\"'anglais_echeance'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n\r\n <div class=\"grid\">\r\n <div class=\"col-8\">\r\n <div class=\"form-group border p-2\">\r\n <div class=\"grid mb-1\">\r\n <div class=\"col-4\"></div>\r\n <div class=\"col-4 text-center\"><b>{{ 'action_Debut' | localize }}</b>\r\n </div>\r\n <div class=\"col-4 text-center\"><b>{{ 'action_Fin' | localize }}</b>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center mb-2\">\r\n <div class=\"col-4\"><Tsi-Label\r\n [labelValue]=\"'action_dateHeure_Prev'\"></Tsi-Label></div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureDebutPrev'\"\r\n [(inputField)]=\"action.dateHeureDebutPrev\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureFinPrev'\"\r\n [(inputField)]=\"action.dateHeureFinPrev\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center\">\r\n <div class=\"col-4\"><Tsi-Label\r\n [labelValue]=\"'action.dateHeuree_Realisee'\"></Tsi-Label></div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureDebutRealisee'\"\r\n [(inputField)]=\"action.dateHeureDebutRealisee\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureFinRealisee'\"\r\n [(inputField)]=\"action.dateHeureFinRealisee\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-4\">\r\n <p-fieldset [legend]=\"'action_Fieldset_alerte' | localize\">\r\n <div class=\"grid flex align-items-center mb-2\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'action_alerte'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-4\"><Tsi-CheckBox [inputName]=\"'Alerte'\" [isBinary]=\"true\"\r\n [(inputField)]=\"action.alerte\"></Tsi-CheckBox>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center \">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'action_alerteAvant'\"></Tsi-Label>\r\n </div>\r\n\r\n <div class=\"col-3 flex align-items-center gap-2\"><Tsi-Integer\r\n [inputName]=\"'AlerteAvant'\" [(inputField)]=\"action.alerteAvant\">\r\n </Tsi-Integer>\r\n <span class=\"text-nowrap\">{{'jours'| localize}}</span>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-tabPanel>\r\n <p-tabPanel [header]=\"'Liste_des_action_details'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n <div presentationDesigner=\"action_Generer\" class=\"grid\">\r\n <Tsi-Label class=\"col-1 col-offset-1\" [labelValue]=\"'action_Generer'\"></Tsi-Label>\r\n <Tsi-Search-Combo class=\"col-4\" inputName=\"className\" id-field=\"className\"\r\n label-field=\"className\"\r\n [listSourceUrl]=\"this.administrationEndpoints.GetAllEntitiesInformationsMinimal()\"\r\n [elementSourceUrl]=\"this.administrationEndpoints.getEntityInfoElementSource()\"\r\n [isFiltered]=\"true\" [(bind)]=\"classename\" [businessClass]=\"businessClass\"\r\n (bindChange)=\"onClasseSelected($event)\"> ></Tsi-Search-Combo>\r\n </div>\r\n <Tsi-Generic-Editable-Grid (onConsultClicked)=\"consultElement($event)\"\r\n [showConsultButton]=\"true\" [columns]=\"actiondetailcolom\"\r\n [gridData]=\"action.actionERPDetails\" [parent]=\"this\"></Tsi-Generic-Editable-Grid>\r\n </ng-template>\r\n </p-tabPanel>\r\n <p-tabPanel [header]=\"'shared_action_participants'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n <Tsi-Generic-Editable-Grid [columns]=\"participantColumns\"\r\n [gridData]=\"action.actionERPUtilisateurs\" [parent]=\"this\" [showAddButton]=\"true\"\r\n [showDeleteButton]=\"true\"></Tsi-Generic-Editable-Grid>\r\n </ng-template>\r\n </p-tabPanel>\r\n </p-tabView>\r\n </div>\r\n </fieldset>\r\n\r\n <div *ngIf=\"mode !== modeRef.create\" class=\"grid mt-2\" presentationDesigner=\"actionnouvelle_actionERP\">\r\n <div class=\"col-8\">\r\n <Tsi-Button class=\"w-full\" (onClick)=\"openActionERPPopUp()\"\r\n [text]=\"'actionnouvelle_actionERP'\"></Tsi-Button>\r\n </div>\r\n </div>\r\n\r\n <Tsi-Modal-Footer [cancelDisabled]=\"saving\"\r\n [saveDisabled]=\"isSubmitDisabled()\" (onCancelClick)=\"hide()\"></Tsi-Modal-Footer>\r\n</tsi-form>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i7.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "component", type: i8.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i9.EditableGridComponent, selector: "Tsi-Generic-Editable-Grid", inputs: ["selectedItems", "configuration", "key", "items", "events", "showGlobalSearch", "showAddButton", "showDeleteButton", "showEditButton", "showRowSummary", "scrollHeight", "rowPerPage", "pageSize", "entityPrimaryKeyName", "columns", "gridData", "isTableLoading", "parent", "showSaveButton", "showActionColumn", "enableRowDisabling", "rowSummaryConfig", "showHaveSumary", "showRowSumary", "selectKeyOnly", "selectionMode", "showConsultButton", "editableGridBusinessClass", "orderColumn", "deleteLineButtonDisabled", "showDuplicateButton", "id"], outputs: ["itemsSave", "refreshEventEmitter", "saveDataEventEmitter", "rowChangedEventEmitter", "selectedRowEventEmitter", "addedRowEventEmitter", "focusOutEventEmitter", "cellChanged", "rowDeletedEventEmitter", "selectedItemsChange", "onRowSelect", "focusOutRow", "onConsultClicked", "rowDuplicatedEventEmitter"] }, { kind: "component", type: i10.TsiSearchComboComponent, selector: "Tsi-Search-Combo", inputs: ["elementSourceUrl", "listSourceUrl", "listSourceParams", "id-field", "label-field", "multiple", "sort", "showClear", "reloadDataSource", "isFiltered", "selectedLabel", "maxWidth", "businessClass", "searchDebounceTime", "comboType", "statusMetadata", "currentRowItem", "datasource", "bind", "maxSelectedLabels", "tooltipMaxDisplayedItems", "bindMode", "showSearchButton", "showAddButton", "showConsultButton", "showUpdateButton"], outputs: ["bindChange", "datasource-loaded", "init", "isLoaded", "selectedLabelChange", "onClick", "onSearchButtonClick", "selectionChange"] }, { kind: "component", type: i11.TsiCheckboxComponent, selector: "Tsi-CheckBox", inputs: ["class", "isBinary", "checked", "tooltipText", "tooltipPosition"], outputs: ["inputFieldChange", "checkedChange"] }, { kind: "component", type: i12.TsiDatePickerComponent, selector: "Tsi-Date-Picker", inputs: ["required", "showTime", "showButtonBar"], outputs: ["inputFieldChange"] }, { kind: "component", type: i13.TsiIntegerComponent, selector: "Tsi-Integer", inputs: ["class", "minValue", "maxValue", "delayChangeTime"], outputs: ["newItemEvent", "inputFieldChange"] }, { kind: "component", type: i14.TsiTextAreaComponent, selector: "Tsi-Text-Area", inputs: ["rows", "cols"], outputs: ["newItemEvent", "inputFieldChange"] }, { kind: "component", type: i15.TsiLabelComponent, selector: "Tsi-Label", inputs: ["labelValue", "styleClass", "infoText"] }, { kind: "component", type: i16.TsiModalFooterComponent, selector: "Tsi-Modal-Footer", inputs: ["cancelDisabled", "saveDisabled", "cancelLabel", "saveLabel", "isConsult", "isDuplicate", "isOnlyCreate", "additionalButtonLabel", "additionalButtonIcon", "additionalButtonDisabled", "showAdditionalButton", "showSaveAndCloseButton", "mode"], outputs: ["onCancelClick", "onSaveClick", "onAdditionalButtonClick"] }, { kind: "component", type: i17.TsiModalHeaderComponent, selector: "Tsi-Modal-Header", inputs: ["inputTitle"], outputs: ["onCloseClick"] }, { kind: "component", type: i18.TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "component", type: i19.TsiFormComponent, selector: "tsi-form", inputs: ["class", "autocomplete", "optionalEndpoints", "disabled", "isLoading", "modalSize", "formEndpoint", "formName", "isReportingToolbarDisabled", "isCreateOnly", "statusInputDisabled"], outputs: ["onSave", "onSubmit", "onSubmitFormWorkflowConfiguration", "formRefChange", "onStatusChange"] }, { kind: "directive", type: i20.PresentationDesignerDirective, selector: "[presentationDesigner]" }, { kind: "pipe", type: i21.LocalizePipe, name: "localize" }, { kind: "pipe", type: i22.ModalLabelPipe, name: "modalLabel" }] }); }
|
|
385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TsiActionErpCreateOrEditComponent, selector: "lib-tsi-action-erp-create-or-edit", providers: [...appProviders, DialogService], usesInheritance: true, ngImport: i0, template: "<tsi-form class=\"form-horizontal\" autocomplete=\"off\" (onSubmit)=\"save()\" [isLoading]=\"isloading\">\r\n <Tsi-Modal-Header [inputTitle]=\"header | modalLabel :mode:'shared_action_add_action'\" (onCloseClick)=\"hide()\">\r\n </Tsi-Modal-Header>\r\n\r\n <fieldset [disabled]=\"isDeleteMode() || isConsultMode()\">\r\n <div class=\"col-12\">\r\n <div class=\"grid row-gap-2\">\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_Nature_Action'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getNatureActionMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllNatureActionMinimal()\"\r\n [(bind)]=\"action.natureAction\" id-field=\"uid\" label-field=\"libelle\" [isFiltered]=\"true\"\r\n [inputName]=\"'NatureAction'\" [businessClass]=\"businessClassNames.NatureAction\"\r\n (bindChange)=\"onNatureActionChange($event)\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_numero'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Integer [inputName]=\"'Numero'\" [(inputField)]=\"action.numero\"\r\n [disabled]=\"true\"></Tsi-Integer></div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_utilisateurDemandeur'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getUtilisateurMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllUtilisateurMinimal()\"\r\n [(bind)]=\"action.utilisateurDemandeur\" id-field=\"uid\" label-field=\"nomPrenom\"\r\n [isFiltered]=\"true\" [inputName]=\"'utilisateurDemandeur'\"\r\n [businessClass]=\"businessClassNames.Utilisateur\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_objet'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Text-Area [inputName]=\"'Objet'\" [(inputField)]=\"action.objet\"\r\n [rows]=\"3\"></Tsi-Text-Area></div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-12 md:col-6\">\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_priorite'\"></Tsi-Label></div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [listSourceUrl]=\"administrationEndpoints.allPrioriteActionCRMEnum\"\r\n [(bind)]=\"action.priorite\" id-field=\"key\" label-field=\"value\" [inputName]=\"'Priorite'\"\r\n [showSearchButton]=\"false\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_utilisateurAssigne'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [elementSourceUrl]=\"administrationEndpoints.getUtilisateurMinimal()\"\r\n [listSourceUrl]=\"administrationEndpoints.getAllUtilisateurMinimal()\"\r\n [(bind)]=\"action.utilisateurAssigne\" id-field=\"uid\" label-field=\"nomPrenom\"\r\n [inputName]=\"'UtilisateurAssigne'\" [isFiltered]=\"true\"\r\n [businessClass]=\"businessClassNames.Utilisateur\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_resultat'\"></Tsi-Label></div>\r\n <div class=\"col-8\">\r\n <Tsi-Search-Combo [listSourceUrl]=\"administrationEndpoints.allResultatActionCRMEnum\"\r\n [(bind)]=\"action.resultat\" id-field=\"key\" label-field=\"value\" [inputName]=\"'Resultat'\"\r\n [showSearchButton]=\"false\"></Tsi-Search-Combo>\r\n </div>\r\n </div>\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_lieu'\"></Tsi-Label></div>\r\n <div class=\"col-8\"><Tsi-Text-Area [inputName]=\"'Lieu'\"\r\n [(inputField)]=\"action.lieu\"></Tsi-Text-Area></div>\r\n </div>\r\n\r\n <div class=\"grid align-items-center\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'shared_action_ActionPrecedente'\"></Tsi-Label></div>\r\n <div class=\"col-7\"><Tsi-Integer [inputName]=\"'ActionPrecedente'\"\r\n [(inputField)]=\"action.codeActionPrecedente\" [disabled]=\"true\"></Tsi-Integer>\r\n </div>\r\n <div class=\"col-1\">\r\n <Tsi-Button [icon]=\"'pi pi-caret-up'\" [disabled]=\"!action.actionPrecedente\"\r\n (onClick)=\"openActionPrecedentePopup()\">\r\n </Tsi-Button>\r\n \r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n <p-tabView>\r\n <p-tabPanel [header]=\"'anglais_echeance'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n\r\n <div class=\"grid\">\r\n <div class=\"col-8\">\r\n <div class=\"form-group border p-2\">\r\n <div class=\"grid mb-1\">\r\n <div class=\"col-4\"></div>\r\n <div class=\"col-4 text-center\"><b>{{ 'action_Debut' | localize }}</b>\r\n </div>\r\n <div class=\"col-4 text-center\"><b>{{ 'action_Fin' | localize }}</b>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center mb-2\">\r\n <div class=\"col-4\"><Tsi-Label\r\n [labelValue]=\"'action_dateHeure_Prev'\"></Tsi-Label></div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureDebutPrev'\"\r\n [(inputField)]=\"action.dateHeureDebutPrev\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureFinPrev'\"\r\n [(inputField)]=\"action.dateHeureFinPrev\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center\">\r\n <div class=\"col-4\"><Tsi-Label\r\n [labelValue]=\"'action.dateHeuree_Realisee'\"></Tsi-Label></div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureDebutRealisee'\"\r\n [(inputField)]=\"action.dateHeureDebutRealisee\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n <div class=\"col-4\"><Tsi-Date-Picker [inputName]=\"'DateHeureFinRealisee'\"\r\n [(inputField)]=\"action.dateHeureFinRealisee\"\r\n [showTime]=\"true\"></Tsi-Date-Picker>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-4\">\r\n <p-fieldset [legend]=\"'action_Fieldset_alerte' | localize\">\r\n <div class=\"grid flex align-items-center mb-2\">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'action_alerte'\"></Tsi-Label>\r\n </div>\r\n <div class=\"col-4\"><Tsi-CheckBox [inputName]=\"'Alerte'\" [isBinary]=\"true\"\r\n [(inputField)]=\"action.alerte\"></Tsi-CheckBox>\r\n </div>\r\n </div>\r\n <div class=\"grid flex align-items-center \">\r\n <div class=\"col-3\"><Tsi-Label [labelValue]=\"'action_alerteAvant'\"></Tsi-Label>\r\n </div>\r\n\r\n <div class=\"col-3 flex align-items-center gap-2\"><Tsi-Integer\r\n [inputName]=\"'AlerteAvant'\" [(inputField)]=\"action.alerteAvant\">\r\n </Tsi-Integer>\r\n <span class=\"text-nowrap\">{{'jours'| localize}}</span>\r\n </div>\r\n </div>\r\n </p-fieldset>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </p-tabPanel>\r\n <p-tabPanel [header]=\"'Liste_des_action_details'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n <div presentationDesigner=\"action_Generer\" class=\"grid\">\r\n <Tsi-Label class=\"col-1 col-offset-1\" [labelValue]=\"'action_Generer'\"></Tsi-Label>\r\n <Tsi-Search-Combo class=\"col-4\" inputName=\"className\" id-field=\"className\"\r\n label-field=\"className\"\r\n [listSourceUrl]=\"this.administrationEndpoints.GetAllEntitiesInformationsMinimal()\"\r\n [elementSourceUrl]=\"this.administrationEndpoints.getEntityInfoElementSource()\"\r\n [isFiltered]=\"true\" [(bind)]=\"classename\" [businessClass]=\"businessClass\"\r\n (bindChange)=\"onClasseSelected($event)\"> ></Tsi-Search-Combo>\r\n </div>\r\n <Tsi-Generic-Editable-Grid (onConsultClicked)=\"consultElement($event)\"\r\n [showConsultButton]=\"true\" [columns]=\"actiondetailcolom\"\r\n [gridData]=\"action.actionERPDetails\" [parent]=\"this\"></Tsi-Generic-Editable-Grid>\r\n </ng-template>\r\n </p-tabPanel>\r\n <p-tabPanel [header]=\"'shared_action_participants'| localize\">\r\n <ng-template pTemplate=\"content\">\r\n <Tsi-Generic-Editable-Grid [columns]=\"participantColumns\"\r\n [gridData]=\"action.actionERPUtilisateurs\" [parent]=\"this\" [showAddButton]=\"true\"\r\n [showDeleteButton]=\"true\"></Tsi-Generic-Editable-Grid>\r\n </ng-template>\r\n </p-tabPanel>\r\n </p-tabView>\r\n </div>\r\n </fieldset>\r\n\r\n <div *ngIf=\"mode !== modeRef.create\" class=\"grid mt-2\" presentationDesigner=\"actionnouvelle_actionERP\">\r\n <div class=\"col-8\">\r\n <Tsi-Button class=\"w-full\" (onClick)=\"openActionERPPopUp()\"\r\n [text]=\"'actionnouvelle_actionERP'\"></Tsi-Button>\r\n </div>\r\n </div>\r\n\r\n <Tsi-Modal-Footer [cancelDisabled]=\"saving\"\r\n [saveDisabled]=\"isSubmitDisabled()\" (onCancelClick)=\"hide()\"></Tsi-Modal-Footer>\r\n</tsi-form>", styles: [""], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i7.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i7.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "component", type: i8.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: i9.EditableGridComponent, selector: "Tsi-Generic-Editable-Grid", inputs: ["selectedItems", "configuration", "key", "items", "saveEvent", "showGlobalSearch", "showAddButton", "showDeleteButton", "showEditButton", "showRowSummary", "scrollHeight", "rowPerPage", "pageSize", "entityPrimaryKeyName", "columns", "gridData", "isTableLoading", "parent", "showSaveButton", "showActionColumn", "enableRowDisabling", "rowSummaryConfig", "showHaveSumary", "showRowSumary", "selectKeyOnly", "selectionMode", "showConsultButton", "editableGridBusinessClass", "orderColumn", "deleteLineButtonDisabled", "showDuplicateButton", "id"], outputs: ["refreshEventEmitter", "saveDataEventEmitter", "rowChangedEventEmitter", "selectedRowEventEmitter", "addedRowEventEmitter", "focusOutEventEmitter", "cellChanged", "rowDeletedEventEmitter", "selectedItemsChange", "onRowSelect", "focusOutRow", "onConsultClicked", "rowDuplicatedEventEmitter"] }, { kind: "component", type: i10.TsiSearchComboComponent, selector: "Tsi-Search-Combo", inputs: ["elementSourceUrl", "listSourceUrl", "listSourceParams", "id-field", "label-field", "multiple", "sort", "showClear", "reloadDataSource", "isFiltered", "selectedLabel", "maxWidth", "businessClass", "searchDebounceTime", "comboType", "statusMetadata", "currentRowItem", "datasource", "bind", "maxSelectedLabels", "tooltipMaxDisplayedItems", "bindMode", "showSearchButton", "showAddButton", "showConsultButton", "showUpdateButton"], outputs: ["bindChange", "datasource-loaded", "init", "isLoaded", "selectedLabelChange", "onClick", "onSearchButtonClick", "selectionChange"] }, { kind: "component", type: i11.TsiCheckboxComponent, selector: "Tsi-CheckBox", inputs: ["class", "isBinary", "checked", "tooltipText", "tooltipPosition"], outputs: ["inputFieldChange", "checkedChange"] }, { kind: "component", type: i12.TsiDatePickerComponent, selector: "Tsi-Date-Picker", inputs: ["required", "showTime", "showButtonBar"], outputs: ["inputFieldChange"] }, { kind: "component", type: i13.TsiIntegerComponent, selector: "Tsi-Integer", inputs: ["class", "minValue", "maxValue", "delayChangeTime"], outputs: ["newItemEvent", "inputFieldChange"] }, { kind: "component", type: i14.TsiTextAreaComponent, selector: "Tsi-Text-Area", inputs: ["rows", "cols"], outputs: ["newItemEvent", "inputFieldChange"] }, { kind: "component", type: i15.TsiLabelComponent, selector: "Tsi-Label", inputs: ["labelValue", "styleClass", "infoText"] }, { kind: "component", type: i16.TsiModalFooterComponent, selector: "Tsi-Modal-Footer", inputs: ["cancelDisabled", "saveDisabled", "cancelLabel", "saveLabel", "isConsult", "isDuplicate", "isOnlyCreate", "additionalButtonLabel", "additionalButtonIcon", "additionalButtonDisabled", "showAdditionalButton", "showSaveAndCloseButton", "mode"], outputs: ["onCancelClick", "onSaveClick", "onAdditionalButtonClick"] }, { kind: "component", type: i17.TsiModalHeaderComponent, selector: "Tsi-Modal-Header", inputs: ["inputTitle"], outputs: ["onCloseClick"] }, { kind: "component", type: i18.TsiButtonComponent, selector: "Tsi-Button", inputs: ["disabled", "text", "style", "tooltipText", "tooltipPosition", "buttonType", "icon", "styleClass", "iconSrc", "id", "iconWidth", "iconClass"], outputs: ["onClick", "rightClick"] }, { kind: "component", type: i19.TsiFormComponent, selector: "tsi-form", inputs: ["class", "autocomplete", "optionalEndpoints", "disabled", "isLoading", "modalSize", "formEndpoint", "formName", "isReportingToolbarDisabled", "isCreateOnly", "statusInputDisabled"], outputs: ["onSave", "onSubmit", "onSubmitFormWorkflowConfiguration", "formRefChange", "onStatusChange"] }, { kind: "directive", type: i20.PresentationDesignerDirective, selector: "[presentationDesigner]" }, { kind: "pipe", type: i21.LocalizePipe, name: "localize" }, { kind: "pipe", type: i22.ModalLabelPipe, name: "modalLabel" }] }); }
|
|
386
386
|
}
|
|
387
387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TsiActionErpCreateOrEditComponent, decorators: [{
|
|
388
388
|
type: Component,
|