@senior-gestao-pessoas/hcm-advanced-filter-general 4.1.1 → 4.1.2-develop-6ef17d35
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/senior-gestao-pessoas-hcm-advanced-filter-general.umd.js +158 -41
- package/bundles/senior-gestao-pessoas-hcm-advanced-filter-general.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-hcm-advanced-filter-general.umd.min.js +2 -2
- package/bundles/senior-gestao-pessoas-hcm-advanced-filter-general.umd.min.js.map +1 -1
- package/esm2015/lib/advanced-filter/advanced-filter.component.js +36 -20
- package/esm2015/lib/advanced-filter-fields/advanced-filter-fields.component.js +9 -5
- package/esm2015/lib/filter-container/filter-container.component.js +30 -12
- package/esm2015/lib/filter-container/filter-container.module.js +12 -2
- package/esm2015/senior-gestao-pessoas-hcm-advanced-filter-general.js +3 -2
- package/esm2015/shared/services/permission.service.js +35 -0
- package/esm2015/shared/storage/storage.service.js +7 -1
- package/esm5/lib/advanced-filter/advanced-filter.component.js +63 -22
- package/esm5/lib/advanced-filter-fields/advanced-filter-fields.component.js +9 -5
- package/esm5/lib/filter-container/filter-container.component.js +34 -12
- package/esm5/lib/filter-container/filter-container.module.js +12 -2
- package/esm5/senior-gestao-pessoas-hcm-advanced-filter-general.js +3 -2
- package/esm5/shared/services/permission.service.js +37 -0
- package/esm5/shared/storage/storage.service.js +12 -1
- package/fesm2015/senior-gestao-pessoas-hcm-advanced-filter-general.js +117 -36
- package/fesm2015/senior-gestao-pessoas-hcm-advanced-filter-general.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-hcm-advanced-filter-general.js +155 -38
- package/fesm5/senior-gestao-pessoas-hcm-advanced-filter-general.js.map +1 -1
- package/lib/advanced-filter/advanced-filter.component.d.ts +3 -2
- package/lib/advanced-filter-fields/advanced-filter-fields.component.d.ts +1 -0
- package/lib/filter-container/filter-container.component.d.ts +8 -3
- package/package.json +1 -1
- package/senior-gestao-pessoas-hcm-advanced-filter-general.d.ts +2 -1
- package/senior-gestao-pessoas-hcm-advanced-filter-general.metadata.json +1 -1
- package/shared/services/permission.service.d.ts +8 -0
- package/shared/storage/storage.service.d.ts +2 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@seniorsistemas/angular-components'), require('angular2-hotkeys'), require('primeng/dropdown'), require('primeng/messages'), require('primeng/toast'), require('primeng/tooltip'), require('@senior-gestao-pessoas/hcm-entity-lookups'), require('moment'), require('primeng/api'), require('primeng/confirmdialog'), require('primeng/dialog'), require('primeng/inputtext'), require('@seniorsistemas/senior-platform-data'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('primeng/selectbutton')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@senior-gestao-pessoas/hcm-advanced-filter-general', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@seniorsistemas/angular-components', 'angular2-hotkeys', 'primeng/dropdown', 'primeng/messages', 'primeng/toast', 'primeng/tooltip', '@senior-gestao-pessoas/hcm-entity-lookups', 'moment', 'primeng/api', 'primeng/confirmdialog', 'primeng/dialog', 'primeng/inputtext', '@seniorsistemas/senior-platform-data', 'rxjs', 'rxjs/operators', '@angular/common/http', 'primeng/selectbutton'], factory) :
|
|
4
|
-
(global = global || self, factory((global['senior-gestao-pessoas'] = global['senior-gestao-pessoas'] || {}, global['senior-gestao-pessoas']['hcm-advanced-filter-general'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.angularComponents, global.angular2Hotkeys, global.dropdown, global.messages, global.toast, global.tooltip, global.hcmEntityLookups, global.moment_, global.api, global.confirmdialog, global.dialog, global.inputtext, global.seniorPlatformData, global.rxjs, global.rxjs.operators, global.ng.common.http, global.selectbutton));
|
|
5
|
-
}(this, (function (exports, common, core, forms, core$1, angularComponents, angular2Hotkeys, dropdown, messages, toast, tooltip, hcmEntityLookups, moment_, api, confirmdialog, dialog, inputtext, seniorPlatformData, rxjs, operators, http, selectbutton) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@seniorsistemas/angular-components'), require('angular2-hotkeys'), require('primeng/dropdown'), require('primeng/messages'), require('primeng/toast'), require('primeng/tooltip'), require('@senior-gestao-pessoas/hcm-entity-lookups'), require('moment'), require('primeng/api'), require('primeng/confirmdialog'), require('primeng/dialog'), require('primeng/inputtext'), require('@seniorsistemas/senior-platform-data'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('primeng/selectbutton'), require('@seniorsistemas/platform-components')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@senior-gestao-pessoas/hcm-advanced-filter-general', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@seniorsistemas/angular-components', 'angular2-hotkeys', 'primeng/dropdown', 'primeng/messages', 'primeng/toast', 'primeng/tooltip', '@senior-gestao-pessoas/hcm-entity-lookups', 'moment', 'primeng/api', 'primeng/confirmdialog', 'primeng/dialog', 'primeng/inputtext', '@seniorsistemas/senior-platform-data', 'rxjs', 'rxjs/operators', '@angular/common/http', 'primeng/selectbutton', '@seniorsistemas/platform-components'], factory) :
|
|
4
|
+
(global = global || self, factory((global['senior-gestao-pessoas'] = global['senior-gestao-pessoas'] || {}, global['senior-gestao-pessoas']['hcm-advanced-filter-general'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.angularComponents, global.angular2Hotkeys, global.dropdown, global.messages, global.toast, global.tooltip, global.hcmEntityLookups, global.moment_, global.api, global.confirmdialog, global.dialog, global.inputtext, global.seniorPlatformData, global.rxjs, global.rxjs.operators, global.ng.common.http, global.selectbutton, global.platformComponents));
|
|
5
|
+
}(this, (function (exports, common, core, forms, core$1, angularComponents, angular2Hotkeys, dropdown, messages, toast, tooltip, hcmEntityLookups, moment_, api, confirmdialog, dialog, inputtext, seniorPlatformData, rxjs, operators, http, selectbutton, platformComponents) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -727,10 +727,8 @@
|
|
|
727
727
|
return currentEntity !== nextEntity;
|
|
728
728
|
};
|
|
729
729
|
AdvancedFilterFieldsComponent.prototype.getConditionType = function (index) {
|
|
730
|
-
var _a
|
|
731
|
-
if (((_a = this.fieldListAdvancedFilter[index]) === null || _a === void 0 ? void 0 : _a.entityName)
|
|
732
|
-
&& ((_b = this.fieldListAdvancedFilter[index]) === null || _b === void 0 ? void 0 : _b.entityName) !== FilterFieldType.TIME_SHIFT_TYPE
|
|
733
|
-
&& ((_c = this.fieldListAdvancedFilter[index]) === null || _c === void 0 ? void 0 : _c.entityName) !== FilterFieldType.COST_CENTER) {
|
|
730
|
+
var _a;
|
|
731
|
+
if (this.lookupsWithOneFilterType((_a = this.fieldListAdvancedFilter[index]) === null || _a === void 0 ? void 0 : _a.entityName)) {
|
|
734
732
|
return this.conditionType;
|
|
735
733
|
}
|
|
736
734
|
else {
|
|
@@ -740,6 +738,12 @@
|
|
|
740
738
|
}];
|
|
741
739
|
}
|
|
742
740
|
};
|
|
741
|
+
AdvancedFilterFieldsComponent.prototype.lookupsWithOneFilterType = function (entityName) {
|
|
742
|
+
return entityName !== FilterFieldType.SALARY_TYPE
|
|
743
|
+
&& entityName !== FilterFieldType.TIME_SHIFT_TYPE
|
|
744
|
+
&& entityName !== FilterFieldType.COST_CENTER
|
|
745
|
+
&& entityName !== FilterFieldType.EMPLOYMENT_RELATIONSHIP;
|
|
746
|
+
};
|
|
743
747
|
AdvancedFilterFieldsComponent.prototype.changeDefaultFieldInformation = function (field, name, index, entityName) {
|
|
744
748
|
field.gridClass = ["ui-g-12"];
|
|
745
749
|
field.label = "";
|
|
@@ -952,7 +956,18 @@
|
|
|
952
956
|
var StorageService = /** @class */ (function () {
|
|
953
957
|
function StorageService() {
|
|
954
958
|
this.GET_USER_ID = seniorPlatformData.user.getUserData().then(function (user) { return user.id; });
|
|
959
|
+
this.GET_USERNAME = seniorPlatformData.user.getUserData().then(function (user) { return (user === null || user === void 0 ? void 0 : user.username) + "@" + (user === null || user === void 0 ? void 0 : user.tenantDomain); });
|
|
955
960
|
}
|
|
961
|
+
StorageService.prototype.getUser = function () {
|
|
962
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
963
|
+
return __generator(this, function (_a) {
|
|
964
|
+
switch (_a.label) {
|
|
965
|
+
case 0: return [4 /*yield*/, this.GET_USERNAME];
|
|
966
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
});
|
|
970
|
+
};
|
|
956
971
|
StorageService.prototype.store = function (key, value) {
|
|
957
972
|
return __awaiter(this, void 0, void 0, function () {
|
|
958
973
|
var _a, _b;
|
|
@@ -1585,18 +1600,30 @@
|
|
|
1585
1600
|
});
|
|
1586
1601
|
};
|
|
1587
1602
|
AdvancedFilterComponent.prototype.onAdvancedFilterSearchRequest = function (event) {
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1603
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1604
|
+
var first, rows, multiSortMeta, filterData, page, sort, filterQuery;
|
|
1605
|
+
var _this = this;
|
|
1606
|
+
return __generator(this, function (_a) {
|
|
1607
|
+
switch (_a.label) {
|
|
1608
|
+
case 0:
|
|
1609
|
+
first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
|
|
1610
|
+
page = first / rows;
|
|
1611
|
+
sort = multiSortMeta;
|
|
1612
|
+
filterQuery = createSearchRequestFilter(filterData, this.getAdvancedFilterFields());
|
|
1613
|
+
return [4 /*yield*/, this.buildFilterByUsername(filterQuery)];
|
|
1614
|
+
case 1:
|
|
1615
|
+
filterQuery = _a.sent();
|
|
1616
|
+
this.advancedFilterService
|
|
1617
|
+
.list({ page: page, sort: sort, filterQuery: filterQuery })
|
|
1618
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1619
|
+
.pipe(operators.map(function (list) { return _this.mapToComponent(list); }))
|
|
1620
|
+
.subscribe(function (list) {
|
|
1621
|
+
_this.advancedFilterSearchGridData = list.contents;
|
|
1622
|
+
_this.advancedFilterSearchTotalRecords = list.totalElements;
|
|
1623
|
+
});
|
|
1624
|
+
return [2 /*return*/];
|
|
1625
|
+
}
|
|
1626
|
+
});
|
|
1600
1627
|
});
|
|
1601
1628
|
};
|
|
1602
1629
|
AdvancedFilterComponent.prototype.mapToComponent = function (list) {
|
|
@@ -1645,15 +1672,27 @@
|
|
|
1645
1672
|
}, function () { return _this.loading = false; });
|
|
1646
1673
|
};
|
|
1647
1674
|
AdvancedFilterComponent.prototype.onAdvancedFilterLookupRequest = function (value) {
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1675
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1676
|
+
var sort, filterQuery;
|
|
1677
|
+
var _this = this;
|
|
1678
|
+
return __generator(this, function (_a) {
|
|
1679
|
+
switch (_a.label) {
|
|
1680
|
+
case 0:
|
|
1681
|
+
sort = this.advancedFilterLookupDisplayFields.map(function (field) { return ({ field: field, order: 1 }); });
|
|
1682
|
+
filterQuery = createLookupRequestFilter(value, this.getAdvancedFilterFields());
|
|
1683
|
+
return [4 /*yield*/, this.buildFilterByUsername(filterQuery)];
|
|
1684
|
+
case 1:
|
|
1685
|
+
filterQuery = _a.sent();
|
|
1686
|
+
this.advancedFilterService
|
|
1687
|
+
.list({ sort: sort, filterQuery: filterQuery })
|
|
1688
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1689
|
+
.pipe(operators.map(function (list) { return _this.mapToComponent(list); }))
|
|
1690
|
+
.subscribe(function (list) {
|
|
1691
|
+
_this.advancedFilterLookupSuggestions = list.contents;
|
|
1692
|
+
});
|
|
1693
|
+
return [2 /*return*/];
|
|
1694
|
+
}
|
|
1695
|
+
});
|
|
1657
1696
|
});
|
|
1658
1697
|
};
|
|
1659
1698
|
AdvancedFilterComponent.prototype.getAdvancedFilterFields = function () {
|
|
@@ -1665,6 +1704,23 @@
|
|
|
1665
1704
|
}),
|
|
1666
1705
|
];
|
|
1667
1706
|
};
|
|
1707
|
+
AdvancedFilterComponent.prototype.buildFilterByUsername = function (filterQuery) {
|
|
1708
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1709
|
+
var user, filterString;
|
|
1710
|
+
return __generator(this, function (_a) {
|
|
1711
|
+
switch (_a.label) {
|
|
1712
|
+
case 0: return [4 /*yield*/, this.filtersStorageService.getUser()];
|
|
1713
|
+
case 1:
|
|
1714
|
+
user = _a.sent();
|
|
1715
|
+
if (user) {
|
|
1716
|
+
filterString = "username eq '" + user + "'";
|
|
1717
|
+
filterQuery = filterQuery ? filterQuery + " and (" + filterString + ")" : filterString;
|
|
1718
|
+
}
|
|
1719
|
+
return [2 /*return*/, filterQuery];
|
|
1720
|
+
}
|
|
1721
|
+
});
|
|
1722
|
+
});
|
|
1723
|
+
};
|
|
1668
1724
|
AdvancedFilterComponent.prototype.validateFieldsSaveAndApply = function () {
|
|
1669
1725
|
var arrFormGroup = this.formGroup.get("advancedFilterFields");
|
|
1670
1726
|
var rowInvalid = false;
|
|
@@ -2336,26 +2392,60 @@
|
|
|
2336
2392
|
ProcessFilterType["ADVANCED_FILTER"] = "ADVANCED_FILTER";
|
|
2337
2393
|
})(exports.ProcessFilterType || (exports.ProcessFilterType = {}));
|
|
2338
2394
|
|
|
2395
|
+
var PermissionService = /** @class */ (function () {
|
|
2396
|
+
function PermissionService(permissionsService) {
|
|
2397
|
+
this.permissionsService = permissionsService;
|
|
2398
|
+
}
|
|
2399
|
+
PermissionService.prototype.hasPermissionsToViewAdvancedFilter = function () {
|
|
2400
|
+
return this.checkPermissions([
|
|
2401
|
+
{
|
|
2402
|
+
actions: ["visualizar"],
|
|
2403
|
+
entities: ["advancedFilter"],
|
|
2404
|
+
},
|
|
2405
|
+
]);
|
|
2406
|
+
};
|
|
2407
|
+
PermissionService.prototype.checkPermissions = function (permissionsToCheckArr) {
|
|
2408
|
+
var _this = this;
|
|
2409
|
+
return rxjs.forkJoin(permissionsToCheckArr.map(function (permissionsToCheck) {
|
|
2410
|
+
return rxjs.forkJoin(permissionsToCheck.entities.map(function (entity) { return _this.permissionsService.get(entity); })).pipe(operators.map(function (entitiesActionPermissions) {
|
|
2411
|
+
return entitiesActionPermissions.every(function (entityActionPermissions) {
|
|
2412
|
+
return permissionsToCheck.actions.every(function (action) { return entityActionPermissions[action]; });
|
|
2413
|
+
});
|
|
2414
|
+
}));
|
|
2415
|
+
})).pipe(operators.map(function (values) { return values.every(function (value) { return value; }); }));
|
|
2416
|
+
};
|
|
2417
|
+
PermissionService.ctorParameters = function () { return [
|
|
2418
|
+
{ type: platformComponents.PermissionsService }
|
|
2419
|
+
]; };
|
|
2420
|
+
PermissionService = __decorate([
|
|
2421
|
+
core.Injectable()
|
|
2422
|
+
], PermissionService);
|
|
2423
|
+
return PermissionService;
|
|
2424
|
+
}());
|
|
2425
|
+
|
|
2339
2426
|
var FilterContainerComponent = /** @class */ (function () {
|
|
2340
|
-
function FilterContainerComponent(translate, filtersStorageService) {
|
|
2427
|
+
function FilterContainerComponent(translate, filtersStorageService, permissionService, cdr) {
|
|
2341
2428
|
this.translate = translate;
|
|
2342
2429
|
this.filtersStorageService = filtersStorageService;
|
|
2430
|
+
this.permissionService = permissionService;
|
|
2431
|
+
this.cdr = cdr;
|
|
2343
2432
|
this.advancedFilterIsPresentInCache = false;
|
|
2433
|
+
this.searchTokensSubject = new rxjs.Subject();
|
|
2434
|
+
this.tokens = [];
|
|
2435
|
+
this.KEY_STORAGE = "AdvancedFilterComponent";
|
|
2436
|
+
this.filterTypeChanged = new core.EventEmitter();
|
|
2437
|
+
this.loadFilterFieldsOnInit = true;
|
|
2344
2438
|
this.filterOptions = [
|
|
2345
2439
|
{
|
|
2346
2440
|
label: "" + this.translate.instant("hcm_contract.employment_contract.advanced_filter_basic_filter_tab"),
|
|
2347
|
-
value: exports.ProcessFilterType.BASIC_FILTER
|
|
2441
|
+
value: exports.ProcessFilterType.BASIC_FILTER,
|
|
2348
2442
|
},
|
|
2349
2443
|
{
|
|
2350
2444
|
label: "" + this.translate.instant("hcm_contract.employment_contract.advanced_filter_side_bar_title"),
|
|
2351
|
-
value: exports.ProcessFilterType.ADVANCED_FILTER
|
|
2445
|
+
value: exports.ProcessFilterType.ADVANCED_FILTER,
|
|
2352
2446
|
}
|
|
2353
2447
|
];
|
|
2354
|
-
this.
|
|
2355
|
-
this.tokens = [];
|
|
2356
|
-
this.KEY_STORAGE = "AdvancedFilterComponent";
|
|
2357
|
-
this.filterTypeChanged = new core.EventEmitter();
|
|
2358
|
-
this.loadFilterFieldsOnInit = true;
|
|
2448
|
+
this.checkPermission();
|
|
2359
2449
|
}
|
|
2360
2450
|
Object.defineProperty(FilterContainerComponent.prototype, "searchTokens", {
|
|
2361
2451
|
set: function (tokens) {
|
|
@@ -2367,6 +2457,9 @@
|
|
|
2367
2457
|
enumerable: true,
|
|
2368
2458
|
configurable: true
|
|
2369
2459
|
});
|
|
2460
|
+
FilterContainerComponent.prototype.ngAfterViewChecked = function () {
|
|
2461
|
+
this.cdr.detectChanges();
|
|
2462
|
+
};
|
|
2370
2463
|
FilterContainerComponent.prototype.ngOnInit = function () {
|
|
2371
2464
|
var _this = this;
|
|
2372
2465
|
this.searchTokensSubject.subscribe(function (tokens) {
|
|
@@ -2535,9 +2628,24 @@
|
|
|
2535
2628
|
FilterContainerComponent.prototype.isAdvancedFilterPresent = function (advancedFilter) {
|
|
2536
2629
|
return Object.keys(advancedFilter).length > 0;
|
|
2537
2630
|
};
|
|
2631
|
+
FilterContainerComponent.prototype.checkPermission = function () {
|
|
2632
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2633
|
+
var _this = this;
|
|
2634
|
+
return __generator(this, function (_a) {
|
|
2635
|
+
this.permissionService.hasPermissionsToViewAdvancedFilter().subscribe(function (hasPermission) {
|
|
2636
|
+
if (!hasPermission) {
|
|
2637
|
+
_this.filterOptions.splice(1, 1);
|
|
2638
|
+
}
|
|
2639
|
+
});
|
|
2640
|
+
return [2 /*return*/];
|
|
2641
|
+
});
|
|
2642
|
+
});
|
|
2643
|
+
};
|
|
2538
2644
|
FilterContainerComponent.ctorParameters = function () { return [
|
|
2539
2645
|
{ type: core$1.TranslateService },
|
|
2540
|
-
{ type: FiltersStorageService }
|
|
2646
|
+
{ type: FiltersStorageService },
|
|
2647
|
+
{ type: PermissionService },
|
|
2648
|
+
{ type: core.ChangeDetectorRef }
|
|
2541
2649
|
]; };
|
|
2542
2650
|
__decorate([
|
|
2543
2651
|
core.ViewChild("selectButton")
|
|
@@ -2563,7 +2671,7 @@
|
|
|
2563
2671
|
FilterContainerComponent = __decorate([
|
|
2564
2672
|
core.Component({
|
|
2565
2673
|
selector: "fnd-filter-container",
|
|
2566
|
-
template: "<div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <div class=\"ui-g-3 ui-sm-12 select-button-container\" [ngClass]=\"{'list-container': filterType === 'LIST'}\">\n <div class=\"select-button-child\">\n <p-selectButton #selectButton id=\"select-button\" [options]=\"filterOptions\" optionLabel=\"label\"\n [(ngModel)]=\"selectedFilter\" optionValue=\"value\" (onOptionClick)=\"onSwitchSelectButton()\">\n </p-selectButton>\n </div>\n </div>\n <div class=\"ui-g-12 ui-md-12 required\" [ngSwitch]=\"selectedFilterType\">\n <div *ngSwitchCase=\"'BASIC_FILTER'\">\n <ng-content></ng-content>\n </div>\n <div *ngSwitchCase=\"'ADVANCED_FILTER'\">\n <div class=\"ui-g-12 ui-md-6\">\n <fnd-advanced-filter\n [parentFormGroup]=\"formGroup\"\n (advancedFilterEvent)=\"onEventAdvancedFilter($event)\"\n [advancedFilterControlName]=\"filterControls.ADVANCED_FILTER[0]\"\n [loadFilterFieldsOnInit]=\"loadFilterFieldsOnInit\">\n </fnd-advanced-filter>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
2674
|
+
template: "<div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <div class=\"ui-g-3 ui-sm-12 select-button-container\"\n [hidden]=\"filterOptions.length < 2\"\n [ngClass]=\"{'list-container': filterType === 'LIST'}\">\n <div class=\"select-button-child\">\n <p-selectButton #selectButton id=\"select-button\" [options]=\"filterOptions\" optionLabel=\"label\"\n [(ngModel)]=\"selectedFilter\" optionValue=\"value\" (onOptionClick)=\"onSwitchSelectButton()\">\n </p-selectButton>\n </div>\n </div>\n <div class=\"ui-g-12 ui-md-12 required\" [ngSwitch]=\"selectedFilterType\">\n <div *ngSwitchCase=\"'BASIC_FILTER'\">\n <ng-content></ng-content>\n </div>\n <div *ngSwitchCase=\"'ADVANCED_FILTER'\">\n <div class=\"ui-g-12 ui-md-6\">\n <fnd-advanced-filter\n [parentFormGroup]=\"formGroup\"\n (advancedFilterEvent)=\"onEventAdvancedFilter($event)\"\n [advancedFilterControlName]=\"filterControls.ADVANCED_FILTER[0]\"\n [loadFilterFieldsOnInit]=\"loadFilterFieldsOnInit\">\n </fnd-advanced-filter>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
2567
2675
|
styles: ["::ng-deep .ui-selectbutton.ui-buttonset .ui-button.ui-state-active{background:#428bca!important;color:#fff!important}@media (min-width:640px) and (max-width:1130px){.select-button-container{width:50%}}.list-container{margin-top:.5%}"]
|
|
2568
2676
|
})
|
|
2569
2677
|
], FilterContainerComponent);
|
|
@@ -2631,6 +2739,13 @@
|
|
|
2631
2739
|
angularComponents.ControlErrorsModule,
|
|
2632
2740
|
forms.FormsModule,
|
|
2633
2741
|
forms.ReactiveFormsModule,
|
|
2742
|
+
platformComponents.PermissionsModule.forChild([
|
|
2743
|
+
{
|
|
2744
|
+
name: "advancedFilter",
|
|
2745
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
2746
|
+
uri: "res://senior.com.br/hcm_advanced_filter/general/entities/advancedFilter",
|
|
2747
|
+
},
|
|
2748
|
+
]),
|
|
2634
2749
|
hcmEntityLookups.EntityLookupModule.forRoot({
|
|
2635
2750
|
domain: "hcm_contract",
|
|
2636
2751
|
service: "employment_contract",
|
|
@@ -2638,7 +2753,8 @@
|
|
|
2638
2753
|
],
|
|
2639
2754
|
providers: [
|
|
2640
2755
|
FiltersStorageService,
|
|
2641
|
-
FilterContainerService
|
|
2756
|
+
FilterContainerService,
|
|
2757
|
+
PermissionService
|
|
2642
2758
|
],
|
|
2643
2759
|
declarations: [FilterContainerComponent],
|
|
2644
2760
|
exports: [FilterContainerComponent]
|
|
@@ -2658,7 +2774,8 @@
|
|
|
2658
2774
|
exports.ɵc = EntityService;
|
|
2659
2775
|
exports.ɵd = FiltersStorageService;
|
|
2660
2776
|
exports.ɵe = StorageService;
|
|
2661
|
-
exports.ɵf =
|
|
2777
|
+
exports.ɵf = PermissionService;
|
|
2778
|
+
exports.ɵg = FilterContainerComponent;
|
|
2662
2779
|
|
|
2663
2780
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2664
2781
|
|