@senior-gestao-pessoas/payroll-core 9.2.0 → 9.3.0

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