@senior-gestao-pessoas/payroll-core 9.2.0 → 9.3.0-4d39b464-875a-426e-94a5-e9a89ba0079c

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 +411 -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 +7 -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 +43 -9
  13. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +251 -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 +51 -9
  20. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +275 -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 +371 -26
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  27. package/fesm5/senior-gestao-pessoas-payroll-core.js +409 -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,25 @@ 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
+ });
9532
9566
  HistoricalPixAccountComponent.ctorParameters = function () { return [
9533
9567
  { type: TranslateService },
9534
9568
  { type: ChangeDetectorRef },
9535
- { type: FormBuilder }
9569
+ { type: FormBuilder },
9570
+ { type: MessageService }
9536
9571
  ]; };
9537
9572
  __decorate([
9538
9573
  ViewChild(CustomFieldsComponent$1, { static: false })
@@ -9579,6 +9614,12 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9579
9614
  __decorate([
9580
9615
  Input()
9581
9616
  ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
9617
+ __decorate([
9618
+ Input()
9619
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
9620
+ __decorate([
9621
+ Input()
9622
+ ], HistoricalPixAccountComponent.prototype, "permission", void 0);
9582
9623
  __decorate([
9583
9624
  Input()
9584
9625
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -9595,7 +9636,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9595
9636
  Component({
9596
9637
  // tslint:disable-next-line:component-selector
9597
9638
  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",
9639
+ 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
9640
  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
9641
  })
9601
9642
  ], HistoricalPixAccountComponent);
@@ -9775,6 +9816,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9775
9816
  this.withSideBar = true;
9776
9817
  this.isEditMode = false;
9777
9818
  this.paramsForm = new FormGroup({});
9819
+ this.defaultCpfNumber = null;
9778
9820
  this.visibleChange = new EventEmitter();
9779
9821
  this.pixAccountItemToList = new EventEmitter();
9780
9822
  this.ngUnsubscribe = new Subject();
@@ -9809,6 +9851,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9809
9851
  percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9810
9852
  Validators.max(this.maxValuePercentage),
9811
9853
  ]))),
9854
+ externalId: this.formBuilder.control(null),
9812
9855
  customFields: this.formBuilder.control(null),
9813
9856
  });
9814
9857
  };
@@ -9817,7 +9860,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9817
9860
  this.pixKeyType = item.key;
9818
9861
  this.isShowPixKeyFieldValidatorMessage = true;
9819
9862
  this.pixAccountFormGroup.get("pixKey").reset();
9820
- this.setPixKeyValidators();
9863
+ this.setPixKeyValidators(true);
9821
9864
  if (item.key === "CPF") {
9822
9865
  this.setDefaultCpfPixKey();
9823
9866
  }
@@ -9845,10 +9888,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9845
9888
  if (value && value.currentItem && Object.keys(value.currentItem).length) {
9846
9889
  this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(__assign({}, value.currentItem)));
9847
9890
  this.labelBtnAdd = "hcm.payroll.employees_update";
9848
- this.setValidatorsAccordingList(value.listData, value.currentItem["index"]);
9891
+ this.setValidatorsAccordingList(value.listData, value.currentItem["index"], value && value["isEditMode"]);
9849
9892
  if (!this.isView) {
9850
9893
  this.configEnableFields(value && value["isEditMode"]);
9851
9894
  }
9895
+ else {
9896
+ if (this.pixAccountFormGroup.get("pixKeyType").value) {
9897
+ this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9898
+ this.formatPixKeyTelephoneNumber();
9899
+ }
9900
+ }
9852
9901
  }
9853
9902
  else {
9854
9903
  this.labelBtnAdd = "hcm.payroll.employees_add";
@@ -9857,6 +9906,11 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9857
9906
  enumerable: true,
9858
9907
  configurable: true
9859
9908
  });
