@senior-gestao-pessoas/payroll-core 9.2.0 → 9.3.0-784091e9-e857-4112-9344-e47026fdac80

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 +349 -18
  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 +1 -0
  7. package/components/historical-pix-account-list/historical-pix-account-list.component.d.ts +50 -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 +6 -2
  13. package/esm2015/components/historical-pix-account-list/historical-pix-account-list.component.js +237 -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 +6 -2
  20. package/esm5/components/historical-pix-account-list/historical-pix-account-list.component.js +257 -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 +321 -19
  26. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  27. package/fesm5/senior-gestao-pessoas-payroll-core.js +347 -19
  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
@@ -9266,6 +9266,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9266
9266
  this.isEditMode = false;
9267
9267
  this.isViewMode = false;
9268
9268
  this.withSideBar = true;
9269
+ this.defaultCpfNumber = null;
9269
9270
  this.visibleChange = new EventEmitter();
9270
9271
  this.ngUnsubscribe = new Subject();
9271
9272
  this.orderBy = {
@@ -9579,6 +9580,9 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9579
9580
  __decorate([
9580
9581
  Input()
9581
9582
  ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
9583
+ __decorate([
9584
+ Input()
9585
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
9582
9586
  __decorate([
9583
9587
  Input()
9584
9588
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -9595,7 +9599,7 @@ var HistoricalPixAccountComponent = /** @class */ (function () {
9595
9599
  Component({
9596
9600
  // tslint:disable-next-line:component-selector
9597
9601
  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",
9602
+ 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
9603
  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
9604
  })
9601
9605
  ], HistoricalPixAccountComponent);
@@ -9775,6 +9779,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9775
9779
  this.withSideBar = true;
9776
9780
  this.isEditMode = false;
9777
9781
  this.paramsForm = new FormGroup({});
9782
+ this.defaultCpfNumber = null;
9778
9783
  this.visibleChange = new EventEmitter();
9779
9784
  this.pixAccountItemToList = new EventEmitter();
9780
9785
  this.ngUnsubscribe = new Subject();
@@ -9809,6 +9814,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9809
9814
  percentage: this.formBuilder.control(null, Validators.compose(__spread(this.initialValidatorOfPercentage, [
9810
9815
  Validators.max(this.maxValuePercentage),
9811
9816
  ]))),
9817
+ externalId: this.formBuilder.control(null),
9812
9818
  customFields: this.formBuilder.control(null),
9813
9819
  });
9814
9820
  };
@@ -9817,7 +9823,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9817
9823
  this.pixKeyType = item.key;
9818
9824
  this.isShowPixKeyFieldValidatorMessage = true;
9819
9825
  this.pixAccountFormGroup.get("pixKey").reset();
9820
- this.setPixKeyValidators();
9826
+ this.setPixKeyValidators(true);
9821
9827
  if (item.key === "CPF") {
9822
9828
  this.setDefaultCpfPixKey();
9823
9829
  }
@@ -9845,10 +9851,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9845
9851
  if (value && value.currentItem && Object.keys(value.currentItem).length) {
9846
9852
  this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(__assign({}, value.currentItem)));
9847
9853
  this.labelBtnAdd = "hcm.payroll.employees_update";
9848
- this.setValidatorsAccordingList(value.listData, value.currentItem["index"]);
9854
+ this.setValidatorsAccordingList(value.listData, value.currentItem["index"], value && value["isEditMode"]);
9849
9855
  if (!this.isView) {
9850
9856
  this.configEnableFields(value && value["isEditMode"]);
9851
9857
  }
9858
+ else {
9859
+ if (this.pixAccountFormGroup.get("pixKeyType").value) {
9860
+ this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
9861
+ this.formatPixKeyTelephoneNumber();
9862
+ }
9863
+ }
9852
9864
  }
9853
9865
  else {
9854
9866
  this.labelBtnAdd = "hcm.payroll.employees_add";
@@ -9857,6 +9869,11 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9857
9869
  enumerable: true,
9858
9870
  configurable: true
9859
9871
  });
9872
+ HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
9873
+ if (this.pixKeyType === "TELEPHONE") {
9874
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
9875
+ }
9876
+ };
9860
9877
  HistoricalPixAccountFormComponent.prototype.convertDTOToShowWithCustomFields = function (data) {
9861
9878
  var obj = __assign({}, data);
9862
9879
  obj["customFields"] = mountCustomToShow(obj["customFields"]);
@@ -9866,10 +9883,8 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9866
9883
  this.visibleBtnSave = isEditMode;
9867
9884
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
9868
9885
  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
- }
9886
+ this.setPixKeyValidators(isEditMode);
9887
+ this.formatPixKeyTelephoneNumber();
9873
9888
  }
