@senior-gestao-pessoas/payroll-core 9.2.0 → 9.3.0-06156ffc-852c-4f04-8482-5c4f9317ecff

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.
Files changed (34) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +419 -25
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.d.ts +3 -1
  6. package/components/historical-pix-account/historical-pix-account.component.d.ts +8 -1
  7. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +51 -0
  8. package/components/historical-pix-account-list/historical-pix-account-list.module.d.ts +2 -0
  9. package/components/historical-pix-account-list/historical-pix-account-list.service.d.ts +9 -0
  10. package/components/historical-pix-account-list/index.d.ts +3 -0
  11. package/esm2015/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +39 -18
  12. package/esm2015/components/historical-pix-account/historical-pix-account.component.js +46 -9
  13. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +252 -0
  14. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.module.js +39 -0
  15. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.service.js +35 -0
  16. package/esm2015/components/historical-pix-account-list/index.js +4 -0
  17. package/esm2015/public_api.js +2 -1
  18. package/esm5/components/historical-pix-account/historical-pix-account-form/historical-pix-account-form.component.js +40 -18
  19. package/esm5/components/historical-pix-account/historical-pix-account.component.js +58 -9
  20. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +276 -0
  21. package/esm5/components/historical-pix-account-list/historical-pix-account-list.module.js +42 -0
  22. package/esm5/components/historical-pix-account-list/historical-pix-account-list.service.js +37 -0
  23. package/esm5/components/historical-pix-account-list/index.js +4 -0
  24. package/esm5/public_api.js +2 -1
  25. package/fesm2015/senior-gestao-pessoas-payroll-core.js +375 -26
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  27. package/fesm5/senior-gestao-pessoas-payroll-core.js +417 -26
  28. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  29. package/locale/en-US.json +8 -1
  30. package/locale/es-ES.json +8 -1
  31. package/locale/pt-BR.json +8 -1
  32. package/package.json +1 -1
  33. package/public_api.d.ts +1 -0
  34. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
@@ -9256,16 +9256,18 @@ 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;
9270
+ this.defaultCpfNumber = null;
9269
9271
  this.visibleChange = new EventEmitter();
9270
9272
  this.ngUnsubscribe = new Subject();
9271
9273
  this.orderBy = {
@@ -9308,17 +9310,35 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9308
9310
  visible: !!(!_this.isEditMode && _this.withSideBar),
9309
9311
  label: _this.translateService.instant("hcm.payroll.edit"),
9310
9312
  command: function () {
9311
- rowData["index"] = key;
9312
- _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9313
- _this.visible = true;
9313
+ if (_this.isAllowToEditHistorical && rowData) {
9314
+ rowData["index"] = key;
9315
+ _this.pixAccountItemInput = { currentItem: rowData, listData: _this.listDataNoPage, isEditMode: true };
9316
+ _this.visible = true;
9317
+ }
9318
+ else {
9319
+ _this.messageService.add({
9320
+ severity: "error",
9321
+ summary: _this.translateService.instant("hcm.payroll.error"),
9322
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9323
+ });
9324
+ }
9314
9325
  },
9315
9326
  },
9316
9327
  {
9317
9328
  visible: !_this.isEditMode,
9318
9329
  label: _this.translateService.instant("hcm.payroll.delete"),
9319
9330
  command: function () {
9320
- _this.loading = true;
9321
- _this.deleteAnnuityItem(key);
9331
+ if (_this.isAllowToDeleteHistorical && rowData) {
9332
+ _this.loading = true;
9333
+ _this.deleteAnnuityItem(key);
9334
+ }
9335
+ else {
9336
+ _this.messageService.add({
9337
+ severity: "error",
9338
+ summary: _this.translateService.instant("hcm.payroll.error"),
9339
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
9340
+ });
9341
+ }
9322
9342
  },
9323
9343
  },
9324
9344
  ];
@@ -9529,10 +9549,32 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9529
9549
  HistoricalPixAccountComponent.prototype.getFormattedPercentage = function (value) {
9530
9550
  return FormatUtilsService.getFormattedPercentage(value);
9531
9551
  };
9552
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToDeleteHistorical", {
9553
+ get: function () {
9554
+ return (this.permission["Excluir"]);
9555
+ },
9556
+ enumerable: true,
9557
+ configurable: true
9558
+ });
9559
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToEditHistorical", {
9560
+ get: function () {
9561
+ return (this.permission["Editar"]);
9562
+ },
9563
+ enumerable: true,
9564
+ configurable: true
9565
+ });
9566
+ Object.defineProperty(HistoricalPixAccountComponent.prototype, "isAllowToViewHistorical", {
9567
+ get: function () {
9568
+ return (this.permission["Visualizar"]);
9569
+ },
9570
+ enumerable: true,
9571
+ configurable: true
9572
+ });
9532
9573
  HistoricalPixAccountComponent.ctorParameters = function () { return [
9533
9574
  { type: TranslateService },
9534
9575
  { type: ChangeDetectorRef },
9535
- { type: FormBuilder }
9576
+ { type: FormBuilder },
9577
+ { type: MessageService }
9536
9578
  ]; };