9909
+ HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
9910
+ if (this.pixKeyType === "TELEPHONE") {
9911
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9912
+ }
9913
+ };
9860
9914
  HistoricalPixAccountFormComponent.prototype.convertDTOToShowWithCustomFields = function (data) {
9861
9915
  var obj = __assign({}, data);
9862
9916
  obj["customFields"] = mountCustomToShow(obj["customFields"]);
@@ -9866,10 +9920,8 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9866
9920
  this.visibleBtnSave = isEditMode;
9867
9921
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
9868
9922
  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
- }
9923
+ this.setPixKeyValidators(isEditMode);
9924
+ this.formatPixKeyTelephoneNumber();
9873
9925
  }
9874
9926
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
9875
9927
  "pixKeyType",
@@ -9931,7 +9983,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9931
9983
  */
9932
9984
  set: function (pixAccountList) {
9933
9985
  if (pixAccountList) {
9934
- this.setValidatorsAccordingList(pixAccountList);
9986
+ this.setValidatorsAccordingList(pixAccountList, null, false);
9935
9987
  }
9936
9988
  else {
9937
9989
  this.resetForm();
@@ -9948,8 +10000,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9948
10000
  * @param pixAccountList
9949
10001
  * @param index
9950
10002
  */
9951
- HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index) {
10003
+ HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode) {
9952
10004
  if (index === void 0) { index = null; }
10005
+ if (isEditMode === void 0) { isEditMode = true; }
9953
10006
  this.pixAccountList = pixAccountList && pixAccountList.length ? __spread(pixAccountList) : [];
9954
10007
  var percentageIncluded = [];
9955
10008
  if (this.pixAccountList && this.pixAccountList.length) {
@@ -9960,13 +10013,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9960
10013
  });
9961
10014
  }
9962
10015
  this.beforeSetPixKeyTypeValidator();
9963
- this.setPixKeyValidators();
10016
+ this.setPixKeyValidators(isEditMode);
9964
10017
  this.validatePercentageValid(percentageIncluded);
9965
10018
  };
9966
10019
  /**
9967
10020
  * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
9968
10021
  */
9969
- HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function () {
10022
+ HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
9970
10023
  var genericPixKey = this.pixAccountFormGroup.get("pixKey");
9971
10024
  if (this.pixKeyType) {
9972
10025
  switch (this.pixKeyType) {
@@ -9997,7 +10050,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9997
10050
  genericPixKey.setValidators(null);
9998
10051
  break;
9999
10052
  }
10000
- genericPixKey.enable();
10053
+ if (isEditMode) {
10054
+ genericPixKey.enable();
10055
+ }
10001
10056
  genericPixKey.updateValueAndValidity();
10002
10057
  }
10003
10058
  };
@@ -10030,11 +10085,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10030
10085
  FormatUtilsService.formatTelephoneInputEvent(event);
10031
10086
  };
10032
10087
  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);
10088
+ if (this.defaultCpfNumber) {
10089
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
10090
+ }
10091
+ else {
10092
+ var sheetDocument = this.paramsForm.get("sheetDocument");
10093
+ if (sheetDocument) {
10094
+ var cpf = sheetDocument.get("cpfNumber").value;
10095
+ if (cpf) {
10096
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10097
+ }
10038
10098
  }
10039
10099
  }
10040
10100
  };
