@senior-agronegocio/angular-components 0.0.63 → 0.0.64
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 +198 -113
- 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/components/event-control-board/common/event-control-constants.d.ts +12 -2
- package/components/event-control-board/common/input-fields-translate.d.ts +5 -0
- package/components/event-control-board/common/input-fields.d.ts +3 -0
- package/components/event-control-board/common/invoice-type.d.ts +9 -0
- package/components/event-control-board/event-control-board.component.d.ts +11 -6
- package/components/event-control-board/service/event-control-item/event-control-item-dto.d.ts +1 -0
- package/components/event-control-board/service/event-control-item/event-control-item.d.ts +1 -0
- package/components/event-steps/event-steps.component.d.ts +1 -0
- package/esm2015/components/event-control-board/common/event-control-constants.js +7 -3
- package/esm2015/components/event-control-board/common/input-fields-translate.js +11 -0
- package/esm2015/components/event-control-board/common/input-fields.js +5 -0
- package/esm2015/components/event-control-board/common/invoice-type.js +11 -0
- package/esm2015/components/event-control-board/event-control-board.component.js +51 -14
- package/esm2015/components/event-control-board/service/event-control-item/event-control-item-dto.js +1 -1
- package/esm2015/components/event-control-board/service/event-control-item/event-control-item.js +1 -1
- package/esm2015/components/event-steps/event-steps.component.js +3 -3
- package/esm2015/services/i18n/en-US.js +9 -2
- package/esm2015/services/i18n/es-CO.js +9 -2
- package/esm2015/services/i18n/pt-BR.js +9 -2
- package/esm5/components/event-control-board/common/event-control-constants.js +7 -3
- package/esm5/components/event-control-board/common/input-fields-translate.js +11 -0
- package/esm5/components/event-control-board/common/input-fields.js +5 -0
- package/esm5/components/event-control-board/common/invoice-type.js +11 -0
- package/esm5/components/event-control-board/event-control-board.component.js +51 -14
- package/esm5/components/event-control-board/service/event-control-item/event-control-item-dto.js +1 -1
- package/esm5/components/event-control-board/service/event-control-item/event-control-item.js +1 -1
- package/esm5/components/event-steps/event-steps.component.js +3 -3
- package/esm5/services/i18n/en-US.js +9 -2
- package/esm5/services/i18n/es-CO.js +9 -2
- package/esm5/services/i18n/pt-BR.js +9 -2
- package/fesm2015/senior-agronegocio-angular-components.js +158 -73
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +196 -111
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/services/i18n/en-US.d.ts +7 -0
- package/services/i18n/es-CO.d.ts +7 -0
- package/services/i18n/pt-BR.d.ts +7 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('rxjs'), require('sockjs-client'), require('@angular/core'), require('rxjs/operators'), require('@stomp/stompjs'), require('js-cookie'), require('@angular/common'), require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@senior-agronegocio/angular-components', ['exports', 'moment', 'rxjs', 'sockjs-client', '@angular/core', 'rxjs/operators', '@stomp/stompjs', 'js-cookie', '@angular/common', '@angular/forms', '@seniorsistemas/angular-components', '@angular/common/
|
|
4
|
-
(global = global || self, factory((global['senior-agronegocio'] = global['senior-agronegocio'] || {}, global['senior-agronegocio']['angular-components'] = {}), global.moment, global.rxjs, global.sockjsClient, global.ng.core, global.rxjs.operators, global.stompjs, global.jsCookie, global.ng.common, global.ng.
|
|
5
|
-
}(this, (function (exports, moment, rxjs, sockjsClient, core, operators, stompjs, jsCookie, common, forms, angularComponents,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('rxjs'), require('sockjs-client'), require('@angular/core'), require('rxjs/operators'), require('@stomp/stompjs'), require('js-cookie'), require('@angular/common'), require('@angular/common/locales/pt'), require('@angular/forms'), require('@seniorsistemas/angular-components'), require('primeng'), require('@angular/common/http'), require('primeng/api'), require('@seniorsistemas/senior-platform-data'), 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('angular2-hotkeys'), require('@seniorsistemas/platform-components'), require('primeng/tooltip'), require('@angular/animations')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@senior-agronegocio/angular-components', ['exports', 'moment', 'rxjs', 'sockjs-client', '@angular/core', 'rxjs/operators', '@stomp/stompjs', 'js-cookie', '@angular/common', '@angular/common/locales/pt', '@angular/forms', '@seniorsistemas/angular-components', 'primeng', '@angular/common/http', 'primeng/api', '@seniorsistemas/senior-platform-data', 'primeng/confirmdialog', 'primeng/panel', 'primeng/tabview', '@seniorsistemas/ng2-currency-mask', 'primeng/inputtext', 'primeng/checkbox', 'primeng/table', 'primeng/calendar', 'primeng/dropdown', 'angular2-hotkeys', '@seniorsistemas/platform-components', 'primeng/tooltip', '@angular/animations'], factory) :
|
|
4
|
+
(global = global || self, factory((global['senior-agronegocio'] = global['senior-agronegocio'] || {}, global['senior-agronegocio']['angular-components'] = {}), global.moment, global.rxjs, global.sockjsClient, global.ng.core, global.rxjs.operators, global.stompjs, global.jsCookie, global.ng.common, global.ng.common.locales.pt, global.ng.forms, global.angularComponents, global.primeng, global.ng.common.http, global.api, global.seniorPlatformData, global.confirmdialog, global.panel, global.tabview, global.ng2CurrencyMask, global.inputtext, global.checkbox, global.table, global.calendar, global.dropdown, global.angular2Hotkeys, global.platformComponents, global.tooltip, global.ng.animations));
|
|
5
|
+
}(this, (function (exports, moment, rxjs, sockjsClient, core, operators, stompjs, jsCookie, common, localePt, forms, angularComponents, primeng, http, api, seniorPlatformData, confirmdialog, panel, tabview, ng2CurrencyMask, inputtext, checkbox, table, calendar, dropdown, angular2Hotkeys, platformComponents, tooltip, animations) { 'use strict';
|
|
6
6
|
|
|
7
7
|
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
|
8
8
|
sockjsClient = sockjsClient && sockjsClient.hasOwnProperty('default') ? sockjsClient['default'] : sockjsClient;
|
|
@@ -3665,7 +3665,14 @@
|
|
|
3665
3665
|
"agro.angular_components.warn_cancel_fixation_message_title": "Cancelamento de fixação",
|
|
3666
3666
|
"agro.angular_components.warn_cancel_fixation_message_description": "Não é permitido cancelar a fixação de compra imediata.",
|
|
3667
3667
|
"agro.angular_components.warn_immediate_cancel_fixation_message_description": "Não é possível cancelar uma fixação realizada via compra imediata.",
|
|
3668
|
-
"agro.angular_components.cancel_fixation_event": "Cancelamento de fixação"
|
|
3668
|
+
"agro.angular_components.cancel_fixation_event": "Cancelamento de fixação",
|
|
3669
|
+
"agro.angular_components.invoice_type_INCOMING": "Entrada",
|
|
3670
|
+
"agro.angular_components.invoice_type_COMPLEMENT": "Complementar",
|
|
3671
|
+
"agro.angular_components.invoice_type_ADJUSTMENT": "Ajuste",
|
|
3672
|
+
"agro.angular_components.invoice_type_OUTGOING": "Saída",
|
|
3673
|
+
"agro.angular_components.invoice_type_RETURN": "Devolução",
|
|
3674
|
+
"agro.angular_components.invoice_type_SERVICE": "Serviço",
|
|
3675
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolução simbólica"
|
|
3669
3676
|
};
|
|
3670
3677
|
|
|
3671
3678
|
var enUS = {
|
|
@@ -3888,7 +3895,14 @@
|
|
|
3888
3895
|
"agro.angular_components.warn_cancel_fixation_message_title": "It is not possible to cancel the fixation",
|
|
3889
3896
|
"agro.angular_components.warn_cancel_fixation_message_description": "It is not possible to cancel a fixation that is already cancelled or in process.",
|
|
3890
3897
|
"agro.angular_components.warn_immediate_cancel_fixation_message_description": "It is not possible to cancel a fixation made via immediate buy.",
|
|
3891
|
-
"agro.angular_components.cancel_fixation_event": "Cancel fixation"
|
|
3898
|
+
"agro.angular_components.cancel_fixation_event": "Cancel fixation",
|
|
3899
|
+
"agro.angular_components.invoice_type_INCOMING": "Incoming",
|
|
3900
|
+
"agro.angular_components.invoice_type_COMPLEMENT": "Complementary",
|
|
3901
|
+
"agro.angular_components.invoice_type_ADJUSTMENT": "Adjustment",
|
|
3902
|
+
"agro.angular_components.invoice_type_OUTGOING": "Outgoing",
|
|
3903
|
+
"agro.angular_components.invoice_type_RETURN": "Return",
|
|
3904
|
+
"agro.angular_components.invoice_type_SERVICE": "Service",
|
|
3905
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Symbolic return"
|
|
3892
3906
|
};
|
|
3893
3907
|
|
|
3894
3908
|
var esCO = {
|
|
@@ -4111,7 +4125,14 @@
|
|
|
4111
4125
|
"agro.angular_components.warn_cancel_fixation_message_title": "No es posible cancelar la fijación",
|
|
4112
4126
|
"agro.angular_components.warn_cancel_fixation_message_description": "No es posible cancelar una fijación que ya esté cancelada o en proceso.",
|
|
4113
4127
|
"agro.angular_components.warn_immediate_cancel_fixation_message_description": "No es posible cancelar una fijación realizada vía compra inmediata.",
|
|
4114
|
-
"agro.angular_components.cancel_fixation_event": "Cancelación de fijación"
|
|
4128
|
+
"agro.angular_components.cancel_fixation_event": "Cancelación de fijación",
|
|
4129
|
+
"agro.angular_components.invoice_type_INCOMING": "Entrada",
|
|
4130
|
+
"agro.angular_components.invoice_type_COMPLEMENT": "Complementaria",
|
|
4131
|
+
"agro.angular_components.invoice_type_ADJUSTMENT": "Ajuste",
|
|
4132
|
+
"agro.angular_components.invoice_type_OUTGOING": "Salida",
|
|
4133
|
+
"agro.angular_components.invoice_type_RETURN": "Devolución",
|
|
4134
|
+
"agro.angular_components.invoice_type_SERVICE": "Servicio",
|
|
4135
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolución simbólica"
|
|
4115
4136
|
};
|
|
4116
4137
|
|
|
4117
4138
|
var LibTranslationService = /** @class */ (function () {
|
|
@@ -4165,93 +4186,15 @@
|
|
|
4165
4186
|
return LibTranslationService;
|
|
4166
4187
|
}());
|
|
4167
4188
|
|
|
4168
|
-
var
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
};
|
|
4178
|
-
|
|
4179
|
-
var PaginatorStorageService = /** @class */ (function () {
|
|
4180
|
-
function PaginatorStorageService() {
|
|
4181
|
-
this.GET_USER_ID = seniorPlatformData.user.getUserData().then(function (user) { return user.id; });
|
|
4182
|
-
this.PAGINATOR_KEY = 'SENIOR_PAGINATOR';
|
|
4183
|
-
}
|
|
4184
|
-
PaginatorStorageService.prototype.store = function (key, value) {
|
|
4185
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4186
|
-
var _a, _b;
|
|
4187
|
-
return __generator(this, function (_c) {
|
|
4188
|
-
switch (_c.label) {
|
|
4189
|
-
case 0:
|
|
4190
|
-
_b = (_a = sessionStorage).setItem;
|
|
4191
|
-
return [4 /*yield*/, this.GET_USER_ID];
|
|
4192
|
-
case 1:
|
|
4193
|
-
_b.apply(_a, [(_c.sent()) + "_" + key, JSON.stringify(value)]);
|
|
4194
|
-
return [2 /*return*/];
|
|
4195
|
-
}
|
|
4196
|
-
});
|
|
4197
|
-
});
|
|
4198
|
-
};
|
|
4199
|
-
PaginatorStorageService.prototype.get = function (key) {
|
|
4200
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4201
|
-
var _a, _b, _c, _d;
|
|
4202
|
-
return __generator(this, function (_e) {
|
|
4203
|
-
switch (_e.label) {
|
|
4204
|
-
case 0:
|
|
4205
|
-
_b = (_a = JSON).parse;
|
|
4206
|
-
_d = (_c = sessionStorage).getItem;
|
|
4207
|
-
return [4 /*yield*/, this.GET_USER_ID];
|
|
4208
|
-
case 1: return [2 /*return*/, _b.apply(_a, [_d.apply(_c, [(_e.sent()) + "_" + key]) || '']) || {}];
|
|
4209
|
-
}
|
|
4210
|
-
});
|
|
4211
|
-
});
|
|
4212
|
-
};
|
|
4213
|
-
PaginatorStorageService.prototype.storePaginator = function (key, listParams) {
|
|
4214
|
-
if (listParams === void 0) { listParams = {}; }
|
|
4215
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4216
|
-
var store;
|
|
4217
|
-
return __generator(this, function (_a) {
|
|
4218
|
-
switch (_a.label) {
|
|
4219
|
-
case 0: return [4 /*yield*/, this.get(this.PAGINATOR_KEY)];
|
|
4220
|
-
case 1:
|
|
4221
|
-
store = (_a.sent()) || {};
|
|
4222
|
-
store[key] = listParams;
|
|
4223
|
-
return [4 /*yield*/, this.store(this.PAGINATOR_KEY, store)];
|
|
4224
|
-
case 2:
|
|
4225
|
-
_a.sent();
|
|
4226
|
-
return [2 /*return*/];
|
|
4227
|
-
}
|
|
4228
|
-
});
|
|
4229
|
-
});
|
|
4230
|
-
};
|
|
4231
|
-
PaginatorStorageService.prototype.getPaginator = function (key) {
|
|
4232
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4233
|
-
var store;
|
|
4234
|
-
return __generator(this, function (_a) {
|
|
4235
|
-
switch (_a.label) {
|
|
4236
|
-
case 0: return [4 /*yield*/, this.get(this.PAGINATOR_KEY)];
|
|
4237
|
-
case 1:
|
|
4238
|
-
store = (_a.sent()) || {};
|
|
4239
|
-
return [2 /*return*/, store[key] || {}];
|
|
4240
|
-
}
|
|
4241
|
-
});
|
|
4242
|
-
});
|
|
4243
|
-
};
|
|
4244
|
-
return PaginatorStorageService;
|
|
4245
|
-
}());
|
|
4246
|
-
|
|
4247
|
-
var EventStatus;
|
|
4248
|
-
(function (EventStatus) {
|
|
4249
|
-
EventStatus["PENDING"] = "PENDING";
|
|
4250
|
-
EventStatus["PROCESSING"] = "PROCESSING";
|
|
4251
|
-
EventStatus["SUCCESS"] = "SUCCESS";
|
|
4252
|
-
EventStatus["FAILED"] = "FAILED";
|
|
4253
|
-
EventStatus["CANCELED"] = "CANCELED";
|
|
4254
|
-
})(EventStatus || (EventStatus = {}));
|
|
4189
|
+
var FixationStatus;
|
|
4190
|
+
(function (FixationStatus) {
|
|
4191
|
+
FixationStatus["APPROVED"] = "APPROVED";
|
|
4192
|
+
FixationStatus["CANCELED"] = "CANCELED";
|
|
4193
|
+
FixationStatus["IN_ANALYSIS"] = "IN_ANALYSIS";
|
|
4194
|
+
FixationStatus["FINISHED"] = "FINISHED";
|
|
4195
|
+
FixationStatus["REJECTED"] = "REJECTED";
|
|
4196
|
+
FixationStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
4197
|
+
})(FixationStatus || (FixationStatus = {}));
|
|
4255
4198
|
|
|
4256
4199
|
var EventOperation;
|
|
4257
4200
|
(function (EventOperation) {
|
|
@@ -4289,6 +4232,20 @@
|
|
|
4289
4232
|
EventOrigin["CANCEL_FIXATION"] = "CANCEL_FIXATION";
|
|
4290
4233
|
})(EventOrigin || (EventOrigin = {}));
|
|
4291
4234
|
|
|
4235
|
+
var EventStatus;
|
|
4236
|
+
(function (EventStatus) {
|
|
4237
|
+
EventStatus["PENDING"] = "PENDING";
|
|
4238
|
+
EventStatus["PROCESSING"] = "PROCESSING";
|
|
4239
|
+
EventStatus["SUCCESS"] = "SUCCESS";
|
|
4240
|
+
EventStatus["FAILED"] = "FAILED";
|
|
4241
|
+
EventStatus["CANCELED"] = "CANCELED";
|
|
4242
|
+
})(EventStatus || (EventStatus = {}));
|
|
4243
|
+
|
|
4244
|
+
var InputFields;
|
|
4245
|
+
(function (InputFields) {
|
|
4246
|
+
InputFields["AGRO_INVOICE_TYPE"] = "agroInvoiceType";
|
|
4247
|
+
})(InputFields || (InputFields = {}));
|
|
4248
|
+
|
|
4292
4249
|
var eventOrigin = [
|
|
4293
4250
|
{ label: "agro.angular_components.balance_entry_control_event", value: EventOrigin.BALANCE_ENTRY_CONTROL },
|
|
4294
4251
|
{ label: "agro.angular_components.invoice_creating_event", value: EventOrigin.INVOICE },
|
|
@@ -4298,14 +4255,14 @@
|
|
|
4298
4255
|
var eventItem = [
|
|
4299
4256
|
{ label: "agro.angular_components.ticket_event", value: EventOperation.TICKET },
|
|
4300
4257
|
{ label: "agro.angular_components.provisional_event", value: EventOperation.PROVISIONAL },
|
|
4301
|
-
{ label: "agro.angular_components.invoice_creating_event", value: EventOperation.CREATE_INVOICE },
|
|
4258
|
+
{ label: "agro.angular_components.invoice_creating_event", value: EventOperation.CREATE_INVOICE, subLabelField: InputFields.AGRO_INVOICE_TYPE },
|
|
4302
4259
|
{ label: "agro.angular_components.remove_provisional_event", value: EventOperation.REMOVE_PROVISIONAL },
|
|
4303
4260
|
{ label: "agro.angular_components.effective_event", value: EventOperation.EFFECTIVE },
|
|
4304
4261
|
{ label: "agro.angular_components.effective_confirmation_event", value: EventOperation.EFFECTIVE_CONFIRMATION },
|
|
4305
4262
|
{ label: "agro.angular_components.change_request_event_summary", value: EventOperation.CHANGE_REQUEST },
|
|
4306
4263
|
{ label: "agro.angular_components.change_response_event", value: EventOperation.CHANGE_RESPONSE },
|
|
4307
4264
|
{ label: "agro.angular_components.fixation_event", value: EventOperation.PROCESS_FIXATION },
|
|
4308
|
-
{ label: "agro.angular_components." + EventOperation.CANCEL_INVOICE, value: EventOperation.CANCEL_INVOICE },
|
|
4265
|
+
{ label: "agro.angular_components." + EventOperation.CANCEL_INVOICE, value: EventOperation.CANCEL_INVOICE, subLabelField: InputFields.AGRO_INVOICE_TYPE },
|
|
4309
4266
|
{ label: "agro.angular_components." + EventOperation.REPROCESS_INVOICE, value: EventOperation.REPROCESS_INVOICE },
|
|
4310
4267
|
{ label: "agro.angular_components." + EventOperation.EFFECTIVE_CONFIRMATION, value: EventOperation.EFFECTIVE_CONFIRMATION },
|
|
4311
4268
|
{ label: "agro.angular_components." + EventOperation.CHANGE_REQUEST, value: EventOperation.CHANGE_REQUEST },
|
|
@@ -4327,8 +4284,29 @@
|
|
|
4327
4284
|
{ label: "agro.angular_components.pending", value: EventStatus.PENDING },
|
|
4328
4285
|
{ label: "agro.angular_components.processing", value: EventStatus.PROCESSING },
|
|
4329
4286
|
{ label: "agro.angular_components.canceled", value: EventStatus.CANCELED },
|
|
4287
|
+
];
|
|
4288
|
+
var inputFieldsPath = [
|
|
4289
|
+
{ path: "invoice", field: InputFields.AGRO_INVOICE_TYPE },
|
|
4330
4290
|
];
|
|
4331
4291
|
|
|
4292
|
+
var LookupErrorMessages = {
|
|
4293
|
+
required: 'agro.angular_components.error_required',
|
|
4294
|
+
min: 'agro.angular_components.error_min_value',
|
|
4295
|
+
max: 'agro.angular_components.error_max_value',
|
|
4296
|
+
minlength: 'agro.angular_components.error_min_length',
|
|
4297
|
+
maxlength: 'agro.angular_components.error_max_length',
|
|
4298
|
+
pattern: 'agro.angular_components.error_invalid',
|
|
4299
|
+
FormDateError_data1: 'agro.angular_components.initial_invalid_date',
|
|
4300
|
+
FormDateError_data2: 'agro.angular_components.end_invalid_date'
|
|
4301
|
+
};
|
|
4302
|
+
|
|
4303
|
+
var OriginOperation;
|
|
4304
|
+
(function (OriginOperation) {
|
|
4305
|
+
OriginOperation["ENTRY_IN_DEPOSIT"] = "ENTRY_IN_DEPOSIT";
|
|
4306
|
+
OriginOperation["IMMEDIATE_BUY_ENTRY"] = "IMMEDIATE_BUY_ENTRY";
|
|
4307
|
+
OriginOperation["ENTRY_TO_BE_FIXED"] = "ENTRY_TO_BE_FIXED";
|
|
4308
|
+
})(OriginOperation || (OriginOperation = {}));
|
|
4309
|
+
|
|
4332
4310
|
var EntityService = /** @class */ (function () {
|
|
4333
4311
|
function EntityService(http, messageService, entityUrl, actionsUrl, queriesUrl, translate) {
|
|
4334
4312
|
this.http = http;
|
|
@@ -4612,22 +4590,94 @@
|
|
|
4612
4590
|
return EventControlBoardService;
|
|
4613
4591
|
}());
|
|
4614
4592
|
|
|
4615
|
-
var
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4593
|
+
var PaginatorStorageService = /** @class */ (function () {
|
|
4594
|
+
function PaginatorStorageService() {
|
|
4595
|
+
this.GET_USER_ID = seniorPlatformData.user.getUserData().then(function (user) { return user.id; });
|
|
4596
|
+
this.PAGINATOR_KEY = 'SENIOR_PAGINATOR';
|
|
4597
|
+
}
|
|
4598
|
+
PaginatorStorageService.prototype.store = function (key, value) {
|
|
4599
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4600
|
+
var _a, _b;
|
|
4601
|
+
return __generator(this, function (_c) {
|
|
4602
|
+
switch (_c.label) {
|
|
4603
|
+
case 0:
|
|
4604
|
+
_b = (_a = sessionStorage).setItem;
|
|
4605
|
+
return [4 /*yield*/, this.GET_USER_ID];
|
|
4606
|
+
case 1:
|
|
4607
|
+
_b.apply(_a, [(_c.sent()) + "_" + key, JSON.stringify(value)]);
|
|
4608
|
+
return [2 /*return*/];
|
|
4609
|
+
}
|
|
4610
|
+
});
|
|
4611
|
+
});
|
|
4612
|
+
};
|
|
4613
|
+
PaginatorStorageService.prototype.get = function (key) {
|
|
4614
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4615
|
+
var _a, _b, _c, _d;
|
|
4616
|
+
return __generator(this, function (_e) {
|
|
4617
|
+
switch (_e.label) {
|
|
4618
|
+
case 0:
|
|
4619
|
+
_b = (_a = JSON).parse;
|
|
4620
|
+
_d = (_c = sessionStorage).getItem;
|
|
4621
|
+
return [4 /*yield*/, this.GET_USER_ID];
|
|
4622
|
+
case 1: return [2 /*return*/, _b.apply(_a, [_d.apply(_c, [(_e.sent()) + "_" + key]) || '']) || {}];
|
|
4623
|
+
}
|
|
4624
|
+
});
|
|
4625
|
+
});
|
|
4626
|
+
};
|
|
4627
|
+
PaginatorStorageService.prototype.storePaginator = function (key, listParams) {
|
|
4628
|
+
if (listParams === void 0) { listParams = {}; }
|
|
4629
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4630
|
+
var store;
|
|
4631
|
+
return __generator(this, function (_a) {
|
|
4632
|
+
switch (_a.label) {
|
|
4633
|
+
case 0: return [4 /*yield*/, this.get(this.PAGINATOR_KEY)];
|
|
4634
|
+
case 1:
|
|
4635
|
+
store = (_a.sent()) || {};
|
|
4636
|
+
store[key] = listParams;
|
|
4637
|
+
return [4 /*yield*/, this.store(this.PAGINATOR_KEY, store)];
|
|
4638
|
+
case 2:
|
|
4639
|
+
_a.sent();
|
|
4640
|
+
return [2 /*return*/];
|
|
4641
|
+
}
|
|
4642
|
+
});
|
|
4643
|
+
});
|
|
4644
|
+
};
|
|
4645
|
+
PaginatorStorageService.prototype.getPaginator = function (key) {
|
|
4646
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4647
|
+
var store;
|
|
4648
|
+
return __generator(this, function (_a) {
|
|
4649
|
+
switch (_a.label) {
|
|
4650
|
+
case 0: return [4 /*yield*/, this.get(this.PAGINATOR_KEY)];
|
|
4651
|
+
case 1:
|
|
4652
|
+
store = (_a.sent()) || {};
|
|
4653
|
+
return [2 /*return*/, store[key] || {}];
|
|
4654
|
+
}
|
|
4655
|
+
});
|
|
4656
|
+
});
|
|
4657
|
+
};
|
|
4658
|
+
return PaginatorStorageService;
|
|
4659
|
+
}());
|
|
4624
4660
|
|
|
4625
|
-
var
|
|
4626
|
-
(function (
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4661
|
+
var InvoiceType;
|
|
4662
|
+
(function (InvoiceType) {
|
|
4663
|
+
InvoiceType["INCOMING"] = "INCOMING";
|
|
4664
|
+
InvoiceType["OUTGOING"] = "OUTGOING";
|
|
4665
|
+
InvoiceType["RETURN"] = "RETURN";
|
|
4666
|
+
InvoiceType["COMPLEMENT"] = "COMPLEMENT";
|
|
4667
|
+
InvoiceType["SYMBOLIC_RETURN"] = "SYMBOLIC_RETURN";
|
|
4668
|
+
InvoiceType["ADJUSTMENT"] = "ADJUSTMENT";
|
|
4669
|
+
InvoiceType["SERVICE"] = "SERVICE";
|
|
4670
|
+
})(InvoiceType || (InvoiceType = {}));
|
|
4671
|
+
|
|
4672
|
+
var invoiceTypeTranslate = [
|
|
4673
|
+
{ value: InvoiceType.INCOMING, label: "agro.angular_components.invoice_type_" + InvoiceType.INCOMING },
|
|
4674
|
+
{ value: InvoiceType.COMPLEMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.COMPLEMENT },
|
|
4675
|
+
{ value: InvoiceType.ADJUSTMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.ADJUSTMENT },
|
|
4676
|
+
{ value: InvoiceType.OUTGOING, label: "agro.angular_components.invoice_type_" + InvoiceType.OUTGOING },
|
|
4677
|
+
{ value: InvoiceType.RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.RETURN },
|
|
4678
|
+
{ value: InvoiceType.SERVICE, label: "agro.angular_components.invoice_type_" + InvoiceType.SERVICE },
|
|
4679
|
+
{ value: InvoiceType.SYMBOLIC_RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.SYMBOLIC_RETURN },
|
|
4680
|
+
];
|
|
4631
4681
|
|
|
4632
4682
|
var EventControlBoardComponent = /** @class */ (function () {
|
|
4633
4683
|
function EventControlBoardComponent(translate, formBuilder, websocketService, eventControlBoardService, paginatorStorageService, messageService, confirmationService) {
|
|
@@ -4651,6 +4701,8 @@
|
|
|
4651
4701
|
this.currentListParams = { page: exports.AGRO_NUMBERS.ZERO, size: exports.AGRO_NUMBERS.TEN, sort: [], filterData: {} };
|
|
4652
4702
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
4653
4703
|
this.eventItem = eventItem;
|
|
4704
|
+
this.inputFieldsPath = inputFieldsPath;
|
|
4705
|
+
this.invoiceTypeTranslate = invoiceTypeTranslate;
|
|
4654
4706
|
common.registerLocaleData(localePt);
|
|
4655
4707
|
}
|
|
4656
4708
|
EventControlBoardComponent.prototype.ngOnInit = function () {
|
|
@@ -4845,6 +4897,7 @@
|
|
|
4845
4897
|
controlCode: item.controlCode,
|
|
4846
4898
|
eventType: item.eventOrigin,
|
|
4847
4899
|
label: this.getEventLabel(detail),
|
|
4900
|
+
subLabel: this.getEventSubLabel(detail),
|
|
4848
4901
|
disabled: detail.status === EventStatus.PENDING && detailIndex !== this.calculateActiveIndex(item.eventControlItem),
|
|
4849
4902
|
tooltip: this.getEventLabel(detail),
|
|
4850
4903
|
state: this.determineStepState(detail)
|
|
@@ -4864,6 +4917,38 @@
|
|
|
4864
4917
|
var eventLabel = (_a = this.eventItem.find(function (e) { return e.value === detail.eventOperation; })) === null || _a === void 0 ? void 0 : _a.label;
|
|
4865
4918
|
return eventLabel ? this.translate.instant(eventLabel) : detail.eventOperation;
|
|
4866
4919
|
};
|
|
4920
|
+
EventControlBoardComponent.prototype.getEventSubLabel = function (detail) {
|
|
4921
|
+
var _a, _b;
|
|
4922
|
+
var field = (_a = this.eventItem.find(function (e) { return e.value === detail.eventOperation; })) === null || _a === void 0 ? void 0 : _a.subLabelField;
|
|
4923
|
+
if (!field || !detail.input) {
|
|
4924
|
+
return null;
|
|
4925
|
+
}
|
|
4926
|
+
var path = (_b = this.inputFieldsPath.find(function (f) { return f.field === field; })) === null || _b === void 0 ? void 0 : _b.path;
|
|
4927
|
+
var fullPath = path ? path + "." + field : field;
|
|
4928
|
+
var value = this.getValueFieldJsonFromPath(detail.input, fullPath);
|
|
4929
|
+
return this.formatFieldValue(field, value);
|
|
4930
|
+
};
|
|
4931
|
+
EventControlBoardComponent.prototype.getValueFieldJsonFromPath = function (json, path) {
|
|
4932
|
+
try {
|
|
4933
|
+
var parsedJson = JSON.parse(json);
|
|
4934
|
+
var keys = path.split('.');
|
|
4935
|
+
return keys.reduce(function (acc, key) { return acc && acc[key]; }, parsedJson);
|
|
4936
|
+
}
|
|
4937
|
+
catch (error) {
|
|
4938
|
+
console.error('Erro ao acessar o objeto pelo path: ' + path, error);
|
|
4939
|
+
return null;
|
|
4940
|
+
}
|
|
4941
|
+
};
|
|
4942
|
+
EventControlBoardComponent.prototype.formatFieldValue = function (field, value) {
|
|
4943
|
+
var _a;
|
|
4944
|
+
switch (field) {
|
|
4945
|
+
case InputFields.AGRO_INVOICE_TYPE:
|
|
4946
|
+
var label = (_a = this.invoiceTypeTranslate.find(function (e) { return e.value === value; })) === null || _a === void 0 ? void 0 : _a.label;
|
|
4947
|
+
return label ? this.translate.instant(label) : value;
|
|
4948
|
+
default:
|
|
4949
|
+
return value;
|
|
4950
|
+
}
|
|
4951
|
+
};
|
|
4867
4952
|
EventControlBoardComponent.prototype.getSortedFields = function () {
|
|
4868
4953
|
var _this = this;
|
|
4869
4954
|
var _a;
|
|
@@ -5229,7 +5314,7 @@
|
|
|
5229
5314
|
EventStepsComponent = EventStepsComponent_1 = __decorate([
|
|
5230
5315
|
core.Component({
|
|
5231
5316
|
selector: "s-event-steps",
|
|
5232
|
-
template: "<div [id]=\"id\" class=\"s-steps-container\">\r\n <ng-container *ngFor=\"let step of visibledStep; let i = index; let isFirst = first; let isLast = last\">\r\n <div *ngIf=\"!isFirst\" class=\"s-step-progress-bar\"\r\n [@activeDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': step.disabled,\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex)\r\n }\"></div>\r\n <div [id]=\"id + '-step-' + (i)\" class=\"s-step-header\" (click)=\"stepClick(step, i, $event)\" role=\"tab\"\r\n tabindex=\"0\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-controls]=\"step.ariaControls\"\r\n [attr.aria-labelledby]=\"!step.ariaLabel ? 'step-label-' + i : null\" [attr.aria-posinset]=\"i + 1\"\r\n [attr.aria-setsize]=\"visibledStep.length\" [attr.aria-selected]=\"activeIndex == i\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex),\r\n 's-step-previous': (i === activeIndex - 1),\r\n 'success-status': (step.state === stepState.Success),\r\n 'failed-status': (step.state === stepState.Warning)\r\n }\">\r\n <div *ngIf=\"!isFirst\"\r\n [@beforeActiveDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\"\r\n class=\"s-step-progress-bar-before\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': step.disabled,\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex)\r\n }\"></div>\r\n <div *ngIf=\"!isLast\"\r\n [@afterActiveDesative]=\"afterBarAnimation(i, activeIndex) ? 'active': 'desactive'\"\r\n class=\"s-step-progress-bar-after\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': visibledStep[i + 1].disabled,\r\n 's-step-visited': ((i + 1) < activeIndex),\r\n 's-step-active': (i === (activeIndex - 1))\r\n }\"></div>\r\n <div\r\n class=\"s-step-index\"\r\n [ngClass]=\"{'s-step-disabled': step.disabled, 'loading-status': !step.disabled}\"\r\n [pTooltip]=\"step.tooltip\"\r\n tooltipPosition=\"top\">\r\n <div class=\"s-step-index-content\">\r\n <span\r\n *ngIf=\"step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)\"\r\n class=\"fas fa-check\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.state == stepState.Warning\"\r\n class=\"fas fa-exclamation-triangle\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.state != stepState.Success && step.state != stepState.Warning\r\n && activeIndex <= i && !step.disabled\"\r\n class=\"fa fa-hourglass-half loading-status\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.disabled\">\r\n {{i + 1}}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n [id]=\"'step-label-' + i\"\r\n class=\"s-step-label\"\r\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\r\n <span>\r\n {{step.label}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n",
|
|
5317
|
+
template: "<div [id]=\"id\" class=\"s-steps-container\">\r\n <ng-container *ngFor=\"let step of visibledStep; let i = index; let isFirst = first; let isLast = last\">\r\n <div *ngIf=\"!isFirst\" class=\"s-step-progress-bar\"\r\n [@activeDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': step.disabled,\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex)\r\n }\"></div>\r\n <div [id]=\"id + '-step-' + (i)\" class=\"s-step-header\" (click)=\"stepClick(step, i, $event)\" role=\"tab\"\r\n tabindex=\"0\" [attr.aria-label]=\"step.ariaLabel || null\" [attr.aria-controls]=\"step.ariaControls\"\r\n [attr.aria-labelledby]=\"!step.ariaLabel ? 'step-label-' + i : null\" [attr.aria-posinset]=\"i + 1\"\r\n [attr.aria-setsize]=\"visibledStep.length\" [attr.aria-selected]=\"activeIndex == i\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex),\r\n 's-step-previous': (i === activeIndex - 1),\r\n 'success-status': (step.state === stepState.Success),\r\n 'failed-status': (step.state === stepState.Warning)\r\n }\">\r\n <div *ngIf=\"!isFirst\"\r\n [@beforeActiveDesative]=\"barAnimation(i, activeIndex) ? 'active': 'desactive'\"\r\n class=\"s-step-progress-bar-before\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': step.disabled,\r\n 's-step-visited': (i < activeIndex),\r\n 's-step-active': (i === activeIndex)\r\n }\"></div>\r\n <div *ngIf=\"!isLast\"\r\n [@afterActiveDesative]=\"afterBarAnimation(i, activeIndex) ? 'active': 'desactive'\"\r\n class=\"s-step-progress-bar-after\" [ngClass]=\"{\r\n 's-step-success': (step.state === stepState.Success),\r\n 's-step-warning': (step.state === stepState.Warning),\r\n 's-step-disabled': visibledStep[i + 1].disabled,\r\n 's-step-visited': ((i + 1) < activeIndex),\r\n 's-step-active': (i === (activeIndex - 1))\r\n }\"></div>\r\n <div\r\n class=\"s-step-index\"\r\n [ngClass]=\"{'s-step-disabled': step.disabled, 'loading-status': !step.disabled}\"\r\n [pTooltip]=\"step.tooltip\"\r\n tooltipPosition=\"top\">\r\n <div class=\"s-step-index-content\">\r\n <span\r\n *ngIf=\"step.state !== stepState.Warning && (step.state == stepState.Success || activeIndex > i)\"\r\n class=\"fas fa-check\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.state == stepState.Warning\"\r\n class=\"fas fa-exclamation-triangle\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.state != stepState.Success && step.state != stepState.Warning\r\n && activeIndex <= i && !step.disabled\"\r\n class=\"fa fa-hourglass-half loading-status\"\r\n aria-hidden=\"true\"\r\n [attr.aria-label]=\"i + 1\"></span>\r\n <span\r\n *ngIf=\"step.disabled\">\r\n {{i + 1}}\r\n </span>\r\n </div>\r\n </div>\r\n <div\r\n [id]=\"'step-label-' + i\"\r\n class=\"s-step-label\"\r\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\r\n <span>\r\n {{step.label}}\r\n </span>\r\n </div>\r\n <div\r\n *ngIf=\"step.subLabel\"\r\n [id]=\"'step-label-' + i\"\r\n class=\"s-step-label\"\r\n [ngClass]=\"{'s-step-disabled': step.disabled}\">\r\n <span>\r\n {{step.subLabel}}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n",
|
|
5233
5318
|
host: {
|
|
5234
5319
|
"aria-orientation": "horizontal",
|
|
5235
5320
|
role: "tablist",
|
|
@@ -5267,7 +5352,7 @@
|
|
|
5267
5352
|
animations.transition(desactiveActive, [animations.animate("50ms 100ms linear")]),
|
|
5268
5353
|
]),
|
|
5269
5354
|
],
|
|
5270
|
-
styles: [".s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow-x:auto;padding:20px 10px;text-align:center}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;position:relative;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:
|
|
5355
|
+
styles: [".s-steps-container{display:-ms-flexbox;display:flex;white-space:nowrap;-ms-flex-align:start;align-items:flex-start;overflow-x:auto;padding:20px 10px;text-align:center}.s-step-header{box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;position:relative;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:76px;padding:0 10px}.s-step-header .s-step-label{white-space:pre;color:#999;font-size:14px;font-weight:400;padding-top:5px}.s-step-header .s-step-progress-bar-before{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;left:0}.s-step-header .s-step-progress-bar-before.s-step-active,.s-step-header .s-step-progress-bar-before.s-step-visited{background-position:left bottom}.s-step-header .s-step-progress-bar-after{margin:0;position:absolute;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:calc(50% - 20px);background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%;right:0}.s-step-header .s-step-progress-bar-after.s-step-active,.s-step-header .s-step-progress-bar-after.s-step-visited{background-position:left bottom}.s-step-progress-bar{margin:0;position:relative;top:20px;-ms-flex:auto;flex:auto;height:3px;overflow:hidden;width:100%;background-color:#ccc;background-image:linear-gradient(to right,#7892a1 50%,#ccc 50%);background-position:right bottom;background-size:300% 100%}.s-step-disabled{opacity:.5;filter:Alpha(Opacity=50)}.s-step-disabled,.s-step-disabled *{cursor:text!important}.s-step-active.s-step-disabled{opacity:1}.s-step-index{background-color:#fff;border:3px solid #ccc;border-radius:50%;color:#999;display:inline-block;font-weight:700;position:relative;transition:background-color .2s ease-out;height:40px;width:40px;-ms-flex:none;flex:none}.s-step-index .s-step-index-content{line-height:18px;font-size:18px;padding-top:8.5px;text-align:center;position:relative;cursor:pointer}.s-step-index:hover{background-color:#f7f7f7}.s-step-warning .s-step-index .s-step-index-content{padding-top:7px}.s-step-visited .s-step-index{border-color:#7892a1;animation:.1s ease-out alternate scale-up-center;background-color:#7892a1}.s-step-visited .s-step-index-content>span{color:#fff}.s-step-active.s-step-progress-bar,.s-step-visited.s-step-progress-bar{background-position:left bottom}.s-step-active .s-step-index{border-color:#7892a1;color:#7892a1;cursor:default}.s-step-active .s-step-label{color:#333;font-weight:700}@media (max-width:767px){.s-step-label{display:none}}@keyframes scale-up-center{0%{transform:scale(.5)}100%{transform:scale(1)}}.failed-status .fa-exclamation-triangle{color:#fff}.failed-status .s-step-index{border-color:#de3218!important;background-color:#de3218!important}.success-status .s-step-index{border-color:#1e973a!important;background-color:#1e973a!important}.loading-status .s-step-index{border-color:#72a9cf!important;background-color:#72a9cf!important;color:#72a9cf}@keyframes blink{0%,100%{opacity:.8}50%{opacity:.5}}@keyframes rotate-and-pause{0%,10%{transform:rotate(0)}10%,45%{transform:rotate(180deg)}100%,55%{transform:rotate(360deg)}}.fa-hourglass-half{animation:3s linear infinite blink,4s linear infinite rotate-and-pause}"]
|
|
5271
5356
|
})
|
|
5272
5357
|
], EventStepsComponent);
|
|
5273
5358
|
return EventStepsComponent;
|