9537
9579
  __decorate([
9538
9580
  ViewChild(CustomFieldsComponent$1, { static: false })
@@ -9579,6 +9621,12 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9579
9621
  __decorate([
9580
9622
  Input()
9581
9623
  ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
9624
+ __decorate([
9625
+ Input()
9626
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
9627
+ __decorate([
9628
+ Input()
9629
+ ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9582
9630
  __decorate([
9583
9631
  Input()
9584
9632
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -9595,7 +9643,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9595
9643
  Component({
9596
9644
  // tslint:disable-next-line:component-selector
9597
9645
  selector: "c-historical-pix-account",
9598
- template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n",
9646
+ template: "<s-sidebar *ngIf=\"withSideBar\" [visible]=\"visible\" (visibleChange)=\"close()\"\n header=\"{{'hcm.payroll.historical_pix_account_title_form'|translate}}\">\n<pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</s-sidebar>\n\n<div *ngIf=\"!withSideBar\">\n <pix-account [(visible)]=\"visible\"\n [isEditAndViewValue]=\"pixAccountItemInput\"\n [currency]=\"currency\"\n [customEntity]=\"customEntity\"\n [customService]=\"customService\"\n [getListPixAccount]=\"listDataNoPage\"\n [withSideBar]=\"false\"\n [isViewMode]=\"isViewMode\"\n [paramsForm]=\"paramsForm\"\n (pixAccountItemToList)=\"addItemInList($event)\"\n [defaultCpfNumber]=\"defaultCpfNumber\"></pix-account>\n</div>\n\n<div class=\"ui-g-1\" *ngIf=\"withSideBar && !isEditMode\">\n <div class=\"form-group \">\n <s-button id=\"ta-addPayAnnuity\"\n [disabled]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n (onClick)=\"add()\"\n [pTooltip]=\"getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage\"\n tooltipPosition=\"top\"\n label=\"{{'hcm.payroll.historical_pix_account_add'|translate}}\"></s-button>\n </div>\n</div>\n<div class=\"ui-g-12\">\n <p-table\n id=\"table-annuity\"\n [value]=\"listData\"\n [columns]=\"cols\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [sortMode]=\"'multiple'\"\n *sLoadingState=\"loading\"\n [rows]=\"recordByRow\"\n dataKey=\"id\">\n <ng-template pTemplate=\"colgroup\" let-coumns>\n <colgroup>\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-m'\">\n <col [ngClass]=\"'col-default-s'\">\n <col [ngClass]=\"'col-action'\">\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <!-- Cabe\u00E7alhos quando da table \u00E9 permitido ordenar as colunas -->\n <tr>\n <!-- Cabe\u00E7alhos das colunas da tabela -->\n <th\n [pSortableColumn]=\"'pixKeyType'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\" id=\"table-0\">\n <span\n id=\"table-annuity-s-0\">{{ 'hcm.payroll.employees_addition_pix_key_type' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key_type' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'pixKey'\"\n [pTooltip]=\"'hcm.payroll.employees_addition_pix_key' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.employees_addition_pix_key' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.employees_addition_pix_key' | translate\"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]=\"'percentage'\"\n [pTooltip]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n >\n <div class=\"senior-header\">\n <span>{{ 'hcm.payroll.historical_pix_account_label_percentage' | translate }}</span>\n <p-sortIcon class=\"p-sorticon-status\"\n [field]=\"'hcm.payroll.historical_pix_account_label_percentage' | translate\"></p-sortIcon>\n </div>\n </th>\n <!-- Cabe\u00E7alho da coluna de a\u00E7\u00F5es -->\n <th id=\"col-actions\"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-key=\"rowIndex\">\n\n <tr [ngClass]=\"'row'+key\" [pSelectableRow]=\"rowData\">\n <td [pTooltip]=\"rowData?.pixKeyType.value\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKeyType.value }}</span>\n </td>\n\n <ng-container [ngSwitch]=\"rowData?.pixKeyType.key\">\n <td *ngSwitchCase=\"'TELEPHONE'\"\n [pTooltip]=\"getFormattedTelephoneNumber(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedTelephoneNumber(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CPF'\"\n [pTooltip]=\"getFormattedCpf(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCpf(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchCase=\"'CNPJ'\"\n [pTooltip]=\"getFormattedCnpj(rowData?.pixKey)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedCnpj(rowData?.pixKey) }}</span>\n </td>\n <td *ngSwitchDefault\n [pTooltip]=\"rowData?.pixKey\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ rowData?.pixKey }}</span>\n </td>\n </ng-container>\n <td [pTooltip]=\"getFormattedPercentage(rowData?.percentage)\" tooltipPosition=\"top\"\n showDelay=\"500\">\n <span>{{ getFormattedPercentage(rowData?.percentage) }}</span>\n </td>\n <td id=\"col-actions-{{key}}\" class=\"col-actions \"\n *ngIf=\"actions && actions(rowData, key)?.length\">\n <s-button id=\"table-admission-btn-actions-{{key}}\"\n *ngIf=\"actions(rowData, key).length > 1\" [label]=\"actionLabel\"\n priority=\"default\" [model]=\"scopedActions(rowData, key)\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n\n <s-button id=\"table-admission-btn-action-{{key}}\"\n *ngIf=\"actions(rowData, key).length <= 1\"\n [label]=\"scopedActions(rowData, key)[0].label\"\n priority=\"default\"\n (click)=\"scopedActions(rowData, key)[0].command()\"\n [disabled]=\"false\" [auxiliary]=\"true\"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\" let-columns>\n <tr>\n <td [attr.colspan]=\"columns.length +2\">\n {{'hcm.payroll.admission_empty_message'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span *ngIf=\"totalRecords\">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n",
9599
9647
  styles: [".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]
9600
9648
  })
9601
9649
  ], HistoricalPixAccountComponent);
@@ -9775,6 +9823,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9775
9823
  this.withSideBar = true;
9776
9824
  this.isEditMode = false;
9777
9825
  this.paramsForm = new FormGroup({});
9826
+ this.defaultCpfNumber = null;
9778
9827
  this.visibleChange = new EventEmitter();
9779
9828
  this.pixAccountItemToList = new EventEmitter();
9780
9829
  this.ngUnsubscribe = new Subject();
@@ -9809,6 +9858,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9809
9858
  percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9810
9859
  Validators.max(this.maxValuePercentage),
9811
9860
  ]))),
9861
+ externalId: this.formBuilder.control(null),
9812
9862
  customFields: this.formBuilder.control(null),
9813
9863
  });
9814
9864
  };
@@ -9817,7 +9867,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9817
9867
  this.pixKeyType = item.key;
9818
9868
  this.isShowPixKeyFieldValidatorMessage = true;
9819
9869
  this.pixAccountFormGroup.get("pixKey").reset();
9820
- this.setPixKeyValidators();
9870
+ this.setPixKeyValidators(true);
9821
9871
  if (item.key === "CPF") {
9822
9872
  this.setDefaultCpfPixKey();
9823
9873
  }
@@ -9845,10 +9895,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9845
9895
  if (value && value.currentItem && Object.keys(value.currentItem).length) {
9846
9896
  this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(__assign({}, value.currentItem)));
9847
9897
  this.labelBtnAdd = "hcm.payroll.employees_update";
9848
- this.setValidatorsAccordingList(value.listData, value.currentItem["index"]);
9898
+ this.setValidatorsAccordingList(value.listData, value.currentItem["index"], value && value["isEditMode"]);
9849
9899
  if (!this.isView) {
9850
9900
  this.configEnableFields(value && value["isEditMode"]);
9851
9901
  }
9902
+ else {
9903
+ if (this.pixAccountFormGroup.get("pixKeyType").value) {
9904
+ this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9905
+ this.formatPixKeyTelephoneNumber();
9906
+ }
9907
+ }
9852
9908
  }
9853
9909
  else {
9854
9910
  this.labelBtnAdd = "hcm.payroll.employees_add";
@@ -9857,6 +9913,11 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9857
9913
  enumerable: true,
9858
9914
  configurable: true
9859
9915
  });