@@ -10095,6 +10155,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10095
10155
  __decorate([
10096
10156
  Input()
10097
10157
  ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
10158
+ __decorate([
10159
+ Input()
10160
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
10098
10161
  __decorate([
10099
10162
  Output()
10100
10163
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10116,7 +10179,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10116
10179
  HistoricalPixAccountFormComponent = __decorate([
10117
10180
  Component({
10118
10181
  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",
10182
+ 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
10183
  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
10184
  })
10122
10185
  ], HistoricalPixAccountFormComponent);
@@ -10177,6 +10240,326 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10177
10240
  return HistoricalPixAccountModule;
10178
10241
  }());
10179
10242
 
10243
+ var HistoricalPixAccountListService = /** @class */ (function () {
10244
+ function HistoricalPixAccountListService(http, httpClient) {
10245
+ this.http = http;
10246
+ this.httpClient = httpClient;
10247
+ }
10248
+ HistoricalPixAccountListService.prototype.remove = function (id, dateWhen, service, dependentId) {
10249
+ if (service === void 0) { service = ServiceType.PAYROLL; }
10250
+ if (service === ServiceType.DEPENDENT) {
10251
+ return this.httpClient
10252
+ .post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete", {
10253
+ dependentId: dependentId,
10254
+ dateWhen: dateWhen,
10255
+ });
10256
+ }
10257
+ else {
10258
+ return this.http.post("actions/historicalEmployeePixDelete", {
10259
+ employeeId: id,
10260
+ dateWhen: dateWhen
10261
+ });
10262
+ }
10263
+ };
10264
+ HistoricalPixAccountListService.ctorParameters = function () { return [
10265
+ { type: HttpClientService },
10266
+ { type: HttpClient }
10267
+ ]; };
10268
+ HistoricalPixAccountListService = __decorate([
10269
+ Injectable()
10270
+ ], HistoricalPixAccountListService);
10271
+ return HistoricalPixAccountListService;
10272
+ }());
10273
+
10274
+ var moment$e = moment_;
10275
+ var HistoricalPixAccountListComponent = /** @class */ (function () {
10276
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10277
+ this.confirmationService = confirmationService;
10278
+ this.translateService = translateService;
10279
+ this.activatedRoute = activatedRoute;
10280
+ this.cd = cd;
10281
+ this.router = router;
10282
+ this.messageService = messageService;
10283
+ this.historicalPixAccountListService = historicalPixAccountListService;
10284
+ this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10285
+ this.keyPayload = "historicalEmployeePix";
10286
+ this.withSidebar = true;
10287
+ this.enableView = new EventEmitter();
10288
+ this.ngUnsubscribe = new Subject();
10289
+ this.loading = true;
10290
+ this.columns = [
10291
+ {
10292
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10293
+ field: "dateChange",
10294
+ },
10295
+ {
10296
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10297
+ field: "pixKeyType.value",
10298
+ },
10299
+ {
10300
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10301
+ field: "pixKey",
10302
+ },
10303
+ {
10304
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10305
+ field: "percentage",
10306
+ },
10307
+ {
10308
+ label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10309
+ field: "numberOfPixAccount",
10310
+ },
10311
+ ];
10312
+ }
10313
+ HistoricalPixAccountListComponent.prototype.ngOnInit = function () {
10314
+ this.initParameters = { employeeId: this.employeeId, dependentId: this.dependentId };
10315
+ };
10316
+ HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10317
+ this.ngUnsubscribe.next();
10318
+ this.ngUnsubscribe.complete();
10319
+ };
10320
+ HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10321
+ this.cd.detectChanges();
10322
+ };
10323
+ HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10324
+ var _this = this;
10325
+ payload.forEach(function (value) {
10326
+ value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10327
+ value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10328
+ value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10329
+ });
10330
+ this.onGridLoad(payload);
10331
+ this.loading = false;
10332
+ };
10333
+ HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10334
+ var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10335
+ if (keyType === "TELEPHONE") {
10336
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10337
+ }
10338
+ else if (keyType === "CPF") {
10339
+ return FormatUtilsService.getFormattedCpf(pixKey);
10340
+ }
10341
+ else if (keyType === "CNPJ") {
10342
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10343
+ }
10344
+ else {
10345
+ return pixKey;
10346
+ }
10347
+ };
10348
+ HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10349
+ var _this = this;
10350
+ return [
10351
+ {
10352
+ label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10353
+ command: function () {
10354
+ if (_this.isAllowToViewHistorical && rowData) {
10355
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10356
+ if (_this.withSidebar) {
10357
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10358
+ relativeTo: _this.activatedRoute,
10359
+ });
10360
+ }
10361
+ else {
10362
+ _this.enableView.emit(dateChange);
10363
+ }
10364
+ }
10365
+ else {
10366
+ _this.messageService.add({
10367
+ severity: "error",
10368
+ summary: _this.translateService.instant("hcm.payroll.error"),
10369
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10370
+ });
10371
+ }
10372
+ },
10373
+ },
10374
+ {
10375
+ label: this.translateService.instant("hcm.payroll.delete"),
10376
+ command: function () {
10377
+ if (_this.isAllowToDeleteHistorical && rowData) {
10378
+ _this.delete(rowData.id, rowData.dateChange);
10379
+ }
10380
+ else {
10381
+ _this.messageService.add({
10382
+ severity: "error",
10383
+ summary: _this.translateService.instant("hcm.payroll.error"),
10384
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10385
+ });
10386
+ }
10387
+ },
10388
+ },
10389
+ ];
10390
+ };
10391
+ HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10392
+ var _this = this;
10393
+ if (id === this.lastRecord.id) {
10394
+ var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
10395
+ this.confirmationService.confirm({
10396
+ message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10397
+ accept: function () {
10398
+ _this.loading = true;
10399
+ var service = _this.withSidebar ? ServiceType.PAYROLL : ServiceType.DEPENDENT;
10400
+ _this.historicalPixAccountListService
10401
+ .remove(_this.employeeId, dateChangeToDto_1, service, _this.dependentId)
10402
+ .pipe(takeUntil(_this.ngUnsubscribe))
10403
+ .subscribe(function () {
10404
+ _this.messageService.add({
10405
+ severity: "success",
10406
+ summary: _this.translateService.instant("hcm.payroll.success"),
10407
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove"),
10408
+ });
10409
+ _this.parameters = (_this.parameters && __assign({}, _this.parameters)) || {};
10410
+ }, function () {
10411
+ _this.messageService.add({
10412
+ severity: "error",
10413
+ summary: _this.translateService.instant("hcm.payroll.error"),
10414
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove"),
10415
+ });
10416
+ _this.loading = false;
10417
+ });
10418
+ },
10419
+ });
10420
+ }
10421
+ else {
10422
+ this.messageService.add({
10423
+ severity: "error",
10424
+ summary: this.translateService.instant("hcm.payroll.error"),
10425
+ detail: this.translateService.instant("hcm.payroll.not_allowed_delete_last"),
10426
+ });
10427
+ }
10428
+ };
10429
+ HistoricalPixAccountListComponent.prototype.add = function () {
10430
+ if (this.isAllowToAddHistorical) {
10431
+ this.router.navigate(["historical-pix-account-new"], {
10432
+ relativeTo: this.activatedRoute,
10433
+ });
10434
+ }
10435
+ else {
10436
+ this.messageService.add({
10437
+ severity: "error",
10438
+ summary: this.translateService.instant("hcm.payroll.error"),
10439
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10440
+ });
10441
+ }
10442
+ };
10443
+ HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10444
+ if (payload && payload.length) {
10445
+ this.lastRecord = payload[0];
10446
+ }
10447
+ };
10448
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10449
+ get: function () {
10450
+ return (this.permission["Incluir"]);
10451
+ },
10452
+ enumerable: true,
10453
+ configurable: true
10454
+ });
10455
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10456
+ get: function () {
10457
+ return (this.permission["Excluir"]);
10458
+ },
10459
+ enumerable: true,
10460
+ configurable: true
10461
+ });
10462
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToViewHistorical", {
10463
+ get: function () {
10464
+ return (this.permission["Visaulizar"]);
10465
+ },
10466
+ enumerable: true,
10467
+ configurable: true
10468
+ });
10469
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10470
+ get: function () {
10471
+ return this.getMenuActions.bind(this);
10472
+ },
10473
+ enumerable: true,
10474
+ configurable: true
10475
+ });
10476
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "reloadList", {
10477
+ set: function (condition) {
10478
+ if (condition) {
10479
+ this.loading = true;
10480
+ this.parameters = (this.parameters && __assign({}, this.parameters)) || {};
10481
+ }
10482
+ },
10483
+ enumerable: true,
10484
+ configurable: true
10485
+ });
10486
+ HistoricalPixAccountListComponent.ctorParameters = function () { return [
10487
+ { type: ConfirmationService },
10488
+ { type: TranslateService },
10489
+ { type: ActivatedRoute },
10490
+ { type: ChangeDetectorRef },
10491
+ { type: Router },
10492
+ { type: MessageService },
10493
+ { type: HistoricalPixAccountListService }
10494
+ ]; };
10495
+ __decorate([
10496
+ ViewChild(CustomFieldsComponent$1, { static: false })
10497
+ ], HistoricalPixAccountListComponent.prototype, "customFields", void 0);
10498
+ __decorate([
10499
+ Input()
10500
+ ], HistoricalPixAccountListComponent.prototype, "permission", void 0);
10501
+ __decorate([
10502
+ Input()
10503
+ ], HistoricalPixAccountListComponent.prototype, "employeeId", void 0);
10504
+ __decorate([
10505
+ Input()
10506
+ ], HistoricalPixAccountListComponent.prototype, "dependentId", void 0);
10507
+ __decorate([
10508
+ Input()
10509
+ ], HistoricalPixAccountListComponent.prototype, "dateFormat", void 0);
10510
+ __decorate([
10511
+ Input()
10512
+ ], HistoricalPixAccountListComponent.prototype, "endPoint", void 0);
10513
+ __decorate([
10514
+ Input()
10515
+ ], HistoricalPixAccountListComponent.prototype, "keyPayload", void 0);
10516
+ __decorate([
10517
+ Input()
10518
+ ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10519
+ __decorate([
10520
+ Output()
10521
+ ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10522
+ __decorate([
10523
+ Input()
10524
+ ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
10525
+ HistoricalPixAccountListComponent = __decorate([
10526
+ Component({
10527
+ // tslint:disable-next-line:component-selector
10528
+ selector: "c-historical-pix-account-list",
10529
+ 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",
10530
+ styles: [""]
10531
+ })
10532
+ ], HistoricalPixAccountListComponent);
10533
+ return HistoricalPixAccountListComponent;
10534
+ }());
10535
+
10536
+ var HistoricalPixAccountListModule = /** @class */ (function () {
10537
+ function HistoricalPixAccountListModule() {
10538
+ }
10539
+ HistoricalPixAccountListModule = __decorate([
10540
+ NgModule({
10541
+ imports: [
10542
+ CommonModule,
10543
+ FormsModule,
10544
+ HttpClientModule,
10545
+ AutoCompleteModule,
10546
+ SharedModule,
10547
+ ReactiveFormsModule,
10548
+ TableModule,
10549
+ ButtonModule,
10550
+ TooltipModule,
10551
+ LoadingStateModule,
10552
+ DataListRestModule,
10553
+ ConfirmDialogModule,
10554
+ ],
10555
+ declarations: [HistoricalPixAccountListComponent],
10556
+ providers: [HistoricalPixAccountListService],
10557
+ exports: [HistoricalPixAccountListComponent],
10558
+ })
10559
+ ], HistoricalPixAccountListModule);
10560
+ return HistoricalPixAccountListModule;
10561
+ }());
10562
+
10180
10563
  /*
10181
10564
  * Public API Surface of core
10182
10565
  */
@@ -10185,5 +10568,5 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10185
10568
  * Generated bundle index. Do not edit.
10186
10569
  */
10187
10570
 
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 };
10571
+ 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
10572
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map