9874
9889
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
9875
9890
  "pixKeyType",
@@ -9931,7 +9946,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9931
9946
  */
9932
9947
  set: function (pixAccountList) {
9933
9948
  if (pixAccountList) {
9934
- this.setValidatorsAccordingList(pixAccountList);
9949
+ this.setValidatorsAccordingList(pixAccountList, null, false);
9935
9950
  }
9936
9951
  else {
9937
9952
  this.resetForm();
@@ -9948,8 +9963,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9948
9963
  * @param pixAccountList
9949
9964
  * @param index
9950
9965
  */
9951
- HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index) {
9966
+ HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode) {
9952
9967
  if (index === void 0) { index = null; }
9968
+ if (isEditMode === void 0) { isEditMode = true; }
9953
9969
  this.pixAccountList = pixAccountList && pixAccountList.length ? __spread(pixAccountList) : [];
9954
9970
  var percentageIncluded = [];
9955
9971
  if (this.pixAccountList && this.pixAccountList.length) {
@@ -9960,13 +9976,13 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9960
9976
  });
9961
9977
  }
9962
9978
  this.beforeSetPixKeyTypeValidator();
9963
- this.setPixKeyValidators();
9979
+ this.setPixKeyValidators(isEditMode);
9964
9980
  this.validatePercentageValid(percentageIncluded);
9965
9981
  };
9966
9982
  /**
9967
9983
  * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
9968
9984
  */
9969
- HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function () {
9985
+ HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
9970
9986
  var genericPixKey = this.pixAccountFormGroup.get("pixKey");
9971
9987
  if (this.pixKeyType) {
9972
9988
  switch (this.pixKeyType) {
@@ -9997,7 +10013,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
9997
10013
  genericPixKey.setValidators(null);
9998
10014
  break;
9999
10015
  }
10000
- genericPixKey.enable();
10016
+ if (isEditMode) {
10017
+ genericPixKey.enable();
10018
+ }
10001
10019
  genericPixKey.updateValueAndValidity();
10002
10020
  }
10003
10021
  };
@@ -10030,11 +10048,16 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10030
10048
  FormatUtilsService.formatTelephoneInputEvent(event);
10031
10049
  };
10032
10050
  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);
10051
+ if (this.defaultCpfNumber) {
10052
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
10053
+ }
10054
+ else {
10055
+ var sheetDocument = this.paramsForm.get("sheetDocument");
10056
+ if (sheetDocument) {
10057
+ var cpf = sheetDocument.get("cpfNumber").value;
10058
+ if (cpf) {
10059
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10060
+ }
10038
10061
  }
10039
10062
  }
10040
10063
  };