9916
+ HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
9917
+ if (this.pixKeyType === "TELEPHONE") {
9918
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9919
+ }
9920
+ };
9860
9921
  HistoricalPixAccountFormComponent.prototype.convertDTOToShowWithCustomFields = function (data) {
9861
9922
  var obj = __assign({}, data);
9862
9923
  obj["customFields"] = mountCustomToShow(obj["customFields"]);
@@ -9866,10 +9927,8 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9866
9927
  this.visibleBtnSave = isEditMode;
9867
9928
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
9868
9929
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9869
- this.setPixKeyValidators();
9870
- if (this.pixKeyType === "TELEPHONE") {
9871
- this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9872
- }
9930
+ this.setPixKeyValidators(isEditMode);
9931
+ this.formatPixKeyTelephoneNumber();
9873
9932
  }
9874
9933
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
9875
9934
  "pixKeyType",
@@ -9931,7 +9990,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9931
9990
  */
9932
9991
  set: function (pixAccountList) {
9933
9992
  if (pixAccountList) {
9934
- this.setValidatorsAccordingList(pixAccountList);
9993
+ this.setValidatorsAccordingList(pixAccountList, null, false);
9935
9994
  }
9936
9995
  else {
9937
9996
  this.resetForm();
@@ -9948,8 +10007,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9948
10007
  * @param pixAccountList
9949
10008
  * @param index
9950
10009
  */
9951
- HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index) {
10010
+ HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode) {
9952
10011
  if (index === void 0) { index = null; }
10012
+ if (isEditMode === void 0) { isEditMode = true; }
9953
10013
  this.pixAccountList = pixAccountList && pixAccountList.length ? __spread(pixAccountList) : [];
9954
10014
  var percentageIncluded = [];
9955
10015
  if (this.pixAccountList && this.pixAccountList.length) {
@@ -9960,13 +10020,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9960
10020
  });
9961
10021
  }
