@senior-agronegocio/angular-components 0.0.9861 → 0.0.9862
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.
- package/bundles/senior-agronegocio-angular-components.umd.js +555 -4
- package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js +2 -2
- package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
- package/common/agro-object-utils.class.d.ts +10 -0
- package/components/financial-title-table/directive/validate-tiltle-value-selected.directive.d.ts +6 -0
- package/components/financial-title-table/financial-title-table-options.interface.d.ts +10 -0
- package/components/financial-title-table/financial-title-table.component.d.ts +61 -0
- package/components/financial-title-table/financial-title-table.module.d.ts +2 -0
- package/components/financial-title-table/index.d.ts +4 -0
- package/components/financial-title-table/services/financial/agro-financial.module.d.ts +2 -0
- package/components/financial-title-table/services/financial/agro-financial.service.d.ts +23 -0
- package/components/financial-title-table/services/financial/enums.d.ts +27 -0
- package/components/financial-title-table/services/financial/index.d.ts +2 -0
- package/components/financial-title-table/services/financial/intefaces.d.ts +104 -0
- package/components/index.d.ts +1 -0
- package/components/modal-invoice-pj/modal-shared-imports.d.ts +4 -7
- package/esm2015/common/agro-object-utils.class.js +29 -1
- package/esm2015/components/financial-title-table/directive/validate-tiltle-value-selected.directive.js +33 -0
- package/esm2015/components/financial-title-table/financial-title-table-options.interface.js +1 -0
- package/esm2015/components/financial-title-table/financial-title-table.component.js +248 -0
- package/esm2015/components/financial-title-table/financial-title-table.module.js +42 -0
- package/esm2015/components/financial-title-table/index.js +4 -0
- package/esm2015/components/financial-title-table/services/financial/agro-financial.module.js +26 -0
- package/esm2015/components/financial-title-table/services/financial/agro-financial.service.js +62 -0
- package/esm2015/components/financial-title-table/services/financial/enums.js +33 -0
- package/esm2015/components/financial-title-table/services/financial/index.js +3 -0
- package/esm2015/components/financial-title-table/services/financial/intefaces.js +1 -0
- package/esm2015/components/index.js +2 -1
- package/esm2015/services/i18n/en-US.js +30 -1
- package/esm2015/services/i18n/es-CO.js +30 -1
- package/esm2015/services/i18n/pt-BR.js +30 -1
- package/esm5/common/agro-object-utils.class.js +29 -1
- package/esm5/components/financial-title-table/directive/validate-tiltle-value-selected.directive.js +37 -0
- package/esm5/components/financial-title-table/financial-title-table-options.interface.js +1 -0
- package/esm5/components/financial-title-table/financial-title-table.component.js +264 -0
- package/esm5/components/financial-title-table/financial-title-table.module.js +45 -0
- package/esm5/components/financial-title-table/index.js +4 -0
- package/esm5/components/financial-title-table/services/financial/agro-financial.module.js +29 -0
- package/esm5/components/financial-title-table/services/financial/agro-financial.service.js +69 -0
- package/esm5/components/financial-title-table/services/financial/enums.js +33 -0
- package/esm5/components/financial-title-table/services/financial/index.js +3 -0
- package/esm5/components/financial-title-table/services/financial/intefaces.js +1 -0
- package/esm5/components/index.js +2 -1
- package/esm5/services/i18n/en-US.js +30 -1
- package/esm5/services/i18n/es-CO.js +30 -1
- package/esm5/services/i18n/pt-BR.js +30 -1
- package/fesm2015/senior-agronegocio-angular-components.js +519 -4
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +552 -4
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-agronegocio-angular-components.metadata.json +1 -1
- package/services/i18n/en-US.d.ts +29 -0
- package/services/i18n/es-CO.d.ts +29 -0
- package/services/i18n/pt-BR.d.ts +29 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('sockjs-client'), require('@angular/core'), require('rxjs/operators'), require('@stomp/stompjs'), require('js-cookie'), require('@angular/common'), require('moment'), require('@angular/forms'), require('primeng/confirmdialog'), require('primeng/panel'), require('primeng/tabview'), require('@seniorsistemas/ng2-currency-mask'), require('primeng/inputtext'), require('primeng/checkbox'), require('primeng/table'), require('primeng/calendar'), require('primeng/dropdown'), require('primeng/api'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@senior-agronegocio/angular-components', ['exports', 'rxjs', 'sockjs-client', '@angular/core', 'rxjs/operators', '@stomp/stompjs', 'js-cookie', '@angular/common', 'moment', '@angular/forms', 'primeng/confirmdialog', 'primeng/panel', 'primeng/tabview', '@seniorsistemas/ng2-currency-mask', 'primeng/inputtext', 'primeng/checkbox', 'primeng/table', 'primeng/calendar', 'primeng/dropdown', 'primeng/api', '
|
|
4
|
-
(global = global || self, factory((global['senior-agronegocio'] = global['senior-agronegocio'] || {}, global['senior-agronegocio']['angular-components'] = {}), global.rxjs, global.sockjsClient, global.ng.core, global.rxjs.operators, global.stompjs, global.jsCookie, global.ng.common, global.moment, global.ng.forms, global.confirmdialog, global.panel, global.tabview, global.ng2CurrencyMask, global.inputtext, global.checkbox, global.table, global.calendar, global.dropdown, global.api, global.
|
|
5
|
-
}(this, (function (exports, rxjs, sockjsClient, core, operators, stompjs, jsCookie, common, moment, forms, confirmdialog, panel, tabview, ng2CurrencyMask, inputtext, checkbox, table, calendar, dropdown, api,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('sockjs-client'), require('@angular/core'), require('rxjs/operators'), require('@stomp/stompjs'), require('js-cookie'), require('@angular/common'), require('moment'), require('@seniorsistemas/angular-components'), require('@angular/forms'), require('primeng/confirmdialog'), require('primeng/panel'), require('primeng/tabview'), require('@seniorsistemas/ng2-currency-mask'), require('primeng/inputtext'), require('primeng/checkbox'), require('primeng/table'), require('primeng/calendar'), require('primeng/dropdown'), require('primeng/api'), require('angular2-hotkeys'), require('@seniorsistemas/platform-components'), require('primeng'), require('primeng/tooltip'), require('@angular/animations'), require('@angular/common/locales/pt'), require('@angular/common/http'), require('@seniorsistemas/senior-platform-data'), require('@angular/cdk/observers')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@senior-agronegocio/angular-components', ['exports', 'rxjs', 'sockjs-client', '@angular/core', 'rxjs/operators', '@stomp/stompjs', 'js-cookie', '@angular/common', 'moment', '@seniorsistemas/angular-components', '@angular/forms', 'primeng/confirmdialog', 'primeng/panel', 'primeng/tabview', '@seniorsistemas/ng2-currency-mask', 'primeng/inputtext', 'primeng/checkbox', 'primeng/table', 'primeng/calendar', 'primeng/dropdown', 'primeng/api', 'angular2-hotkeys', '@seniorsistemas/platform-components', 'primeng', 'primeng/tooltip', '@angular/animations', '@angular/common/locales/pt', '@angular/common/http', '@seniorsistemas/senior-platform-data', '@angular/cdk/observers'], factory) :
|
|
4
|
+
(global = global || self, factory((global['senior-agronegocio'] = global['senior-agronegocio'] || {}, global['senior-agronegocio']['angular-components'] = {}), global.rxjs, global.sockjsClient, global.ng.core, global.rxjs.operators, global.stompjs, global.jsCookie, global.ng.common, global.moment, global.angularComponents, global.ng.forms, global.confirmdialog, global.panel, global.tabview, global.ng2CurrencyMask, global.inputtext, global.checkbox, global.table, global.calendar, global.dropdown, global.api, global.angular2Hotkeys, global.platformComponents, global.primeng, global.tooltip, global.ng.animations, global.ng.common.locales.pt, global.ng.common.http, global.seniorPlatformData, global.ng.cdk.observers));
|
|
5
|
+
}(this, (function (exports, rxjs, sockjsClient, core, operators, stompjs, jsCookie, common, moment, angularComponents, forms, confirmdialog, panel, tabview, ng2CurrencyMask, inputtext, checkbox, table, calendar, dropdown, api, angular2Hotkeys, platformComponents, primeng, tooltip, animations, localePt, http, seniorPlatformData, observers) { 'use strict';
|
|
6
6
|
|
|
7
7
|
sockjsClient = sockjsClient && sockjsClient.hasOwnProperty('default') ? sockjsClient['default'] : sockjsClient;
|
|
8
8
|
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
|
@@ -1022,6 +1022,35 @@
|
|
|
1022
1022
|
'agro.angular_components.no_register_found_for_external_invoices_summary': 'Nenhuma nota encontrada',
|
|
1023
1023
|
'agro.angular_components.total_value': 'Valor total',
|
|
1024
1024
|
'agro.angular_components.value_linked': 'Valor vinculado',
|
|
1025
|
+
"agro.angular_components.no_accounts_found_title": "Nenhuma conta encontrada",
|
|
1026
|
+
"agro.angular_components.no_accounts_found_description": "Não foram encontradas contas para o produtor selecionado.",
|
|
1027
|
+
"agro.angular_components.details": "Detalhes",
|
|
1028
|
+
"agro.angular_components.error_less_or_equal_zero": "O valor da baixa deve ser maior que zero",
|
|
1029
|
+
"agro.angular_components.error_greater_than_allowed": "O valor da baixa deve ser menor ou igual ao valor líquido",
|
|
1030
|
+
"agro.angular_components.account_details": "Detalhes do título - ",
|
|
1031
|
+
"agro.angular_components.status_open": "Aberto",
|
|
1032
|
+
"agro.angular_components.status_paid": "Pago",
|
|
1033
|
+
"agro.angular_components.title": "Título",
|
|
1034
|
+
"agro.angular_components.type": "Tipo",
|
|
1035
|
+
"agro.angular_components.entry": "Entrada",
|
|
1036
|
+
"agro.angular_components.due_date": "Vencimento",
|
|
1037
|
+
"agro.angular_components.original_value": "Valor original",
|
|
1038
|
+
"agro.angular_components.open_value": "Valor aberto",
|
|
1039
|
+
"agro.angular_components.value_net": "Valor líquido",
|
|
1040
|
+
"agro.angular_components.value_to_pay": "Valor baixa",
|
|
1041
|
+
"agro.angular_components.branch": "Filial",
|
|
1042
|
+
"agro.angular_components.producer": "Produtor",
|
|
1043
|
+
"agro.angular_components.value_fees": "Valor de juros",
|
|
1044
|
+
"agro.angular_components.value_fine": "Valor de multa",
|
|
1045
|
+
"agro.angular_components.value_charge": "Valor de cobrança",
|
|
1046
|
+
"agro.angular_components.value_correction": "Valor de correção",
|
|
1047
|
+
"agro.angular_components.value_additional": "Valor adicional",
|
|
1048
|
+
"agro.angular_components.value_discount": "Descontos",
|
|
1049
|
+
"agro.angular_components.value_other_discount": "Outros descontos",
|
|
1050
|
+
"agro.angular_components.error_loading_accounts_title": "Erro ao carregar contas",
|
|
1051
|
+
"agro.angular_components.error_loading_accounts_description": "Ocorreu um erro ao carregar as contas do produtor. Tente novamente mais tarde.",
|
|
1052
|
+
"agro.angular_components.close": "Fechar",
|
|
1053
|
+
"agro.angular_components.value_paid": "Valor a pagar",
|
|
1025
1054
|
};
|
|
1026
1055
|
|
|
1027
1056
|
var enUS = {
|
|
@@ -1287,6 +1316,35 @@
|
|
|
1287
1316
|
"agro.angular_components.itens": "Itens",
|
|
1288
1317
|
"agro.angular_components.quantity": "Quantidade",
|
|
1289
1318
|
"agro.angular_components.issuance_date": "Data de emissão",
|
|
1319
|
+
"agro.angular_components.no_accounts_found_title": "No accounts found",
|
|
1320
|
+
"agro.angular_components.no_accounts_found_description": "No accounts were found for the selected producer.",
|
|
1321
|
+
"agro.angular_components.details": "Details",
|
|
1322
|
+
"agro.angular_components.error_less_or_equal_zero": "The payment value must be greater than zero",
|
|
1323
|
+
"agro.angular_components.error_greater_than_allowed": "The payment value must be less than or equal to the net value",
|
|
1324
|
+
"agro.angular_components.account_details": "Account details - ",
|
|
1325
|
+
"agro.angular_components.status_open": "Open",
|
|
1326
|
+
"agro.angular_components.status_paid": "Paid",
|
|
1327
|
+
"agro.angular_components.title": "Title",
|
|
1328
|
+
"agro.angular_components.type": "Type",
|
|
1329
|
+
"agro.angular_components.entry": "Entry",
|
|
1330
|
+
"agro.angular_components.due_date": "Due date",
|
|
1331
|
+
"agro.angular_components.original_value": "Original value",
|
|
1332
|
+
"agro.angular_components.open_value": "Open value",
|
|
1333
|
+
"agro.angular_components.value_net": "Net value",
|
|
1334
|
+
"agro.angular_components.value_to_pay": "Payment value",
|
|
1335
|
+
"agro.angular_components.branch": "Branch",
|
|
1336
|
+
"agro.angular_components.producer": "Producer",
|
|
1337
|
+
"agro.angular_components.value_fees": "Fees value",
|
|
1338
|
+
"agro.angular_components.value_fine": "Fine value",
|
|
1339
|
+
"agro.angular_components.value_charge": "Charge value",
|
|
1340
|
+
"agro.angular_components.value_correction": "Correction value",
|
|
1341
|
+
"agro.angular_components.value_additional": "Additional value",
|
|
1342
|
+
"agro.angular_components.value_discount": "Discounts",
|
|
1343
|
+
"agro.angular_components.value_other_discount": "Other discounts",
|
|
1344
|
+
"agro.angular_components.error_loading_accounts_title": "Error loading accounts",
|
|
1345
|
+
"agro.angular_components.error_loading_accounts_description": "An error occurred while loading the producer's accounts. Please try again later.",
|
|
1346
|
+
"agro.angular_components.close": "Close",
|
|
1347
|
+
"agro.angular_components.value_paid": "Value to pay",
|
|
1290
1348
|
};
|
|
1291
1349
|
|
|
1292
1350
|
var esCO = {
|
|
@@ -1552,6 +1610,35 @@
|
|
|
1552
1610
|
"agro.angular_components.itens": "Itens",
|
|
1553
1611
|
"agro.angular_components.quantity": "Quantidade",
|
|
1554
1612
|
"agro.angular_components.issuance_date": "Data de emissão",
|
|
1613
|
+
"agro.angular_components.no_accounts_found_title": "Ninguna cuenta encontrada",
|
|
1614
|
+
"agro.angular_components.no_accounts_found_description": "No se encontraron cuentas para el productor seleccionado.",
|
|
1615
|
+
"agro.angular_components.details": "Detalles",
|
|
1616
|
+
"agro.angular_components.error_less_or_equal_zero": "El valor de la baja debe ser mayor que cero",
|
|
1617
|
+
"agro.angular_components.error_greater_than_allowed": "El valor de la baja debe ser menor o igual al valor neto",
|
|
1618
|
+
"agro.angular_components.account_details": "Detalles del título - ",
|
|
1619
|
+
"agro.angular_components.status_open": "Abierto",
|
|
1620
|
+
"agro.angular_components.status_paid": "Pagado",
|
|
1621
|
+
"agro.angular_components.title": "Título",
|
|
1622
|
+
"agro.angular_components.type": "Tipo",
|
|
1623
|
+
"agro.angular_components.entry": "Entrada",
|
|
1624
|
+
"agro.angular_components.due_date": "Vencimiento",
|
|
1625
|
+
"agro.angular_components.original_value": "Valor original",
|
|
1626
|
+
"agro.angular_components.open_value": "Valor abierto",
|
|
1627
|
+
"agro.angular_components.value_net": "Valor neto",
|
|
1628
|
+
"agro.angular_components.value_to_pay": "Valor baja",
|
|
1629
|
+
"agro.angular_components.branch": "Sucursal",
|
|
1630
|
+
"agro.angular_components.producer": "Productor",
|
|
1631
|
+
"agro.angular_components.value_fees": "Valor de intereses",
|
|
1632
|
+
"agro.angular_components.value_fine": "Valor de multa",
|
|
1633
|
+
"agro.angular_components.value_charge": "Valor de cobro",
|
|
1634
|
+
"agro.angular_components.value_correction": "Valor de corrección",
|
|
1635
|
+
"agro.angular_components.value_additional": "Valor adicional",
|
|
1636
|
+
"agro.angular_components.value_discount": "Descuentos",
|
|
1637
|
+
"agro.angular_components.value_other_discount": "Otros descuentos",
|
|
1638
|
+
"agro.angular_components.error_loading_accounts_title": "Error al cargar cuentas",
|
|
1639
|
+
"agro.angular_components.error_loading_accounts_description": "Ocurrió un error al cargar las cuentas del productor. Intente nuevamente más tarde.",
|
|
1640
|
+
"agro.angular_components.close": "Cerrar",
|
|
1641
|
+
"agro.angular_components.value_paid": "Valor a pagar",
|
|
1555
1642
|
};
|
|
1556
1643
|
|
|
1557
1644
|
|
|
@@ -2959,6 +3046,33 @@
|
|
|
2959
3046
|
return undefined;
|
|
2960
3047
|
}
|
|
2961
3048
|
};
|
|
3049
|
+
/**
|
|
3050
|
+
* Retorna o valor de uma propriedade de um objeto, formatado conforme o tipo especificado.
|
|
3051
|
+
*
|
|
3052
|
+
* @param obj - O objeto do qual a propriedade será extraída.
|
|
3053
|
+
* @param path - O caminho da propriedade no objeto (pode ser um caminho aninhado).
|
|
3054
|
+
* @param type - O tipo de formatação a ser aplicada (String, Date, Money).
|
|
3055
|
+
* @returns O valor formatado da propriedade.
|
|
3056
|
+
*/
|
|
3057
|
+
AgroObjectUtils.getPropAndFormatValue = function (obj, path, type) {
|
|
3058
|
+
var r = path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
3059
|
+
if (!r) {
|
|
3060
|
+
return "";
|
|
3061
|
+
}
|
|
3062
|
+
if (type === angularComponents.FieldType.String) {
|
|
3063
|
+
return r;
|
|
3064
|
+
}
|
|
3065
|
+
else if (type === angularComponents.FieldType.Date) {
|
|
3066
|
+
var moment$1 = moment;
|
|
3067
|
+
return moment$1(r).format("L");
|
|
3068
|
+
}
|
|
3069
|
+
else if (type === angularComponents.FieldType.Money) {
|
|
3070
|
+
return Number(r).toLocaleString("pt-BR", { style: "currency", currency: "BRL" });
|
|
3071
|
+
}
|
|
3072
|
+
else {
|
|
3073
|
+
return r;
|
|
3074
|
+
}
|
|
3075
|
+
};
|
|
2962
3076
|
return AgroObjectUtils;
|
|
2963
3077
|
}());
|
|
2964
3078
|
|
|
@@ -7809,11 +7923,446 @@
|
|
|
7809
7923
|
return ModalInvoicePjForFixationModule;
|
|
7810
7924
|
}());
|
|
7811
7925
|
|
|
7926
|
+
var TypeAccount;
|
|
7927
|
+
(function (TypeAccount) {
|
|
7928
|
+
TypeAccount["PAYABLE"] = "PAYABLE";
|
|
7929
|
+
TypeAccount["RECEIVABLE"] = "RECEIVABLE";
|
|
7930
|
+
})(TypeAccount || (TypeAccount = {}));
|
|
7931
|
+
var StatusType;
|
|
7932
|
+
(function (StatusType) {
|
|
7933
|
+
StatusType["OPEN"] = "OPEN";
|
|
7934
|
+
StatusType["PAID"] = "PAID";
|
|
7935
|
+
StatusType["CANCELLED"] = "CANCELLED";
|
|
7936
|
+
})(StatusType || (StatusType = {}));
|
|
7937
|
+
var TitleFieldsOrderBy;
|
|
7938
|
+
(function (TitleFieldsOrderBy) {
|
|
7939
|
+
TitleFieldsOrderBy["NUMBER_TITLE"] = "NUMBER_TITLE";
|
|
7940
|
+
TitleFieldsOrderBy["ISSUE_DATE"] = "ISSUE_DATE";
|
|
7941
|
+
TitleFieldsOrderBy["DUE_DATE"] = "DUE_DATE";
|
|
7942
|
+
TitleFieldsOrderBy["ORIGINAL_VALUE"] = "ORIGINAL_VALUE";
|
|
7943
|
+
TitleFieldsOrderBy["OPEN_VALUE"] = "OPEN_VALUE";
|
|
7944
|
+
TitleFieldsOrderBy["NET_VALUE"] = "NET_VALUE";
|
|
7945
|
+
TitleFieldsOrderBy["STATUS"] = "STATUS";
|
|
7946
|
+
})(TitleFieldsOrderBy || (TitleFieldsOrderBy = {}));
|
|
7947
|
+
var OrderByType;
|
|
7948
|
+
(function (OrderByType) {
|
|
7949
|
+
OrderByType["ASC"] = "ASC";
|
|
7950
|
+
OrderByType["DESC"] = "DESC";
|
|
7951
|
+
})(OrderByType || (OrderByType = {}));
|
|
7952
|
+
var QueryStatus;
|
|
7953
|
+
(function (QueryStatus) {
|
|
7954
|
+
QueryStatus["PENDING"] = "PENDING";
|
|
7955
|
+
QueryStatus["FINISHED"] = "FINISHED";
|
|
7956
|
+
QueryStatus["FAILED"] = "FAILED";
|
|
7957
|
+
})(QueryStatus || (QueryStatus = {}));
|
|
7958
|
+
|
|
7959
|
+
var AgroFinancialService = /** @class */ (function (_super) {
|
|
7960
|
+
__extends(AgroFinancialService, _super);
|
|
7961
|
+
function AgroFinancialService(http, messageService, translate) {
|
|
7962
|
+
var _this = _super.call(this, http, messageService, "agro/financial/entities/title", "agro/financial/actions", "agro/financial/queries", translate) || this;
|
|
7963
|
+
_this.http = http;
|
|
7964
|
+
_this.messageService = messageService;
|
|
7965
|
+
_this.translate = translate;
|
|
7966
|
+
_this.pooling = new rxjs.Subject();
|
|
7967
|
+
return _this;
|
|
7968
|
+
}
|
|
7969
|
+
AgroFinancialService.prototype.listTitles = function (input) {
|
|
7970
|
+
var _this = this;
|
|
7971
|
+
return this.requestListTitles(input)
|
|
7972
|
+
.pipe(operators.switchMap(function (res) { return _this.pollListTitlesResult(res.requestId); }));
|
|
7973
|
+
};
|
|
7974
|
+
AgroFinancialService.prototype.requestListTitles = function (input) {
|
|
7975
|
+
return this.http
|
|
7976
|
+
.post(this.queriesUrl + "/requestListTitles", input)
|
|
7977
|
+
.pipe(this.defaultCatch());
|
|
7978
|
+
};
|
|
7979
|
+
AgroFinancialService.prototype.getListTitlesResponse = function (input) {
|
|
7980
|
+
return this.http
|
|
7981
|
+
.post(this.queriesUrl + "/getListTitlesResponse", input)
|
|
7982
|
+
.pipe(this.defaultCatch());
|
|
7983
|
+
};
|
|
7984
|
+
/**
|
|
7985
|
+
* Realiza o polling para obter o resultado da listagem de títulos financeiros
|
|
7986
|
+
*
|
|
7987
|
+
* @param requestId Id da requisição utlizada na busca pelo resultado
|
|
7988
|
+
* @returns
|
|
7989
|
+
*/
|
|
7990
|
+
AgroFinancialService.prototype.pollListTitlesResult = function (requestId) {
|
|
7991
|
+
var _this = this;
|
|
7992
|
+
// define o intervalo de polling entre cada tentativa de maneira exponencial
|
|
7993
|
+
var delays = Array.from({ length: 10 }, function (_, index) {
|
|
7994
|
+
if (index === 0) {
|
|
7995
|
+
return 1000;
|
|
7996
|
+
}
|
|
7997
|
+
return (index + 1) * 1000;
|
|
7998
|
+
});
|
|
7999
|
+
return rxjs.scheduled(delays, rxjs.asyncScheduler).pipe(operators.concatMap(function (delay) {
|
|
8000
|
+
return rxjs.timer(delay).pipe(operators.switchMap(function () { return _this.getListTitlesResponse({ requestId: requestId }); }), operators.tap(function (res) {
|
|
8001
|
+
if (res.status === QueryStatus.FAILED) {
|
|
8002
|
+
throw new Error(res.message);
|
|
8003
|
+
}
|
|
8004
|
+
}));
|
|
8005
|
+
}), operators.scan(function (_, curr) { return curr; }, null), operators.filter(function (res) { return (res === null || res === void 0 ? void 0 : res.status) === QueryStatus.FINISHED; }), operators.take(1), operators.defaultIfEmpty(null), operators.takeUntil(this.pooling), operators.map(function (res) { return res === null || res === void 0 ? void 0 : res.result; }));
|
|
8006
|
+
};
|
|
8007
|
+
AgroFinancialService.ctorParameters = function () { return [
|
|
8008
|
+
{ type: http.HttpClient },
|
|
8009
|
+
{ type: api.MessageService },
|
|
8010
|
+
{ type: LibTranslationService }
|
|
8011
|
+
]; };
|
|
8012
|
+
AgroFinancialService = __decorate([
|
|
8013
|
+
core.Injectable()
|
|
8014
|
+
], AgroFinancialService);
|
|
8015
|
+
return AgroFinancialService;
|
|
8016
|
+
}(AgroEntityService));
|
|
8017
|
+
|
|
8018
|
+
var FinancialTitleTableComponent = /** @class */ (function () {
|
|
8019
|
+
function FinancialTitleTableComponent(translate, financialService, messageService) {
|
|
8020
|
+
this.translate = translate;
|
|
8021
|
+
this.financialService = financialService;
|
|
8022
|
+
this.messageService = messageService;
|
|
8023
|
+
this.selected = [];
|
|
8024
|
+
this.selectionChange = new core.EventEmitter();
|
|
8025
|
+
this.gridData = [];
|
|
8026
|
+
this.gridColumns = [];
|
|
8027
|
+
this.sidebarFields = [];
|
|
8028
|
+
this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
|
|
8029
|
+
this.ngUnsubscribe = new core.EventEmitter();
|
|
8030
|
+
this.buttonSize = angularComponents.ButtonSize;
|
|
8031
|
+
this.buttonPriority = angularComponents.ButtonPriority;
|
|
8032
|
+
this.badgeColors = angularComponents.BadgeColors;
|
|
8033
|
+
}
|
|
8034
|
+
FinancialTitleTableComponent.prototype.ngOnInit = function () {
|
|
8035
|
+
this.gridColumns = [
|
|
8036
|
+
this.getFields("title", "agro.angular_components.title", ["numberTitle"], angularComponents.FieldType.String),
|
|
8037
|
+
this.getFields("type", "agro.angular_components.type", ["titleType.cod", "titleType.desc"], angularComponents.FieldType.String),
|
|
8038
|
+
this.getFields("entryDate", "agro.angular_components.entry", ["issueDate"], angularComponents.FieldType.Date),
|
|
8039
|
+
this.getFields("dueDate", "agro.angular_components.due_date", ["dueDate"], angularComponents.FieldType.Date),
|
|
8040
|
+
this.getFields("valueOrigin", "agro.angular_components.original_value", ["values.originalValue"], angularComponents.FieldType.Money),
|
|
8041
|
+
this.getFields("valueOpen", "agro.angular_components.open_value", ["values.openValue"], angularComponents.FieldType.Money),
|
|
8042
|
+
this.getFields("valueNet", "agro.angular_components.value_net", ["values.netValue"], angularComponents.FieldType.Money),
|
|
8043
|
+
this.getFields("valuePaid", "agro.angular_components.value_to_pay", ["valuePaid"], angularComponents.FieldType.Money),
|
|
8044
|
+
];
|
|
8045
|
+
this.sidebarFields = __spread([
|
|
8046
|
+
this.getFields("company", "agro.angular_components.company", ["company.cod", "company.desc"], angularComponents.FieldType.String),
|
|
8047
|
+
this.getFields("branch", "agro.angular_components.branch", ["branch.cod", "branch.desc"], angularComponents.FieldType.String),
|
|
8048
|
+
this.getFields("producer", "agro.angular_components.producer", ["producer.cod", "producer.desc"], angularComponents.FieldType.String)
|
|
8049
|
+
], this.gridColumns.filter(function (col) { return !["valuePaid", "valueNet"].includes(col.field); }), [
|
|
8050
|
+
this.getFields("valueFees", "agro.angular_components.value_fees", ["values.feesValue"], angularComponents.FieldType.Money),
|
|
8051
|
+
this.getFields("valueFine", "agro.angular_components.value_fine", ["values.fineValue"], angularComponents.FieldType.Money),
|
|
8052
|
+
this.getFields("valueCharge", "agro.angular_components.value_charge", ["values.chargeValue"], angularComponents.FieldType.Money),
|
|
8053
|
+
this.getFields("valueCorrection", "agro.angular_components.value_correction", ["values.monetaryCorrectionValue"], angularComponents.FieldType.Money),
|
|
8054
|
+
this.getFields("valueAdditional", "agro.angular_components.value_additional", ["values.otherAdditionValue"], angularComponents.FieldType.Money),
|
|
8055
|
+
this.getFields("valueDiscount", "agro.angular_components.value_discount", ["values.discountValue"], angularComponents.FieldType.Money),
|
|
8056
|
+
this.getFields("valueOtherDiscount", "agro.angular_components.value_other_discount", ["values.otherDiscountValue"], angularComponents.FieldType.Money)
|
|
8057
|
+
], this.gridColumns.filter(function (col) { return ["valueNet"].includes(col.field); }));
|
|
8058
|
+
this.updateGrid({ first: 0, rows: this.getPageSize(), sortField: this.getSortField(), sortOrder: this.getSortOrder() });
|
|
8059
|
+
};
|
|
8060
|
+
FinancialTitleTableComponent.prototype.ngAfterViewInit = function () {
|
|
8061
|
+
this.tableInitialized = true;
|
|
8062
|
+
this.synchronizeCheckboxAndEditableFieldState();
|
|
8063
|
+
};
|
|
8064
|
+
FinancialTitleTableComponent.prototype.ngOnDestroy = function () {
|
|
8065
|
+
this.ngUnsubscribe.next();
|
|
8066
|
+
this.ngUnsubscribe.complete();
|
|
8067
|
+
};
|
|
8068
|
+
FinancialTitleTableComponent.prototype.getPageSize = function () {
|
|
8069
|
+
return this.currentListParams.size;
|
|
8070
|
+
};
|
|
8071
|
+
FinancialTitleTableComponent.prototype.getRowIndex = function () {
|
|
8072
|
+
return this.currentListParams.page * this.currentListParams.size;
|
|
8073
|
+
};
|
|
8074
|
+
FinancialTitleTableComponent.prototype.getSortField = function () {
|
|
8075
|
+
if (!this.currentListParams.sort || this.currentListParams.sort.length <= 0) {
|
|
8076
|
+
return this.gridColumns[0].field;
|
|
8077
|
+
}
|
|
8078
|
+
return this.currentListParams.sort[0].field;
|
|
8079
|
+
};
|
|
8080
|
+
FinancialTitleTableComponent.prototype.getSortOrder = function () {
|
|
8081
|
+
if (!this.currentListParams.sort || this.currentListParams.sort.length <= 0) {
|
|
8082
|
+
return 1;
|
|
8083
|
+
}
|
|
8084
|
+
return this.currentListParams.sort[0].order;
|
|
8085
|
+
};
|
|
8086
|
+
FinancialTitleTableComponent.prototype.updateGrid = function (event) {
|
|
8087
|
+
var _this = this;
|
|
8088
|
+
this.componentLoading = true;
|
|
8089
|
+
var size = event.rows;
|
|
8090
|
+
var page = event.first / size;
|
|
8091
|
+
var sort = event.sortField;
|
|
8092
|
+
this.currentListParams = __assign(__assign({}, this.currentListParams), { page: page, size: size, sort: sort });
|
|
8093
|
+
var input = {
|
|
8094
|
+
pageRequest: { offset: page, size: size },
|
|
8095
|
+
filter: this.options,
|
|
8096
|
+
};
|
|
8097
|
+
this.financialService
|
|
8098
|
+
.listTitles(input)
|
|
8099
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.catchError(function (err) {
|
|
8100
|
+
_this.componentLoading = false;
|
|
8101
|
+
_this.addMessage("error", "agro.angular_components.error_loading_accounts_title", "agro.angular_components.error_loading_accounts_description");
|
|
8102
|
+
throw err;
|
|
8103
|
+
}))
|
|
8104
|
+
.subscribe(function (list) {
|
|
8105
|
+
_this.gridData = list.titles || [];
|
|
8106
|
+
_this.gridTotalRecords = list.totalElements;
|
|
8107
|
+
_this.componentLoading = false;
|
|
8108
|
+
});
|
|
8109
|
+
};
|
|
8110
|
+
FinancialTitleTableComponent.prototype.initRowEdit = function (row) {
|
|
8111
|
+
var _this = this;
|
|
8112
|
+
if (this.table) {
|
|
8113
|
+
this.table.initRowEdit(row);
|
|
8114
|
+
}
|
|
8115
|
+
setTimeout(function () {
|
|
8116
|
+
_this.models.forEach(function (model) { return model.control.markAsDirty(); });
|
|
8117
|
+
});
|
|
8118
|
+
};
|
|
8119
|
+
FinancialTitleTableComponent.prototype.cancelRowEdit = function (row) {
|
|
8120
|
+
if (this.table) {
|
|
8121
|
+
this.table.cancelRowEdit(row);
|
|
8122
|
+
}
|
|
8123
|
+
};
|
|
8124
|
+
FinancialTitleTableComponent.prototype.synchronizeCheckboxAndEditableFieldState = function () {
|
|
8125
|
+
var _this = this;
|
|
8126
|
+
if (!this.gridData || !this.tableInitialized) {
|
|
8127
|
+
return;
|
|
8128
|
+
}
|
|
8129
|
+
this.selected.forEach(function (selectedRow) {
|
|
8130
|
+
var index = _this.gridData.findIndex(function (row) { return row.id === selectedRow.id; });
|
|
8131
|
+
if (index !== -1) {
|
|
8132
|
+
_this.gridData[index] = selectedRow;
|
|
8133
|
+
_this.initRowEdit(selectedRow);
|
|
8134
|
+
}
|
|
8135
|
+
});
|
|
8136
|
+
this.gridData.forEach(function (row) {
|
|
8137
|
+
var isSelected = _this.selected.some(function (selectedRow) { return selectedRow.id === row.id; });
|
|
8138
|
+
if (isSelected) {
|
|
8139
|
+
_this.initRowEdit(row);
|
|
8140
|
+
}
|
|
8141
|
+
else {
|
|
8142
|
+
_this.cancelRowEdit(row);
|
|
8143
|
+
}
|
|
8144
|
+
});
|
|
8145
|
+
};
|
|
8146
|
+
FinancialTitleTableComponent.prototype.onInputChange = function (event, row, field) {
|
|
8147
|
+
var _this = this;
|
|
8148
|
+
var _a;
|
|
8149
|
+
row[field] = event;
|
|
8150
|
+
if ((row === null || row === void 0 ? void 0 : row.valuePaid) > ((_a = row === null || row === void 0 ? void 0 : row.values) === null || _a === void 0 ? void 0 : _a.netValue)) {
|
|
8151
|
+
setTimeout(function () {
|
|
8152
|
+
row.valuePaid = row.values.netValue;
|
|
8153
|
+
_this.handleSelectionChange(row);
|
|
8154
|
+
});
|
|
8155
|
+
return;
|
|
8156
|
+
}
|
|
8157
|
+
this.handleSelectionChange(row);
|
|
8158
|
+
};
|
|
8159
|
+
FinancialTitleTableComponent.prototype.handleSelectionChange = function (rowData) {
|
|
8160
|
+
var index = this.selected.findIndex(function (selectedRow) { return selectedRow.id === rowData.id; });
|
|
8161
|
+
if (index !== -1) {
|
|
8162
|
+
this.selected[index] = rowData;
|
|
8163
|
+
}
|
|
8164
|
+
this.selectionChange.emit(this.selected);
|
|
8165
|
+
};
|
|
8166
|
+
FinancialTitleTableComponent.prototype.onSelectionChange = function (event) {
|
|
8167
|
+
this.selected = event;
|
|
8168
|
+
this.synchronizeCheckboxAndEditableFieldState();
|
|
8169
|
+
this.selectionChange.emit(this.selected);
|
|
8170
|
+
};
|
|
8171
|
+
FinancialTitleTableComponent.prototype.onUnselect = function (event) {
|
|
8172
|
+
var row = this.gridData.find(function (r) { return r.id === event.data.id; });
|
|
8173
|
+
if (row) {
|
|
8174
|
+
row.valuePaid = null;
|
|
8175
|
+
}
|
|
8176
|
+
};
|
|
8177
|
+
FinancialTitleTableComponent.prototype.showDetails = function (rowData) {
|
|
8178
|
+
this.selectedRow = rowData;
|
|
8179
|
+
this.showSidebar = true;
|
|
8180
|
+
};
|
|
8181
|
+
FinancialTitleTableComponent.prototype.closeDetails = function () {
|
|
8182
|
+
this.showSidebar = false;
|
|
8183
|
+
};
|
|
8184
|
+
FinancialTitleTableComponent.prototype.isLastColumn = function (index, columns) {
|
|
8185
|
+
return index === columns.length - 1;
|
|
8186
|
+
};
|
|
8187
|
+
FinancialTitleTableComponent.prototype.getStyleColumns = function (field) {
|
|
8188
|
+
var styleClass = {};
|
|
8189
|
+
switch (field) {
|
|
8190
|
+
case "checkbox":
|
|
8191
|
+
styleClass = { width: "50px" };
|
|
8192
|
+
break;
|
|
8193
|
+
case "title":
|
|
8194
|
+
case "dueDate":
|
|
8195
|
+
styleClass = { width: "150px" };
|
|
8196
|
+
break;
|
|
8197
|
+
case "type":
|
|
8198
|
+
case "entryDate":
|
|
8199
|
+
styleClass = { width: "120px" };
|
|
8200
|
+
break;
|
|
8201
|
+
default:
|
|
8202
|
+
styleClass = { width: "198px" };
|
|
8203
|
+
break;
|
|
8204
|
+
}
|
|
8205
|
+
return styleClass;
|
|
8206
|
+
};
|
|
8207
|
+
FinancialTitleTableComponent.prototype.getProp = function (obj, col) {
|
|
8208
|
+
var e_1, _a;
|
|
8209
|
+
if (!obj || !(col === null || col === void 0 ? void 0 : col.path)) {
|
|
8210
|
+
return "-";
|
|
8211
|
+
}
|
|
8212
|
+
var separator = "";
|
|
8213
|
+
var result = "";
|
|
8214
|
+
try {
|
|
8215
|
+
for (var _b = __values(col.path), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
8216
|
+
var path = _c.value;
|
|
8217
|
+
result += separator + AgroObjectUtils.getPropAndFormatValue(obj, path, col.type);
|
|
8218
|
+
separator = " - ";
|
|
8219
|
+
}
|
|
8220
|
+
}
|
|
8221
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
8222
|
+
finally {
|
|
8223
|
+
try {
|
|
8224
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
8225
|
+
}
|
|
8226
|
+
finally { if (e_1) throw e_1.error; }
|
|
8227
|
+
}
|
|
8228
|
+
return result;
|
|
8229
|
+
};
|
|
8230
|
+
FinancialTitleTableComponent.prototype.getFields = function (field, header, path, type) {
|
|
8231
|
+
return { field: field, path: path, type: type, header: this.translate.instant(header) };
|
|
8232
|
+
};
|
|
8233
|
+
FinancialTitleTableComponent.prototype.addMessage = function (severity, summary, detail, sticky) {
|
|
8234
|
+
if (sticky === void 0) { sticky = false; }
|
|
8235
|
+
this.messageService.add({
|
|
8236
|
+
severity: severity,
|
|
8237
|
+
sticky: sticky,
|
|
8238
|
+
summary: this.translate.instant(summary),
|
|
8239
|
+
detail: this.translate.instant(detail),
|
|
8240
|
+
});
|
|
8241
|
+
};
|
|
8242
|
+
FinancialTitleTableComponent.ctorParameters = function () { return [
|
|
8243
|
+
{ type: LibTranslationService },
|
|
8244
|
+
{ type: AgroFinancialService },
|
|
8245
|
+
{ type: primeng.MessageService }
|
|
8246
|
+
]; };
|
|
8247
|
+
__decorate([
|
|
8248
|
+
core.ViewChild("TitleTable")
|
|
8249
|
+
], FinancialTitleTableComponent.prototype, "table", void 0);
|
|
8250
|
+
__decorate([
|
|
8251
|
+
core.ViewChildren(forms.NgModel)
|
|
8252
|
+
], FinancialTitleTableComponent.prototype, "models", void 0);
|
|
8253
|
+
__decorate([
|
|
8254
|
+
core.Input()
|
|
8255
|
+
], FinancialTitleTableComponent.prototype, "options", void 0);
|
|
8256
|
+
__decorate([
|
|
8257
|
+
core.Input()
|
|
8258
|
+
], FinancialTitleTableComponent.prototype, "selected", void 0);
|
|
8259
|
+
__decorate([
|
|
8260
|
+
core.Output()
|
|
8261
|
+
], FinancialTitleTableComponent.prototype, "selectionChange", void 0);
|
|
8262
|
+
FinancialTitleTableComponent = __decorate([
|
|
8263
|
+
core.Component({
|
|
8264
|
+
selector: "s-financial-title-table",
|
|
8265
|
+
template: "<ng-container *sLoadingState=\"componentLoading\">\r\n <div *ngIf=\"gridData?.length === 0\">\r\n <s-empty-state\r\n iconClass=\"fa fa-inbox\"\r\n title=\"{{ 'agro.angular_components.no_accounts_found_title' | libTranslate }}\"\r\n [showPrimaryAction]=\"false\"\r\n description=\"{{ 'agro.angular_components.no_accounts_found_description' | libTranslate }}\"\r\n ></s-empty-state>\r\n </div>\r\n <ng-container *ngIf=\"gridData?.length > 0\">\r\n <p-table\r\n #TitleTable\r\n [value]=\"gridData\"\r\n [columns]=\"gridColumns\"\r\n dataKey=\"id\"\r\n [lazy]=\"true\"\r\n [paginator]=\"true\"\r\n [totalRecords]=\"gridTotalRecords\"\r\n [sortField]=\"getSortField()\"\r\n [sortOrder]=\"getSortOrder()\"\r\n [first]=\"getRowIndex()\"\r\n [rows]=\"getPageSize()\"\r\n [lazyLoadOnInit]=\"true\"\r\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\r\n (onLazyLoad)=\"updateGrid($event)\"\r\n [(selection)]=\"selected\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n (onRowUnselect)=\"onUnselect($event)\"\r\n sortMode=\"multiple\"\r\n [selectionMode]=\"'multiple'\"\r\n editMode=\"row\"\r\n [scrollable]=\"true\"\r\n [sTableFrozenPosition]=\"'right'\"\r\n [sTableFrozenValue]=\"gridData\"\r\n frozenWidth=\"160px\"\r\n >\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th class=\"table-checkbox-header\" scope=\"col\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container *ngIf=\"!isLastColumn(i, columns); else lastColumn\">\r\n <th [pSortableColumn]=\"col.field\" [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </ng-container>\r\n <ng-template #lastColumn>\r\n <th [scope]=\"'col'\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n {{ col.header }}\r\n </th>\r\n </ng-template>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenheader\">\r\n <tr>\r\n <th scope=\"col\" pFrozenColumn>\r\n {{ \"agro.angular_components.details\" | libTranslate }}\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template \r\n pTemplate=\"body\" \r\n let-rowData \r\n let-columns=\"columns\"\r\n let-rowIndex=\"rowIndex\"\r\n let-editing=\"editing\"\r\n let-ri=\"rowIndex\"\r\n >\r\n <tr [pEditableRow]=\"rowData\">\r\n <td class=\"table-checkbox-header\" [ngStyle]=\"getStyleColumns('checkbox')\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td *ngFor=\"let col of columns\" [ngStyle]=\"getStyleColumns(col.field)\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n <input\r\n [validateValueSelected]=\"rowData?.values?.netValue\"\r\n pInputText\r\n sNumberInput\r\n #inputComponent=\"ngModel\"\r\n class=\"w-full\"\r\n id=\"valuePaid-input-{{ rowData.id || rowIndex }}\"\r\n [ngModelOptions]=\"{name: rowData.id}\"\r\n type=\"text\"\r\n [scale]=\"2\"\r\n decimalSeparator=\",\"\r\n thousandsSeparator=\".\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (ngModelChange)=\"onInputChange($event, rowData, col.field)\"\r\n required\r\n [attr.aria-label]=\"'agro.angular_components.value_paid' | libTranslate \"\r\n />\r\n <div *ngIf=\"inputComponent.errors \r\n && (inputComponent.dirty || inputComponent.touched)\">\r\n <div *ngIf=\"inputComponent.errors.lessThanZero\" class=\"error-message\">\r\n {{ \"agro.angular_components.error_less_or_equal_zero\" | libTranslate }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <ng-container [ngSwitch]=\"col.field\">\r\n <ng-container *ngSwitchCase=\"'valuePaid'\">\r\n <input\r\n pInputText\r\n sNumberInput\r\n class=\"w-full\"\r\n id=\"valuePaid-output-{{ rowData.id || rowIndex }}\"\r\n [ngModelOptions]=\"{name: rowData.id}\"\r\n type=\"text\"\r\n [scale]=\"2\"\r\n decimalSeparator=\",\"\r\n thousandsSeparator=\".\"\r\n [ngModel]=\"rowData[col.field]\"\r\n [readonly]=\"true\"\r\n [disabled]=\"true\"\r\n [attr.aria-label]=\"'agro.angular_components.value_paid' | libTranslate \"\r\n />\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ getProp(rowData, col) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"frozenbody\" let-rowData let-columns>\r\n <tr [pEditableRow]=\"rowData\">\r\n <td pFrozenColumn>\r\n <s-button\r\n id=\"details-{{ rowData.id }}\"\r\n (click)=\"showDetails(rowData)\"\r\n (keydown.enter)=\"showDetails(rowData)\"\r\n label=\"{{ 'agro.angular_components.details' | libTranslate }}\"\r\n [priority]=\"buttonPriority.Default\"\r\n [disabled]=\"false\"\r\n [auxiliary]=\"true\"\r\n [size]=\"buttonSize.Small\"\r\n iconClass=\"fa fa-rocket\"\r\n ></s-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </ng-container>\r\n <s-sidebar\r\n [(visible)]=\"showSidebar\"\r\n position=\"right\"\r\n [header]=\"('agro.angular_components.account_details' | libTranslate) + ' ' + (selectedRow?.numberTitle || '')\"\r\n >\r\n <div class=\"ui-fluid\">\r\n <div class=\"ui-g\">\r\n <ng-container *ngFor=\"let field of sidebarFields\">\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ field.header }}</strong>\r\n </span>\r\n <p>{{ getProp(selectedRow, field) || \"-\" }}</p>\r\n </div>\r\n </ng-container>\r\n <ng-template #noValue>-</ng-template>\r\n <div class=\"ui-g-4\">\r\n <span>\r\n <strong>{{ \"agro.angular_components.status_label\" | libTranslate }}</strong>\r\n </span>\r\n <p>\r\n <ng-container [ngSwitch]=\"selectedRow?.status\">\r\n <span *ngSwitchCase=\"'OPEN'\">\r\n <s-badge\r\n [color]=\"badgeColors.Yellow\"\r\n text=\"{{ 'agro.angular_components.status_open' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n <span *ngSwitchCase=\"'PAID'\">\r\n <s-badge\r\n [color]=\"badgeColors.Green\"\r\n text=\"{{ 'agro.angular_components.status_paid' | libTranslate }}\"\r\n [selectable]=\"false\"\r\n ></s-badge>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n <s-footer>\r\n <s-button label=\"{{ 'agro.angular_components.close' | libTranslate }}\"\r\n (onClick)=\"closeDetails()\">\r\n </s-button>\r\n </s-footer>\r\n </s-sidebar>\r\n</ng-container>\r\n",
|
|
8266
|
+
styles: [".error-message{color:#c13018;margin-top:5px;font-size:12px}"]
|
|
8267
|
+
})
|
|
8268
|
+
], FinancialTitleTableComponent);
|
|
8269
|
+
return FinancialTitleTableComponent;
|
|
8270
|
+
}());
|
|
8271
|
+
|
|
8272
|
+
var ValidateTitleValueSelectedDirective = /** @class */ (function () {
|
|
8273
|
+
function ValidateTitleValueSelectedDirective() {
|
|
8274
|
+
}
|
|
8275
|
+
ValidateTitleValueSelectedDirective_1 = ValidateTitleValueSelectedDirective;
|
|
8276
|
+
ValidateTitleValueSelectedDirective.prototype.validate = function (control) {
|
|
8277
|
+
return this.validateValuePaid(this.val)(control);
|
|
8278
|
+
};
|
|
8279
|
+
ValidateTitleValueSelectedDirective.prototype.validateValuePaid = function (valuePaid) {
|
|
8280
|
+
return function (control) {
|
|
8281
|
+
var val = parseFloat(control.value) || null;
|
|
8282
|
+
if (val <= exports.AGRO_NUMBERS.ZERO) {
|
|
8283
|
+
return { lessThanZero: true };
|
|
8284
|
+
}
|
|
8285
|
+
if (val > valuePaid) {
|
|
8286
|
+
return { greatherThanAllowed: true };
|
|
8287
|
+
}
|
|
8288
|
+
return null;
|
|
8289
|
+
};
|
|
8290
|
+
};
|
|
8291
|
+
var ValidateTitleValueSelectedDirective_1;
|
|
8292
|
+
__decorate([
|
|
8293
|
+
core.Input("validateValueSelected")
|
|
8294
|
+
], ValidateTitleValueSelectedDirective.prototype, "val", void 0);
|
|
8295
|
+
ValidateTitleValueSelectedDirective = ValidateTitleValueSelectedDirective_1 = __decorate([
|
|
8296
|
+
core.Directive({
|
|
8297
|
+
selector: "[validateValueSelected]",
|
|
8298
|
+
providers: [{ provide: forms.NG_VALIDATORS, useExisting: ValidateTitleValueSelectedDirective_1, multi: true }],
|
|
8299
|
+
})
|
|
8300
|
+
], ValidateTitleValueSelectedDirective);
|
|
8301
|
+
return ValidateTitleValueSelectedDirective;
|
|
8302
|
+
}());
|
|
8303
|
+
|
|
8304
|
+
var AgroFinancialModule = /** @class */ (function () {
|
|
8305
|
+
function AgroFinancialModule() {
|
|
8306
|
+
}
|
|
8307
|
+
AgroFinancialModule = __decorate([
|
|
8308
|
+
core.NgModule({
|
|
8309
|
+
imports: [
|
|
8310
|
+
http.HttpClientModule,
|
|
8311
|
+
platformComponents.PermissionsModule.forChild([
|
|
8312
|
+
{
|
|
8313
|
+
name: "Financial",
|
|
8314
|
+
actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
|
|
8315
|
+
uri: "res://senior.com.br/agro/financial/entities/title"
|
|
8316
|
+
}
|
|
8317
|
+
])
|
|
8318
|
+
],
|
|
8319
|
+
providers: [AgroFinancialService],
|
|
8320
|
+
declarations: [],
|
|
8321
|
+
exports: []
|
|
8322
|
+
})
|
|
8323
|
+
], AgroFinancialModule);
|
|
8324
|
+
return AgroFinancialModule;
|
|
8325
|
+
}());
|
|
8326
|
+
|
|
8327
|
+
var FinancialTitleTableModule = /** @class */ (function () {
|
|
8328
|
+
function FinancialTitleTableModule() {
|
|
8329
|
+
}
|
|
8330
|
+
FinancialTitleTableModule = __decorate([
|
|
8331
|
+
core.NgModule({
|
|
8332
|
+
imports: [
|
|
8333
|
+
common.CommonModule,
|
|
8334
|
+
angularComponents.LocaleModule.forChild(),
|
|
8335
|
+
angularComponents.EmptyStateModule,
|
|
8336
|
+
angularComponents.TableModule,
|
|
8337
|
+
table.TableModule,
|
|
8338
|
+
LibTranslationModule,
|
|
8339
|
+
angularComponents.BadgeModule,
|
|
8340
|
+
angularComponents.ButtonModule,
|
|
8341
|
+
angularComponents.SidebarModule,
|
|
8342
|
+
forms.ReactiveFormsModule,
|
|
8343
|
+
forms.FormsModule,
|
|
8344
|
+
angularComponents.LoadingStateModule,
|
|
8345
|
+
primeng.InputTextModule,
|
|
8346
|
+
angularComponents.NumberInputModule,
|
|
8347
|
+
AgroFinancialModule,
|
|
8348
|
+
angularComponents.TableHeaderCheckboxModule,
|
|
8349
|
+
primeng.SharedModule,
|
|
8350
|
+
observers.ObserversModule,
|
|
8351
|
+
],
|
|
8352
|
+
declarations: [FinancialTitleTableComponent, ValidateTitleValueSelectedDirective],
|
|
8353
|
+
exports: [FinancialTitleTableComponent, ValidateTitleValueSelectedDirective],
|
|
8354
|
+
})
|
|
8355
|
+
], FinancialTitleTableModule);
|
|
8356
|
+
return FinancialTitleTableModule;
|
|
8357
|
+
}());
|
|
8358
|
+
|
|
7812
8359
|
exports.AGRO_REGEX = AGRO_REGEX;
|
|
7813
8360
|
exports.AgroAngularComponentsModule = AgroAngularComponentsModule;
|
|
7814
8361
|
exports.AgroArrayUtils = AgroArrayUtils;
|
|
7815
8362
|
exports.AgroCookieUtils = AgroCookieUtils;
|
|
7816
8363
|
exports.AgroDateUtils = AgroDateUtils;
|
|
8364
|
+
exports.AgroFinancialModule = AgroFinancialModule;
|
|
8365
|
+
exports.AgroFinancialService = AgroFinancialService;
|
|
7817
8366
|
exports.AgroFormValidator = AgroFormValidator;
|
|
7818
8367
|
exports.AgroInvoiceModule = AgroInvoiceModule;
|
|
7819
8368
|
exports.AgroInvoiceService = AgroInvoiceService;
|
|
@@ -7842,6 +8391,8 @@
|
|
|
7842
8391
|
exports.EventStepsComponent = EventStepsComponent;
|
|
7843
8392
|
exports.EventStepsModule = EventStepsModule;
|
|
7844
8393
|
exports.ExternalInvoiceModule = ExternalInvoiceModule;
|
|
8394
|
+
exports.FinancialTitleTableComponent = FinancialTitleTableComponent;
|
|
8395
|
+
exports.FinancialTitleTableModule = FinancialTitleTableModule;
|
|
7845
8396
|
exports.FixationModule = FixationModule;
|
|
7846
8397
|
exports.HostProjectConfigsInjectionToken = HostProjectConfigsInjectionToken;
|
|
7847
8398
|
exports.InvoiceModule = InvoiceModule;
|