@@ -10095,6 +10118,9 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10095
10118
  __decorate([
10096
10119
  Input()
10097
10120
  ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
10121
+ __decorate([
10122
+ Input()
10123
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
10098
10124
  __decorate([
10099
10125
  Output()
10100
10126
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10116,7 +10142,7 @@ var HistoricalPixAccountFormComponent = /** @class */ (function () {
10116
10142
  HistoricalPixAccountFormComponent = __decorate([
10117
10143
  Component({
10118
10144
  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",
10145
+ 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
10146
  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
10147
  })
10122
10148
  ], HistoricalPixAccountFormComponent);
@@ -10177,6 +10203,308 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10177
10203
  return HistoricalPixAccountModule;
10178
10204
  }());
10179
10205
 
10206
+ var HistoricalPixAccountListService = /** @class */ (function () {
10207
+ function HistoricalPixAccountListService(http, httpClient) {
10208
+ this.http = http;
10209
+ this.httpClient = httpClient;
10210
+ }
10211
+ HistoricalPixAccountListService.prototype.remove = function (id, dateWhen, service, dependentId) {
10212
+ if (service === void 0) { service = ServiceType.PAYROLL; }
10213
+ if (service === ServiceType.DEPENDENT) {
10214
+ return this.httpClient
10215
+ .post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete", {
10216
+ dependentId: dependentId,
10217
+ dateWhen: dateWhen,
10218
+ });
10219
+ }
10220
+ else {
10221
+ return this.http.post("actions/historicalEmployeePixDelete", {
10222
+ employeeId: id,
10223
+ dateWhen: dateWhen
10224
+ });
10225
+ }
10226
+ };
10227
+ HistoricalPixAccountListService.ctorParameters = function () { return [
10228
+ { type: HttpClientService },
10229
+ { type: HttpClient }
10230
+ ]; };
10231
+ HistoricalPixAccountListService = __decorate([
10232
+ Injectable()
10233
+ ], HistoricalPixAccountListService);
10234
+ return HistoricalPixAccountListService;
10235
+ }());
10236
+
10237
+ var moment$e = moment_;
10238
+ var HistoricalPixAccountListComponent = /** @class */ (function () {
10239
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10240
+ this.confirmationService = confirmationService;
10241
+ this.translateService = translateService;
10242
+ this.activatedRoute = activatedRoute;
10243
+ this.cd = cd;
10244
+ this.router = router;
10245
+ this.messageService = messageService;
10246
+ this.historicalPixAccountListService = historicalPixAccountListService;
10247
+ this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10248
+ this.keyPayload = "historicalEmployeePix";
10249
+ this.withSidebar = true;
10250
+ this.enableView = new EventEmitter();
10251
+ this.ngUnsubscribe = new Subject();
10252
+ this.loading = true;
10253
+ this.columns = [
10254
+ {
10255
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10256
+ field: "dateChange",
10257
+ },
10258
+ {
10259
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10260
+ field: "pixKeyType.value",
10261
+ },
10262
+ {
10263
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10264
+ field: "pixKey",
10265
+ },
10266
+ {
10267
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10268
+ field: "percentage",
10269
+ },
10270
+ {
10271
+ label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10272
+ field: "numberOfPixAccount",
10273
+ },
10274
+ ];
10275
+ }
10276
+ HistoricalPixAccountListComponent.prototype.ngOnInit = function () {
10277
+ this.initParameters = { employeeId: this.employeeId, dependentId: this.dependentId };
10278
+ };
10279
+ HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10280
+ this.ngUnsubscribe.next();
10281
+ this.ngUnsubscribe.complete();
10282
+ };
10283
+ HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10284
+ this.cd.detectChanges();
10285
+ };
10286
+ HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10287
+ var _this = this;
10288
+ payload.forEach(function (value) {
10289
+ value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10290
+ value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10291
+ value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10292
+ });
10293
+ this.onGridLoad(payload);
10294
+ this.loading = false;
10295
+ };
10296
+ HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10297
+ var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10298
+ if (keyType === "TELEPHONE") {
10299
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10300
+ }
10301
+ else if (keyType === "CPF") {
10302
+ return FormatUtilsService.getFormattedCpf(pixKey);
10303
+ }
10304
+ else if (keyType === "CNPJ") {
10305
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10306
+ }
10307
+ else {
10308
+ return pixKey;
10309
+ }
10310
+ };
10311
+ HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10312
+ var _this = this;
10313
+ return [
10314
+ {
10315
+ label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10316
+ command: function () {
10317
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10318
+ if (_this.withSidebar)
10319
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10320
+ relativeTo: _this.activatedRoute,
10321
+ });
10322
+ else
10323
+ _this.enableView.emit(dateChange);
10324
+ },
10325
+ },
10326
+ {
10327
+ label: this.translateService.instant("hcm.payroll.delete"),
10328
+ command: function () {
10329
+ if (_this.isAllowToDeleteHistorical && rowData) {
10330
+ _this.delete(rowData.id, rowData.dateChange);
10331
+ }
10332
+ else {
10333
+ _this.messageService.add({
10334
+ severity: "error",
10335
+ summary: _this.translateService.instant("hcm.payroll.error"),
10336
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10337
+ });
10338
+ }
10339
+ },
10340
+ },
10341
+ ];
10342
+ };
10343
+ HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10344
+ var _this = this;
10345
+ if (id === this.lastRecord.id) {
10346
+ var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
10347
+ this.confirmationService.confirm({
10348
+ message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10349
+ accept: function () {
10350
+ _this.loading = true;
10351
+ var service = _this.withSidebar ? ServiceType.PAYROLL : ServiceType.DEPENDENT;
10352
+ _this.historicalPixAccountListService
10353
+ .remove(_this.employeeId, dateChangeToDto_1, service, _this.dependentId)
10354
+ .pipe(takeUntil(_this.ngUnsubscribe))
10355
+ .subscribe(function () {
10356
+ _this.messageService.add({
10357
+ severity: "success",
10358
+ summary: _this.translateService.instant("hcm.payroll.success"),
10359
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove"),
10360
+ });
10361
+ _this.parameters = (_this.parameters && __assign({}, _this.parameters)) || {};
10362
+ }, function () {
10363
+ _this.messageService.add({
10364
+ severity: "error",
10365
+ summary: _this.translateService.instant("hcm.payroll.error"),
10366
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove"),
10367
+ });
10368
+ _this.loading = false;
10369
+ });
10370
+ },
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.not_allowed_delete_last"),
10378
+ });
10379
+ }
10380
+ };
10381
+ HistoricalPixAccountListComponent.prototype.add = function () {
10382
+ if (this.isAllowToAddHistorical) {
10383
+ this.router.navigate(["historical-pix-account-new"], {
10384
+ relativeTo: this.activatedRoute,
10385
+ });
10386
+ }
10387
+ else {
10388
+ this.messageService.add({
10389
+ severity: "error",
10390
+ summary: this.translateService.instant("hcm.payroll.error"),
10391
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10392
+ });
10393
+ }
10394
+ };
10395
+ HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10396
+ if (payload && payload.length) {
10397
+ this.lastRecord = payload[0];
10398
+ }
10399
+ };
10400
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10401
+ get: function () {
10402
+ return (this.permission["incluir"]);
10403
+ },
10404
+ enumerable: true,
10405
+ configurable: true
10406
+ });
10407
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10408
+ get: function () {
10409
+ return (this.permission["excluir"]);
10410
+ },
10411
+ enumerable: true,
10412
+ configurable: true
10413
+ });
10414
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10415
+ get: function () {
10416
+ return this.getMenuActions.bind(this);
10417
+ },
10418
+ enumerable: true,
10419
+ configurable: true
10420
+ });
10421
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "reloadList", {
10422
+ set: function (condition) {
10423
+ if (condition) {
10424
+ this.loading = true;
10425
+ this.parameters = (this.parameters && __assign({}, this.parameters)) || {};
10426
+ }
10427
+ },
10428
+ enumerable: true,
10429
+ configurable: true
10430
+ });
10431
+ HistoricalPixAccountListComponent.ctorParameters = function () { return [
10432
+ { type: ConfirmationService },
10433
+ { type: TranslateService },
10434
+ { type: ActivatedRoute },
10435
+ { type: ChangeDetectorRef },
10436
+ { type: Router },
10437
+ { type: MessageService },
10438
+ { type: HistoricalPixAccountListService }
10439
+ ]; };
10440
+ __decorate([
10441
+ ViewChild(CustomFieldsComponent$1, { static: false })
10442
+ ], HistoricalPixAccountListComponent.prototype, "customFields", void 0);
10443
+ __decorate([
10444
+ Input()
10445
+ ], HistoricalPixAccountListComponent.prototype, "permission", void 0);
10446
+ __decorate([
10447
+ Input()
10448
+ ], HistoricalPixAccountListComponent.prototype, "employeeId", void 0);
10449
+ __decorate([
10450
+ Input()
10451
+ ], HistoricalPixAccountListComponent.prototype, "dependentId", void 0);
10452
+ __decorate([
10453
+ Input()
10454
+ ], HistoricalPixAccountListComponent.prototype, "dateFormat", void 0);
10455
+ __decorate([
10456
+ Input()
10457
+ ], HistoricalPixAccountListComponent.prototype, "endPoint", void 0);
10458
+ __decorate([
10459
+ Input()
10460
+ ], HistoricalPixAccountListComponent.prototype, "keyPayload", void 0);
10461
+ __decorate([
10462
+ Input()
10463
+ ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10464
+ __decorate([
10465
+ Output()
10466
+ ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10467
+ __decorate([
10468
+ Input()
10469
+ ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
10470
+ HistoricalPixAccountListComponent = __decorate([
10471
+ Component({
10472
+ // tslint:disable-next-line:component-selector
10473
+ selector: "c-historical-pix-account-list",
10474
+ 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",
10475
+ styles: [""]
10476
+ })
10477
+ ], HistoricalPixAccountListComponent);
10478
+ return HistoricalPixAccountListComponent;
10479
+ }());
10480
+
10481
+ var HistoricalPixAccountListModule = /** @class */ (function () {
10482
+ function HistoricalPixAccountListModule() {
10483
+ }
10484
+ HistoricalPixAccountListModule = __decorate([
10485
+ NgModule({
10486
+ imports: [
10487
+ CommonModule,
10488
+ FormsModule,
10489
+ HttpClientModule,
10490
+ AutoCompleteModule,
10491
+ SharedModule,
10492
+ ReactiveFormsModule,
10493
+ TableModule,
10494
+ ButtonModule,
10495
+ TooltipModule,
10496
+ LoadingStateModule,
10497
+ DataListRestModule,
10498
+ ConfirmDialogModule,
10499
+ ],
10500
+ declarations: [HistoricalPixAccountListComponent],
10501
+ providers: [HistoricalPixAccountListService],
10502
+ exports: [HistoricalPixAccountListComponent],
10503
+ })
10504
+ ], HistoricalPixAccountListModule);
10505
+ return HistoricalPixAccountListModule;
10506
+ }());
10507
+
10180
10508
  /*
10181
10509
  * Public API Surface of core
10182
10510
  */
@@ -10185,5 +10513,5 @@ var HistoricalPixAccountModule = /** @class */ (function () {
10185
10513
  * Generated bundle index. Do not edit.
10186
10514
  */
10187
10515
 
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 };
10516
+ 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
10517
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.js.map