@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
@@ -9432,6 +9432,7 @@
9432
9432
  this.isEditMode = false;
9433
9433
  this.isViewMode = false;
9434
9434
  this.withSideBar = true;
9435
+ this.defaultCpfNumber = null;
9435
9436
  this.visibleChange = new core.EventEmitter();
9436
9437
  this.ngUnsubscribe = new rxjs.Subject();
9437
9438
  this.orderBy = {
@@ -9745,6 +9746,9 @@
9745
9746
  __decorate([
9746
9747
  core.Input()
9747
9748
  ], HistoricalPixAccountComponent.prototype, "paramsForm", void 0);
9749
+ __decorate([
9750
+ core.Input()
9751
+ ], HistoricalPixAccountComponent.prototype, "defaultCpfNumber", void 0);
9748
9752
  __decorate([
9749
9753
  core.Input()
9750
9754
  ], HistoricalPixAccountComponent.prototype, "dateChange", null);
@@ -9761,7 +9765,7 @@
9761
9765
  core.Component({
9762
9766
  // tslint:disable-next-line:component-selector
9763
9767
  selector: "c-historical-pix-account",
9764
- 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",
9768
+ 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",
9765
9769
  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}"]
9766
9770
  })
9767
9771
  ], HistoricalPixAccountComponent);
@@ -9941,6 +9945,7 @@
9941
9945
  this.withSideBar = true;
9942
9946
  this.isEditMode = false;
9943
9947
  this.paramsForm = new forms.FormGroup({});
9948
+ this.defaultCpfNumber = null;
9944
9949
  this.visibleChange = new core.EventEmitter();
9945
9950
  this.pixAccountItemToList = new core.EventEmitter();
9946
9951
  this.ngUnsubscribe = new rxjs.Subject();
@@ -9975,6 +9980,7 @@
9975
9980
  percentage: this.formBuilder.control(null, forms.Validators.compose(__spread(this.initialValidatorOfPercentage, [
9976
9981
  forms.Validators.max(this.maxValuePercentage),
9977
9982
  ]))),
9983
+ externalId: this.formBuilder.control(null),
9978
9984
  customFields: this.formBuilder.control(null),
9979
9985
  });
9980
9986
  };
@@ -9983,7 +9989,7 @@
9983
9989
  this.pixKeyType = item.key;
9984
9990
  this.isShowPixKeyFieldValidatorMessage = true;
9985
9991
  this.pixAccountFormGroup.get("pixKey").reset();
9986
- this.setPixKeyValidators();
9992
+ this.setPixKeyValidators(true);
9987
9993
  if (item.key === "CPF") {
9988
9994
  this.setDefaultCpfPixKey();
9989
9995
  }
@@ -10011,10 +10017,16 @@
10011
10017
  if (value && value.currentItem && Object.keys(value.currentItem).length) {
10012
10018
  this.pixAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(__assign({}, value.currentItem)));
10013
10019
  this.labelBtnAdd = "hcm.payroll.employees_update";
10014
- this.setValidatorsAccordingList(value.listData, value.currentItem["index"]);
10020
+ this.setValidatorsAccordingList(value.listData, value.currentItem["index"], value && value["isEditMode"]);
10015
10021
  if (!this.isView) {
10016
10022
  this.configEnableFields(value && value["isEditMode"]);
10017
10023
  }
10024
+ else {
10025
+ if (this.pixAccountFormGroup.get("pixKeyType").value) {
10026
+ this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
10027
+ this.formatPixKeyTelephoneNumber();
10028
+ }
10029
+ }
10018
10030
  }
10019
10031
  else {
10020
10032
  this.labelBtnAdd = "hcm.payroll.employees_add";
@@ -10023,6 +10035,11 @@
10023
10035
  enumerable: true,
10024
10036
  configurable: true
10025
10037
  });
