ngx-histaff-alpha 6.6.5 → 6.6.7
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/fesm2022/{ngx-histaff-alpha-ai-hint-for-table.component-DWRkZ_y-.mjs → ngx-histaff-alpha-ai-hint-for-table.component-CN312QCn.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-ai-hint-for-table.component-DWRkZ_y-.mjs.map → ngx-histaff-alpha-ai-hint-for-table.component-CN312QCn.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-form-design.component-BWdjH0_j.mjs → ngx-histaff-alpha-core-form-design.component-D6TrPmpG.mjs} +4 -4
- package/fesm2022/{ngx-histaff-alpha-core-form-design.component-BWdjH0_j.mjs.map → ngx-histaff-alpha-core-form-design.component-D6TrPmpG.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-0dbcfop9.mjs → ngx-histaff-alpha-core-sys-action.component-YqAEn6iz.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-sys-action.component-0dbcfop9.mjs.map → ngx-histaff-alpha-core-sys-action.component-YqAEn6iz.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DSkJCe1P.mjs → ngx-histaff-alpha-core-template-editor.component-CvJChUao.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-template-editor.component-DSkJCe1P.mjs.map → ngx-histaff-alpha-core-template-editor.component-CvJChUao.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-BAA0-x9x.mjs → ngx-histaff-alpha-core-toast-loading.component-DYxZA2xa.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-toast-loading.component-BAA0-x9x.mjs.map → ngx-histaff-alpha-core-toast-loading.component-DYxZA2xa.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-CSO45aXX.mjs → ngx-histaff-alpha-core-workflow-consume.component-K-_atwQM.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-core-workflow-consume.component-CSO45aXX.mjs.map → ngx-histaff-alpha-core-workflow-consume.component-K-_atwQM.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-BlPfMcNb.mjs → ngx-histaff-alpha-db-settings.component-D0JhoiHQ.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-db-settings.component-BlPfMcNb.mjs.map → ngx-histaff-alpha-db-settings.component-D0JhoiHQ.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.component-DjnCbdcf.mjs → ngx-histaff-alpha-design-wrapper.component-C7SJCccg.mjs} +131 -82
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-C7SJCccg.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-kxf1j0_8.mjs → ngx-histaff-alpha-design-wrapper.route-DVdapOzd.mjs} +5 -5
- package/fesm2022/{ngx-histaff-alpha-design-wrapper.route-kxf1j0_8.mjs.map → ngx-histaff-alpha-design-wrapper.route-DVdapOzd.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-D56qeUNM.mjs → ngx-histaff-alpha-hrm-schema.component-BTzEGNfX.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-hrm-schema.component-D56qeUNM.mjs.map → ngx-histaff-alpha-hrm-schema.component-BTzEGNfX.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-live-form.component-C-feoub0.mjs → ngx-histaff-alpha-live-form.component-CYB3NnkR.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-live-form.component-C-feoub0.mjs.map → ngx-histaff-alpha-live-form.component-CYB3NnkR.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-ngx-histaff-alpha-CQbwDcW4.mjs → ngx-histaff-alpha-ngx-histaff-alpha-BsbSArBq.mjs} +923 -327
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-BsbSArBq.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-D1k8Emdl.mjs → ngx-histaff-alpha-simple-chat.component-CWWWy9FV.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-simple-chat.component-D1k8Emdl.mjs.map → ngx-histaff-alpha-simple-chat.component-CWWWy9FV.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-sys-smtp-client-edit.component-CfzO29Lp.mjs → ngx-histaff-alpha-sys-smtp-client-edit.component-Cn1CYwCF.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-sys-smtp-client-edit.component-CfzO29Lp.mjs.map → ngx-histaff-alpha-sys-smtp-client-edit.component-Cn1CYwCF.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-sys-smtp-client.component-Bbcn4r1k.mjs → ngx-histaff-alpha-sys-smtp-client.component-CtRfWRoX.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-sys-smtp-client.component-Bbcn4r1k.mjs.map → ngx-histaff-alpha-sys-smtp-client.component-CtRfWRoX.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-template-list.component-z_4A9WFA.mjs → ngx-histaff-alpha-template-list.component-TYq8bPtG.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-template-list.component-z_4A9WFA.mjs.map → ngx-histaff-alpha-template-list.component-TYq8bPtG.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-BLW6Z-nb.mjs → ngx-histaff-alpha-tracker-studio.component-BEMXswAW.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-tracker-studio.component-BLW6Z-nb.mjs.map → ngx-histaff-alpha-tracker-studio.component-BEMXswAW.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-Snsq54lS.mjs → ngx-histaff-alpha-wf-form-assign.component-Bck-IKZX.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-form-assign.component-Snsq54lS.mjs.map → ngx-histaff-alpha-wf-form-assign.component-Bck-IKZX.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-global-config.component-uH0_6nrs.mjs → ngx-histaff-alpha-wf-global-config.component-DhTw3REl.mjs} +15 -5
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-DhTw3REl.mjs.map +1 -0
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-C5m-H34L.mjs → ngx-histaff-alpha-wf-instance-status.component-D-KD7Veu.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-instance-status.component-C5m-H34L.mjs.map → ngx-histaff-alpha-wf-instance-status.component-D-KD7Veu.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-instance-step-react.component-DyhxYZTO.mjs → ngx-histaff-alpha-wf-instance-step-react.component-DE5sJiVw.mjs} +3 -3
- package/fesm2022/{ngx-histaff-alpha-wf-instance-step-react.component-DyhxYZTO.mjs.map → ngx-histaff-alpha-wf-instance-step-react.component-DE5sJiVw.mjs.map} +1 -1
- package/fesm2022/{ngx-histaff-alpha-wf-lab.component-3-5CrqQX.mjs → ngx-histaff-alpha-wf-lab.component-DoFDdaIu.mjs} +2 -2
- package/fesm2022/{ngx-histaff-alpha-wf-lab.component-3-5CrqQX.mjs.map → ngx-histaff-alpha-wf-lab.component-DoFDdaIu.mjs.map} +1 -1
- package/fesm2022/ngx-histaff-alpha.mjs +1 -1
- package/lib/app/libraries/core-dom-decision-editor/core-dom-decision-editor.component.d.ts +3 -1
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/action-code.enum.d.ts +1 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/intent-descriptor.model.d.ts +21 -2
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/intent-draft.model.d.ts +4 -2
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/omega-decision.d.ts +6 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/omega-intent.d.ts +7 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/others.d.ts +10 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/r-code.enum.d.ts +15 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/CREATE_O.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/CREATE_S.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/CREATE_TREE.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/DECLARE_SNAPSHOT.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/LINK_O_O.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/LINK_P_S_INTERNAL.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/LINK_S_O.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/LINK_S_S.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SET_O_ATTR.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SET_P_ATTR.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SET_S_ATTR.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SHORTEN_O_O.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SHORTEN_S_O.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/enum-interfaces/registries/SHORTEN_S_S.d.ts +2 -0
- package/lib/app/libraries/core-dom-decision-editor/intent-composer/intent-composer.component.d.ts +8 -4
- package/lib/app/libraries/core-form/core-form/enum-interfaces.d.ts +4 -0
- package/lib/app/libraries/core-form/core-form-array/core-form-array.component.d.ts +21 -2
- package/lib/app/libraries/core-form-design/core-form-design.component.d.ts +1 -1
- package/lib/app/libraries/core-form-design/core-form-group-editor.component.d.ts +1 -1
- package/lib/app/libraries/core-rule-set/core-rule-set.component.d.ts +7 -0
- package/lib/app/libraries/core-table/EnumCoreTablePipeType.d.ts +2 -1
- package/lib/app/libraries/core-timezone/core-timezone.component.d.ts +15 -0
- package/lib/app/libraries/core-tree-reference/core-tree-reference.component.d.ts +12 -0
- package/lib/app/libraries/core-tree-reference/core-tree-reference.node.d.ts +6 -0
- package/lib/app/libraries/core-tree-reference/moke.data.d.ts +2 -0
- package/lib/app/libraries/core-workflow-builder/core-workflow.service.d.ts +0 -11
- package/lib/app/libraries/core-workflow-builder/interfaces/IUiDelegation.d.ts +1 -0
- package/lib/app/libraries/core-workflow-builder/wf-delegation/wf-delegation.component.d.ts +5 -0
- package/lib/app/services/app-config.service.d.ts +1 -0
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
- package/fesm2022/ngx-histaff-alpha-design-wrapper.component-DjnCbdcf.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-ngx-histaff-alpha-CQbwDcW4.mjs.map +0 -1
- package/fesm2022/ngx-histaff-alpha-wf-global-config.component-uH0_6nrs.mjs.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Component, Injector, runInInjectionContext, effect, Input, ChangeDetectionStrategy, EventEmitter, ElementRef, ViewChild, Output, Renderer2, output, computed, signal, viewChild, ChangeDetectorRef, Injectable, Directive, Pipe, ViewChildren } from '@angular/core';
|
|
3
|
-
import { B as BaseComponent, n as CoreWorkflowService, y as CoreFormDesignService, b as AlertService, z as EnumWorkflowStepType, w as alertOptions, E as EnumFormBaseContolType, M as MultiLanguageService, T as TooltipDirective, e as TranslatePipe, h as BaseEditComponent, i as DialogService, A as AppService, j as CorePageEditComponent, F as FullscreenModalLoaderComponent, G as DomService, o as EnumCoreFormControlSeekerSourceType, H as EnumActorSourceType, J as CoreParamControlComponent, K as CoreRadioGroupComponent, L as GptService, N as CoreRuleTreeService, O as CoreRuleTreeComponent, P as CoreStickerCollectionComponent, Q as ApplicationHelpService, R as HotKeysDirective, U as CoreDatetimeService, p as CoreFormService, V as EnumCorePageEditMode, W as CoreFormComponent, X as NavigatorService, Y as JsonService } from './ngx-histaff-alpha-ngx-histaff-alpha-
|
|
3
|
+
import { B as BaseComponent, n as CoreWorkflowService, y as CoreFormDesignService, b as AlertService, z as EnumWorkflowStepType, w as alertOptions, E as EnumFormBaseContolType, M as MultiLanguageService, T as TooltipDirective, e as TranslatePipe, h as BaseEditComponent, i as DialogService, A as AppService, j as CorePageEditComponent, F as FullscreenModalLoaderComponent, G as DomService, o as EnumCoreFormControlSeekerSourceType, H as EnumActorSourceType, J as CoreParamControlComponent, K as CoreRadioGroupComponent, L as GptService, N as CoreRuleTreeService, O as CoreRuleTreeComponent, P as CoreStickerCollectionComponent, Q as ApplicationHelpService, R as HotKeysDirective, U as CoreDatetimeService, a as AppConfigService, p as CoreFormService, k as EnumCoreTablePipeType, V as EnumCorePageEditMode, W as CoreFormComponent, X as NavigatorService, Y as JsonService } from './ngx-histaff-alpha-ngx-histaff-alpha-BsbSArBq.mjs';
|
|
4
4
|
import * as i1$1 from '@angular/router';
|
|
5
5
|
import { Router, ActivatedRoute, RouterOutlet } from '@angular/router';
|
|
6
6
|
import { catchError, of, BehaviorSubject, distinctUntilChanged } from 'rxjs';
|
|
7
7
|
import { EnumTranslateKey } from 'alpha-global-constants';
|
|
8
|
-
import { AsyncPipe, LowerCasePipe, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
8
|
+
import { AsyncPipe, LowerCasePipe, NgStyle, NgTemplateOutlet, JsonPipe } from '@angular/common';
|
|
9
9
|
import * as i1 from '@angular/forms';
|
|
10
10
|
import { Validators, FormsModule } from '@angular/forms';
|
|
11
|
-
import { CoreFormDesignComponent } from './ngx-histaff-alpha-core-form-design.component-
|
|
11
|
+
import { CoreFormDesignComponent } from './ngx-histaff-alpha-core-form-design.component-D6TrPmpG.mjs';
|
|
12
12
|
import { HttpClient } from '@angular/common/http';
|
|
13
|
-
import { C as CoreToastLoadingComponent } from './ngx-histaff-alpha-core-toast-loading.component-
|
|
14
|
-
import { R as RoutingPreviewPanelComponent } from './ngx-histaff-alpha-live-form.component-
|
|
13
|
+
import { C as CoreToastLoadingComponent } from './ngx-histaff-alpha-core-toast-loading.component-DYxZA2xa.mjs';
|
|
14
|
+
import { R as RoutingPreviewPanelComponent } from './ngx-histaff-alpha-live-form.component-CYB3NnkR.mjs';
|
|
15
15
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
16
16
|
|
|
17
17
|
class CurrentHeaderComponent extends BaseComponent {
|
|
@@ -32,6 +32,7 @@ class CurrentHeaderComponent extends BaseComponent {
|
|
|
32
32
|
{ index: 4, label: 'Delegation', changed: this.wfs.$processDesignChanged, onClick: () => this.goToDelegation() },
|
|
33
33
|
{ index: 5, label: 'Email Templates', changed: this.wfs.$moreChanged, onClick: () => this.goToEmailTemplates() }
|
|
34
34
|
];
|
|
35
|
+
//this.wfs.$delegationFinalPayload.set(null);
|
|
35
36
|
}
|
|
36
37
|
findStepMissingFallback(steps) {
|
|
37
38
|
for (const step of steps) {
|
|
@@ -118,14 +119,14 @@ class CurrentHeaderComponent extends BaseComponent {
|
|
|
118
119
|
this.wfs.$currentFlow.update(flow => {
|
|
119
120
|
if (flow) {
|
|
120
121
|
flow.afInstanceDTO = afInstanceDTO;
|
|
121
|
-
const rawDelegation = this.wfs
|
|
122
|
-
rawDelegation
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
});
|
|
128
|
-
flow.delegationJson = JSON.stringify(rawDelegation);
|
|
122
|
+
//const rawDelegation: IUiDelegation | null = this.wfs.$delegationFinalPayload();
|
|
123
|
+
// rawDelegation?.delegationRows
|
|
124
|
+
// ?.filter(x => !x.delegationId)
|
|
125
|
+
// .forEach(row => {
|
|
126
|
+
// row.vfUtc = this.normalizeToStartOfDay(row.vfUtc);
|
|
127
|
+
// row.vtUtc = this.normalizeToStartOfDay(row.vtUtc);
|
|
128
|
+
// });
|
|
129
|
+
// flow.delegationJson = JSON.stringify(rawDelegation);
|
|
129
130
|
const templates = this.wfs.emailTemplatesForm.getRawValue();
|
|
130
131
|
const { submitSubject, submitBody, reactSubject, reactBody, fullyApproveSubject, fullyApproveBody, rejectSubject, rejectBody, cancelSubject, cancelBody, terminateSubject, terminateBody, revokeSubject, revokeBody, ccSubject, ccBody } = templates;
|
|
131
132
|
flow.submitSubject = submitSubject;
|
|
@@ -1885,6 +1886,7 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1885
1886
|
this.cdr = inject(ChangeDetectorRef);
|
|
1886
1887
|
this.cdts = inject(CoreDatetimeService);
|
|
1887
1888
|
this.appService = inject(AppService);
|
|
1889
|
+
this.acs = inject(AppConfigService);
|
|
1888
1890
|
this.timezoneOptions$ = new BehaviorSubject([]);
|
|
1889
1891
|
this.injector = inject(Injector);
|
|
1890
1892
|
this.cfs = inject(CoreFormService);
|
|
@@ -1893,6 +1895,9 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1893
1895
|
this.loading = false;
|
|
1894
1896
|
this.entityTable = "WF_WORKFLOW";
|
|
1895
1897
|
this.subscriptions = [];
|
|
1898
|
+
//Angular rule (rất quan trọng)
|
|
1899
|
+
//form.value KHÔNG bao gồm disabled controls
|
|
1900
|
+
//form.getRawValue() MỚI bao gồm disabled controls
|
|
1896
1901
|
this.sections = [
|
|
1897
1902
|
{
|
|
1898
1903
|
rows: [
|
|
@@ -1912,9 +1917,24 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1912
1917
|
value: [],
|
|
1913
1918
|
controlType: EnumFormBaseContolType.FORM_ARRAY,
|
|
1914
1919
|
type: 'object',
|
|
1920
|
+
removeDisabledIf: {
|
|
1921
|
+
field: 'lastUsedAtUtc',
|
|
1922
|
+
notNull: true
|
|
1923
|
+
},
|
|
1924
|
+
removeDisabledIfMessage: 'This delegation has been used and cannot be removed.',
|
|
1925
|
+
formArrayIdentityField: 'delegationId',
|
|
1915
1926
|
formArraySections: [
|
|
1916
1927
|
{
|
|
1917
1928
|
rows: [
|
|
1929
|
+
[
|
|
1930
|
+
{
|
|
1931
|
+
field: 'conditionJson',
|
|
1932
|
+
label: 'Condition',
|
|
1933
|
+
value: "",
|
|
1934
|
+
flexSize: 4,
|
|
1935
|
+
controlType: EnumFormBaseContolType.RULE_SET,
|
|
1936
|
+
},
|
|
1937
|
+
],
|
|
1918
1938
|
[
|
|
1919
1939
|
{
|
|
1920
1940
|
field: 'delegationId',
|
|
@@ -1923,7 +1943,16 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1923
1943
|
flexSize: 0,
|
|
1924
1944
|
controlType: EnumFormBaseContolType.TEXTBOX,
|
|
1925
1945
|
hidden: true,
|
|
1926
|
-
disabled: true
|
|
1946
|
+
//disabled: true
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
field: 'formArrayItemDeleted',
|
|
1950
|
+
label: 'FormArrayItemDeleted',
|
|
1951
|
+
value: false,
|
|
1952
|
+
flexSize: 0,
|
|
1953
|
+
controlType: EnumFormBaseContolType.CHECKBOX,
|
|
1954
|
+
hidden: true,
|
|
1955
|
+
//disabled: true
|
|
1927
1956
|
},
|
|
1928
1957
|
{
|
|
1929
1958
|
field: 'lastUsedAtUtc',
|
|
@@ -1932,8 +1961,10 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1932
1961
|
flexSize: 0,
|
|
1933
1962
|
controlType: EnumFormBaseContolType.TEXTBOX,
|
|
1934
1963
|
hidden: true,
|
|
1935
|
-
disabled: true
|
|
1964
|
+
//disabled: true
|
|
1936
1965
|
},
|
|
1966
|
+
],
|
|
1967
|
+
[
|
|
1937
1968
|
{
|
|
1938
1969
|
field: 'fromPositionId',
|
|
1939
1970
|
label: 'From position',
|
|
@@ -1941,13 +1972,19 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1941
1972
|
shownFrom: 'name',
|
|
1942
1973
|
seekerVerifyIgnore: true,
|
|
1943
1974
|
value: null,
|
|
1944
|
-
flexSize:
|
|
1975
|
+
flexSize: 6,
|
|
1945
1976
|
controlType: EnumFormBaseContolType.SEEKER,
|
|
1946
1977
|
seekerSourceType: EnumCoreFormControlSeekerSourceType.POSITION_SEEK,
|
|
1947
1978
|
selfEnrichmentApiDriven: true,
|
|
1948
1979
|
selfEnrichmentApi: '/api/BaseHuPosition/GetById',
|
|
1949
1980
|
selfEnrichmentHttpVerb: 'HttpGet',
|
|
1950
1981
|
selfEnrichmentShownFrom: 'name',
|
|
1982
|
+
alsoBindTo: [
|
|
1983
|
+
{
|
|
1984
|
+
takeFrom: 'masterName',
|
|
1985
|
+
bindTo: 'fromPositionHolder'
|
|
1986
|
+
}
|
|
1987
|
+
],
|
|
1951
1988
|
validators: [
|
|
1952
1989
|
{
|
|
1953
1990
|
name: 'required',
|
|
@@ -1956,6 +1993,17 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1956
1993
|
}
|
|
1957
1994
|
]
|
|
1958
1995
|
},
|
|
1996
|
+
{
|
|
1997
|
+
field: 'fromPositionHolder',
|
|
1998
|
+
label: '',
|
|
1999
|
+
value: '',
|
|
2000
|
+
flexSize: 6,
|
|
2001
|
+
disabled: true,
|
|
2002
|
+
pipe: EnumCoreTablePipeType.UNDEFINED_TO_EMPTY_STRING,
|
|
2003
|
+
controlType: EnumFormBaseContolType.TEXTBOX,
|
|
2004
|
+
},
|
|
2005
|
+
],
|
|
2006
|
+
[
|
|
1959
2007
|
{
|
|
1960
2008
|
field: 'toPositionId',
|
|
1961
2009
|
label: 'To position',
|
|
@@ -1963,13 +2011,19 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1963
2011
|
shownFrom: 'name',
|
|
1964
2012
|
seekerVerifyIgnore: true,
|
|
1965
2013
|
value: null,
|
|
1966
|
-
flexSize:
|
|
2014
|
+
flexSize: 6,
|
|
1967
2015
|
controlType: EnumFormBaseContolType.SEEKER,
|
|
1968
2016
|
seekerSourceType: EnumCoreFormControlSeekerSourceType.POSITION_SEEK,
|
|
1969
2017
|
selfEnrichmentApiDriven: true,
|
|
1970
2018
|
selfEnrichmentApi: '/api/BaseHuPosition/GetById',
|
|
1971
2019
|
selfEnrichmentHttpVerb: 'HttpGet',
|
|
1972
2020
|
selfEnrichmentShownFrom: 'name',
|
|
2021
|
+
alsoBindTo: [
|
|
2022
|
+
{
|
|
2023
|
+
takeFrom: 'masterName',
|
|
2024
|
+
bindTo: 'toPositionHolder'
|
|
2025
|
+
}
|
|
2026
|
+
],
|
|
1973
2027
|
validators: [
|
|
1974
2028
|
{
|
|
1975
2029
|
name: 'required',
|
|
@@ -1979,17 +2033,21 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
1979
2033
|
]
|
|
1980
2034
|
},
|
|
1981
2035
|
{
|
|
1982
|
-
field: '
|
|
1983
|
-
label: '
|
|
1984
|
-
value:
|
|
1985
|
-
flexSize:
|
|
1986
|
-
|
|
2036
|
+
field: 'toPositionHolder',
|
|
2037
|
+
label: '',
|
|
2038
|
+
value: '',
|
|
2039
|
+
flexSize: 6,
|
|
2040
|
+
disabled: true,
|
|
2041
|
+
pipe: EnumCoreTablePipeType.UNDEFINED_TO_EMPTY_STRING,
|
|
2042
|
+
controlType: EnumFormBaseContolType.TEXTBOX,
|
|
1987
2043
|
},
|
|
2044
|
+
],
|
|
2045
|
+
[
|
|
1988
2046
|
{
|
|
1989
2047
|
field: 'vfUtc',
|
|
1990
2048
|
label: 'Valid from',
|
|
1991
2049
|
value: null,
|
|
1992
|
-
flexSize:
|
|
2050
|
+
flexSize: 4,
|
|
1993
2051
|
controlType: EnumFormBaseContolType.DATEPICKER,
|
|
1994
2052
|
validators: [
|
|
1995
2053
|
{
|
|
@@ -2002,15 +2060,22 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
2002
2060
|
{
|
|
2003
2061
|
field: 'vtUtc',
|
|
2004
2062
|
label: 'Valid to (not included)',
|
|
2005
|
-
value:
|
|
2006
|
-
flexSize:
|
|
2063
|
+
value: new Date(9999, 11, 31),
|
|
2064
|
+
flexSize: 4,
|
|
2007
2065
|
controlType: EnumFormBaseContolType.DATEPICKER,
|
|
2066
|
+
validators: [
|
|
2067
|
+
{
|
|
2068
|
+
name: 'required',
|
|
2069
|
+
validator: Validators.required,
|
|
2070
|
+
errorMessage: EnumTranslateKey.UI_FORM_CONTROL_ERROR_REQUIRED
|
|
2071
|
+
}
|
|
2072
|
+
]
|
|
2008
2073
|
},
|
|
2009
2074
|
{
|
|
2010
2075
|
field: 'timezoneId',
|
|
2011
2076
|
label: 'Timezone',
|
|
2012
|
-
value: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2013
|
-
flexSize:
|
|
2077
|
+
value: this.acs.DEFAULT_IANA_TIMEZONE_ID ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2078
|
+
flexSize: 4,
|
|
2014
2079
|
controlType: EnumFormBaseContolType.DROPDOWN,
|
|
2015
2080
|
dropdownOptions$: this.timezoneOptions$,
|
|
2016
2081
|
getByIdObject$: new BehaviorSubject({}),
|
|
@@ -2041,17 +2106,6 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
2041
2106
|
u: '/api/WfWorkflow/Update',
|
|
2042
2107
|
d: '/api/WfWorkflow/Delete',
|
|
2043
2108
|
};
|
|
2044
|
-
// const groupIdString = this.route.snapshot.queryParamMap.get('groupId');
|
|
2045
|
-
// if (!!groupIdString) {
|
|
2046
|
-
// const groupId = Number(groupIdString);
|
|
2047
|
-
// if (this.wfs.$allGroups().length) {
|
|
2048
|
-
// this.wfs.$currentGroup.set(this.wfs.$allGroups().filter(g => g.id === groupId)[0])
|
|
2049
|
-
// } else {
|
|
2050
|
-
// //this.wfs.refresh('/api/WfWorkflowGroup/GetAllWithWorkflows', '', groupId);
|
|
2051
|
-
// }
|
|
2052
|
-
// } else if (this.wfs.$designActiveTab() === 1) {
|
|
2053
|
-
// this.alertService.warn("The Query Params lack of groupId", alertOptions);
|
|
2054
|
-
// }
|
|
2055
2109
|
effect(() => {
|
|
2056
2110
|
const tzs = this.cdts.$timeZones();
|
|
2057
2111
|
const ops = [];
|
|
@@ -2067,47 +2121,12 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
2067
2121
|
setTimeout(() => {
|
|
2068
2122
|
});
|
|
2069
2123
|
}
|
|
2070
|
-
// private updateCurrentFlow(values: any) {
|
|
2071
|
-
// if (!values) return;
|
|
2072
|
-
// this.wfs.$currentFlow.update(currentFlow => {
|
|
2073
|
-
// if (!currentFlow) {
|
|
2074
|
-
// return null
|
|
2075
|
-
// } else {
|
|
2076
|
-
// Object.keys(values).forEach((key: string) => {
|
|
2077
|
-
// (currentFlow as any)[key] = values[key]
|
|
2078
|
-
// })
|
|
2079
|
-
// return { ...currentFlow }
|
|
2080
|
-
// }
|
|
2081
|
-
// })
|
|
2082
|
-
// }
|
|
2083
|
-
// private updateCurrentFlowByKey(key: string, value: any) {
|
|
2084
|
-
// this.wfs.$currentFlow.update(currentFlow => {
|
|
2085
|
-
// if (!currentFlow) {
|
|
2086
|
-
// return null
|
|
2087
|
-
// } else {
|
|
2088
|
-
// (currentFlow as any)[key] = value
|
|
2089
|
-
// return { ...currentFlow }
|
|
2090
|
-
// }
|
|
2091
|
-
// })
|
|
2092
|
-
// }
|
|
2093
|
-
// private updateCurrentAfInstance(formValue: any): void {
|
|
2094
|
-
// console.log("[WfBasicInfoComponent][updateCurrentAfInstance]: $afInstance is being updated");
|
|
2095
|
-
// this.fds.$afInstance.update(current => {
|
|
2096
|
-
// if (!current) return current;
|
|
2097
|
-
// return {
|
|
2098
|
-
// ...current,
|
|
2099
|
-
// name: formValue.name,
|
|
2100
|
-
// code: formValue.code
|
|
2101
|
-
// };
|
|
2102
|
-
// });
|
|
2103
|
-
// }
|
|
2104
2124
|
onFormCreated(e) {
|
|
2105
2125
|
this.wfs.delegationForm = e;
|
|
2106
|
-
e.valueChanges.subscribe(
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
});
|
|
2126
|
+
this.subscriptions.push(e.valueChanges.subscribe((current) => {
|
|
2127
|
+
// Debug / preview (giữ nguyên nếu anh cần)
|
|
2128
|
+
this.wfs.$currentDelegationJson.set(JSON.stringify(current));
|
|
2129
|
+
}));
|
|
2111
2130
|
runInInjectionContext(this.injector, () => {
|
|
2112
2131
|
effect(() => {
|
|
2113
2132
|
const form = this.wfs.delegationForm;
|
|
@@ -2123,14 +2142,42 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
2123
2142
|
this.formInitStringValue = e;
|
|
2124
2143
|
}
|
|
2125
2144
|
onSubmitSuccess(e) {
|
|
2126
|
-
//this.wfs.refresh(undefined, '');
|
|
2127
2145
|
this.router.navigate([{ outlets: { workflowAux: null } }], { relativeTo: this.route.parent });
|
|
2128
2146
|
}
|
|
2129
2147
|
onGotById(e) {
|
|
2130
|
-
//this.wfs.emailTemplatesForm.patchValue(e);
|
|
2131
2148
|
if (e.uiDelegation) {
|
|
2132
2149
|
this.cfs.syncAllFormArraysBeforePatch(this.wfs.delegationForm, e.uiDelegation);
|
|
2133
2150
|
this.wfs.delegationForm.patchValue(e.uiDelegation);
|
|
2151
|
+
queueMicrotask(() => {
|
|
2152
|
+
this.wfs.delegationForm
|
|
2153
|
+
.get('delegationRows')
|
|
2154
|
+
?.value?.forEach((_, i) => {
|
|
2155
|
+
const group = this.wfs.delegationForm
|
|
2156
|
+
.get('delegationRows')
|
|
2157
|
+
?.get(i.toString());
|
|
2158
|
+
if (group) {
|
|
2159
|
+
this.disableRowExceptVT(group);
|
|
2160
|
+
}
|
|
2161
|
+
});
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
disableRowExceptVT(group) {
|
|
2166
|
+
const lastUsedAt = group.get('lastUsedAtUtc')?.value;
|
|
2167
|
+
if (lastUsedAt != null) {
|
|
2168
|
+
Object.keys(group.controls).forEach(key => {
|
|
2169
|
+
if (key === 'vtUtc') {
|
|
2170
|
+
group.get(key)?.enable({ emitEvent: false });
|
|
2171
|
+
}
|
|
2172
|
+
else {
|
|
2173
|
+
group.get(key)?.disable({ emitEvent: false });
|
|
2174
|
+
}
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
else {
|
|
2178
|
+
Object.keys(group.controls).forEach(key => {
|
|
2179
|
+
group.get(key)?.enable({ emitEvent: false });
|
|
2180
|
+
});
|
|
2134
2181
|
}
|
|
2135
2182
|
}
|
|
2136
2183
|
ngOnDestroy() {
|
|
@@ -2138,21 +2185,23 @@ class WfDelegationComponent extends BaseEditComponent {
|
|
|
2138
2185
|
this.subscriptions.map(x => x?.unsubscribe());
|
|
2139
2186
|
}
|
|
2140
2187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WfDelegationComponent, deps: [{ token: DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: WfDelegationComponent, isStandalone: true, selector: "wf-delegation", usesInheritance: true, ngImport: i0, template: "<div class=\"wf-delegation-container\">\r\n\r\n <div class=\"container container-fluid\">\r\n\r\n <core-page-edit\r\n [normalMode]=\"true\"\r\n [captionCode]=\"''\"\r\n [sections]=\"sections\" [crud]=\"crud\" [entityTable]=\"entityTable\" [hasIdOfStringType]=\"true\"\r\n [stayAfterSubmit]=\"true\" (onFormCreated)=\"onFormCreated($event)\"\r\n [idAsInput]=\"true\"\r\n [id]=\"wfs.$currentFlow()?.id\"\r\n [hideButtons]=\"true\"\r\n [checkError$]=\"wfs.basicInfoFormCheckError$\"\r\n (onGotById)=\"onGotById($event)\"\r\n (onInitialValueStringReady)=\"onFormReinit($event)\"\r\n (onSubmitSuccess)=\"onSubmitSuccess($event)\">\r\n </core-page-edit>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n@if (loading) {\r\n<app-fullscreen-modal-loader></app-fullscreen-modal-loader>\r\n}", styles: [""], dependencies: [{ kind: "component", type: CorePageEditComponent, selector: "core-page-edit", inputs: ["stayAfterSubmit", "width", "entityTable", "hasIdOfStringType", "captionCode", "leftInputSections", "leftInputSectionsFlexSize", "sections", "normalMode", "bottomTemplateRef", "autoGetByIdOff", "autoSubmitLogicOff", "autoCancelLogicOff", "customFormButtonItems", "mixedMode", "checkError$", "showSaveButton", "disableSaveButton", "disableCancelButton", "forceListRefreshOnCreateOrUpdate", "wrapEachSectionInAccordion", "gridMode", "crud", "entityUniqueIndexs", "idAsInput", "id", "hideButtons"], outputs: ["submitLogic", "onFormCreated", "onSubmitSuccess", "onButtonClick", "cancelLogic", "onGotById", "onInitialValueStringReady"] }] }); }
|
|
2188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: WfDelegationComponent, isStandalone: true, selector: "wf-delegation", usesInheritance: true, ngImport: i0, template: "<div class=\"wf-delegation-container\">\r\n\r\n <div class=\"container container-fluid\">\r\n\r\n <core-page-edit\r\n [normalMode]=\"true\"\r\n [captionCode]=\"''\"\r\n [sections]=\"sections\" [crud]=\"crud\" [entityTable]=\"entityTable\" [hasIdOfStringType]=\"true\"\r\n [stayAfterSubmit]=\"true\" (onFormCreated)=\"onFormCreated($event)\"\r\n [idAsInput]=\"true\"\r\n [id]=\"wfs.$currentFlow()?.id\"\r\n [hideButtons]=\"true\"\r\n [checkError$]=\"wfs.basicInfoFormCheckError$\"\r\n (onGotById)=\"onGotById($event)\"\r\n (onInitialValueStringReady)=\"onFormReinit($event)\"\r\n (onSubmitSuccess)=\"onSubmitSuccess($event)\">\r\n </core-page-edit>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n@if (loading) {\r\n<app-fullscreen-modal-loader></app-fullscreen-modal-loader>\r\n}", styles: [""], dependencies: [{ kind: "component", type: CorePageEditComponent, selector: "core-page-edit", inputs: ["stayAfterSubmit", "width", "entityTable", "hasIdOfStringType", "captionCode", "leftInputSections", "leftInputSectionsFlexSize", "sections", "normalMode", "bottomTemplateRef", "autoGetByIdOff", "autoSubmitLogicOff", "autoCancelLogicOff", "customFormButtonItems", "mixedMode", "checkError$", "showSaveButton", "disableSaveButton", "disableCancelButton", "forceListRefreshOnCreateOrUpdate", "wrapEachSectionInAccordion", "gridMode", "crud", "entityUniqueIndexs", "idAsInput", "id", "hideButtons"], outputs: ["submitLogic", "onFormCreated", "onSubmitSuccess", "onButtonClick", "cancelLogic", "onGotById", "onInitialValueStringReady"] }] }); }
|
|
2142
2189
|
}
|
|
2143
2190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: WfDelegationComponent, decorators: [{
|
|
2144
2191
|
type: Component,
|
|
2145
2192
|
args: [{ selector: 'wf-delegation', imports: [
|
|
2146
2193
|
CorePageEditComponent,
|
|
2147
2194
|
NgTemplateOutlet,
|
|
2195
|
+
JsonPipe,
|
|
2148
2196
|
CoreRuleTreeComponent
|
|
2149
|
-
], template: "<div class=\"wf-delegation-container\">\r\n\r\n <div class=\"container container-fluid\">\r\n\r\n <core-page-edit\r\n [normalMode]=\"true\"\r\n [captionCode]=\"''\"\r\n [sections]=\"sections\" [crud]=\"crud\" [entityTable]=\"entityTable\" [hasIdOfStringType]=\"true\"\r\n [stayAfterSubmit]=\"true\" (onFormCreated)=\"onFormCreated($event)\"\r\n [idAsInput]=\"true\"\r\n [id]=\"wfs.$currentFlow()?.id\"\r\n [hideButtons]=\"true\"\r\n [checkError$]=\"wfs.basicInfoFormCheckError$\"\r\n (onGotById)=\"onGotById($event)\"\r\n (onInitialValueStringReady)=\"onFormReinit($event)\"\r\n (onSubmitSuccess)=\"onSubmitSuccess($event)\">\r\n </core-page-edit>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n@if (loading) {\r\n<app-fullscreen-modal-loader></app-fullscreen-modal-loader>\r\n}" }]
|
|
2197
|
+
], template: "<div class=\"wf-delegation-container\">\r\n\r\n <div class=\"container container-fluid\">\r\n\r\n <core-page-edit\r\n [normalMode]=\"true\"\r\n [captionCode]=\"''\"\r\n [sections]=\"sections\" [crud]=\"crud\" [entityTable]=\"entityTable\" [hasIdOfStringType]=\"true\"\r\n [stayAfterSubmit]=\"true\" (onFormCreated)=\"onFormCreated($event)\"\r\n [idAsInput]=\"true\"\r\n [id]=\"wfs.$currentFlow()?.id\"\r\n [hideButtons]=\"true\"\r\n [checkError$]=\"wfs.basicInfoFormCheckError$\"\r\n (onGotById)=\"onGotById($event)\"\r\n (onInitialValueStringReady)=\"onFormReinit($event)\"\r\n (onSubmitSuccess)=\"onSubmitSuccess($event)\">\r\n </core-page-edit>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n\r\n@if (loading) {\r\n<app-fullscreen-modal-loader></app-fullscreen-modal-loader>\r\n}" }]
|
|
2150
2198
|
}], ctorParameters: () => [{ type: DialogService }] });
|
|
2151
2199
|
|
|
2152
2200
|
const EMAIL_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>';
|
|
2153
2201
|
const TEMPLATE_TYPES = [
|
|
2154
2202
|
{ key: 'submit', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_SUBMIT' },
|
|
2155
2203
|
{ key: 'react', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_REACT' },
|
|
2204
|
+
{ key: 'delegatedReact', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_DELEGATED_REACT' },
|
|
2156
2205
|
{ key: 'selfReact', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_SELF_REACT' },
|
|
2157
2206
|
{ key: 'fullyApprove', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_FULLY_APPROVE' },
|
|
2158
2207
|
{ key: 'reject', caption: 'UI_WORKFLOW_EMAIL_TEMPLATE_SECTION_REJECT' },
|
|
@@ -2386,4 +2435,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2386
2435
|
}], ctorParameters: () => [] });
|
|
2387
2436
|
|
|
2388
2437
|
export { DesignWrapperComponent };
|
|
2389
|
-
//# sourceMappingURL=ngx-histaff-alpha-design-wrapper.component-
|
|
2438
|
+
//# sourceMappingURL=ngx-histaff-alpha-design-wrapper.component-C7SJCccg.mjs.map
|