nuxeo-development-framework 3.3.6 → 3.3.8
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/nuxeo-development-framework.umd.js +746 -746
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/Core/services/roles/roles.service.js +13 -17
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.js +7 -3
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.js +4 -9
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-textitem/dynamic-form-textitem.component.js +2 -2
- package/esm2015/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.js +18 -11
- package/esm2015/lib/components/filter/filter/filter.component.js +1 -1
- package/esm2015/lib/components/select-users-by-department/select-users-by-departments/select-users-by-departments.component.js +1 -1
- package/esm2015/lib/nuxeo-development-framework.module.js +2 -2
- package/esm2015/lib/shared-services/global-admin.service.js +5 -7
- package/fesm2015/nuxeo-development-framework.js +212 -212
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/Core/services/roles/roles.service.d.ts +2 -8
- package/lib/components/dynamic-form/components/dynamic-form-department/dynamic-form-department.component.d.ts +3 -1
- package/lib/components/dynamic-form/components/dynamic-form-department/services/department-api.service.d.ts +1 -1
- package/lib/components/dynamic-form/components/dynamic-form-treeview-select/dropdown-treeview-select.component.d.ts +3 -1
- package/lib/shared-services/global-admin.service.d.ts +1 -3
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import { ToastrModule, Toast } from 'ngx-toastr';
|
|
|
18
18
|
import * as i1$2 from 'ngx-treeview';
|
|
19
19
|
import { TreeviewModule, TreeviewItem, DefaultTreeviewI18n, TreeviewConfig, TreeviewHelper, TreeviewI18n, DropdownTreeviewComponent } from 'ngx-treeview';
|
|
20
20
|
import { ReplaySubject, combineLatest, throwError, of, Observable, forkJoin, BehaviorSubject, from, Subject, concat, EMPTY } from 'rxjs';
|
|
21
|
-
import { map, retry, catchError, distinctUntilChanged,
|
|
21
|
+
import { map, retry, catchError, distinctUntilChanged, takeUntil, first, take, debounceTime, tap, switchMap, publishReplay, refCount, mergeMap, toArray, expand, delay, reduce } from 'rxjs/operators';
|
|
22
22
|
import { __awaiter, __decorate } from 'tslib';
|
|
23
23
|
import * as i2$1 from '@angular/platform-browser';
|
|
24
24
|
import { BrowserTransferStateModule } from '@angular/platform-browser';
|
|
@@ -680,177 +680,11 @@ class NuxeoOverride$1 extends Nuxeo$1 {
|
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
class EvaluatorsService {
|
|
684
|
-
constructor(nuxeoService, appConfigService) {
|
|
685
|
-
this.nuxeoService = nuxeoService;
|
|
686
|
-
this.appConfigService = appConfigService;
|
|
687
|
-
this.context = { entity: null, getEvaluator: null, user: null };
|
|
688
|
-
this.asyncEvery = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
689
|
-
for (let e of arr) {
|
|
690
|
-
if (!(yield predicate(e))) {
|
|
691
|
-
return false;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
return true;
|
|
695
|
-
});
|
|
696
|
-
this.asyncSome = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
697
|
-
for (let e of arr) {
|
|
698
|
-
if (yield predicate(e)) {
|
|
699
|
-
return true;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
return false;
|
|
703
|
-
});
|
|
704
|
-
// tslint:disable-next-line:member-ordering
|
|
705
|
-
this.evaluators = {
|
|
706
|
-
AND: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
707
|
-
if (!args || args.length === 0) {
|
|
708
|
-
return false;
|
|
709
|
-
}
|
|
710
|
-
return yield this.asyncEvery(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
711
|
-
const evaluator = yield context.getEvaluator(arg.value);
|
|
712
|
-
if (!evaluator) {
|
|
713
|
-
console.warn("evaluator not found: " + arg.value);
|
|
714
|
-
return false;
|
|
715
|
-
}
|
|
716
|
-
return yield evaluator(context, arg.parameters || []);
|
|
717
|
-
}));
|
|
718
|
-
}),
|
|
719
|
-
OR: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
720
|
-
if (!args || args.length === 0) {
|
|
721
|
-
return false;
|
|
722
|
-
}
|
|
723
|
-
return yield this.asyncSome(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
724
|
-
const evaluator = yield context.getEvaluator(arg.value);
|
|
725
|
-
if (!evaluator) {
|
|
726
|
-
console.warn("evaluator not found: " + arg.value);
|
|
727
|
-
return false;
|
|
728
|
-
}
|
|
729
|
-
const res = yield evaluator(context, arg.parameters || []);
|
|
730
|
-
return res;
|
|
731
|
-
}));
|
|
732
|
-
}),
|
|
733
|
-
isStatus: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
734
|
-
if (args.indexOf(context.entity.state) > -1) {
|
|
735
|
-
return true;
|
|
736
|
-
}
|
|
737
|
-
else {
|
|
738
|
-
return false;
|
|
739
|
-
}
|
|
740
|
-
}),
|
|
741
|
-
isCreator: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
742
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
743
|
-
//check if user loged in is the creator of that corresp
|
|
744
|
-
let owner;
|
|
745
|
-
if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
|
|
746
|
-
owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
|
|
747
|
-
}
|
|
748
|
-
else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
|
|
749
|
-
owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
|
|
750
|
-
}
|
|
751
|
-
else if (context.entity.properties.owner) {
|
|
752
|
-
owner = context.entity.properties.owner;
|
|
753
|
-
}
|
|
754
|
-
else if (context.entity.properties["corr:owner"]) {
|
|
755
|
-
owner = context.entity.properties["corr:owner"];
|
|
756
|
-
}
|
|
757
|
-
if (owner === context.user.properties.username) {
|
|
758
|
-
return true;
|
|
759
|
-
}
|
|
760
|
-
else {
|
|
761
|
-
return false;
|
|
762
|
-
}
|
|
763
|
-
}),
|
|
764
|
-
isUserInrole: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
765
|
-
const result = yield this.nuxeoService
|
|
766
|
-
.isUserInRole(args, "")
|
|
767
|
-
.pipe(first())
|
|
768
|
-
.toPromise();
|
|
769
|
-
return result;
|
|
770
|
-
}),
|
|
771
|
-
};
|
|
772
|
-
this.getEvaluator = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
773
|
-
const eva = this.evaluators;
|
|
774
|
-
if (key && key.startsWith("!")) {
|
|
775
|
-
const fn = eva[key.substring(1)];
|
|
776
|
-
return (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
777
|
-
const result = yield fn(context, ...args);
|
|
778
|
-
return !result;
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
return eva[key];
|
|
782
|
-
});
|
|
783
|
-
this.appConfigService.configLoaded.subscribe((ready) => {
|
|
784
|
-
if (ready) {
|
|
785
|
-
this.conditions = this.getAllRules();
|
|
786
|
-
}
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
setEvaluators(evaluators) {
|
|
790
|
-
this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
|
|
791
|
-
}
|
|
792
|
-
getEvaluators() {
|
|
793
|
-
return this.evaluators;
|
|
794
|
-
}
|
|
795
|
-
// ----------------------------------------------------
|
|
796
|
-
evaluateRule(ruleId, context) {
|
|
797
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
798
|
-
const ruleRef = this.getRuleById(ruleId);
|
|
799
|
-
context = context || this.context;
|
|
800
|
-
context["getEvaluator"] = this.getEvaluator;
|
|
801
|
-
if (ruleRef) {
|
|
802
|
-
const evaluator = yield this.getEvaluator(ruleRef.type);
|
|
803
|
-
if (evaluator) {
|
|
804
|
-
return yield evaluator(context, ruleRef.parameters);
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
else {
|
|
808
|
-
const evaluator = yield this.getEvaluator(ruleId);
|
|
809
|
-
if (evaluator) {
|
|
810
|
-
return yield evaluator(context);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
getRuleById(id) {
|
|
816
|
-
return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
|
|
817
|
-
}
|
|
818
|
-
getAllRules() {
|
|
819
|
-
return this.appConfigService.conditons;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
EvaluatorsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
823
|
-
EvaluatorsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, providedIn: "root" });
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, decorators: [{
|
|
825
|
-
type: Injectable,
|
|
826
|
-
args: [{ providedIn: "root" }]
|
|
827
|
-
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }]; } });
|
|
828
|
-
|
|
829
|
-
class GlobalAdminService {
|
|
830
|
-
constructor(nuxeo, evaluatorService) {
|
|
831
|
-
this.nuxeo = nuxeo;
|
|
832
|
-
this.evaluatorService = evaluatorService;
|
|
833
|
-
this.isGlobalAdmin = false;
|
|
834
|
-
this.activeTenant = null;
|
|
835
|
-
}
|
|
836
|
-
checkIfGlobalAdmin() {
|
|
837
|
-
return this.evaluatorService.evaluateRule('isGlobalAdmin');
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
GlobalAdminService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, deps: [{ token: NuxeoService$1 }, { token: EvaluatorsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
841
|
-
GlobalAdminService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, providedIn: 'root' });
|
|
842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, decorators: [{
|
|
843
|
-
type: Injectable,
|
|
844
|
-
args: [{
|
|
845
|
-
providedIn: 'root'
|
|
846
|
-
}]
|
|
847
|
-
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: EvaluatorsService }]; } });
|
|
848
|
-
|
|
849
683
|
class RolesService$1 {
|
|
850
|
-
constructor(environment
|
|
684
|
+
constructor(environment
|
|
685
|
+
// , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
|
|
686
|
+
) {
|
|
851
687
|
this.environment = environment;
|
|
852
|
-
this.globalAdmin = globalAdmin;
|
|
853
|
-
this.nuxeoService = nuxeoService;
|
|
854
688
|
}
|
|
855
689
|
getRoleName(role, code = null) {
|
|
856
690
|
if (this.environment.RolesConstants[role]) {
|
|
@@ -937,15 +771,15 @@ class RolesService$1 {
|
|
|
937
771
|
});
|
|
938
772
|
return isUserInDepartment;
|
|
939
773
|
}
|
|
940
|
-
getUserDepartment(currentUser, prefix = "cts_role_") {
|
|
774
|
+
getUserDepartment(currentUser, prefix = "cts_role_", option) {
|
|
941
775
|
let groupToExclude = "cts_role_sys";
|
|
942
|
-
if (
|
|
943
|
-
prefix = `tenant_${
|
|
944
|
-
groupToExclude = `tenant_${
|
|
776
|
+
if (option && option.isGlobalAdmin) {
|
|
777
|
+
prefix = `tenant_${option.activeTenant}_cts_role_`;
|
|
778
|
+
groupToExclude = `tenant_${option.activeTenant}_cts_role_sys`;
|
|
945
779
|
}
|
|
946
|
-
else if (!
|
|
947
|
-
prefix = `tenant_${
|
|
948
|
-
groupToExclude = `tenant_${
|
|
780
|
+
else if (option && !option.isGlobalAdmin && option.tenantId) {
|
|
781
|
+
prefix = `tenant_${option.tenantId}_cts_role_`;
|
|
782
|
+
groupToExclude = `tenant_${option.tenantId}_cts_role_sys`;
|
|
949
783
|
}
|
|
950
784
|
let allGroups = currentUser.properties.groups;
|
|
951
785
|
let departmentCode = "";
|
|
@@ -962,7 +796,7 @@ class RolesService$1 {
|
|
|
962
796
|
return departmentCode;
|
|
963
797
|
}
|
|
964
798
|
}
|
|
965
|
-
RolesService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService$1, deps: [{ token: "environment" }
|
|
799
|
+
RolesService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService$1, deps: [{ token: "environment" }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
966
800
|
RolesService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService$1, providedIn: "root" });
|
|
967
801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService$1, decorators: [{
|
|
968
802
|
type: Injectable,
|
|
@@ -972,9 +806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
972
806
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
973
807
|
type: Inject,
|
|
974
808
|
args: ["environment"]
|
|
975
|
-
}] }
|
|
976
|
-
'tenant_fintech_cts_role_sys';
|
|
977
|
-
'tenant_fintech_cts_role_';
|
|
809
|
+
}] }]; } });
|
|
978
810
|
|
|
979
811
|
class NuxeoService$1 {
|
|
980
812
|
constructor(http, keycloak, baseHref, environment, rolesService) {
|
|
@@ -2028,10 +1860,10 @@ class NuxeoOverride extends Nuxeo {
|
|
|
2028
1860
|
}
|
|
2029
1861
|
|
|
2030
1862
|
class RolesService {
|
|
2031
|
-
constructor(environment
|
|
1863
|
+
constructor(environment
|
|
1864
|
+
// , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
|
|
1865
|
+
) {
|
|
2032
1866
|
this.environment = environment;
|
|
2033
|
-
this.globalAdmin = globalAdmin;
|
|
2034
|
-
this.nuxeoService = nuxeoService;
|
|
2035
1867
|
}
|
|
2036
1868
|
getRoleName(role, code = null) {
|
|
2037
1869
|
if (this.environment.RolesConstants[role]) {
|
|
@@ -2118,15 +1950,15 @@ class RolesService {
|
|
|
2118
1950
|
});
|
|
2119
1951
|
return isUserInDepartment;
|
|
2120
1952
|
}
|
|
2121
|
-
getUserDepartment(currentUser, prefix = "cts_role_") {
|
|
1953
|
+
getUserDepartment(currentUser, prefix = "cts_role_", option) {
|
|
2122
1954
|
let groupToExclude = "cts_role_sys";
|
|
2123
|
-
if (
|
|
2124
|
-
prefix = `tenant_${
|
|
2125
|
-
groupToExclude = `tenant_${
|
|
1955
|
+
if (option && option.isGlobalAdmin) {
|
|
1956
|
+
prefix = `tenant_${option.activeTenant}_cts_role_`;
|
|
1957
|
+
groupToExclude = `tenant_${option.activeTenant}_cts_role_sys`;
|
|
2126
1958
|
}
|
|
2127
|
-
else if (!
|
|
2128
|
-
prefix = `tenant_${
|
|
2129
|
-
groupToExclude = `tenant_${
|
|
1959
|
+
else if (option && !option.isGlobalAdmin && option.tenantId) {
|
|
1960
|
+
prefix = `tenant_${option.tenantId}_cts_role_`;
|
|
1961
|
+
groupToExclude = `tenant_${option.tenantId}_cts_role_sys`;
|
|
2130
1962
|
}
|
|
2131
1963
|
let allGroups = currentUser.properties.groups;
|
|
2132
1964
|
let departmentCode = "";
|
|
@@ -2143,7 +1975,7 @@ class RolesService {
|
|
|
2143
1975
|
return departmentCode;
|
|
2144
1976
|
}
|
|
2145
1977
|
}
|
|
2146
|
-
RolesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService, deps: [{ token: "environment" }
|
|
1978
|
+
RolesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService, deps: [{ token: "environment" }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2147
1979
|
RolesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService, providedIn: "root" });
|
|
2148
1980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: RolesService, decorators: [{
|
|
2149
1981
|
type: Injectable,
|
|
@@ -2153,9 +1985,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
2153
1985
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2154
1986
|
type: Inject,
|
|
2155
1987
|
args: ["environment"]
|
|
2156
|
-
}] }
|
|
2157
|
-
'tenant_fintech_cts_role_sys';
|
|
2158
|
-
'tenant_fintech_cts_role_';
|
|
1988
|
+
}] }]; } });
|
|
2159
1989
|
|
|
2160
1990
|
class NuxeoService {
|
|
2161
1991
|
constructor(http, keycloak, baseHref, environment, rolesService) {
|
|
@@ -3220,6 +3050,152 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
3220
3050
|
}]
|
|
3221
3051
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: TranslationService$1 }]; } });
|
|
3222
3052
|
|
|
3053
|
+
class EvaluatorsService {
|
|
3054
|
+
constructor(nuxeoService, appConfigService) {
|
|
3055
|
+
this.nuxeoService = nuxeoService;
|
|
3056
|
+
this.appConfigService = appConfigService;
|
|
3057
|
+
this.context = { entity: null, getEvaluator: null, user: null };
|
|
3058
|
+
this.asyncEvery = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
3059
|
+
for (let e of arr) {
|
|
3060
|
+
if (!(yield predicate(e))) {
|
|
3061
|
+
return false;
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
return true;
|
|
3065
|
+
});
|
|
3066
|
+
this.asyncSome = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
3067
|
+
for (let e of arr) {
|
|
3068
|
+
if (yield predicate(e)) {
|
|
3069
|
+
return true;
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
return false;
|
|
3073
|
+
});
|
|
3074
|
+
// tslint:disable-next-line:member-ordering
|
|
3075
|
+
this.evaluators = {
|
|
3076
|
+
AND: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3077
|
+
if (!args || args.length === 0) {
|
|
3078
|
+
return false;
|
|
3079
|
+
}
|
|
3080
|
+
return yield this.asyncEvery(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
3081
|
+
const evaluator = yield context.getEvaluator(arg.value);
|
|
3082
|
+
if (!evaluator) {
|
|
3083
|
+
console.warn("evaluator not found: " + arg.value);
|
|
3084
|
+
return false;
|
|
3085
|
+
}
|
|
3086
|
+
return yield evaluator(context, arg.parameters || []);
|
|
3087
|
+
}));
|
|
3088
|
+
}),
|
|
3089
|
+
OR: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3090
|
+
if (!args || args.length === 0) {
|
|
3091
|
+
return false;
|
|
3092
|
+
}
|
|
3093
|
+
return yield this.asyncSome(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
3094
|
+
const evaluator = yield context.getEvaluator(arg.value);
|
|
3095
|
+
if (!evaluator) {
|
|
3096
|
+
console.warn("evaluator not found: " + arg.value);
|
|
3097
|
+
return false;
|
|
3098
|
+
}
|
|
3099
|
+
const res = yield evaluator(context, arg.parameters || []);
|
|
3100
|
+
return res;
|
|
3101
|
+
}));
|
|
3102
|
+
}),
|
|
3103
|
+
isStatus: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3104
|
+
if (args.indexOf(context.entity.state) > -1) {
|
|
3105
|
+
return true;
|
|
3106
|
+
}
|
|
3107
|
+
else {
|
|
3108
|
+
return false;
|
|
3109
|
+
}
|
|
3110
|
+
}),
|
|
3111
|
+
isCreator: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3112
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3113
|
+
//check if user loged in is the creator of that corresp
|
|
3114
|
+
let owner;
|
|
3115
|
+
if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
|
|
3116
|
+
owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
|
|
3117
|
+
}
|
|
3118
|
+
else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
|
|
3119
|
+
owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
|
|
3120
|
+
}
|
|
3121
|
+
else if (context.entity.properties.owner) {
|
|
3122
|
+
owner = context.entity.properties.owner;
|
|
3123
|
+
}
|
|
3124
|
+
else if (context.entity.properties["corr:owner"]) {
|
|
3125
|
+
owner = context.entity.properties["corr:owner"];
|
|
3126
|
+
}
|
|
3127
|
+
if (owner === context.user.properties.username) {
|
|
3128
|
+
return true;
|
|
3129
|
+
}
|
|
3130
|
+
else {
|
|
3131
|
+
return false;
|
|
3132
|
+
}
|
|
3133
|
+
}),
|
|
3134
|
+
isUserInrole: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3135
|
+
const result = yield this.nuxeoService
|
|
3136
|
+
.isUserInRole(args, "")
|
|
3137
|
+
.pipe(first())
|
|
3138
|
+
.toPromise();
|
|
3139
|
+
return result;
|
|
3140
|
+
}),
|
|
3141
|
+
};
|
|
3142
|
+
this.getEvaluator = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
3143
|
+
const eva = this.evaluators;
|
|
3144
|
+
if (key && key.startsWith("!")) {
|
|
3145
|
+
const fn = eva[key.substring(1)];
|
|
3146
|
+
return (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3147
|
+
const result = yield fn(context, ...args);
|
|
3148
|
+
return !result;
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
return eva[key];
|
|
3152
|
+
});
|
|
3153
|
+
this.appConfigService.configLoaded.subscribe((ready) => {
|
|
3154
|
+
if (ready) {
|
|
3155
|
+
this.conditions = this.getAllRules();
|
|
3156
|
+
}
|
|
3157
|
+
});
|
|
3158
|
+
}
|
|
3159
|
+
setEvaluators(evaluators) {
|
|
3160
|
+
this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
|
|
3161
|
+
}
|
|
3162
|
+
getEvaluators() {
|
|
3163
|
+
return this.evaluators;
|
|
3164
|
+
}
|
|
3165
|
+
// ----------------------------------------------------
|
|
3166
|
+
evaluateRule(ruleId, context) {
|
|
3167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3168
|
+
const ruleRef = this.getRuleById(ruleId);
|
|
3169
|
+
context = context || this.context;
|
|
3170
|
+
context["getEvaluator"] = this.getEvaluator;
|
|
3171
|
+
if (ruleRef) {
|
|
3172
|
+
const evaluator = yield this.getEvaluator(ruleRef.type);
|
|
3173
|
+
if (evaluator) {
|
|
3174
|
+
return yield evaluator(context, ruleRef.parameters);
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
else {
|
|
3178
|
+
const evaluator = yield this.getEvaluator(ruleId);
|
|
3179
|
+
if (evaluator) {
|
|
3180
|
+
return yield evaluator(context);
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
});
|
|
3184
|
+
}
|
|
3185
|
+
getRuleById(id) {
|
|
3186
|
+
return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
|
|
3187
|
+
}
|
|
3188
|
+
getAllRules() {
|
|
3189
|
+
return this.appConfigService.conditons;
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
EvaluatorsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, deps: [{ token: NuxeoService$1 }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3193
|
+
EvaluatorsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, providedIn: "root" });
|
|
3194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: EvaluatorsService, decorators: [{
|
|
3195
|
+
type: Injectable,
|
|
3196
|
+
args: [{ providedIn: "root" }]
|
|
3197
|
+
}], ctorParameters: function () { return [{ type: NuxeoService$1 }, { type: AppConfigService }]; } });
|
|
3198
|
+
|
|
3223
3199
|
/**
|
|
3224
3200
|
* Permission directive shows or hides an element,
|
|
3225
3201
|
* based on a predefined structured condition object in the [conditions.json]{@link ../additional-documentation/conditions-file.html} file.
|
|
@@ -5727,6 +5703,25 @@ DepartmentConstants.fields = {
|
|
|
5727
5703
|
manager: 'dept:manager',
|
|
5728
5704
|
};
|
|
5729
5705
|
|
|
5706
|
+
class GlobalAdminService {
|
|
5707
|
+
constructor(evaluatorService) {
|
|
5708
|
+
this.evaluatorService = evaluatorService;
|
|
5709
|
+
this.isGlobalAdmin = false;
|
|
5710
|
+
this.activeTenant = null;
|
|
5711
|
+
}
|
|
5712
|
+
checkIfGlobalAdmin() {
|
|
5713
|
+
return this.evaluatorService.evaluateRule('isGlobalAdmin');
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5716
|
+
GlobalAdminService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, deps: [{ token: EvaluatorsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5717
|
+
GlobalAdminService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, providedIn: 'root' });
|
|
5718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: GlobalAdminService, decorators: [{
|
|
5719
|
+
type: Injectable,
|
|
5720
|
+
args: [{
|
|
5721
|
+
providedIn: 'root'
|
|
5722
|
+
}]
|
|
5723
|
+
}], ctorParameters: function () { return [{ type: EvaluatorsService }]; } });
|
|
5724
|
+
|
|
5730
5725
|
const departmentCacheBuster$ = new Subject();
|
|
5731
5726
|
const minute$1 = 60000;
|
|
5732
5727
|
/** @ignore */
|
|
@@ -5742,14 +5737,9 @@ class DepartmentApiService {
|
|
|
5742
5737
|
this.arabic = res;
|
|
5743
5738
|
});
|
|
5744
5739
|
}
|
|
5745
|
-
getDepartmentTree(customPageProvider) {
|
|
5746
|
-
let
|
|
5747
|
-
|
|
5748
|
-
currentPageIndex: 0,
|
|
5749
|
-
offset: 0,
|
|
5750
|
-
pageSize: 40,
|
|
5751
|
-
quickFilters: 'Parent Dept'
|
|
5752
|
-
};
|
|
5740
|
+
getDepartmentTree(customPageProvider, customParams) {
|
|
5741
|
+
let obj = customParams ? customParams : {};
|
|
5742
|
+
let params = Object.assign({ pageProvider: customPageProvider ? customPageProvider : 'PP_Department', currentPageIndex: 0, offset: 0, pageSize: 40, quickFilters: 'Parent Dept' }, obj);
|
|
5753
5743
|
if (this.globalAdminService.isGlobalAdmin) {
|
|
5754
5744
|
params['queryParams'] = '/' + this.globalAdminService.activeTenant + '/';
|
|
5755
5745
|
}
|
|
@@ -6329,7 +6319,7 @@ class DynamicFormTextItemComponent {
|
|
|
6329
6319
|
}
|
|
6330
6320
|
DynamicFormTextItemComponent.DEFAULT_SEPARATOR = ', ';
|
|
6331
6321
|
DynamicFormTextItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormTextItemComponent, deps: [{ token: DynamicFormUpdateService }, { token: i1$1.TranslateService }, { token: i6.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
6332
|
-
DynamicFormTextItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: { autoComplete: "autoComplete", nativeAutoComplete: "nativeAutoComplete", autoComplete_pageProvider: "autoComplete_pageProvider", autoComplete_propertyName: "autoComplete_propertyName", autoComplete_propertyKey: "autoComplete_propertyKey", autoCompleteValueKey: "autoCompleteValueKey", autoCompleteType: "autoCompleteType", tenantId: "tenantId", emitFullObject: "emitFullObject", outsideParams: "outsideParams", type: "type", property: "property", label: "label", editable: "editable", placeholder: "placeholder", disabled: "disabled", displayEmpty: "displayEmpty", preventSpace: "preventSpace", id: "id", maxCharsNum: "maxCharsNum" }, viewQueries: [{ propertyName: "editorInput", first: true, predicate: ["editorInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <label *ngIf=\"label\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n <div class=\"\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n <div class=\"new-one\" (clickOutside)=\"openOptions(false)\">\r\n <input\r\n \r\n [id]=\"id\"\r\n [attr.disabled]=\"isDisabled() || null\"\r\n [type]=\"type\"\r\n class=\"form-control\"\r\n [ngClass]=\"{'input-filled' : (emitFullObject ? editedValue
|
|
6322
|
+
DynamicFormTextItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: { autoComplete: "autoComplete", nativeAutoComplete: "nativeAutoComplete", autoComplete_pageProvider: "autoComplete_pageProvider", autoComplete_propertyName: "autoComplete_propertyName", autoComplete_propertyKey: "autoComplete_propertyKey", autoCompleteValueKey: "autoCompleteValueKey", autoCompleteType: "autoCompleteType", tenantId: "tenantId", emitFullObject: "emitFullObject", outsideParams: "outsideParams", type: "type", property: "property", label: "label", editable: "editable", placeholder: "placeholder", disabled: "disabled", displayEmpty: "displayEmpty", preventSpace: "preventSpace", id: "id", maxCharsNum: "maxCharsNum" }, viewQueries: [{ propertyName: "editorInput", first: true, predicate: ["editorInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"app-property-value\">\r\n <div class=\"app-input-wrapper\">\r\n <label *ngIf=\"label\" for=\"formGroupInputSmall\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n <div class=\"\">\r\n <ng-container *ngIf=\"isEditable(); else readOnly\">\r\n <div class=\"new-one\" (clickOutside)=\"openOptions(false)\">\r\n <input\r\n \r\n [id]=\"id\"\r\n [attr.disabled]=\"isDisabled() || null\"\r\n [type]=\"type\"\r\n class=\"form-control\"\r\n [ngClass]=\"{'input-filled' : (emitFullObject ? (editedValue?.title) : editedValue) }\"\r\n (keydown.space)=\"allowSpace($event)\"\r\n #editorInput\r\n [required]=\"isRequired()\"\r\n [(ngModel)]=\"emitFullObject ? editedValue?.title : editedValue\"\r\n [autocomplete]=\"nativeAutoComplete\"\r\n (ngModelChange)=\"update($event)\"\r\n (keyup)=\"waitUntilUserFinishTyping()\"\r\n [attr.data-automation-id]=\"'card-textitem-editinput-'\"\r\n placeholder=\"{{ placeholder | translate }}\"\r\n (focus)=\"openOptions(true)\"\r\n maxlength=\"{{maxCharsNum}}\"\r\n />\r\n <div *ngIf=\"documentList.length !== 0\" id=\"suggestedoptions\">\r\n <div\r\n class=\"suggestions-wrapper\"\r\n [ngClass]=\"{ 'd-block': showsuggestedOptions }\"\r\n >\r\n <div\r\n class=\"option\"\r\n id=\"suggestedoptions\"\r\n *ngFor=\"let option of documentList\"\r\n (click)=\"selectItem(option)\"\r\n >\r\n {{ option.title }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n >\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ label | translate }} {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.pattern\">\r\n {{ \"wrong pattern\" | translate }}\r\n </li>\r\n <li *ngIf=\"control.errors.min\">\r\n {{ \"VALIDATORS.MIN\" | translate }} {{ control.errors.min.min }}\r\n </li>\r\n </ul>\r\n </mat-error>\r\n </ng-container>\r\n <ng-template #readOnly>\r\n {{ emitFullObject ? editedValue?.title : editedValue }}\r\n </ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".app-property-value .input-filled{border-color:#1a96c6!important}.app-property-value .app-input-wrapper label{color:#8f98aa;font-size:12px;margin-bottom:0}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;background-color:#8f98aa1a;border-radius:0;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .app-textitem-editable-error ul{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error ul li{margin-top:5px}.app-property-value .app-input-wrapper .new-one{position:relative}.app-property-value .app-input-wrapper .suggestions-wrapper{border-radius:3px;height:auto;max-height:240px;border:1px solid #ccc;box-shadow:2px 2px 2px #0000000f;overflow:auto;display:none;position:absolute;width:100%;background-color:#fff;z-index:99}.app-property-value .app-input-wrapper .suggestions-wrapper .option{margin-bottom:5px;padding:5px 10px;cursor:pointer}.app-property-value .app-input-wrapper .suggestions-wrapper .option:hover{background-color:#f5faff}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
6333
6323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormTextItemComponent, decorators: [{
|
|
6334
6324
|
type: Component,
|
|
6335
6325
|
args: [{
|
|
@@ -7073,13 +7063,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
7073
7063
|
*/
|
|
7074
7064
|
class TreeviewSelectComponent {
|
|
7075
7065
|
// this component is used in two places the flag is this.treeview
|
|
7076
|
-
constructor(i18n, translation, departmentApiService, departmentManagment, rolesService, nuxeoService) {
|
|
7066
|
+
constructor(i18n, translation, departmentApiService, departmentManagment, rolesService, nuxeoService, globalAdmin) {
|
|
7077
7067
|
this.i18n = i18n;
|
|
7078
7068
|
this.translation = translation;
|
|
7079
7069
|
this.departmentApiService = departmentApiService;
|
|
7080
7070
|
this.departmentManagment = departmentManagment;
|
|
7081
7071
|
this.rolesService = rolesService;
|
|
7082
7072
|
this.nuxeoService = nuxeoService;
|
|
7073
|
+
this.globalAdmin = globalAdmin;
|
|
7083
7074
|
this.multipleSelection = [];
|
|
7084
7075
|
this.selectedParentWithChild = [];
|
|
7085
7076
|
this.showPlus = false;
|
|
@@ -7162,7 +7153,12 @@ class TreeviewSelectComponent {
|
|
|
7162
7153
|
}
|
|
7163
7154
|
}
|
|
7164
7155
|
selectDefault() {
|
|
7165
|
-
|
|
7156
|
+
let option = {
|
|
7157
|
+
'isGlobalAdmin': this.globalAdmin.isGlobalAdmin,
|
|
7158
|
+
'activeTenant': this.globalAdmin.activeTenant,
|
|
7159
|
+
'tenantId': this.nuxeoService.nuxeoClient.user.properties.tenantId
|
|
7160
|
+
};
|
|
7161
|
+
this.myDepartment = this.rolesService.getUserDepartment(this.nuxeoService.nuxeoClient.user, 'cts_role_', option);
|
|
7166
7162
|
this.items.map((item) => {
|
|
7167
7163
|
this.setPreSeletedItem(item, this.myDepartment);
|
|
7168
7164
|
});
|
|
@@ -7305,7 +7301,7 @@ class TreeviewSelectComponent {
|
|
|
7305
7301
|
}, (err) => { });
|
|
7306
7302
|
}
|
|
7307
7303
|
}
|
|
7308
|
-
TreeviewSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: TreeviewSelectComponent, deps: [{ token: i1$2.TreeviewI18n }, { token: TranslationService$1 }, { token: DepartmentApiService }, { token: DepartmentManagementService$1 }, { token: RolesService$1 }, { token: NuxeoService$1 }], target: i0.ɵɵFactoryTarget.Component });
|
|
7304
|
+
TreeviewSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: TreeviewSelectComponent, deps: [{ token: i1$2.TreeviewI18n }, { token: TranslationService$1 }, { token: DepartmentApiService }, { token: DepartmentManagementService$1 }, { token: RolesService$1 }, { token: NuxeoService$1 }, { token: GlobalAdminService }], target: i0.ɵɵFactoryTarget.Component });
|
|
7309
7305
|
TreeviewSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", config: "config", items: "items", value: "value", multiple: "multiple", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", useCustomAddEditAction: "useCustomAddEditAction", customPrefix: "customPrefix", customParentProperty: "customParentProperty", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", plusClicked: "plusClicked", actionClicked: "actionClicked" }, providers: [{ provide: TreeviewI18n, useClass: DropdownTreeviewSelectI18n }], viewQueries: [{ propertyName: "dropdownTreeviewComponent", first: true, predicate: DropdownTreeviewComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template\r\n #itemTemplate\r\n let-item=\"item\"\r\n let-onCollapseExpand=\"onCollapseExpand\"\r\n let-onCheckedChange=\"onCheckedChange\"\r\n>\r\n <!-- single -->\r\n <div *ngIf=\"!treeview && !multiple\">\r\n <div\r\n class=\"text-nowrap row-item\"\r\n [ngClass]=\"{ active: item.value === this.value }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapseExpand()\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <!-- <label class=\"form-check-label\" (click)=\"select(item)\">{{\r\n item.text\r\n }}</label> -->\r\n <label *ngIf=\"item.disabled\" class=\"form-check-label\">{{\r\n item.text\r\n }}</label>\r\n <label *ngIf=\"!item.disabled\" class=\"form-check-label\" (click)=\"select(item)\">{{\r\n item.text\r\n }}</label>\r\n </div>\r\n </div>\r\n <!-- Multiple -->\r\n <div *ngIf=\"!treeview && multiple\">\r\n <div\r\n class=\"text-nowrap row-item\"\r\n [ngClass]=\"{ active: item.value === this.value }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapseExpand()\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <!-- <input\r\n class=\"multiple-checkBox\"\r\n type=\"checkbox\"\r\n [checked]=\"multipleSelection.includes(item.value)\"\r\n (change)=\"selectMultiple($event.target.checked, item)\"\r\n />\r\n\r\n <label class=\"form-check-label\">{{ item.text }}</label> -->\r\n <div class=\"multiple-treeview\">\r\n <mat-checkbox\r\n [checked]=\"multipleSelection.includes(item.value)\"\r\n (change)=\"selectMultiple($event.checked, item)\"\r\n >\r\n <span> {{ item.text }} </span>\r\n </mat-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- treeView -->\r\n <div *ngIf=\"treeview && !treeViewAsFormControl\" class=\"tree-view-container\">\r\n <div\r\n (mouseenter)=\"hoverField.style.display = 'flex'\"\r\n (mouseleave)=\"hoverField.style.display = 'none'\"\r\n class=\"text-nowrap row-item treeview-row\"\r\n [ngClass]=\"{ selected: item.value == selectedItem }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapsed(item)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <label class=\"form-check-label-treeview\" (click)=\"select(item)\"\r\n >{{ item.text }}\r\n <span #hoverField class=\"hoverField\">\r\n <span\r\n type=\"button\"\r\n matTooltip=\"{{ 'department_management.form.edit' | translate }}\"\r\n (click)=\"onAction($event, 'update', item)\"\r\n >\r\n <li class=\"bi bi-pencil\"></li>\r\n </span>\r\n\r\n <span\r\n type=\"button\"\r\n matTooltip=\"{{\r\n 'department_management.form.toolTip_message' | translate\r\n }}\"\r\n (click)=\"onAction($event, 'add', item)\"\r\n >\r\n <li class=\"bi bi-plus\"></li>\r\n </span>\r\n </span>\r\n </label>\r\n </div>\r\n </div>\r\n <!-- treeView as form control -->\r\n <div *ngIf=\"treeview && treeViewAsFormControl\" class=\"tree-view-container\">\r\n <div\r\n class=\"text-nowrap row-item treeview-row-form-control\"\r\n [ngClass]=\"{ 'selected-form-control': item.value == selectedItem }\"\r\n >\r\n <i\r\n *ngIf=\"item.children\"\r\n (click)=\"onCollapsed(item)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span\r\n *ngSwitchCase=\"true\"\r\n class=\"bi bi-caret-{{ arabic ? 'left' : 'right' }}-fill caret-icon\"\r\n ></span>\r\n \r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-caret-down-fill caret-icon\"\r\n ></span>\r\n </i>\r\n <label class=\"form-check-label-treeview\" (click)=\"select(item)\"\r\n >{{ item.text }}\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template>\r\n<ng-template\r\n #headerTemplate\r\n let-config=\"config\"\r\n let-item=\"item\"\r\n let-onCollapseExpand=\"onCollapseExpand\"\r\n let-onCheckedChange=\"onCheckedChange\"\r\n let-onFilterTextChange=\"onFilterTextChange\"\r\n>\r\n <div *ngIf=\"config.hasFilter\" class=\"row row-filter\">\r\n <div class=\"col-12\">\r\n <input\r\n class=\"form-control\"\r\n type=\"text\"\r\n [placeholder]=\"i18n.getFilterPlaceholder(placeholder)\"\r\n [(ngModel)]=\"filterText\"\r\n (ngModelChange)=\"onFilterTextChange($event)\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"config.hasAllCheckBox || config.hasCollapseExpand\" class=\"row\">\r\n <div class=\"col-12\">\r\n <label *ngIf=\"config.hasAllCheckBox\" (click)=\"select(item)\">\r\n <strong>{{ i18n.getAllCheckboxText() }}</strong>\r\n </label>\r\n <label\r\n *ngIf=\"config.hasCollapseExpand\"\r\n class=\"float-right\"\r\n (click)=\"onCollapseExpand()\"\r\n >\r\n <i\r\n [title]=\"i18n.getTooltipCollapseExpandText(item.collapsed)\"\r\n aria-hidden=\"true\"\r\n [ngSwitch]=\"item.collapsed\"\r\n >\r\n <span *ngSwitchCase=\"true\" class=\"bi bi-arrows-angle-expand\"></span>\r\n <span\r\n *ngSwitchCase=\"false\"\r\n class=\"bi bi-arrows-angle-contract\"\r\n ></span>\r\n </i>\r\n </label>\r\n </div>\r\n </div>\r\n <a *ngIf=\"defaultSelect\" class=\"select-default\" (click)=\"selectDefault()\">{{'department_management.selectDefault'| translate}}</a>\r\n <div *ngIf=\"config.hasDivider\" class=\"dropdown-divider\" [ngClass]=\"{'dropdown-divider-noMargin': defaultSelect}\"></div>\r\n</ng-template>\r\n\r\n<ng-container *ngIf=\"!treeview && !multiple\">\r\n <ngx-dropdown-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-dropdown-treeview\r\n></ng-container>\r\n<ng-container *ngIf=\"!treeview && multiple\">\r\n <div class=\"multiple-tree-view\">\r\n <ngx-dropdown-treeview\r\n [config]=\"config\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-dropdown-treeview>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"treeview && !treeViewAsFormControl\">\r\n <div class=\"tree-view\">\r\n <ngx-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-treeview>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"treeview && treeViewAsFormControl\">\r\n <div class=\"tree-view-form-control\">\r\n <ngx-treeview\r\n [config]=\"config\"\r\n [headerTemplate]=\"headerTemplate\"\r\n [items]=\"items\"\r\n [itemTemplate]=\"itemTemplate\"\r\n >\r\n </ngx-treeview>\r\n </div>\r\n</ng-container>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.caret-icon{color:#6c757d;font-size:14px}.multiple-treeview .mat-checkbox-ripple .mat-ripple-element,.multiple-treeview .mat-checkbox-checked.mat-accent .mat-checkbox-background{background-color:#33e3b7!important}.multiple-treeview .mat-checkbox-ripple .mat-ripple-element{position:fixed;left:inherit;top:inherit;transform:translate(-3px,-3px)!important}.multiple-treeview mat-checkbox .mat-checkbox-background{background-color:#d9dce2!important}.form-check-label-treeview{display:flex;align-items:center;justify-content:space-between;width:100%}.form-check-label-treeview .hoverField{display:none;align-items:center;text-align:center}.form-check-label-treeview .hoverField span{display:flex;align-items:center;justify-content:center;margin:0 3px;border:none;background-color:snow;background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:30px;width:30px;color:#fff;border-radius:5px;list-style:none;margin-inline-end:4px}.form-check-label-treeview .hoverField span .bi-plus{font-size:28px;display:flex;justify-content:center}.form-check-label-treeview .hoverField .add-btn{width:164px;padding:1px;display:flex;justify-content:center;align-items:center;font-size:13px;background-color:#0dbab5;border-radius:5px;border:0;color:#fff;--tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.form-check-label-treeview .hoverField .plus-btn{display:flex;font-size:28px;align-items:center}.selected{background-color:#f5f6f8}.selected .hoverField{display:flex!important}.selected-form-control{background-color:#d9dce2}.selected-form-control .hoverField{display:flex!important}.treeview-item .row-item{display:flex;align-items:center;padding:5px 10px}.treeview-item .row-item .multiple-checkBox{margin-inline-start:4px;margin-inline-end:4px}.treeview-item .active{background-color:#f5f6f8}.treeview-row{display:flex;align-items:center}.treeview-row:hover{background-color:#f5f6f8}.treeview-row-form-control{display:flex;align-items:center}.treeview-row-form-control:hover{background-color:#d9dce2}label{margin-bottom:0;cursor:pointer}.bi{cursor:pointer;margin-right:.3rem}ngx-treeview .treeview-container{max-height:200px!important;overflow-x:hidden;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;overflow-y:auto}ngx-treeview .select-default{display:flex;justify-content:start;font-size:13px;cursor:pointer;margin-bottom:3px;margin-top:4px}ngx-treeview .dropdown-divider-noMargin{margin-top:0!important}.tree-view ngx-treeview .treeview-container{max-height:500px!important;overflow-x:hidden}.tree-view-form-control ngx-treeview .treeview-container{max-height:300px!important;overflow-x:hidden}ngx-dropdown-treeview .dropdown .dropdown-menu{margin-top:0!important;width:100%}ngx-dropdown-treeview .dropdown .btn-outline-secondary{background-color:#8f98aa1a;border:none!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:hover{color:#6c757d!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:focus{box-shadow:none!important}ngx-dropdown-treeview .dropdown .btn-outline-secondary:active{background-color:#8f98aa1a!important;border:none!important;color:#6c757d!important}ngx-dropdown-treeview .dropdown:after{position:static!important}ngx-dropdown-treeview .show .dropdown-toggle{background-color:#8f98aa1a!important;border:none!important;color:#6c757d!important}.rtl .treeview-item .treeview-item{margin-right:2rem!important;margin-left:0!important}.rtl .row-all .col-12{text-align:right}.rtl .row-all .col-12 .pull-right{float:left!important}.rtl .form-check.form-check-inline{margin-right:0!important}.rtl .btn.dropdown-toggle{margin-right:0!important}.rtl .dropdown-menu:not(ngb-datepicker){right:0px;left:unset}.rtl .dropdown :after{margin-top:.6rem;left:.6rem;right:unset!important}.rtl ngx-treeview-item{text-align:right;direction:rtl}@media (min-width: 576px){.rtl .form-inline .form-check-input{margin:3px}}.rtl .form-inline .form-check-input{margin:3px;position:inherit}.rtl .dropdown button{text-align:right!important;direction:rtl}.rtl .fa.fa-caret-right{transform:rotate(180deg)}\n"], components: [{ type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i1$2.DropdownTreeviewComponent, selector: "ngx-dropdown-treeview", inputs: ["buttonClass", "config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }, { type: i1$2.TreeviewComponent, selector: "ngx-treeview", inputs: ["config", "headerTemplate", "itemTemplate", "items"], outputs: ["selectedChange", "filterChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
7310
7306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: TreeviewSelectComponent, decorators: [{
|
|
7311
7307
|
type: Component,
|
|
@@ -7316,7 +7312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
7316
7312
|
encapsulation: ViewEncapsulation.None,
|
|
7317
7313
|
providers: [{ provide: TreeviewI18n, useClass: DropdownTreeviewSelectI18n }],
|
|
7318
7314
|
}]
|
|
7319
|
-
}], ctorParameters: function () { return [{ type: i1$2.TreeviewI18n }, { type: TranslationService$1 }, { type: DepartmentApiService }, { type: DepartmentManagementService$1 }, { type: RolesService$1 }, { type: NuxeoService$1 }]; }, propDecorators: { treeview: [{
|
|
7315
|
+
}], ctorParameters: function () { return [{ type: i1$2.TreeviewI18n }, { type: TranslationService$1 }, { type: DepartmentApiService }, { type: DepartmentManagementService$1 }, { type: RolesService$1 }, { type: NuxeoService$1 }, { type: GlobalAdminService }]; }, propDecorators: { treeview: [{
|
|
7320
7316
|
type: Input
|
|
7321
7317
|
}], treeViewAsFormControl: [{
|
|
7322
7318
|
type: Input
|
|
@@ -7379,6 +7375,8 @@ class DynamicFormDepartmentComponent {
|
|
|
7379
7375
|
/** is tree searchable */
|
|
7380
7376
|
this.searchable = true;
|
|
7381
7377
|
this.defaultSelect = false;
|
|
7378
|
+
/** to allow custom paramsto be passed to get departments request from outside the component */
|
|
7379
|
+
this.customParams = {};
|
|
7382
7380
|
/** emitted when item is selected */
|
|
7383
7381
|
this.onSelecting = new EventEmitter();
|
|
7384
7382
|
/** emitted when action is clicked */
|
|
@@ -7458,7 +7456,7 @@ class DynamicFormDepartmentComponent {
|
|
|
7458
7456
|
}
|
|
7459
7457
|
getLisOfOptions() {
|
|
7460
7458
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7461
|
-
this.departmentApi.getDepartmentTree(this.pp_departmentTree).subscribe((res) => __awaiter(this, void 0, void 0, function* () {
|
|
7459
|
+
this.departmentApi.getDepartmentTree(this.pp_departmentTree, this.customParams).subscribe((res) => __awaiter(this, void 0, void 0, function* () {
|
|
7462
7460
|
this.loading = false;
|
|
7463
7461
|
this.data = yield this.recursiveFill(res.entries);
|
|
7464
7462
|
}));
|
|
@@ -7500,7 +7498,7 @@ class DynamicFormDepartmentComponent {
|
|
|
7500
7498
|
}
|
|
7501
7499
|
}
|
|
7502
7500
|
DynamicFormDepartmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormDepartmentComponent, deps: [{ token: TranslationService$1 }, { token: DepartmentApiService }, { token: i6.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
7503
|
-
DynamicFormDepartmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", label: "label", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", pp_departmentTree: "pp_departmentTree", customPrefix: "customPrefix", useCustomAddEditAction: "useCustomAddEditAction", customParentProperty: "customParentProperty" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-treeview-select\r\n [treeview]=\"treeview\"\r\n [treeViewAsFormControl]=\"treeViewAsFormControl\"\r\n [defaultSelect]=\"defaultSelect\"\r\n [multiple]=\"multiple\"\r\n [items]=\"data\"\r\n [pp_departmentNestedTree]=\"pp_departmentNestedTree\"\r\n [useCustomAddEditAction]=\"useCustomAddEditAction\"\r\n [customPrefix]=\"customPrefix\"\r\n [customParentProperty]=\"customParentProperty\"\r\n (valueChange)=\"getSelecteditems($event)\"\r\n [(value)]=\"selection\"\r\n (actionClicked)=\"onAction($event)\"\r\n class=\"dropdown-wrapper\"\r\n [ngClass]=\"{'input-filled' : selection && selection.length > 0 }\"\r\n>\r\n</app-dynamic-form-treeview-select>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: ["app-dynamic-form-department .dropdown{border:1px solid #ccc!important;border-radius:5px!important}app-dynamic-form-department .input-filled .dropdown{border-color:#1a96c6!important}\n"], components: [{ type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: ["treeview", "treeViewAsFormControl", "config", "items", "value", "multiple", "defaultSelect", "pp_departmentNestedTree", "useCustomAddEditAction", "customPrefix", "customParentProperty", "placeholder"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
7501
|
+
DynamicFormDepartmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: { treeview: "treeview", treeViewAsFormControl: "treeViewAsFormControl", placeholder: "placeholder", multiple: "multiple", searchable: "searchable", label: "label", defaultSelect: "defaultSelect", pp_departmentNestedTree: "pp_departmentNestedTree", pp_departmentTree: "pp_departmentTree", customPrefix: "customPrefix", useCustomAddEditAction: "useCustomAddEditAction", customParentProperty: "customParentProperty", customParams: "customParams" }, outputs: { onSelecting: "onSelecting", actionClicked: "actionClicked" }, ngImport: i0, template: "<ng-container *ngIf=\"label\">\r\n <div>\r\n <label class=\"select-label\"\r\n >{{ label | translate\r\n }}<span *ngIf=\"isRequired()\" class=\"text-danger m-1\">*</span></label\r\n >\r\n </div>\r\n</ng-container>\r\n<app-dynamic-form-treeview-select\r\n [treeview]=\"treeview\"\r\n [treeViewAsFormControl]=\"treeViewAsFormControl\"\r\n [defaultSelect]=\"defaultSelect\"\r\n [multiple]=\"multiple\"\r\n [items]=\"data\"\r\n [pp_departmentNestedTree]=\"pp_departmentNestedTree\"\r\n [useCustomAddEditAction]=\"useCustomAddEditAction\"\r\n [customPrefix]=\"customPrefix\"\r\n [customParentProperty]=\"customParentProperty\"\r\n (valueChange)=\"getSelecteditems($event)\"\r\n [(value)]=\"selection\"\r\n (actionClicked)=\"onAction($event)\"\r\n class=\"dropdown-wrapper\"\r\n [ngClass]=\"{'input-filled' : selection && selection.length > 0 }\"\r\n>\r\n</app-dynamic-form-treeview-select>\r\n<mat-error\r\n [attr.data-automation-id]=\"'card-textitem-error-'\"\r\n class=\"app-textitem-editable-error\"\r\n *ngIf=\"hasErrors()\"\r\n>\r\n <ul>\r\n <li *ngIf=\"control.errors.required\">\r\n {{ \"VALIDATORS.REQUIRED\" | translate }}\r\n </li>\r\n </ul>\r\n</mat-error>\r\n", styles: ["app-dynamic-form-department .dropdown{border:1px solid #ccc!important;border-radius:5px!important}app-dynamic-form-department .input-filled .dropdown{border-color:#1a96c6!important}\n"], components: [{ type: TreeviewSelectComponent, selector: "app-dynamic-form-treeview-select", inputs: ["treeview", "treeViewAsFormControl", "config", "items", "value", "multiple", "defaultSelect", "pp_departmentNestedTree", "useCustomAddEditAction", "customPrefix", "customParentProperty", "placeholder"], outputs: ["valueChange", "plusClicked", "actionClicked"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6$2.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
7504
7502
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: DynamicFormDepartmentComponent, decorators: [{
|
|
7505
7503
|
type: Component,
|
|
7506
7504
|
args: [{
|
|
@@ -7537,6 +7535,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImpor
|
|
|
7537
7535
|
type: Input
|
|
7538
7536
|
}], customParentProperty: [{
|
|
7539
7537
|
type: Input
|
|
7538
|
+
}], customParams: [{
|
|
7539
|
+
type: Input
|
|
7540
7540
|
}], onSelecting: [{
|
|
7541
7541
|
type: Output
|
|
7542
7542
|
}], actionClicked: [{
|
|
@@ -16787,7 +16787,7 @@ class FilterComponent {
|
|
|
16787
16787
|
}
|
|
16788
16788
|
}
|
|
16789
16789
|
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FilterComponent, deps: [{ token: i6.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
16790
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0, template: "<div class=\"filter-wrapper\">\r\n <div class=\"filter-title\">\r\n <!-- {{filterTitle | translate}} -->\r\n </div>\r\n <div class=\"iner-filter-wrapper\" *ngIf=\"filterForm\">\r\n <form [formGroup]=\"filterForm\">\r\n <div class=\"single-control-wrapper\" *ngFor=\"let field of fields\">\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'text'\">\r\n <app-dynamic-form-textitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'dropdown'\">\r\n <app-dynamic-form-vocabulary-item\r\n [shwoAllValues]=\"false\"\r\n [label]=\"field.label\"\r\n [bindLabel]=\"field.bindLabel\"\r\n [bindValue]=\"field.bindValue\"\r\n [placeholder]=\"field.placeholder | translate\"\r\n [multiple]=\"field.multiple\"\r\n [searchable]=\"field.searchable\"\r\n [closeOnSelect]=\"field.closeOnSelect\"\r\n [hideSelectedItems]=\"field.hideSelectedItems\"\r\n [vocabularyType]=\"field.vocabularyType\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'rang'\">\r\n <cts-dynamic-form-hijri-dateitem [label]=\"field.label\" [formControlName]=\"field.formControlName\"[range]=\"true\" [vertical]=\"false\" >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'department'\">\r\n <app-dynamic-form-department\r\n [label]=\"field.label\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'toggle'\">\r\n <cts-dynamic-form-slide-toggleitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'date'\">\r\n <cts-dynamic-form-hijri-dateitem\r\n [formControlName]=\"field.formControlName\"\r\n [label]=\"field.label\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n \r\n\r\n </div>\r\n\r\n </form>\r\n \r\n </div>\r\n <div class=\"form-actions\">\r\n <button class=\"my-button mx-2\" type=\"button\" (click)=\"filter()\"> {{'FILTER' | translate}}</button>\r\n <button class=\"my-button reset mx-2\" type=\"button\" (click)=\"reset()\"> {{'reset' | translate}}</button>\r\n </div>\r\n</div>\r\n\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.filter-wrapper .filter-title{font-size:18px;font-weight:bold;margin-bottom:15px}.filter-wrapper .iner-filter-wrapper{height:320px;overflow:auto;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;padding:15px 15px 0}.filter-wrapper .iner-filter-wrapper .single-control-wrapper{margin-bottom:15px}.filter-wrapper .form-actions{display:flex;justify-content:flex-start;align-content:center;padding:10px 15px}.filter-wrapper .form-actions .filter{border:none;background-color:transparent;font-weight:bold;width:80px;height:40px;background-image:linear-gradient(to bottom,#0dbab5,#2e62df);color:#fff;border-radius:5px}\n"], components: [{ type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly", "placeholder"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"], outputs: ["onToggle"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
16790
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FilterComponent, selector: "cts-filter", inputs: { fields: "fields", filterTitle: "filterTitle" }, outputs: { onFiltering: "onFiltering" }, ngImport: i0, template: "<div class=\"filter-wrapper\">\r\n <div class=\"filter-title\">\r\n <!-- {{filterTitle | translate}} -->\r\n </div>\r\n <div class=\"iner-filter-wrapper\" *ngIf=\"filterForm\">\r\n <form [formGroup]=\"filterForm\">\r\n <div class=\"single-control-wrapper\" *ngFor=\"let field of fields\">\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'text'\">\r\n <app-dynamic-form-textitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n >\r\n </app-dynamic-form-textitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'dropdown'\">\r\n <app-dynamic-form-vocabulary-item\r\n [shwoAllValues]=\"false\"\r\n [label]=\"field.label\"\r\n [bindLabel]=\"field.bindLabel\"\r\n [bindValue]=\"field.bindValue\"\r\n [placeholder]=\"field.placeholder | translate\"\r\n [multiple]=\"field.multiple\"\r\n [searchable]=\"field.searchable\"\r\n [closeOnSelect]=\"field.closeOnSelect\"\r\n [hideSelectedItems]=\"field.hideSelectedItems\"\r\n [vocabularyType]=\"field.vocabularyType\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-vocabulary-item>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'rang'\">\r\n <cts-dynamic-form-hijri-dateitem [label]=\"field.label\" [formControlName]=\"field.formControlName\"[range]=\"true\" [vertical]=\"false\" >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'department'\">\r\n <app-dynamic-form-department\r\n [label]=\"field.label\"\r\n placeholder=\"{{ 'CREATE.PLACE_HOLDER' | translate }} {{\r\n field.placeholder | translate\r\n }}\"\r\n [formControlName]=\"field.formControlName\"\r\n >\r\n </app-dynamic-form-department>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'toggle'\">\r\n <cts-dynamic-form-slide-toggleitem\r\n [label]=\"field.label\"\r\n [formControlName]=\"field.formControlName\"\r\n ></cts-dynamic-form-slide-toggleitem>\r\n </div>\r\n\r\n <div class=\"control\" *ngIf=\"field.type === 'date'\">\r\n <cts-dynamic-form-hijri-dateitem\r\n [formControlName]=\"field.formControlName\"\r\n [label]=\"field.label\"\r\n >\r\n </cts-dynamic-form-hijri-dateitem>\r\n </div>\r\n \r\n\r\n </div>\r\n\r\n </form>\r\n \r\n </div>\r\n <div class=\"form-actions\">\r\n <button class=\"my-button mx-2\" type=\"button\" (click)=\"filter()\"> {{'FILTER' | translate}}</button>\r\n <button class=\"my-button reset mx-2\" type=\"button\" (click)=\"reset()\"> {{'reset' | translate}}</button>\r\n </div>\r\n</div>\r\n\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.filter-wrapper .filter-title{font-size:18px;font-weight:bold;margin-bottom:15px}.filter-wrapper .iner-filter-wrapper{height:320px;overflow:auto;scrollbar-color:#b4bac6 transparent!important;scrollbar-width:thin!important;padding:15px 15px 0}.filter-wrapper .iner-filter-wrapper .single-control-wrapper{margin-bottom:15px}.filter-wrapper .form-actions{display:flex;justify-content:flex-start;align-content:center;padding:10px 15px}.filter-wrapper .form-actions .filter{border:none;background-color:transparent;font-weight:bold;width:80px;height:40px;background-image:linear-gradient(to bottom,#0dbab5,#2e62df);color:#fff;border-radius:5px}\n"], components: [{ type: DynamicFormTextItemComponent, selector: "app-dynamic-form-textitem", inputs: ["autoComplete", "nativeAutoComplete", "autoComplete_pageProvider", "autoComplete_propertyName", "autoComplete_propertyKey", "autoCompleteValueKey", "autoCompleteType", "tenantId", "emitFullObject", "outsideParams", "type", "property", "label", "editable", "placeholder", "disabled", "displayEmpty", "preventSpace", "id", "maxCharsNum"] }, { type: DynamicFormVocabularyItemComponent, selector: "app-dynamic-form-vocabulary-item", inputs: ["bindValue", "bindLabel", "placeholder", "multiple", "searchable", "closeOnSelect", "hideSelectedItems", "disabled", "vocabularyType", "label", "cacheable", "shwoAllValues"], outputs: ["onSelecting"] }, { type: DynamicFormHijriDateitemComponent, selector: "cts-dynamic-form-hijri-dateitem", inputs: ["minHijri", "maxHijri", "minGreg", "maxGreg", "label", "isDisabled", "range", "vertical", "isReadOnly", "placeholder"], outputs: ["valueChanged"] }, { type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty", "customParams"], outputs: ["onSelecting", "actionClicked"] }, { type: DynamicFormSlideToggleitemComponent, selector: "cts-dynamic-form-slide-toggleitem", inputs: ["label", "disabled", "checked", "theme"], outputs: ["onToggle"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1$1.TranslatePipe } });
|
|
16791
16791
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: FilterComponent, decorators: [{
|
|
16792
16792
|
type: Component,
|
|
16793
16793
|
args: [{
|
|
@@ -21640,7 +21640,7 @@ class SelectUsersByDepartmentsComponent {
|
|
|
21640
21640
|
}
|
|
21641
21641
|
}
|
|
21642
21642
|
SelectUsersByDepartmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SelectUsersByDepartmentsComponent, deps: [{ token: DepartmentManagementService }, { token: i6.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
21643
|
-
SelectUsersByDepartmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SelectUsersByDepartmentsComponent, selector: "app-select-users-by-departments", inputs: { display: "display", depLabel: "depLabel", userLabel: "userLabel", allowMultipleUsers: "allowMultipleUsers" }, outputs: { formChanged: "formChanged" }, host: { classAttribute: "userByDepSelectors" }, ngImport: i0, template: "<form [formGroup]=\"depAnditsUsers\">\r\n <div class=\"w-full flex justify-between\"\r\n [ngClass]=\"{'flex-row': display === 'row', 'flex-col': display === 'column'}\">\r\n <div class=\"flex flex-col w-full flex-1 depWrapper\">\r\n <label class=\"dep-label\">\r\n {{depLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-container *ngIf=\"!reseting\">\r\n <app-dynamic-form-department \r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n <ng-container *ngIf=\"reseting\">\r\n <app-dynamic-form-department\r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex flex-col w-full flex-1 usersWrapper\"\r\n [ngClass]=\"{'mt-4': display === 'column'}\">\r\n <label class=\"users-label\">\r\n {{userLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-select \r\n formControlName=\"users\"\r\n #ngSelectComponent \r\n [items]=\"depUsers\" \r\n bindLabel=\"properties.fullName\" \r\n bindValue=\"properties.username\" \r\n [multiple]=\"allowMultipleUsers\"\r\n [placeholder]=\"'share.placeholder' | translate\"\r\n (change)=\"setUser()\"\r\n >\r\n <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\r\n <div class=\"ng-option disabled\" *ngIf=\"!depAnditsUsers?.get('dep').value;else notFound\">\r\n {{'archiveSearch.select_dep' | translate}}\r\n </div>\r\n <ng-template #notFound>\r\n <div class=\"ng-option disabled\">\r\n {{'archiveSearch.noUsers' | translate}}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\r\n <div class=\"flex flex-col h-full\">\r\n <div *ngIf=\"item\" class=\"flex flex-row\">\r\n <div class=\"flex-0 w-8 h-8 rounded-full overflow-hidden\">\r\n <cts-avatar [user]=\"{\r\n properties: {\r\n firstName: item.properties?.firstName,\r\n lastName: item.properties?.lastName\r\n }\r\n }\">\r\n </cts-avatar>\r\n </div>\r\n <div class=\"flex flex-col pt-0 px-2\">\r\n <span>{{item.properties?.fullName}}</span>\r\n <span>{{item.properties?.email}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n</form>", styles: [".userByDepSelectors ngx-dropdown-treeview>.dropdown{@apply bg-primary-50 border-primary-100 !important;}.userByDepSelectors .ng-select .ng-select-container .ng-value-container .ng-placeholder{font-size:12px!important;margin-top:4px!important}\n"], components: [{ type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty"], outputs: ["onSelecting", "actionClicked"] }, { type: i4$2.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: AvatarComponent, selector: "cts-avatar", inputs: ["user"] }], directives: [{ type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$2.ɵl, selector: "[ng-notfound-tmp]" }, { type: i4$2.ɵf, selector: "[ng-option-tmp]" }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
21643
|
+
SelectUsersByDepartmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: SelectUsersByDepartmentsComponent, selector: "app-select-users-by-departments", inputs: { display: "display", depLabel: "depLabel", userLabel: "userLabel", allowMultipleUsers: "allowMultipleUsers" }, outputs: { formChanged: "formChanged" }, host: { classAttribute: "userByDepSelectors" }, ngImport: i0, template: "<form [formGroup]=\"depAnditsUsers\">\r\n <div class=\"w-full flex justify-between\"\r\n [ngClass]=\"{'flex-row': display === 'row', 'flex-col': display === 'column'}\">\r\n <div class=\"flex flex-col w-full flex-1 depWrapper\">\r\n <label class=\"dep-label\">\r\n {{depLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-container *ngIf=\"!reseting\">\r\n <app-dynamic-form-department \r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n <ng-container *ngIf=\"reseting\">\r\n <app-dynamic-form-department\r\n #depRef\r\n formControlName=\"dep\"\r\n placeholder=\"placeholder\"\r\n [treeview]=\"false\"\r\n [pp_departmentNestedTree]=\"'PP_OS_Departments'\"\r\n [pp_departmentTree]=\"'PP_OS_Departments'\"\r\n [customPrefix]=\"'osdept'\"\r\n [customParentProperty]=\"'osdepartment_parentDepartmentCode'\"\r\n [useCustomAddEditAction]=\"true\"\r\n (onSelecting)=\"getDepMembers($event)\"\r\n >\r\n </app-dynamic-form-department>\r\n </ng-container>\r\n </div>\r\n <div class=\"flex flex-col w-full flex-1 usersWrapper\"\r\n [ngClass]=\"{'mt-4': display === 'column'}\">\r\n <label class=\"users-label\">\r\n {{userLabel}}\r\n <span class=\"text-danger\" *ngIf=\"isRequired()\">*</span>\r\n </label>\r\n <ng-select \r\n formControlName=\"users\"\r\n #ngSelectComponent \r\n [items]=\"depUsers\" \r\n bindLabel=\"properties.fullName\" \r\n bindValue=\"properties.username\" \r\n [multiple]=\"allowMultipleUsers\"\r\n [placeholder]=\"'share.placeholder' | translate\"\r\n (change)=\"setUser()\"\r\n >\r\n <ng-template ng-notfound-tmp let-searchTerm=\"searchTerm\">\r\n <div class=\"ng-option disabled\" *ngIf=\"!depAnditsUsers?.get('dep').value;else notFound\">\r\n {{'archiveSearch.select_dep' | translate}}\r\n </div>\r\n <ng-template #notFound>\r\n <div class=\"ng-option disabled\">\r\n {{'archiveSearch.noUsers' | translate}}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\r\n <div class=\"flex flex-col h-full\">\r\n <div *ngIf=\"item\" class=\"flex flex-row\">\r\n <div class=\"flex-0 w-8 h-8 rounded-full overflow-hidden\">\r\n <cts-avatar [user]=\"{\r\n properties: {\r\n firstName: item.properties?.firstName,\r\n lastName: item.properties?.lastName\r\n }\r\n }\">\r\n </cts-avatar>\r\n </div>\r\n <div class=\"flex flex-col pt-0 px-2\">\r\n <span>{{item.properties?.fullName}}</span>\r\n <span>{{item.properties?.email}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n </div>\r\n</form>", styles: [".userByDepSelectors ngx-dropdown-treeview>.dropdown{@apply bg-primary-50 border-primary-100 !important;}.userByDepSelectors .ng-select .ng-select-container .ng-value-container .ng-placeholder{font-size:12px!important;margin-top:4px!important}\n"], components: [{ type: DynamicFormDepartmentComponent, selector: "app-dynamic-form-department", inputs: ["treeview", "treeViewAsFormControl", "placeholder", "multiple", "searchable", "label", "defaultSelect", "pp_departmentNestedTree", "pp_departmentTree", "customPrefix", "useCustomAddEditAction", "customParentProperty", "customParams"], outputs: ["onSelecting", "actionClicked"] }, { type: i4$2.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: AvatarComponent, selector: "cts-avatar", inputs: ["user"] }], directives: [{ type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4$2.ɵl, selector: "[ng-notfound-tmp]" }, { type: i4$2.ɵf, selector: "[ng-option-tmp]" }], pipes: { "translate": i1$1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
21644
21644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: SelectUsersByDepartmentsComponent, decorators: [{
|
|
21645
21645
|
type: Component,
|
|
21646
21646
|
args: [{
|