@senior-gestao-pessoas/payroll-core 9.3.0-784091e9-e857-4112-9344-e47026fdac80 → 9.3.0-7aaf9dac-728c-48d9-acf3-c7589164bebb
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 +126 -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 +14 -2
- package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +3 -0
- package/esm2015/components/historical-pix-account/historical-pix-account.component.js +79 -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.component.js +95 -12
- package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +35 -13
- package/fesm2015/senior-gestao-pessoas-payroll-core.js +106 -22
- package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
- package/fesm5/senior-gestao-pessoas-payroll-core.js +126 -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,22 @@ 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.isOnlyView = new EventEmitter();
|
|
9273
|
+
this.isOnlyEdit = new EventEmitter();
|
|
9274
|
+
this.isOnlyDelete = new EventEmitter();
|
|
9270
9275
|
this.visibleChange = new EventEmitter();
|
|
9271
9276
|
this.ngUnsubscribe = new Subject();
|
|
9272
9277
|
this.orderBy = {
|
|
@@ -9300,26 +9305,52 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9300
9305
|
visible: _this.isEditMode,
|
|
9301
9306
|
label: _this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
9302
9307
|
command: function () {
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9308
|
+
if (_this.isAllowToViewHistorical) {
|
|
9309
|
+
rowData["index"] = key;
|
|
9310
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: false };
|
|
9311
|
+
_this.visible = true;
|
|
9312
|
+
}
|
|
9313
|
+
else {
|
|
9314
|
+
_this.isOnlyView.emit(true);
|
|
9315
|
+
}
|
|
9306
9316
|
},
|
|
9307
9317
|
},
|
|
9308
9318
|
{
|
|
9309
9319
|
visible: !!(!_this.isEditMode && _this.withSideBar),
|
|
9310
9320
|
label: _this.translateService.instant("hcm.payroll.edit"),
|
|
9311
9321
|
command: function () {
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9322
|
+
if (_this.isAllowToEditHistorical) {
|
|
9323
|
+
console.log("ENTER IN isAllowToEditHistorical");
|
|
9324
|
+
rowData["index"] = key;
|
|
9325
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9326
|
+
_this.visible = true;
|
|
9327
|
+
}
|
|
9328
|
+
else {
|
|
9329
|
+
_this.isOnlyEdit.emit(true);
|
|
9330
|
+
if (!_this.listDataReciever) {
|
|
9331
|
+
console.log("ENTER IN listDataReciever");
|
|
9332
|
+
rowData["index"] = key;
|
|
9333
|
+
_this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
|
|
9334
|
+
_this.visible = true;
|
|
9335
|
+
}
|
|
9336
|
+
}
|
|
9315
9337
|
},
|
|
9316
9338
|
},
|
|
9317
9339
|
{
|
|
9318
9340
|
visible: !_this.isEditMode,
|
|
9319
9341
|
label: _this.translateService.instant("hcm.payroll.delete"),
|
|
9320
9342
|
command: function () {
|
|
9321
|
-
_this.
|
|
9322
|
-
|
|
9343
|
+
if (_this.isAllowToDeleteHistorical) {
|
|
9344
|
+
_this.loading = true;
|
|
9345
|
+
_this.deleteAnnuityItem(key);
|
|
9346
|
+
}
|
|
9347
|
+
else {
|
|
9348
|
+
_this.isOnlyDelete.emit(true);
|
|
9349
|
+
if (!_this.listDataReciever) {
|
|
9350
|
+
_this.loading = true;
|
|
9351
|
+
_this.deleteAnnuityItem(key);
|
|
9352
|
+
}
|
|
9353
|
+
}
|
|
9323
9354
|
},
|
|
9324
9355
|
},
|
|
9325
9356
|
];
|
|
@@ -9385,6 +9416,13 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9385
9416
|
this.pixAccountItemInput = {};
|
|
9386
9417
|
this.visible = true;
|
|
9387
9418
|
};
|
|
9419
|
+
HistoricalPixAccountComponent.prototype.isNotAllowMessage = function () {
|
|
9420
|
+
this.messageService.add({
|
|
9421
|
+
severity: "error",
|
|
9422
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
9423
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
9424
|
+
});
|
|
9425
|
+
};
|
|
9388
9426
|
HistoricalPixAccountComponent.prototype.deleteAnnuityItem = function (index) {
|
|
9389
9427
|
var newlist = __spread(this.getHistoricalPixAccountList());
|
|
9390
9428
|
newlist.sort(compareValues(this.orderBy.field, this.orderBy.direction));
|
|
@@ -9530,10 +9568,39 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9530
9568
|
HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
|
|
9531
9569
|
return FormatUtilsService.getFormattedPercentage(value);
|
|
9532
9570
|
};
|
|
9571
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToAddHistorical", {
|
|
9572
|
+
get: function () {
|
|
9573
|
+
return (this.permission["incluir"]);
|
|
9574
|
+
},
|
|
9575
|
+
enumerable: true,
|
|
9576
|
+
configurable: true
|
|
9577
|
+
});
|
|
9578
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
|
|
9579
|
+
get: function () {
|
|
9580
|
+
return (this.permission["excluir"]);
|
|
9581
|
+
},
|
|
9582
|
+
enumerable: true,
|
|
9583
|
+
configurable: true
|
|
9584
|
+
});
|
|
9585
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
|
|
9586
|
+
get: function () {
|
|
9587
|
+
return (this.permission["editar"]);
|
|
9588
|
+
},
|
|
9589
|
+
enumerable: true,
|
|
9590
|
+
configurable: true
|
|
9591
|
+
});
|
|
9592
|
+
Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
|
|
9593
|
+
get: function () {
|
|
9594
|
+
return (this.permission["visualizar"]);
|
|
9595
|
+
},
|
|
9596
|
+
enumerable: true,
|
|
9597
|
+
configurable: true
|
|
9598
|
+
});
|
|
9533
9599
|
HistoricalPixAccountComponent.ctorParameters = function () { return [
|
|
9534
9600
|
{ type: TranslateService },
|
|
9535
9601
|
{ type: ChangeDetectorRef },
|
|
9536
|
-
{ type: FormBuilder }
|
|
9602
|
+
{ type: FormBuilder },
|
|
9603
|
+
{ type: MessageService }
|
|
9537
9604
|
]; };
|
|
9538
9605
|
__decorate([
|
|
9539
9606
|
ViewChild(CustomFieldsComponent$1, { static: false })
|
|
@@ -9583,6 +9650,21 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
|
|
|
9583
9650
|
__decorate([
|
|
9584
9651
|
Input()
|
|
9585
9652
|
], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
|
|
9653
|
+
__decorate([
|
|
9654
|
+
Input()
|
|
9655
|
+
], HistoricalPixAccountComponent.prototype, "permission", void 0);
|
|
9656
|
+
__decorate([
|
|
9657
|
+
Input()
|
|
9658
|
+
], HistoricalPixAccountComponent.prototype, "listDataReciever", void 0);
|
|
9659
|
+
__decorate([
|
|
9660
|
+
Output()
|
|
9661
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyView", void 0);
|
|
9662
|
+
__decorate([
|
|
9663
|
+
Output()
|
|
9664
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyEdit", void 0);
|
|
9665
|
+
__decorate([
|
|
9666
|
+
Output()
|
|
9667
|
+
], HistoricalPixAccountComponent.prototype, "isOnlyDelete", void 0);
|
|
9586
9668
|
__decorate([
|
|
9587
9669
|
Input()
|
|
9588
9670
|
], HistoricalPixAccountComponent.prototype, "dateChange", null);
|
|
@@ -10247,6 +10329,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10247
10329
|
this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
|
|
10248
10330
|
this.keyPayload = "historicalEmployeePix";
|
|
10249
10331
|
this.withSidebar = true;
|
|
10332
|
+
this.isOnlyView = new EventEmitter();
|
|
10250
10333
|
this.enableView = new EventEmitter();
|
|
10251
10334
|
this.ngUnsubscribe = new Subject();
|
|
10252
10335
|
this.loading = true;
|
|
@@ -10314,13 +10397,21 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10314
10397
|
{
|
|
10315
10398
|
label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
|
|
10316
10399
|
command: function () {
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
_this.
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10400
|
+
if (_this.isAllowToViewHistorical) {
|
|
10401
|
+
var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
|
|
10402
|
+
if (_this.withSidebar) {
|
|
10403
|
+
_this.isOnlyView.emit(true);
|
|
10404
|
+
_this.router.navigate(["historical-pix-account/" + dateChange], {
|
|
10405
|
+
relativeTo: _this.activatedRoute,
|
|
10406
|
+
});
|
|
10407
|
+
}
|
|
10408
|
+
else {
|
|
10409
|
+
_this.enableView.emit(dateChange);
|
|
10410
|
+
}
|
|
10411
|
+
}
|
|
10412
|
+
else {
|
|
10413
|
+
_this.isNotAllowMessage();
|
|
10414
|
+
}
|
|
10324
10415
|
},
|
|
10325
10416
|
},
|
|
10326
10417
|
{
|
|
@@ -10330,11 +10421,7 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10330
10421
|
_this.delete(rowData.id, rowData.dateChange);
|
|
10331
10422
|
}
|
|
10332
10423
|
else {
|
|
10333
|
-
_this.
|
|
10334
|
-
severity: "error",
|
|
10335
|
-
summary: _this.translateService.instant("hcm.payroll.error"),
|
|
10336
|
-
detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10337
|
-
});
|
|
10424
|
+
_this.isNotAllowMessage();
|
|
10338
10425
|
}
|
|
10339
10426
|
},
|
|
10340
10427
|
},
|
|
@@ -10392,6 +10479,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10392
10479
|
});
|
|
10393
10480
|
}
|
|
10394
10481
|
};
|
|
10482
|
+
HistoricalPixAccountListComponent.prototype.isNotAllowMessage = function () {
|
|
10483
|
+
this.messageService.add({
|
|
10484
|
+
severity: "error",
|
|
10485
|
+
summary: this.translateService.instant("hcm.payroll.error"),
|
|
10486
|
+
detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
|
|
10487
|
+
});
|
|
10488
|
+
};
|
|
10395
10489
|
HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
|
|
10396
10490
|
if (payload && payload.length) {
|
|
10397
10491
|
this.lastRecord = payload[0];
|
|
@@ -10411,6 +10505,13 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10411
10505
|
enumerable: true,
|
|
10412
10506
|
configurable: true
|
|
10413
10507
|
});
|
|
10508
|
+
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
|
|
10509
|
+
get: function () {
|
|
10510
|
+
return (this.permission["visualizar"]);
|
|
10511
|
+
},
|
|
10512
|
+
enumerable: true,
|
|
10513
|
+
configurable: true
|
|
10514
|
+
});
|
|
10414
10515
|
Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
|
|
10415
10516
|
get: function () {
|
|
10416
10517
|
return this.getMenuActions.bind(this);
|
|
@@ -10461,6 +10562,9 @@ var HistoricalPixAccountListComponent = /** @class */ (function () {
|
|
|
10461
10562
|
__decorate([
|
|
10462
10563
|
Input()
|
|
10463
10564
|
], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
|
|
10565
|
+
__decorate([
|
|
10566
|
+
Output()
|
|
10567
|
+
], HistoricalPixAccountListComponent.prototype, "isOnlyView", void 0);
|
|
10464
10568
|
__decorate([
|
|
10465
10569
|
Output()
|
|
10466
10570
|
], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
|