@senior-gestao-pessoas/payroll-core 9.3.0 → 9.4.0-a9314477-d301-4380-b67e-31e2d2abb4e5
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-payroll-core.umd.js +131 -22
- package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
- package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
- package/components/historical-pix-account/historical-pix-account.component.d.ts +17 -3
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +3 -0
- package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +2 -1
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +83 -12
- package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +31 -13
- package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +2 -1
- package/esm5/components/historical-pix-account/historical-pix-account.component.js +99 -12
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +35 -13
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +111 -22
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +131 -22
- package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
|
@@ -9256,17 +9256,23 @@ var FormatUtilsService = /** @class */ (function () {
|
|
|
9256
9256
|
}());
|
|
9257
9257
|
|
|
9258
9258
|
var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
9259
|
-
function HistoricalPixAccountComponent(translateService, cd, formBuilder) {
|
|
9259
|
+
function HistoricalPixAccountComponent(translateService, cd, formBuilder, messageService) {
|
|
9260
9260
|
var _this = this;
|
|
9261
9261
|
this.translateService = translateService;
|
|
9262
9262
|
this.cd = cd;
|
|
9263
9263
|
this.formBuilder = formBuilder;
|
|
9264
|
+
this.messageService = messageService;
|
|
9264
9265
|
this.recordByRow = 1;
|
|
9265
9266
|
this.showDateChange = false;
|
|
9266
9267
|
this.isEditMode = false;
|
|
9267
9268
|
this.isViewMode = false;
|
|
9268
9269
|
this.withSideBar = true;
|
|
9269
9270
|
this.defaultCpfNumber = null;
|
|
9271
|
+
this.listDataReciever = [];
|
|
9272
|
+
this.isViewModeActive = new EventEmitter();
|
|
9273
|
+
this.isEditModeActive = new EventEmitter();
|
|
9274
|
+
this.isDeleteModeActive = new EventEmitter();
|
|
9275
|
+
this.listFromApp = [];
|
|
9270
9276
|
this.visibleChange = new EventEmitter();
|
|
9271
9277
|
this.ngUnsubscribe = new Subject();
|
|
9272
9278
|
this.orderBy = {
|
|
@@ -9300,26 +9306,50 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9300
9306
|
visible: _this.isEditMode,
|
|
9301
9307
|
label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9302
9308
|
command: function () {
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9309
|
+
if (_this.isAllowToViewHistorical) {
|
|
9310
|
+
rowData["index"] = key;
|
|
9311
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
|
|
9312
|
+
_this.visible = true;
|
|
9313
|
+
}
|
|
9314
|
+
else {
|
|
9315
|
+
_this.isViewModeActive.emit(true);
|
|
9316
|
+
}
|
|
9306
9317
|
},
|
|
9307
9318
|
},
|
|
9308
9319
|
{
|
|
9309
9320
|
visible: !!(!_this.isEditMode && _this.withSideBar),
|
|
9310
9321
|
label: _this.translateService.instant("hcm.payroll.edit"),
|
|
9311
9322
|
command: function () {
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9323
|
+
if (_this.isAllowToEditHistorical) {
|
|
9324
|
+
rowData["index"] = key;
|
|
9325
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9326
|
+
_this.visible = true;
|
|
9327
|
+
}
|
|
9328
|
+
else {
|
|
9329
|
+
_this.isEditModeActive.emit(true);
|
|
9330
|
+
if (_this.listFromApp.length == 0) {
|
|
9331
|
+
rowData["index"] = key;
|
|
9332
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9333
|
+
_this.visible = true;
|
|
9334
|
+
}
|
|
9335
|
+
}
|
|
9315
9336
|
},
|
|
9316
9337
|
},
|
|
9317
9338
|
{
|
|
9318
9339
|
visible: !_this.isEditMode,
|
|
9319
9340
|
label: _this.translateService.instant("hcm.payroll.delete"),
|
|
9320
9341
|
command: function () {
|
|
9321
|
-
_this.
|
|
9322
|
-
|
|
9342
|
+
if (_this.isAllowToDeleteHistorical) {
|
|
9343
|
+
_this.loading = true;
|
|
9344
|
+
_this.deleteAnnuityItem(key);
|
|
9345
|
+
}
|
|
9346
|
+
else {
|
|
9347
|
+
_this.isDeleteModeActive.emit(true);
|
|
9348
|
+
if (_this.listFromApp.length == 0) {
|
|
9349
|
+
_this.loading = true;
|
|
9350
|
+
_this.deleteAnnuityItem(key);
|
|
9351
|
+
}
|
|
9352
|
+
}
|
|
9323
9353
|
},
|
|
9324
9354
|
},
|
|
9325
9355
|
];
|
|
@@ -9329,6 +9359,11 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9329
9359
|
HistoricalPixAccountComponent.prototype.ngOnInit = function () {
|
|
9330
9360
|
this.formGroup.setControl(this.fieldFormGroup, this.historicalPixAccountList);
|
|
9331
9361
|
};
|
|
9362
|
+
HistoricalPixAccountComponent.prototype.ngOnChanges = function (changes) {
|
|
9363
|
+
if (changes['listDataReciever'] && changes['listDataReciever'].currentValue) {
|
|
9364
|
+
this.listFromApp = changes['listDataReciever'].currentValue;
|
|
9365
|
+
}
|
|
9366
|
+
};
|
|
9332
9367
|
HistoricalPixAccountComponent.prototype.createFormGroup = function () {
|
|
9333
9368
|
this.historicalPixAccountList = this.formBuilder.group({
|
|
9334
9369
|
historicalPixAccountList: this.formBuilder.control(null),
|
|
@@ -9385,6 +9420,13 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9385
9420
|
this.pixAccountItemInput = {};
|
|
9386
9421
|
this.visible = true;
|
|
9387
9422
|
};
|
|
9423
|
+
HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
|
|
9424
|
+
this.messageService.add({
|
|
9425
|
+
severity: "error",
|
|
9426
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9427
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9428
|
+
});
|
|
9429
|
+
};
|
|
9388
9430
|
HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
|
|
9389
9431
|
var newlist = __spread(this.getHistoricalPixAccountList());
|
|
9390
9432
|
newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
|
|
@@ -9530,10 +9572,39 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9530
9572
|
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
9531
9573
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
9532
9574
|
};
|
|
9575
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
|
|
9576
|
+
get: function () {
|
|
9577
|
+
return (this.permission["incluir"]);
|
|
9578
|
+
},
|
|
9579
|
+
enumerable: true,
|
|
9580
|
+
configurable: true
|
|
9581
|
+
});
|
|
9582
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
|
|
9583
|
+
get: function () {
|
|
9584
|
+
return (this.permission["excluir"]);
|
|
9585
|
+
},
|
|
9586
|
+
enumerable: true,
|
|
9587
|
+
configurable: true
|
|
9588
|
+
});
|
|
9589
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
|
|
9590
|
+
get: function () {
|
|
9591
|
+
return (this.permission["editar"]);
|
|
9592
|
+
},
|
|
9593
|
+
enumerable: true,
|
|
9594
|
+
configurable: true
|
|
9595
|
+
});
|
|
9596
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
|
|
9597
|
+
get: function () {
|
|
9598
|
+
return (this.permission["visualizar"]);
|
|
9599
|
+
},
|
|
9600
|
+
enumerable: true,
|
|
9601
|
+
configurable: true
|
|
9602
|
+
});
|
|
9533
9603
|
HistoricalPixAccountComponent.ctorParameters = function () { return [
|
|
9534
9604
|
{ type: TranslateService },
|
|
9535
9605
|
{ type: ChangeDetectorRef },
|
|
9536
|
-
{ type: FormBuilder }
|
|
9606
|
+
{ type: FormBuilder },
|
|
9607
|
+
{ type: MessageService }
|
|
9537
9608
|
]; };
|
|
9538
9609
|
__decorate([
|
|
9539
9610
|
ViewChild(CustomFieldsComponent$1, { static: false })
|
|
@@ -9583,6 +9654,21 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9583
9654
|
__decorate([
|
|
9584
9655
|
Input()
|
|
9585
9656
|
], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
|
|
9657
|
+
__decorate([
|
|
9658
|
+
Input()
|
|
9659
|
+
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
9660
|
+
__decorate([
|
|
9661
|
+
Input()
|
|
9662
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
9663
|
+
__decorate([
|
|
9664
|
+
Output()
|
|
9665
|
+
], HistoricalPixAccountComponent.prototype, "isViewModeActive", void 0);
|
|
9666
|
+
__decorate([
|
|
9667
|
+
Output()
|
|
9668
|
+
], HistoricalPixAccountComponent.prototype, "isEditModeActive", void 0);
|
|
9669
|
+
__decorate([
|
|
9670
|
+
Output()
|
|
9671
|
+
], HistoricalPixAccountComponent.prototype, "isDeleteModeActive", void 0);
|
|
9586
9672
|
__decorate([
|
|
9587
9673
|
Input()
|
|
9588
9674
|
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
@@ -9814,6 +9900,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
|
|
|
9814
9900
|
percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
|
|
9815
9901
|
Validators.max(this.maxValuePercentage),
|
|
9816
9902
|
]))),
|
|
9903
|
+
externalId: this.formBuilder.control(null),
|
|
9817
9904
|
customFields: this.formBuilder.control(null),
|
|
9818
9905
|
});
|
|
9819
9906
|
};
|
|
@@ -10246,6 +10333,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10246
10333
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
10247
10334
|
this.keyPayload = "historicalEmployeePix";
|
|
10248
10335
|
this.withSidebar = true;
|
|
10336
|
+
this.isOnlyView = new EventEmitter();
|
|
10249
10337
|
this.enableView = new EventEmitter();
|
|
10250
10338
|
this.ngUnsubscribe = new Subject();
|
|
10251
10339
|
this.loading = true;
|
|
@@ -10313,13 +10401,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10313
10401
|
{
|
|
10314
10402
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
10315
10403
|
command: function () {
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
_this.
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10404
|
+
if (_this.isAllowToViewHistorical) {
|
|
10405
|
+
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10406
|
+
if (_this.withSidebar) {
|
|
10407
|
+
_this.isOnlyView.emit(true);
|
|
10408
|
+
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10409
|
+
relativeTo: _this.activatedRoute,
|
|
10410
|
+
});
|
|
10411
|
+
}
|
|
10412
|
+
else {
|
|
10413
|
+
_this.enableView.emit(dateChange);
|
|
10414
|
+
}
|
|
10415
|
+
}
|
|
10416
|
+
else {
|
|
10417
|
+
_this.isNotAllowMessage();
|
|
10418
|
+
}
|
|
10323
10419
|
},
|
|
10324
10420
|
},
|
|
10325
10421
|
{
|
|
@@ -10329,11 +10425,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10329
10425
|
_this.delete(rowData.id, rowData.dateChange);
|
|
10330
10426
|
}
|
|
10331
10427
|
else {
|
|
10332
|
-
_this.
|
|
10333
|
-
severity: "error",
|
|
10334
|
-
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
10335
|
-
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10336
|
-
});
|
|
10428
|
+
_this.isNotAllowMessage();
|
|
10337
10429
|
}
|
|
10338
10430
|
},
|
|
10339
10431
|
},
|
|
@@ -10391,6 +10483,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10391
10483
|
});
|
|
10392
10484
|
}
|
|
10393
10485
|
};
|
|
10486
|
+
HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
|
|
10487
|
+
this.messageService.add({
|
|
10488
|
+
severity: "error",
|
|
10489
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
10490
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10491
|
+
});
|
|
10492
|
+
};
|
|
10394
10493
|
HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
|
|
10395
10494
|
if (payload && payload.length) {
|
|
10396
10495
|
this.lastRecord = payload[0];
|
|
@@ -10410,6 +10509,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10410
10509
|
enumerable: true,
|
|
10411
10510
|
configurable: true
|
|
10412
10511
|
});
|
|
10512
|
+
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
|
|
10513
|
+
get: function () {
|
|
10514
|
+
return (this.permission["visualizar"]);
|
|
10515
|
+
},
|
|
10516
|
+
enumerable: true,
|
|
10517
|
+
configurable: true
|
|
10518
|
+
});
|
|
10413
10519
|
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
|
|
10414
10520
|
get: function () {
|
|
10415
10521
|
return this.getMenuActions.bind(this);
|
|
@@ -10460,6 +10566,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10460
10566
|
__decorate([
|
|
10461
10567
|
Input()
|
|
10462
10568
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
10569
|
+
__decorate([
|
|
10570
|
+
Output()
|
|
10571
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
10463
10572
|
__decorate([
|
|
10464
10573
|
Output()
|
|
10465
10574
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|