9962
10022
  this.beforeSetPixKeyTypeValidator();
9963
- this.setPixKeyValidators();
10023
+ this.setPixKeyValidators(isEditMode);
9964
10024
  this.validatePercentageValid(percentageIncluded);
9965
10025
  };
9966
10026
  /**
9967
10027
  * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
9968
10028
  */
9969
- HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function () {
10029
+ HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
9970
10030
  var genericPixKey = this.pixAccountFormGroup.get("pixKey");
9971
10031
  if (this.pixKeyType) {
9972
10032
  switch (this.pixKeyType) {
@@ -9997,7 +10057,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9997
10057
  genericPixKey.setValidators(null);
9998
10058
  break;
9999
10059
  }
10000
- genericPixKey.enable();
10060
+ if (isEditMode) {
10061
+ genericPixKey.enable();
10062
+ }
10001
10063
  genericPixKey.updateValueAndValidity();
10002
10064
  }
10003
10065
  };
@@ -10030,11 +10092,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10030
10092
  FormatUtilsService.formatTelephoneInputEvent(event);
10031
10093
  };
10032
10094
  HistoricalPixAccountFormComponent.prototype.setDefaultCpfPixKey = function () {
10033
- var sheetDocument = this.paramsForm.get("sheetDocument");
10034
- if (sheetDocument) {
10035
- var cpf = sheetDocument.get("cpfNumber").value;
10036
- if (cpf) {
10037
- this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10095
+ if (this.defaultCpfNumber) {
10096
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
10097
+ }
10098
+ else {
10099
+ var sheetDocument = this.paramsForm.get("sheetDocument");
10100
+ if (sheetDocument) {
10101
+ var cpf = sheetDocument.get("cpfNumber").value;
10102
+ if (cpf) {
10103
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10104
+ }
10038
10105
  }
10039
10106
  }
10040
10107
  };
@@ -10095,6 +10162,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10095
10162
  __decorate([
10096
10163
  Input()
10097
10164
  ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
10165
+ __decorate([
10166
+ Input()
10167
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
10098
10168
  __decorate([
10099
10169
  Output()
10100
10170
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10116,7 +10186,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10116
10186
  HistoricalPixAccountFormComponent = __decorate([
10117
10187
  Component({
10118
10188
  selector: "pix-account",
10119
- template: "<div id=\"main\">\n <form [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
10189
+ template: "<div id=\"main\">\n <form [formGroup]=\"pixAccountFormGroup\" autocomplete=\"off\">\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <!-- Tipo de chave -->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label>{{'hcm.payroll.employees_addition_pix_key_type'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]=\"true\" server=\"payroll\"\n enumeration=\"PixKeyType\"\n placeholder=\"{{'hcm.payroll.select' | translate}}\"\n name=\"pixKeyType\" [form]=\"pixAccountFormGroup\"\n (onSelect)=\"onChangePixKeyType($event)\"\n (onClear)=\"onClearPixKeyType()\"\n id=\"ta-pixKeyType\"></input-rest-auto-complete-enum>\n <s-control-errors [control]=\"pixAccountFormGroup.get('pixKeyType')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n pixKeyTypeBankAccountDuplicate: 'hcm.payroll.historical_pix_key_type_bank_account_duplicate' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Chave Pix-->\n <div class=\"ui-md-6 ui-sm-12\" [ngClass]=\"{'required': pixKeyType !== 'BANK_ACCOUNT'}\">\n <label>{{'hcm.payroll.employees_addition_pix_key' | translate}}</label>\n <ng-container [ngSwitch]=\"pixKeyType\">\n <input *ngSwitchCase=\"'TELEPHONE'\" only-number\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n (keyup)=\"phoneMask($event)\" maxlength=\"15\"\n placeholder=\"(__) ____-____\">\n <p-inputMask *ngSwitchCase=\"'CPF'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"___.___.___-__\"\n mask=\"999.999.999-99\" [unmask]=\"true\"></p-inputMask>\n <p-inputMask *ngSwitchCase=\"'CNPJ'\"\n id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"__.___.___/____-__\"\n mask=\"99.999.999/9999-99\" [unmask]=\"true\"></p-inputMask>\n <input *ngSwitchCase=\"'EMAIL'\"\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"\n placeholder=\"{{'hcm.payroll.employees_addition_email'|translate}}\"/>\n <input *ngSwitchCase=\"'BANK_ACCOUNT'\" disabled\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\"/>\n <input *ngSwitchDefault\n pInputText id=\"ta-pixKey\" name=\"pixKey\" formControlName=\"pixKey\" maxlength=\"100\" />\n </ng-container>\n <s-control-errors *ngIf=\"isShowPixKeyFieldValidatorMessage\" id=\"er-pix-key\"\n [control]=\"pixAccountFormGroup.get('pixKey')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n invalidPhoneNumber: 'hcm.payroll.employees_addition_invalid_phone_number' | translate: { value: pixAccountFormGroup.get('pixKey').value },\n invalidEmail: 'hcm.payroll.employees_addition_email_invalid' | translate,\n cpfNotValid: 'hcm.payroll.employees_addition_cpf_error' | translate,\n cnpjNotValid: 'hcm.payroll.employees_addition_cnpj_error' | translate\n }\">\n </s-control-errors>\n </div>\n <!--Percentual-->\n <div class=\"ui-md-6 ui-sm-12 required\">\n <label id=\"lb-percentage\"\n for=\"ff-percentage\">{{ 'hcm.payroll.historical_bank_account_label_percentage' | translate }}</label>\n <div class=\"ui-inputgroup\">\n <span class=\"ui-inputgroup-addon\">%</span>\n <input pInputText id=\"ff-percentage\" name=\"percentage\"\n formControlName=\"percentage\"\n currencyMask\n [options]=\"optionsPercentage\"\n [placeholder]=\"percentagePlaceholder\"/>\n </div>\n <s-control-errors [control]=\"pixAccountFormGroup.get('percentage')\"\n [errorMessages]=\"{\n required: 'hcm.payroll.required' | translate,\n maxlength: 'hcm.payroll.error_max_length' | translate: { value: '6' },\n max: 'hcm.payroll.error_max_value_number' | translate: { value: maxValuePercentage },\n min: 'hcm.payroll.error_min_value_number' | translate: { value: '0,01' }\n }\">\n </s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <p-fieldset\n legend=\"{{ 'hcm.payroll.custom_fields' | translate }}\"\n [attr.data-hidden]=\"!customFields || !customFields.fields.length\"\n >\n <s-custom-fields\n domain=\"hcm\"\n service=\"{{customService}}\"\n entity=\"{{customEntity}}\"\n formControlName=\"customFields\"\n [invalidErrorLabel]=\"'hcm.payroll.employees_invalid_field' | translate\"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]=\"withSideBar ? 'footer' : 'footer-s-border'\">\n <div class=\"form-group\">\n <s-button id=\"btn-save\" label=\"{{ labelBtnAdd | translate}}\" priority=\"primary\"\n (onClick)=\"addItem()\" *ngIf=\"visibleBtnSave && !this.isView\"></s-button>\n <s-button *ngIf=\"withSideBar\" id=\"btn-close\" label=\"{{'hcm.payroll.cancel'|translate}}\" priority=\"secondary\"\n priority=\"link\" (onClick)=\"close()\"></s-button>\n </div>\n </div>\n</div>\n",
10120
10190
  styles: [".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]
10121
10191
  })
10122
10192
  ], HistoricalPixAccountFormComponent);
@@ -10177,6 +10247,327 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10177
10247
  return HistoricalPixAccountModule;
10178
10248
  }());
10179
10249
 
10250
+ var HistoricalPixAccountListService = /** @class */ (function () {
10251
+ function HistoricalPixAccountListService(http, httpClient) {
10252
+ this.http = http;
10253
+ this.httpClient = httpClient;
10254
+ }
10255
+ HistoricalPixAccountListService.prototype.remove = function (id, dateWhen, service, dependentId) {
10256
+ if (service === void 0) { service = ServiceType.PAYROLL; }
10257
+ if (service === ServiceType.DEPENDENT) {
10258
+ return this.httpClient
10259
+ .post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete", {
10260
+ dependentId: dependentId,
10261
+ dateWhen: dateWhen,
10262
+ });
10263
+ }
10264
+ else {
10265
+ return this.http.post("actions/historicalEmployeePixDelete", {
10266
+ employeeId: id,
10267
+ dateWhen: dateWhen
10268
+ });
10269
+ }
10270
+ };
10271
+ HistoricalPixAccountListService.ctorParameters = function () { return [
10272
+ { type: HttpClientService },
10273
+ { type: HttpClient }
10274
+ ]; };
10275
+ HistoricalPixAccountListService = __decorate([
10276
+ Injectable()
10277
+ ], HistoricalPixAccountListService);
10278
+ return HistoricalPixAccountListService;
10279
+ }());
10280
+
10281
+ var moment$e = moment_;
10282
+ var HistoricalPixAccountListComponent = /** @class */ (function () {
10283
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10284
+ this.confirmationService = confirmationService;
10285
+ this.translateService = translateService;
10286
+ this.activatedRoute = activatedRoute;
10287
+ this.cd = cd;
10288
+ this.router = router;
10289
+ this.messageService = messageService;
10290
+ this.historicalPixAccountListService = historicalPixAccountListService;
10291
+ this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10292
+ this.keyPayload = "historicalEmployeePix";
10293
+ this.withSidebar = true;
10294
+ this.enableView = new EventEmitter();
10295
+ this.ngUnsubscribe = new Subject();
10296
+ this.loading = true;
10297
+ this.columns = [
10298
+ {
10299
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10300
+ field: "dateChange",
10301
+ },
10302
+ {
10303
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10304
+ field: "pixKeyType.value",
10305
+ },
10306
+ {
10307
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10308
+ field: "pixKey",
10309
+ },
10310
+ {
10311
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10312
+ field: "percentage",
10313
+ },
10314
+ {
10315
+ label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10316
+ field: "numberOfPixAccount",
10317
+ },
10318
+ ];
10319
+ }
10320
+ HistoricalPixAccountListComponent.prototype.ngOnInit = function () {
10321
+ this.initParameters = { employeeId: this.employeeId, dependentId: this.dependentId };
10322
+ };
10323
+ HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10324
+ this.ngUnsubscribe.next();
10325
+ this.ngUnsubscribe.complete();
10326
+ };
10327
+ HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10328
+ this.cd.detectChanges();
10329
+ };
10330
+ HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10331
+ var _this = this;
10332
+ payload.forEach(function (value) {
10333
+ value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10334
+ value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10335
+ value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10336
+ });
10337
+ this.onGridLoad(payload);
10338
+ this.loading = false;
10339
+ };
10340
+ HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10341
+ var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10342
+ if (keyType === "TELEPHONE") {
10343
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10344
+ }
10345
+ else if (keyType === "CPF") {
10346
+ return FormatUtilsService.getFormattedCpf(pixKey);
10347
+ }
10348
+ else if (keyType === "CNPJ") {
10349
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10350
+ }
10351
+ else {
10352
+ return pixKey;
10353
+ }
10354
+ };
10355
+ HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10356
+ var _this = this;
10357
+ return [
10358
+ {
10359
+ label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10360
+ command: function () {
10361
+ console.log(_this.isAllowToViewHistorical);
10362
+ if (_this.isAllowToViewHistorical && rowData) {
10363
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10364
+ if (_this.withSidebar) {
10365
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10366
+ relativeTo: _this.activatedRoute,
10367
+ });
10368
+ }
10369
+ else {
10370
+ _this.enableView.emit(dateChange);
10371
+ }
10372
+ }
10373
+ else {
10374
+ _this.messageService.add({
10375
+ severity: "error",
10376
+ summary: _this.translateService.instant("hcm.payroll.error"),
10377
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10378
+ });
10379
+ }
10380
+ },
10381
+ },
10382
+ {
10383
+ label: this.translateService.instant("hcm.payroll.delete"),
10384
+ command: function () {
10385
+ if (_this.isAllowToDeleteHistorical && rowData) {
10386
+ _this.delete(rowData.id, rowData.dateChange);
10387
+ }
10388
+ else {
10389
+ _this.messageService.add({
10390
+ severity: "error",
10391
+ summary: _this.translateService.instant("hcm.payroll.error"),
10392
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10393
+ });
10394
+ }
10395
+ },
10396
+ },
10397
+ ];
10398
+ };
10399
+ HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10400
+ var _this = this;
10401
+ if (id === this.lastRecord.id) {
10402
+ var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
10403
+ this.confirmationService.confirm({
10404
+ message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10405
+ accept: function () {
10406
+ _this.loading = true;
10407
+ var service = _this.withSidebar ? ServiceType.PAYROLL : ServiceType.DEPENDENT;
10408
+ _this.historicalPixAccountListService
10409
+ .remove(_this.employeeId, dateChangeToDto_1, service, _this.dependentId)
10410
+ .pipe(takeUntil(_this.ngUnsubscribe))
10411
+ .subscribe(function () {
10412
+ _this.messageService.add({
10413
+ severity: "success",
10414
+ summary: _this.translateService.instant("hcm.payroll.success"),
10415
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove"),
10416
+ });
10417
+ _this.parameters = (_this.parameters && __assign({}, _this.parameters)) || {};
10418
+ }, function () {
10419
+ _this.messageService.add({
10420
+ severity: "error",
10421
+ summary: _this.translateService.instant("hcm.payroll.error"),
10422
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove"),
10423
+ });
10424
+ _this.loading = false;
10425
+ });
10426
+ },
10427
+ });
10428
+ }
10429
+ else {
10430
+ this.messageService.add({
10431
+ severity: "error",
10432
+ summary: this.translateService.instant("hcm.payroll.error"),
10433
+ detail: this.translateService.instant("hcm.payroll.not_allowed_delete_last"),
10434
+ });
10435
+ }
10436
+ };
10437
+ HistoricalPixAccountListComponent.prototype.add = function () {
10438
+ if (this.isAllowToAddHistorical) {
10439
+ this.router.navigate(["historical-pix-account-new"], {
10440
+ relativeTo: this.activatedRoute,
10441
+ });
10442
+ }
10443
+ else {
10444
+ this.messageService.add({
10445
+ severity: "error",
10446
+ summary: this.translateService.instant("hcm.payroll.error"),
10447
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10448
+ });
10449
+ }
10450
+ };
10451
+ HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10452
+ if (payload && payload.length) {
10453
+ this.lastRecord = payload[0];
10454
+ }
10455
+ };
10456
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10457
+ get: function () {
10458
+ return (this.permission["Incluir"]);
10459
+ },
10460
+ enumerable: true,
10461
+ configurable: true
10462
+ });
10463
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10464
+ get: function () {
10465
+ return (this.permission["Excluir"]);
10466
+ },
10467
+ enumerable: true,
10468
+ configurable: true
10469
+ });
10470
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10471
+ get: function () {
10472
+ return (this.permission["Visualizar"]);
10473
+ },
10474
+ enumerable: true,
10475
+ configurable: true
10476
+ });
10477
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10478
+ get: function () {
10479
+ return this.getMenuActions.bind(this);
10480
+ },
10481
+ enumerable: true,
10482
+ configurable: true
10483
+ });
10484
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "reloadList", {
10485
+ set: function (condition) {
10486
+ if (condition) {
10487
+ this.loading = true;
10488
+ this.parameters = (this.parameters && __assign({}, this.parameters)) || {};
10489
+ }
10490
+ },
10491
+ enumerable: true,
10492
+ configurable: true
10493
+ });
10494
+ HistoricalPixAccountListComponent.ctorParameters = function () { return [
10495
+ { type: ConfirmationService },
10496
+ { type: TranslateService },
10497
+ { type: ActivatedRoute },
10498
+ { type: ChangeDetectorRef },
10499
+ { type: Router },
10500
+ { type: MessageService },
10501
+ { type: HistoricalPixAccountListService }
10502
+ ]; };
10503
+ __decorate([
10504
+ ViewChild(CustomFieldsComponent$1, { static: false })
10505
+ ], HistoricalPixAccountListComponent.prototype, "customFields", void 0);
10506
+ __decorate([
10507
+ Input()
10508
+ ], HistoricalPixAccountListComponent.prototype, "permission", void 0);
10509
+ __decorate([
10510
+ Input()
10511
+ ], HistoricalPixAccountListComponent.prototype, "employeeId", void 0);
10512
+ __decorate([
10513
+ Input()
10514
+ ], HistoricalPixAccountListComponent.prototype, "dependentId", void 0);
10515
+ __decorate([
10516
+ Input()
10517
+ ], HistoricalPixAccountListComponent.prototype, "dateFormat", void 0);
10518
+ __decorate([
10519
+ Input()
10520
+ ], HistoricalPixAccountListComponent.prototype, "endPoint", void 0);
10521
+ __decorate([
10522
+ Input()
10523
+ ], HistoricalPixAccountListComponent.prototype, "keyPayload", void 0);
10524
+ __decorate([
10525
+ Input()
10526
+ ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10527
+ __decorate([
10528
+ Output()
10529
+ ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10530
+ __decorate([
10531
+ Input()
10532
+ ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
10533
+ HistoricalPixAccountListComponent = __decorate([
10534
+ Component({
10535
+ // tslint:disable-next-line:component-selector
10536
+ selector: "c-historical-pix-account-list",
10537
+ template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <c-data-list-rest\n id=\"ta-historical-pix-account-list\"\n [columns]=\"columns\"\n actionLabel=\"{{ 'hcm.payroll.movimentation_generic_action' | translate }}\"\n emptyMessage=\"{{ 'hcm.payroll.admission_empty_message' | translate }}\"\n [endpoint]=\"endPoint\"\n singularMessageRecords=\"{{\n 'hcm.payroll.admission_register' | translate\n }}\"\n [actions]=\"scopedActions\"\n pluralMessageRecords=\"{{\n 'hcm.payroll.admission_registers' | translate\n }}\"\n [keyPayload]=\"keyPayload\"\n [lazy]=\"true\"\n (lazyLoad)=\"onLazyLoad($event)\"\n [(loading)]=\"loading\"\n [initParameters]=\"initParameters\"\n [parameters]=\"parameters\"\n [isSortable]=\"false\"\n ></c-data-list-rest>\n </div>\n</div>\n\n",
10538
+ styles: [""]
10539
+ })
10540
+ ], HistoricalPixAccountListComponent);
10541
+ return HistoricalPixAccountListComponent;
10542
+ }());
10543
+
10544
+ var HistoricalPixAccountListModule = /** @class */ (function () {
10545
+ function HistoricalPixAccountListModule() {
10546
+ }
10547
+ HistoricalPixAccountListModule = __decorate([
10548
+ NgModule({
10549
+ imports: [
10550
+ CommonModule,
10551
+ FormsModule,
10552
+ HttpClientModule,
10553
+ AutoCompleteModule,
10554
+ SharedModule,
10555
+ ReactiveFormsModule,
10556
+ TableModule,
10557
+ ButtonModule,
10558
+ TooltipModule,
10559
+ LoadingStateModule,
10560
+ DataListRestModule,
10561
+ ConfirmDialogModule,
10562
+ ],
10563
+ declarations: [HistoricalPixAccountListComponent],
10564
+ providers: [HistoricalPixAccountListService],
10565
+ exports: [HistoricalPixAccountListComponent],
10566
+ })
10567
+ ], HistoricalPixAccountListModule);
10568
+ return HistoricalPixAccountListModule;
10569
+ }());
10570
+
10180
10571
  /*
10181
10572
  * Public API Surface of core
10182
10573
  */
@@ -10185,5 +10576,5 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10185
10576
  * Generated bundle index. Do not edit.
10186
10577
  */
10187
10578
 
10188
- export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricalPixAccountFormComponent as ɵr };
10579
+ export { AdmissionDraftSummaryComponent, AdmissionDraftSummaryModule, AdmissionDraftSummaryService, AutocompleteParametersService, BlockUiComponent, BlockUiModule, BreadcrumbComponent, BreadcrumbSDSModule, CNPJValidator, CPFValidator, CompanyIndicationType, CompanyIndicationsService, CompareType, ControlMessagesErrorComponent, ControlMessagesErrorModule, CoreDirectives, CoreFieldType, CustomFieldsComponent, CustomFieldsModule, DataListModule, DataListRestModule, DateValidator, DirectionEnumeration, EmployeeSelectorComponent, EmployeeSelectorModule, EmployeeSummaryComponent, EmployeeSummaryModule, EmployeeSummaryService, EntityODataParameter, ErrorPageComponent, ErrorPageModule, FieldValidatorComponent, FieldValidatorModule, FileUploadComponent, FileUploadCoreModule, FormComparatorService, FromToComponent, FromToModule, HistoricalBankAccountComponent, HistoricalBankAccountListComponent, HistoricalBankAccountListModule, HistoricalBankAccountListService, HistoricalBankAccountModule, HistoricalBankAccountService, HistoricalPixAccountComponent, HistoricalPixAccountListComponent, HistoricalPixAccountListModule, HistoricalPixAccountListService, HistoricalPixAccountModule, HistoricalPixAccountService, HttpClientService, HttpRequestType, ImageCropComponent, ImageCropModule, ImageCropService, InputDateComponent, InputDateModelComponent, InputDateModelModule, InputDateModule, InputRestAutoCompleteComponent, InputRestAutoCompleteEmployeeModelModule, InputRestAutoCompleteEmployeeModelService, InputRestAutoCompleteEmployeeModule, InputRestAutoCompleteEmployeeService, InputRestAutoCompleteEnumComponent, InputRestAutoCompleteEnumModule, InputRestAutoCompleteEnumService, InputRestAutoCompleteJobpositionComponent, InputRestAutoCompleteJobpositionModule, InputRestAutoCompleteJobpositionService, InputRestAutoCompleteModelEnumModule, InputRestAutoCompleteModelEnumService, InputRestAutoCompleteModelModule, InputRestAutoCompleteModelService, InputRestAutoCompleteModule, InputRestAutoCompleteService, IntegrationService, ListRestComponent, ListRestModule, LookupModule, LookupParametersService, MenuType, ModuleType, NameNotSpacesDirective, OnlyNumberDirective, Operators, ParameterType, PermissionService, ReportFormat, ReportService, ReportStage, ServiceType, ServicesModule, SpinnerLoaderComponent, SpinnerLoaderModule, StringMethods, ToastComponent, ToastModule, ToastService, TypeAdmissionModule, TypeAdmissionServices, UsingType, WorkflowDataService, WorkflowIntegrator, WorkstationgroupLookupDto, WorkstationgroupLookupModule, _moment, assign, autoCompleteObjectForIdObject, clearValues, cnpjValidator, compareValues, configEnabledFields, containsMoreThanOneConsecutiveAbbreviation, containsMoreThanOneConsecutiveBlankSpace, containsMoreThanTwoRepeatedCharacters, containsSpecialCharacters, convertBooleanString, convertStringToBoolean, cpfValidator, firstNameIsValid, firstNameLengthIsValid, formatMoney, fullNameLengthIsValid, getAddWeekDaysBusiness, getFormat, getFormatDate, getMoment, getNowDate, getObjValids, getQueryParams, getWeekDaysBusiness, getYears, invertFieldDate, isBirthDayValid, isDateCompare, isDateExpirationBeforeExpeditionDate, isDateField, isDateSameOrAfterCurrentDate, isFullDate, isMax, isNumber, isObject, isRequired, isShallow, isValid, isValidDate, isValidPIS, mountCustomForSave, mountCustomForShow, mountCustomToSave, mountCustomToShow, mountGeneratedCustomToSave, ngCalendarFormat, notEmpty, numberOrZero, removeCharacteresSpecials, removeEmpty, removeWhiteSpaces, setCustonFields, setDisableField, setErrors, setRequired, setRequiredFields, setValidator, setValidatorsAndDisableFields, setValueCustom, stringMethods, sun, uiid, validateBirthDate, verifyValidationsForm, SharedModule as ɵa, DataListRestComponent as ɵb, DataListRestService as ɵc, FileUploadService as ɵd, InputRestAutoCompleteEmployeeComponent as ɵe, InputRestAutoCompleteEmployeeModelComponent as ɵf, InputRestAutoCompleteModelComponent as ɵg, InputRestAutoCompleteModelEnumComponent as ɵh, ListRestService as ɵi, DataListComponent as ɵj, DataListService as ɵk, LookupComponent as ɵl, LookupService as ɵm, WorkstationgroupLookupComponent as ɵn, AutocompleteService as ɵo, LookupService$1 as ɵp, HistoricalBankAccountFormComponent as ɵq, HistoricalPixAccountFormComponent as ɵr };
10189
10580
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map