10038
+ HistoricalPixAccountFormComponent.prototype.formatPixKeyTelephoneNumber = function () {
10039
+ if (this.pixKeyType === "TELEPHONE") {
10040
+ this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
10041
+ }
10042
+ };
10026
10043
  HistoricalPixAccountFormComponent.prototype.convertDTOToShowWithCustomFields = function (data) {
10027
10044
  var obj = __assign({}, data);
10028
10045
  obj["customFields"] = mountCustomToShow(obj["customFields"]);
@@ -10032,10 +10049,8 @@
10032
10049
  this.visibleBtnSave = isEditMode;
10033
10050
  if (this.pixAccountFormGroup.get("pixKeyType").value) {
10034
10051
  this.pixKeyType = this.pixAccountFormGroup.get("pixKeyType").value.key;
10035
- this.setPixKeyValidators();
10036
- if (this.pixKeyType === "TELEPHONE") {
10037
- this.pixAccountFormGroup.get("pixKey").setValue(FormatUtilsService.getFormattedTelephoneNumber(this.pixAccountFormGroup.get("pixKey").value));
10038
- }
10052
+ this.setPixKeyValidators(isEditMode);
10053
+ this.formatPixKeyTelephoneNumber();
10039
10054
  }
10040
10055
  configEnabledFields(this.pixAccountFormGroup, isEditMode, [
10041
10056
  "pixKeyType",
@@ -10097,7 +10112,7 @@
10097
10112
  */
10098
10113
  set: function (pixAccountList) {
10099
10114
  if (pixAccountList) {
10100
- this.setValidatorsAccordingList(pixAccountList);
10115
+ this.setValidatorsAccordingList(pixAccountList, null, false);
10101
10116
  }
10102
10117
  else {
10103
10118
  this.resetForm();
@@ -10114,8 +10129,9 @@
10114
10129
  * @param pixAccountList
10115
10130
  * @param index
10116
10131
  */
10117
- HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index) {
10132
+ HistoricalPixAccountFormComponent.prototype.setValidatorsAccordingList = function (pixAccountList, index, isEditMode) {
10118
10133
  if (index === void 0) { index = null; }
10134
+ if (isEditMode === void 0) { isEditMode = true; }
10119
10135
  this.pixAccountList = pixAccountList && pixAccountList.length ? __spread(pixAccountList) : [];
10120
10136
  var percentageIncluded = [];
10121
10137
  if (this.pixAccountList && this.pixAccountList.length) {
@@ -10126,13 +10142,13 @@
10126
10142
  });
10127
10143
  }
10128
10144
  this.beforeSetPixKeyTypeValidator();
10129
- this.setPixKeyValidators();
10145
+ this.setPixKeyValidators(isEditMode);
10130
10146
  this.validatePercentageValid(percentageIncluded);
10131
10147
  };
10132
10148
  /**
10133
10149
  * Antes de setar o validator prepara as variáveis necessária para que seja feita a validação do campo.
10134
10150
  */
10135
- HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function () {
10151
+ HistoricalPixAccountFormComponent.prototype.setPixKeyValidators = function (isEditMode) {
10136
10152
  var genericPixKey = this.pixAccountFormGroup.get("pixKey");
10137
10153
  if (this.pixKeyType) {
10138
10154
  switch (this.pixKeyType) {
@@ -10163,7 +10179,9 @@
10163
10179
  genericPixKey.setValidators(null);
10164
10180
  break;
10165
10181
  }
10166
- genericPixKey.enable();
10182
+ if (isEditMode) {
10183
+ genericPixKey.enable();
10184
+ }
10167
10185
  genericPixKey.updateValueAndValidity();
10168
10186
  }
10169
10187
  };
@@ -10196,11 +10214,16 @@
10196
10214
  FormatUtilsService.formatTelephoneInputEvent(event);
10197
10215
  };
10198
10216
  HistoricalPixAccountFormComponent.prototype.setDefaultCpfPixKey = function () {
10199
- var sheetDocument = this.paramsForm.get("sheetDocument");
10200
- if (sheetDocument) {
10201
- var cpf = sheetDocument.get("cpfNumber").value;
10202
- if (cpf) {
10203
- this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10217
+ if (this.defaultCpfNumber) {
10218
+ this.pixAccountFormGroup.get("pixKey").setValue(this.defaultCpfNumber);
10219
+ }
10220
+ else {
10221
+ var sheetDocument = this.paramsForm.get("sheetDocument");
10222
+ if (sheetDocument) {
10223
+ var cpf = sheetDocument.get("cpfNumber").value;
10224
+ if (cpf) {
10225
+ this.pixAccountFormGroup.get("pixKey").setValue(cpf);
10226
+ }
10204
10227
  }
10205
10228
  }
10206
10229
  };
@@ -10261,6 +10284,9 @@
10261
10284
  __decorate([
10262
10285
  core.Input()
10263
10286
  ], HistoricalPixAccountFormComponent.prototype, "paramsForm", void 0);
10287
+ __decorate([
10288
+ core.Input()
10289
+ ], HistoricalPixAccountFormComponent.prototype, "defaultCpfNumber", void 0);
10264
10290
  __decorate([
10265
10291
  core.Output()
10266
10292
  ], HistoricalPixAccountFormComponent.prototype, "visibleChange", void 0);
@@ -10282,7 +10308,7 @@
10282
10308
  HistoricalPixAccountFormComponent = __decorate([
10283
10309
  core.Component({
10284
10310
  selector: "pix-account",
10285
- 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",
10311
+ 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",
10286
10312
  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}"]
10287
10313
  })
10288
10314
  ], HistoricalPixAccountFormComponent);
@@ -10343,6 +10369,308 @@
10343
10369
  return HistoricalPixAccountModule;
10344
10370
  }());
10345
10371
 
10372
+ var HistoricalPixAccountListService = /** @class */ (function () {
10373
+ function HistoricalPixAccountListService(http, httpClient) {
10374
+ this.http = http;
10375
+ this.httpClient = httpClient;
10376
+ }
10377
+ HistoricalPixAccountListService.prototype.remove = function (id, dateWhen, service, dependentId) {
10378
+ if (service === void 0) { service = exports.ServiceType.PAYROLL; }
10379
+ if (service === exports.ServiceType.DEPENDENT) {
10380
+ return this.httpClient
10381
+ .post("hcm/dependent/queries/historicalDependentJudicialPensionPixDelete", {
10382
+ dependentId: dependentId,
10383
+ dateWhen: dateWhen,
10384
+ });
10385
+ }
10386
+ else {
10387
+ return this.http.post("actions/historicalEmployeePixDelete", {
10388
+ employeeId: id,
10389
+ dateWhen: dateWhen
10390
+ });
10391
+ }
10392
+ };
10393
+ HistoricalPixAccountListService.ctorParameters = function () { return [
10394
+ { type: HttpClientService },
10395
+ { type: http.HttpClient }
10396
+ ]; };
10397
+ HistoricalPixAccountListService = __decorate([
10398
+ core.Injectable()
10399
+ ], HistoricalPixAccountListService);
10400
+ return HistoricalPixAccountListService;
10401
+ }());
10402
+
10403
+ var moment$e = moment_;
10404
+ var HistoricalPixAccountListComponent = /** @class */ (function () {
10405
+ function HistoricalPixAccountListComponent(confirmationService, translateService, activatedRoute, cd, router, messageService, historicalPixAccountListService) {
10406
+ this.confirmationService = confirmationService;
10407
+ this.translateService = translateService;
10408
+ this.activatedRoute = activatedRoute;
10409
+ this.cd = cd;
10410
+ this.router = router;
10411
+ this.messageService = messageService;
10412
+ this.historicalPixAccountListService = historicalPixAccountListService;
10413
+ this.endPoint = "hcm/payroll/queries/historicalEmployeePixQuery";
10414
+ this.keyPayload = "historicalEmployeePix";
10415
+ this.withSidebar = true;
10416
+ this.enableView = new core.EventEmitter();
10417
+ this.ngUnsubscribe = new rxjs.Subject();
10418
+ this.loading = true;
10419
+ this.columns = [
10420
+ {
10421
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_date_change"),
10422
+ field: "dateChange",
10423
+ },
10424
+ {
10425
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key_type"),
10426
+ field: "pixKeyType.value",
10427
+ },
10428
+ {
10429
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_pix_key"),
10430
+ field: "pixKey",
10431
+ },
10432
+ {
10433
+ label: this.translateService.instant("hcm.payroll.historical_pix_account_label_percentage"),
10434
+ field: "percentage",
10435
+ },
10436
+ {
10437
+ label: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_label_qtd_account"),
10438
+ field: "numberOfPixAccount",
10439
+ },
10440
+ ];
10441
+ }
10442
+ HistoricalPixAccountListComponent.prototype.ngOnInit = function () {
10443
+ this.initParameters = { employeeId: this.employeeId, dependentId: this.dependentId };
10444
+ };
10445
+ HistoricalPixAccountListComponent.prototype.ngOnDestroy = function () {
10446
+ this.ngUnsubscribe.next();
10447
+ this.ngUnsubscribe.complete();
10448
+ };
10449
+ HistoricalPixAccountListComponent.prototype.ngAfterViewInit = function () {
10450
+ this.cd.detectChanges();
10451
+ };
10452
+ HistoricalPixAccountListComponent.prototype.onLazyLoad = function (payload) {
10453
+ var _this = this;
10454
+ payload.forEach(function (value) {
10455
+ value.dateChange = moment$e(value.dateChange).format(_this.dateFormat);
10456
+ value.pixKey = _this.formatPixKeyByType(value.pixKeyType, value.pixKey);
10457
+ value.percentage = FormatUtilsService.getFormattedPercentage(value.percentage);
10458
+ });
10459
+ this.onGridLoad(payload);
10460
+ this.loading = false;
10461
+ };
10462
+ HistoricalPixAccountListComponent.prototype.formatPixKeyByType = function (pixKeyType, pixKey) {
10463
+ var keyType = pixKeyType ? pixKeyType.key.toUpperCase() : "";
10464
+ if (keyType === "TELEPHONE") {
10465
+ return FormatUtilsService.getFormattedTelephoneNumber(pixKey);
10466
+ }
10467
+ else if (keyType === "CPF") {
10468
+ return FormatUtilsService.getFormattedCpf(pixKey);
10469
+ }
10470
+ else if (keyType === "CNPJ") {
10471
+ return FormatUtilsService.getFormattedCnpj(pixKey);
10472
+ }
10473
+ else {
10474
+ return pixKey;
10475
+ }
10476
+ };
10477
+ HistoricalPixAccountListComponent.prototype.getMenuActions = function (rowData) {
10478
+ var _this = this;
10479
+ return [
10480
+ {
10481
+ label: this.translateService.instant("hcm.payroll.employees_image_cropper_view"),
10482
+ command: function () {
10483
+ var dateChange = rowData && rowData.dateChange && moment$e(rowData.dateChange, _this.dateFormat).format("YYYY-MM-DD");
10484
+ if (_this.withSidebar)
10485
+ _this.router.navigate(["historical-pix-account/" + dateChange], {
10486
+ relativeTo: _this.activatedRoute,
10487
+ });
10488
+ else
10489
+ _this.enableView.emit(dateChange);
10490
+ },
10491
+ },
10492
+ {
10493
+ label: this.translateService.instant("hcm.payroll.delete"),
10494
+ command: function () {
10495
+ if (_this.isAllowToDeleteHistorical && rowData) {
10496
+ _this.delete(rowData.id, rowData.dateChange);
10497
+ }
10498
+ else {
10499
+ _this.messageService.add({
10500
+ severity: "error",
10501
+ summary: _this.translateService.instant("hcm.payroll.error"),
10502
+ detail: _this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10503
+ });
10504
+ }
10505
+ },
10506
+ },
10507
+ ];
10508
+ };
10509
+ HistoricalPixAccountListComponent.prototype.delete = function (id, dateChange) {
10510
+ var _this = this;
10511
+ if (id === this.lastRecord.id) {
10512
+ var dateChangeToDto_1 = moment$e(dateChange, this.dateFormat).format("YYYY-MM-DD");
10513
+ this.confirmationService.confirm({
10514
+ message: this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_question_confirm_delete") + "?",
10515
+ accept: function () {
10516
+ _this.loading = true;
10517
+ var service = _this.withSidebar ? exports.ServiceType.PAYROLL : exports.ServiceType.DEPENDENT;
10518
+ _this.historicalPixAccountListService
10519
+ .remove(_this.employeeId, dateChangeToDto_1, service, _this.dependentId)
10520
+ .pipe(operators.takeUntil(_this.ngUnsubscribe))
10521
+ .subscribe(function () {
10522
+ _this.messageService.add({
10523
+ severity: "success",
10524
+ summary: _this.translateService.instant("hcm.payroll.success"),
10525
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_remove"),
10526
+ });
10527
+ _this.parameters = (_this.parameters && __assign({}, _this.parameters)) || {};
10528
+ }, function () {
10529
+ _this.messageService.add({
10530
+ severity: "error",
10531
+ summary: _this.translateService.instant("hcm.payroll.error"),
10532
+ detail: _this.translateService.instant("hcm.payroll.employees_movimentation_historical_pix_account_error_remove"),
10533
+ });
10534
+ _this.loading = false;
10535
+ });
10536
+ },
10537
+ });
10538
+ }
10539
+ else {
10540
+ this.messageService.add({
10541
+ severity: "error",
10542
+ summary: this.translateService.instant("hcm.payroll.error"),
10543
+ detail: this.translateService.instant("hcm.payroll.not_allowed_delete_last"),
10544
+ });
10545
+ }
10546
+ };
10547
+ HistoricalPixAccountListComponent.prototype.add = function () {
10548
+ if (this.isAllowToAddHistorical) {
10549
+ this.router.navigate(["historical-pix-account-new"], {
10550
+ relativeTo: this.activatedRoute,
10551
+ });
10552
+ }
10553
+ else {
10554
+ this.messageService.add({
10555
+ severity: "error",
10556
+ summary: this.translateService.instant("hcm.payroll.error"),
10557
+ detail: this.translateService.instant("hcm.payroll.permission_error_not_allowed"),
10558
+ });
10559
+ }
10560
+ };
10561
+ HistoricalPixAccountListComponent.prototype.onGridLoad = function (payload) {
10562
+ if (payload && payload.length) {
10563
+ this.lastRecord = payload[0];
10564
+ }
10565
+ };
10566
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToAddHistorical", {
10567
+ get: function () {
10568
+ return (this.permission["incluir"]);
10569
+ },
10570
+ enumerable: true,
10571
+ configurable: true
10572
+ });
10573
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "isAllowToDeleteHistorical", {
10574
+ get: function () {
10575
+ return (this.permission["excluir"]);
10576
+ },
10577
+ enumerable: true,
10578
+ configurable: true
10579
+ });
10580
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "scopedActions", {
10581
+ get: function () {
10582
+ return this.getMenuActions.bind(this);
10583
+ },
10584
+ enumerable: true,
10585
+ configurable: true
10586
+ });
10587
+ Object.defineProperty(HistoricalPixAccountListComponent.prototype, "reloadList", {
10588
+ set: function (condition) {
10589
+ if (condition) {
10590
+ this.loading = true;
10591
+ this.parameters = (this.parameters && __assign({}, this.parameters)) || {};
10592
+ }
10593
+ },
10594
+ enumerable: true,
10595
+ configurable: true
10596
+ });
10597
+ HistoricalPixAccountListComponent.ctorParameters = function () { return [
10598
+ { type: api.ConfirmationService },
10599
+ { type: core$1.TranslateService },
10600
+ { type: router.ActivatedRoute },
10601
+ { type: core.ChangeDetectorRef },
10602
+ { type: router.Router },
10603
+ { type: api.MessageService },
10604
+ { type: HistoricalPixAccountListService }
10605
+ ]; };
10606
+ __decorate([
10607
+ core.ViewChild(angularComponents.CustomFieldsComponent, { static: false })
10608
+ ], HistoricalPixAccountListComponent.prototype, "customFields", void 0);
10609
+ __decorate([
10610
+ core.Input()
10611
+ ], HistoricalPixAccountListComponent.prototype, "permission", void 0);
10612
+ __decorate([
10613
+ core.Input()
10614
+ ], HistoricalPixAccountListComponent.prototype, "employeeId", void 0);
10615
+ __decorate([
10616
+ core.Input()
10617
+ ], HistoricalPixAccountListComponent.prototype, "dependentId", void 0);
10618
+ __decorate([
10619
+ core.Input()
10620
+ ], HistoricalPixAccountListComponent.prototype, "dateFormat", void 0);
10621
+ __decorate([
10622
+ core.Input()
10623
+ ], HistoricalPixAccountListComponent.prototype, "endPoint", void 0);
10624
+ __decorate([
10625
+ core.Input()
10626
+ ], HistoricalPixAccountListComponent.prototype, "keyPayload", void 0);
10627
+ __decorate([
10628
+ core.Input()
10629
+ ], HistoricalPixAccountListComponent.prototype, "withSidebar", void 0);
10630
+ __decorate([
10631
+ core.Output()
10632
+ ], HistoricalPixAccountListComponent.prototype, "enableView", void 0);
10633
+ __decorate([
10634
+ core.Input()
10635
+ ], HistoricalPixAccountListComponent.prototype, "reloadList", null);
10636
+ HistoricalPixAccountListComponent = __decorate([
10637
+ core.Component({
10638
+ // tslint:disable-next-line:component-selector
10639
+ selector: "c-historical-pix-account-list",
10640
+ 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",
10641
+ styles: [""]
10642
+ })
10643
+ ], HistoricalPixAccountListComponent);
10644
+ return HistoricalPixAccountListComponent;
10645
+ }());
10646
+
10647
+ var HistoricalPixAccountListModule = /** @class */ (function () {
10648
+ function HistoricalPixAccountListModule() {
10649
+ }
10650
+ HistoricalPixAccountListModule = __decorate([
10651
+ core.NgModule({
10652
+ imports: [
10653
+ common.CommonModule,
10654
+ forms.FormsModule,
10655
+ http.HttpClientModule,
10656
+ autocomplete.AutoCompleteModule,
10657
+ SharedModule,
10658
+ forms.ReactiveFormsModule,
10659
+ table.TableModule,
10660
+ angularComponents.ButtonModule,
10661
+ tooltip.TooltipModule,
10662
+ angularComponents.LoadingStateModule,
10663
+ DataListRestModule,
10664
+ confirmdialog.ConfirmDialogModule,
10665
+ ],
10666
+ declarations: [HistoricalPixAccountListComponent],
10667
+ providers: [HistoricalPixAccountListService],
10668
+ exports: [HistoricalPixAccountListComponent],
10669
+ })
10670
+ ], HistoricalPixAccountListModule);
10671
+ return HistoricalPixAccountListModule;
10672
+ }());
10673
+
10346
10674
  exports.AdmissionDraftSummaryComponent = AdmissionDraftSummaryComponent;
10347
10675
  exports.AdmissionDraftSummaryModule = AdmissionDraftSummaryModule;
10348
10676
  exports.AdmissionDraftSummaryService = AdmissionDraftSummaryService;
@@ -10384,6 +10712,9 @@
10384
10712
  exports.HistoricalBankAccountModule = HistoricalBankAccountModule;
10385
10713
  exports.HistoricalBankAccountService = HistoricalBankAccountService;
10386
10714
  exports.HistoricalPixAccountComponent = HistoricalPixAccountComponent;
10715
+ exports.HistoricalPixAccountListComponent = HistoricalPixAccountListComponent;
10716
+ exports.HistoricalPixAccountListModule = HistoricalPixAccountListModule;
10717
+ exports.HistoricalPixAccountListService = HistoricalPixAccountListService;
10387
10718
  exports.HistoricalPixAccountModule = HistoricalPixAccountModule;
10388
10719
  exports.HistoricalPixAccountService = HistoricalPixAccountService;
10389
10720
  exports.HttpClientService = HttpClientService;