@senior-agronegocio/angular-components 0.0.64 → 0.0.65
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 +199 -95
- 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/numbers.d.ts +6 -0
- package/components/cancel-event-dialog/cancel-event-dialog-config.d.ts +7 -0
- package/components/cancel-event-dialog/cancel-event-dialog.component.d.ts +33 -0
- package/components/cancel-event-dialog/cancel-event-dialog.module.d.ts +2 -0
- package/components/cancel-event-dialog/index.d.ts +3 -0
- package/components/event-control-board/common/event-operation.d.ts +5 -1
- package/components/event-control-board/event-control-board.component.d.ts +5 -4
- package/components/event-control-board/index.d.ts +2 -0
- package/components/index.d.ts +1 -0
- package/esm2015/common/numbers.js +8 -0
- package/esm2015/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -0
- package/esm2015/components/cancel-event-dialog/cancel-event-dialog.component.js +115 -0
- package/esm2015/components/cancel-event-dialog/cancel-event-dialog.module.js +27 -0
- package/esm2015/components/cancel-event-dialog/index.js +3 -0
- package/esm2015/components/event-control-board/common/event-control-constants.js +5 -1
- package/esm2015/components/event-control-board/common/event-operation.js +5 -1
- package/esm2015/components/event-control-board/event-control-board.component.js +21 -54
- package/esm2015/components/event-control-board/event-control-board.module.js +6 -4
- package/esm2015/components/event-control-board/index.js +2 -1
- package/esm2015/components/index.js +2 -1
- package/esm2015/services/i18n/en-US.js +4 -3
- package/esm2015/services/i18n/es-CO.js +4 -3
- package/esm2015/services/i18n/pt-BR.js +10 -5
- package/esm5/common/numbers.js +8 -0
- package/esm5/components/cancel-event-dialog/cancel-event-dialog-config.js +1 -0
- package/esm5/components/cancel-event-dialog/cancel-event-dialog.component.js +117 -0
- package/esm5/components/cancel-event-dialog/cancel-event-dialog.module.js +30 -0
- package/esm5/components/cancel-event-dialog/index.js +3 -0
- package/esm5/components/event-control-board/common/event-control-constants.js +5 -1
- package/esm5/components/event-control-board/common/event-operation.js +5 -1
- package/esm5/components/event-control-board/event-control-board.component.js +21 -56
- package/esm5/components/event-control-board/event-control-board.module.js +6 -4
- package/esm5/components/event-control-board/index.js +2 -1
- package/esm5/components/index.js +2 -1
- package/esm5/services/i18n/en-US.js +4 -3
- package/esm5/services/i18n/es-CO.js +4 -3
- package/esm5/services/i18n/pt-BR.js +10 -5
- package/fesm2015/senior-agronegocio-angular-components.js +197 -98
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +202 -100
- 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 +1 -0
- package/services/i18n/es-CO.d.ts +1 -0
- package/services/i18n/pt-BR.d.ts +5 -0
- package/components/event-control-board/common/origin-operation.d.ts +0 -5
- package/esm2015/components/event-control-board/common/origin-operation.js +0 -7
- package/esm5/components/event-control-board/common/origin-operation.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __read, __values, __awaiter, __generator, __spread, __decorate, __extends, __assign } from 'tslib';
|
|
2
2
|
import moment from 'moment';
|
|
3
|
-
import { Subject, BehaviorSubject, of, throwError
|
|
3
|
+
import { Subject, BehaviorSubject, of, throwError } from 'rxjs';
|
|
4
4
|
import sockjsClient from 'sockjs-client';
|
|
5
5
|
import { ɵɵdefineInjectable, Injectable, ɵɵinject, NgModule, Input, Component, LOCALE_ID, EventEmitter, Output, Pipe, InjectionToken } from '@angular/core';
|
|
6
6
|
import { filter, take, finalize, switchMap, map, catchError, takeUntil } from 'rxjs/operators';
|
|
@@ -8,9 +8,9 @@ import { Client, FrameImpl } from '@stomp/stompjs';
|
|
|
8
8
|
import { get } from 'js-cookie';
|
|
9
9
|
import { CommonModule, registerLocaleData } from '@angular/common';
|
|
10
10
|
import localePt from '@angular/common/locales/pt';
|
|
11
|
-
import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
-
import { ButtonPriority,
|
|
13
|
-
import { MessageService as MessageService$1,
|
|
11
|
+
import { Validators, FormControl, FormGroup, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
+
import { ButtonPriority, FormField, FieldType, BadgeColors, StepState as StepState$1, ButtonModule, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, SidebarModule, LoadingStateModule, NumberInputModule, TableModule as TableModule$1, ObjectCardModule, LocaleModule, BadgeModule } from '@seniorsistemas/angular-components';
|
|
13
|
+
import { DynamicDialogConfig, DynamicDialogRef, MessageService as MessageService$1, DialogService, DialogModule, FieldsetModule } from 'primeng';
|
|
14
14
|
import { HttpParams, HttpClient } from '@angular/common/http';
|
|
15
15
|
import { MessageService, SharedModule as SharedModule$1 } from 'primeng/api';
|
|
16
16
|
import { user } from '@seniorsistemas/senior-platform-data';
|
|
@@ -3345,7 +3345,7 @@ var ptBR = {
|
|
|
3345
3345
|
"agro.angular_components.error_invalid": "Valor inválido",
|
|
3346
3346
|
"agro.angular_components.error_max_length": "O valor máximo de caracteres é {0}",
|
|
3347
3347
|
"agro.angular_components.error_max_value": "O valor máximo é {0}",
|
|
3348
|
-
"agro.angular_components.error_min_length": "O valor mínimo de caracteres é {
|
|
3348
|
+
"agro.angular_components.error_min_length": "O valor mínimo de caracteres é {valor}",
|
|
3349
3349
|
"agro.angular_components.error_min_value": "O valor mínimo é {0}",
|
|
3350
3350
|
"agro.angular_components.error_not_found_description": "O recurso solicitado não foi encontrado",
|
|
3351
3351
|
"agro.angular_components.error_not_found_title": "Não encontrado",
|
|
@@ -3469,8 +3469,8 @@ var ptBR = {
|
|
|
3469
3469
|
"agro.angular_components.CHANGE_REQUEST": "Solicitação de alteração",
|
|
3470
3470
|
"agro.angular_components.CHANGE_RESPONSE": "Resposta da solicitação de alteração",
|
|
3471
3471
|
"agro.angular_components.PROCESS_FIXATION": "Processa a fixação",
|
|
3472
|
-
"agro.angular_components.TRANSFER_CREATE_INCOMING_INVOICE": "
|
|
3473
|
-
"agro.angular_components.TRANSFER_CREATE_OUTGOING_INVOICE": "
|
|
3472
|
+
"agro.angular_components.TRANSFER_CREATE_INCOMING_INVOICE": "Emissão NF de entrada",
|
|
3473
|
+
"agro.angular_components.TRANSFER_CREATE_OUTGOING_INVOICE": "Emissão NF de saída",
|
|
3474
3474
|
"agro.angular_components.TRANSFER_PRODUCER_BALANCE": "Transferência de saldo entre produtores",
|
|
3475
3475
|
"agro.angular_components.control_code": "Identificador",
|
|
3476
3476
|
"agro.angular_components.fixation_event": "Fixação",
|
|
@@ -3496,7 +3496,12 @@ var ptBR = {
|
|
|
3496
3496
|
"agro.angular_components.invoice_type_OUTGOING": "Saída",
|
|
3497
3497
|
"agro.angular_components.invoice_type_RETURN": "Devolução",
|
|
3498
3498
|
"agro.angular_components.invoice_type_SERVICE": "Serviço",
|
|
3499
|
-
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolução simbólica"
|
|
3499
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolução simbólica",
|
|
3500
|
+
"agro.angular_components.cancel_reason": "Motivo do cancelamento",
|
|
3501
|
+
"agro.angular_components.TRANSFER_CANCEL_INCOMING_INVOICE": "Cancelamento de NF de entrada",
|
|
3502
|
+
"agro.angular_components.TRANSFER_CANCEL_OUTGOING_INVOICE": "Cancelamento de NF de saída ",
|
|
3503
|
+
"agro.angular_components.TRANSFER_REVERSE_PRODUCER_BALANCE": "Estorno dos saldos de produtores",
|
|
3504
|
+
"agro.angular_components.TRANSFER_CONCLUDE_CANCEL": "Conclusão do cancelamento",
|
|
3500
3505
|
};
|
|
3501
3506
|
|
|
3502
3507
|
var enUS = {
|
|
@@ -3575,7 +3580,7 @@ var enUS = {
|
|
|
3575
3580
|
"agro.angular_components.error_invalid": "Invalid value",
|
|
3576
3581
|
"agro.angular_components.error_max_length": "The maximum number of characters is {0}",
|
|
3577
3582
|
"agro.angular_components.error_max_value": "The maximum value is {0}",
|
|
3578
|
-
"agro.angular_components.error_min_length": "The minimum number of characters is {
|
|
3583
|
+
"agro.angular_components.error_min_length": "The minimum number of characters is {valor}",
|
|
3579
3584
|
"agro.angular_components.error_min_value": "The minimum value is {0}",
|
|
3580
3585
|
"agro.angular_components.error_not_found_description": "The requested resource was not found",
|
|
3581
3586
|
"agro.angular_components.error_not_found_title": "Not found",
|
|
@@ -3726,7 +3731,8 @@ var enUS = {
|
|
|
3726
3731
|
"agro.angular_components.invoice_type_OUTGOING": "Outgoing",
|
|
3727
3732
|
"agro.angular_components.invoice_type_RETURN": "Return",
|
|
3728
3733
|
"agro.angular_components.invoice_type_SERVICE": "Service",
|
|
3729
|
-
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Symbolic return"
|
|
3734
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Symbolic return",
|
|
3735
|
+
"agro.angular_components.cancel_reason": "Cancellation reason"
|
|
3730
3736
|
};
|
|
3731
3737
|
|
|
3732
3738
|
var esCO = {
|
|
@@ -3805,7 +3811,7 @@ var esCO = {
|
|
|
3805
3811
|
"agro.angular_components.error_invalid": "Valor inválido",
|
|
3806
3812
|
"agro.angular_components.error_max_length": "El valor máximo de caracteres es {0}",
|
|
3807
3813
|
"agro.angular_components.error_max_value": "El valor máximo es {0}",
|
|
3808
|
-
"agro.angular_components.error_min_length": "El valor mínimo de caracteres es {
|
|
3814
|
+
"agro.angular_components.error_min_length": "El valor mínimo de caracteres es {valor}",
|
|
3809
3815
|
"agro.angular_components.error_min_value": "El valor mínimo es {0}",
|
|
3810
3816
|
"agro.angular_components.error_not_found_description": "El recurso solicitado no fue encontrado",
|
|
3811
3817
|
"agro.angular_components.error_not_found_title": "No encontrado",
|
|
@@ -3956,7 +3962,8 @@ var esCO = {
|
|
|
3956
3962
|
"agro.angular_components.invoice_type_OUTGOING": "Salida",
|
|
3957
3963
|
"agro.angular_components.invoice_type_RETURN": "Devolución",
|
|
3958
3964
|
"agro.angular_components.invoice_type_SERVICE": "Servicio",
|
|
3959
|
-
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolución simbólica"
|
|
3965
|
+
"agro.angular_components.invoice_type_SYMBOLIC_RETURN": "Devolución simbólica",
|
|
3966
|
+
"agro.angular_components.cancel_reason": "Motivo de la cancelación"
|
|
3960
3967
|
};
|
|
3961
3968
|
|
|
3962
3969
|
var LibTranslationService = /** @class */ (function () {
|
|
@@ -4010,15 +4017,121 @@ var LibTranslationService = /** @class */ (function () {
|
|
|
4010
4017
|
return LibTranslationService;
|
|
4011
4018
|
}());
|
|
4012
4019
|
|
|
4013
|
-
var
|
|
4014
|
-
(function (
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4020
|
+
var NUMBERS;
|
|
4021
|
+
(function (NUMBERS) {
|
|
4022
|
+
NUMBERS[NUMBERS["ZERO"] = 0] = "ZERO";
|
|
4023
|
+
NUMBERS[NUMBERS["TWELVE"] = 12] = "TWELVE";
|
|
4024
|
+
NUMBERS[NUMBERS["FIFTEEN"] = 15] = "FIFTEEN";
|
|
4025
|
+
NUMBERS[NUMBERS["HUNDRED"] = 100] = "HUNDRED";
|
|
4026
|
+
})(NUMBERS || (NUMBERS = {}));
|
|
4027
|
+
|
|
4028
|
+
var CancelEventDialogComponent = /** @class */ (function () {
|
|
4029
|
+
function CancelEventDialogComponent(formBuilder, config, ref, translate) {
|
|
4030
|
+
this.formBuilder = formBuilder;
|
|
4031
|
+
this.config = config;
|
|
4032
|
+
this.ref = ref;
|
|
4033
|
+
this.translate = translate;
|
|
4034
|
+
this.loading = false;
|
|
4035
|
+
this.reasonMinLength = NUMBERS.FIFTEEN;
|
|
4036
|
+
this.ngUnsubscribe = new Subject();
|
|
4037
|
+
this.cpSize = {
|
|
4038
|
+
sm: 12,
|
|
4039
|
+
md: NUMBERS.TWELVE,
|
|
4040
|
+
lg: NUMBERS.TWELVE,
|
|
4041
|
+
xl: NUMBERS.TWELVE,
|
|
4042
|
+
};
|
|
4043
|
+
this.priority = ButtonPriority;
|
|
4044
|
+
}
|
|
4045
|
+
CancelEventDialogComponent.prototype.ngOnInit = function () {
|
|
4046
|
+
this.setFormGroup();
|
|
4047
|
+
this.setFormFields();
|
|
4048
|
+
this.setDataConfigDialog();
|
|
4049
|
+
this.setTranslations();
|
|
4050
|
+
};
|
|
4051
|
+
CancelEventDialogComponent.prototype.ngOnDestroy = function () {
|
|
4052
|
+
this.ngUnsubscribe.next();
|
|
4053
|
+
this.ngUnsubscribe.complete();
|
|
4054
|
+
};
|
|
4055
|
+
CancelEventDialogComponent.prototype.setFormGroup = function () {
|
|
4056
|
+
this.formGroup = this.formBuilder.group({
|
|
4057
|
+
reason: [{ value: null, disabled: false }, Validators.compose([Validators.required, Validators.minLength(this.reasonMinLength)])],
|
|
4058
|
+
});
|
|
4059
|
+
};
|
|
4060
|
+
CancelEventDialogComponent.prototype.setFormFields = function () {
|
|
4061
|
+
this.formFields = [
|
|
4062
|
+
new FormField({
|
|
4063
|
+
name: "reason",
|
|
4064
|
+
label: this.translate.instant("agro.angular_components.cancel_reason"),
|
|
4065
|
+
type: FieldType.String,
|
|
4066
|
+
multiple: false,
|
|
4067
|
+
required: function () { return true; },
|
|
4068
|
+
size: this.cpSize,
|
|
4069
|
+
maxLength: NUMBERS.HUNDRED,
|
|
4070
|
+
}),
|
|
4071
|
+
];
|
|
4072
|
+
};
|
|
4073
|
+
CancelEventDialogComponent.prototype.setDataConfigDialog = function () {
|
|
4074
|
+
var _a, _b, _c, _d;
|
|
4075
|
+
this.cancelEventDialogConfig = (_b = (_a = this.config.data) === null || _a === void 0 ? void 0 : _a.cancelEventDialogConfig) !== null && _b !== void 0 ? _b : {};
|
|
4076
|
+
this.reasonMinLength = (_d = (_c = this.cancelEventDialogConfig) === null || _c === void 0 ? void 0 : _c.reasonMinLength) !== null && _d !== void 0 ? _d : NUMBERS.FIFTEEN;
|
|
4077
|
+
};
|
|
4078
|
+
CancelEventDialogComponent.prototype.setTranslations = function () {
|
|
4079
|
+
this.translations = {
|
|
4080
|
+
required: this.translate.instant("agro.angular_components.error_required"),
|
|
4081
|
+
min: this.translate.instant("agro.angular_components.error_min_value"),
|
|
4082
|
+
max: this.translate.instant("agro.angular_components.error_max_value"),
|
|
4083
|
+
minlength: this.translate.instant("agro.angular_components.error_min_length", { valor: this.reasonMinLength }),
|
|
4084
|
+
maxlength: this.translate.instant("agro.angular_components.error_max_length_transfer_code"),
|
|
4085
|
+
pattern: this.translate.instant("agro.angular_components.error_invalid"),
|
|
4086
|
+
FormDateError_data1: this.translate.instant("agro.angular_components.initial_invalid_date"),
|
|
4087
|
+
FormDateError_data2: this.translate.instant("agro.angular_components.end_invalid_date"),
|
|
4088
|
+
};
|
|
4089
|
+
};
|
|
4090
|
+
CancelEventDialogComponent.prototype.handleConfirmClick = function () {
|
|
4091
|
+
var _a, _b;
|
|
4092
|
+
if (this.formGroup.invalid && ((_a = this.cancelEventDialogConfig) === null || _a === void 0 ? void 0 : _a.withReason)) {
|
|
4093
|
+
this.validateAllFormFields(this.formGroup);
|
|
4094
|
+
return;
|
|
4095
|
+
}
|
|
4096
|
+
var reason = (_b = this.formGroup.get("reason")) === null || _b === void 0 ? void 0 : _b.value;
|
|
4097
|
+
this.loading = true;
|
|
4098
|
+
this.cancelEventDialogConfig.cancelFunction(reason);
|
|
4099
|
+
this.loading = false;
|
|
4100
|
+
this.ref.close(true);
|
|
4101
|
+
};
|
|
4102
|
+
CancelEventDialogComponent.prototype.validateAllFormFields = function (formGroup) {
|
|
4103
|
+
var _this = this;
|
|
4104
|
+
Object.keys(formGroup.controls).forEach(function (field) {
|
|
4105
|
+
var control = formGroup.get(field);
|
|
4106
|
+
if (control instanceof FormControl) {
|
|
4107
|
+
control.markAsDirty({ onlySelf: true });
|
|
4108
|
+
}
|
|
4109
|
+
if (control instanceof FormGroup) {
|
|
4110
|
+
_this.validateAllFormFields(control);
|
|
4111
|
+
}
|
|
4112
|
+
});
|
|
4113
|
+
};
|
|
4114
|
+
CancelEventDialogComponent.prototype.handleCancelClick = function () {
|
|
4115
|
+
this.ref.close();
|
|
4116
|
+
};
|
|
4117
|
+
CancelEventDialogComponent.ctorParameters = function () { return [
|
|
4118
|
+
{ type: FormBuilder },
|
|
4119
|
+
{ type: DynamicDialogConfig },
|
|
4120
|
+
{ type: DynamicDialogRef },
|
|
4121
|
+
{ type: LibTranslationService }
|
|
4122
|
+
]; };
|
|
4123
|
+
__decorate([
|
|
4124
|
+
Input()
|
|
4125
|
+
], CancelEventDialogComponent.prototype, "cancelEventDialogConfig", void 0);
|
|
4126
|
+
CancelEventDialogComponent = __decorate([
|
|
4127
|
+
Component({
|
|
4128
|
+
selector: "s-cancel-event-dialog",
|
|
4129
|
+
template: "<div class=\"content\" *sLoadingState=\"loading\">\r\n <div class=\"top\">\r\n <div *ngIf=\"cancelEventDialogConfig?.message\" class=\"message-container\">\r\n <span>{{ cancelEventDialogConfig?.message }}</span>\r\n </div>\r\n <div class=\"form-container\" *ngIf=\"cancelEventDialogConfig?.withReason\">\r\n <s-dynamic-form [fields]=\"formFields\" [form]=\"formGroup\" [errorMessages]=\"translations\">\r\n </s-dynamic-form>\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <s-button [priority]=\"priority.Secondary\" label=\"{{ 'agro.angular_components.no' | libTranslate }}\"\r\n (click)=\"handleCancelClick()\"></s-button>\r\n <s-button [priority]=\"priority.Primary\" label=\"{{ 'agro.angular_components.yes' | libTranslate }}\" (click)=\"handleConfirmClick()\"></s-button>\r\n </div>\r\n</div>\r\n",
|
|
4130
|
+
styles: [".message-container{padding:.5rem}.footer{display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;padding:.5rem}.content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;box-sizing:border-box}.content.loading{min-height:150px;display:-ms-flexbox;display:flex;width:100%}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width:760px){.content{-ms-flex-pack:justify;justify-content:space-between}.content .top{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}}"]
|
|
4131
|
+
})
|
|
4132
|
+
], CancelEventDialogComponent);
|
|
4133
|
+
return CancelEventDialogComponent;
|
|
4134
|
+
}());
|
|
4022
4135
|
|
|
4023
4136
|
var EventOperation;
|
|
4024
4137
|
(function (EventOperation) {
|
|
@@ -4042,6 +4155,10 @@ var EventOperation;
|
|
|
4042
4155
|
EventOperation["CANCEL_FINANCIAL_FIXATION"] = "CANCEL_FINANCIAL_FIXATION";
|
|
4043
4156
|
EventOperation["CANCEL_PRODUCER_NET_VALUE_FIXATION"] = "CANCEL_PRODUCER_NET_VALUE_FIXATION";
|
|
4044
4157
|
EventOperation["CANCEL_FIXATION"] = "CANCEL_FIXATION";
|
|
4158
|
+
EventOperation["TRANSFER_CANCEL_INCOMING_INVOICE"] = "TRANSFER_CANCEL_INCOMING_INVOICE";
|
|
4159
|
+
EventOperation["TRANSFER_CANCEL_OUTGOING_INVOICE"] = "TRANSFER_CANCEL_OUTGOING_INVOICE";
|
|
4160
|
+
EventOperation["TRANSFER_REVERSE_PRODUCER_BALANCE"] = "TRANSFER_REVERSE_PRODUCER_BALANCE";
|
|
4161
|
+
EventOperation["TRANSFER_CONCLUDE_CANCEL"] = "TRANSFER_CONCLUDE_CANCEL";
|
|
4045
4162
|
})(EventOperation || (EventOperation = {}));
|
|
4046
4163
|
|
|
4047
4164
|
var EventOrigin;
|
|
@@ -4101,6 +4218,10 @@ var eventItem = [
|
|
|
4101
4218
|
{ label: "agro.angular_components." + EventOperation.CANCEL_FINANCIAL_FIXATION, value: EventOperation.CANCEL_FINANCIAL_FIXATION },
|
|
4102
4219
|
{ label: "agro.angular_components." + EventOperation.CANCEL_PRODUCER_NET_VALUE_FIXATION, value: EventOperation.CANCEL_PRODUCER_NET_VALUE_FIXATION },
|
|
4103
4220
|
{ label: "agro.angular_components." + EventOperation.CANCEL_FIXATION, value: EventOperation.CANCEL_FIXATION },
|
|
4221
|
+
{ label: "agro.angular_components." + EventOperation.TRANSFER_CANCEL_INCOMING_INVOICE, value: EventOperation.TRANSFER_CANCEL_INCOMING_INVOICE },
|
|
4222
|
+
{ label: "agro.angular_components." + EventOperation.TRANSFER_CANCEL_OUTGOING_INVOICE, value: EventOperation.TRANSFER_CANCEL_OUTGOING_INVOICE },
|
|
4223
|
+
{ label: "agro.angular_components." + EventOperation.TRANSFER_REVERSE_PRODUCER_BALANCE, value: EventOperation.TRANSFER_REVERSE_PRODUCER_BALANCE },
|
|
4224
|
+
{ label: "agro.angular_components." + EventOperation.TRANSFER_CONCLUDE_CANCEL, value: EventOperation.TRANSFER_CONCLUDE_CANCEL },
|
|
4104
4225
|
];
|
|
4105
4226
|
var eventStatus = [
|
|
4106
4227
|
{ label: "agro.angular_components.panel_title_events_completed_successfully", value: EventStatus.SUCCESS },
|
|
@@ -4113,6 +4234,27 @@ var inputFieldsPath = [
|
|
|
4113
4234
|
{ path: "invoice", field: InputFields.AGRO_INVOICE_TYPE },
|
|
4114
4235
|
];
|
|
4115
4236
|
|
|
4237
|
+
var InvoiceType;
|
|
4238
|
+
(function (InvoiceType) {
|
|
4239
|
+
InvoiceType["INCOMING"] = "INCOMING";
|
|
4240
|
+
InvoiceType["OUTGOING"] = "OUTGOING";
|
|
4241
|
+
InvoiceType["RETURN"] = "RETURN";
|
|
4242
|
+
InvoiceType["COMPLEMENT"] = "COMPLEMENT";
|
|
4243
|
+
InvoiceType["SYMBOLIC_RETURN"] = "SYMBOLIC_RETURN";
|
|
4244
|
+
InvoiceType["ADJUSTMENT"] = "ADJUSTMENT";
|
|
4245
|
+
InvoiceType["SERVICE"] = "SERVICE";
|
|
4246
|
+
})(InvoiceType || (InvoiceType = {}));
|
|
4247
|
+
|
|
4248
|
+
var invoiceTypeTranslate = [
|
|
4249
|
+
{ value: InvoiceType.INCOMING, label: "agro.angular_components.invoice_type_" + InvoiceType.INCOMING },
|
|
4250
|
+
{ value: InvoiceType.COMPLEMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.COMPLEMENT },
|
|
4251
|
+
{ value: InvoiceType.ADJUSTMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.ADJUSTMENT },
|
|
4252
|
+
{ value: InvoiceType.OUTGOING, label: "agro.angular_components.invoice_type_" + InvoiceType.OUTGOING },
|
|
4253
|
+
{ value: InvoiceType.RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.RETURN },
|
|
4254
|
+
{ value: InvoiceType.SERVICE, label: "agro.angular_components.invoice_type_" + InvoiceType.SERVICE },
|
|
4255
|
+
{ value: InvoiceType.SYMBOLIC_RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.SYMBOLIC_RETURN },
|
|
4256
|
+
];
|
|
4257
|
+
|
|
4116
4258
|
var LookupErrorMessages = {
|
|
4117
4259
|
required: 'agro.angular_components.error_required',
|
|
4118
4260
|
min: 'agro.angular_components.error_min_value',
|
|
@@ -4124,13 +4266,6 @@ var LookupErrorMessages = {
|
|
|
4124
4266
|
FormDateError_data2: 'agro.angular_components.end_invalid_date'
|
|
4125
4267
|
};
|
|
4126
4268
|
|
|
4127
|
-
var OriginOperation;
|
|
4128
|
-
(function (OriginOperation) {
|
|
4129
|
-
OriginOperation["ENTRY_IN_DEPOSIT"] = "ENTRY_IN_DEPOSIT";
|
|
4130
|
-
OriginOperation["IMMEDIATE_BUY_ENTRY"] = "IMMEDIATE_BUY_ENTRY";
|
|
4131
|
-
OriginOperation["ENTRY_TO_BE_FIXED"] = "ENTRY_TO_BE_FIXED";
|
|
4132
|
-
})(OriginOperation || (OriginOperation = {}));
|
|
4133
|
-
|
|
4134
4269
|
var EntityService = /** @class */ (function () {
|
|
4135
4270
|
function EntityService(http, messageService, entityUrl, actionsUrl, queriesUrl, translate) {
|
|
4136
4271
|
this.http = http;
|
|
@@ -4482,36 +4617,15 @@ var PaginatorStorageService = /** @class */ (function () {
|
|
|
4482
4617
|
return PaginatorStorageService;
|
|
4483
4618
|
}());
|
|
4484
4619
|
|
|
4485
|
-
var InvoiceType;
|
|
4486
|
-
(function (InvoiceType) {
|
|
4487
|
-
InvoiceType["INCOMING"] = "INCOMING";
|
|
4488
|
-
InvoiceType["OUTGOING"] = "OUTGOING";
|
|
4489
|
-
InvoiceType["RETURN"] = "RETURN";
|
|
4490
|
-
InvoiceType["COMPLEMENT"] = "COMPLEMENT";
|
|
4491
|
-
InvoiceType["SYMBOLIC_RETURN"] = "SYMBOLIC_RETURN";
|
|
4492
|
-
InvoiceType["ADJUSTMENT"] = "ADJUSTMENT";
|
|
4493
|
-
InvoiceType["SERVICE"] = "SERVICE";
|
|
4494
|
-
})(InvoiceType || (InvoiceType = {}));
|
|
4495
|
-
|
|
4496
|
-
var invoiceTypeTranslate = [
|
|
4497
|
-
{ value: InvoiceType.INCOMING, label: "agro.angular_components.invoice_type_" + InvoiceType.INCOMING },
|
|
4498
|
-
{ value: InvoiceType.COMPLEMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.COMPLEMENT },
|
|
4499
|
-
{ value: InvoiceType.ADJUSTMENT, label: "agro.angular_components.invoice_type_" + InvoiceType.ADJUSTMENT },
|
|
4500
|
-
{ value: InvoiceType.OUTGOING, label: "agro.angular_components.invoice_type_" + InvoiceType.OUTGOING },
|
|
4501
|
-
{ value: InvoiceType.RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.RETURN },
|
|
4502
|
-
{ value: InvoiceType.SERVICE, label: "agro.angular_components.invoice_type_" + InvoiceType.SERVICE },
|
|
4503
|
-
{ value: InvoiceType.SYMBOLIC_RETURN, label: "agro.angular_components.invoice_type_" + InvoiceType.SYMBOLIC_RETURN },
|
|
4504
|
-
];
|
|
4505
|
-
|
|
4506
4620
|
var EventControlBoardComponent = /** @class */ (function () {
|
|
4507
|
-
function EventControlBoardComponent(translate, formBuilder, websocketService, eventControlBoardService, paginatorStorageService, messageService,
|
|
4621
|
+
function EventControlBoardComponent(translate, formBuilder, websocketService, eventControlBoardService, paginatorStorageService, messageService, dialogService) {
|
|
4508
4622
|
this.translate = translate;
|
|
4509
4623
|
this.formBuilder = formBuilder;
|
|
4510
4624
|
this.websocketService = websocketService;
|
|
4511
4625
|
this.eventControlBoardService = eventControlBoardService;
|
|
4512
4626
|
this.paginatorStorageService = paginatorStorageService;
|
|
4513
4627
|
this.messageService = messageService;
|
|
4514
|
-
this.
|
|
4628
|
+
this.dialogService = dialogService;
|
|
4515
4629
|
this.steps = [];
|
|
4516
4630
|
this.showSidebar = false;
|
|
4517
4631
|
this.showReprocessButton = false;
|
|
@@ -4924,52 +5038,15 @@ var EventControlBoardComponent = /** @class */ (function () {
|
|
|
4924
5038
|
this.displayModal = true;
|
|
4925
5039
|
};
|
|
4926
5040
|
EventControlBoardComponent.prototype.openCancelModal = function () {
|
|
4927
|
-
var
|
|
4928
|
-
this.
|
|
4929
|
-
header: this.
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
_this.cancelFixation();
|
|
5041
|
+
var _a;
|
|
5042
|
+
this.dialogService.open(CancelEventDialogComponent, {
|
|
5043
|
+
header: (_a = this.cancelEventDialogConfig) === null || _a === void 0 ? void 0 : _a.header,
|
|
5044
|
+
contentStyle: { "height": "100%" },
|
|
5045
|
+
closable: true,
|
|
5046
|
+
closeOnEscape: false,
|
|
5047
|
+
data: {
|
|
5048
|
+
cancelEventDialogConfig: this.cancelEventDialogConfig,
|
|
4936
5049
|
},
|
|
4937
|
-
reject: function () {
|
|
4938
|
-
_this.gridLoading = false;
|
|
4939
|
-
}
|
|
4940
|
-
});
|
|
4941
|
-
};
|
|
4942
|
-
EventControlBoardComponent.prototype.cancelFixation = function () {
|
|
4943
|
-
var _this = this;
|
|
4944
|
-
var params = {
|
|
4945
|
-
filterQuery: "id eq '" + this.gridData[AGRO_NUMBERS.ZERO].externalId + "'",
|
|
4946
|
-
displayFields: ['*', 'fixationItem']
|
|
4947
|
-
};
|
|
4948
|
-
this.eventControlBoardService.fixationService
|
|
4949
|
-
.list(params)
|
|
4950
|
-
.pipe(takeUntil(this.ngUnsubscribe), switchMap(function (result) {
|
|
4951
|
-
var fixationEntity = result.contents[AGRO_NUMBERS.ZERO];
|
|
4952
|
-
if (fixationEntity.status !== FixationStatus.FINISHED) {
|
|
4953
|
-
_this.addMessage('warn', 'agro.angular_components.warn_cancel_fixation_message_title', 'agro.angular_components.warn_cancel_fixation_message_description');
|
|
4954
|
-
_this.gridLoading = false;
|
|
4955
|
-
return EMPTY;
|
|
4956
|
-
}
|
|
4957
|
-
if (fixationEntity.fixationItem[0].originOperation === OriginOperation.IMMEDIATE_BUY_ENTRY) {
|
|
4958
|
-
_this.addMessage('warn', 'agro.angular_components.warn_cancel_fixation_message_title', 'agro.angular_components.warn_immediate_cancel_fixation_message_description');
|
|
4959
|
-
_this.gridLoading = false;
|
|
4960
|
-
return EMPTY;
|
|
4961
|
-
}
|
|
4962
|
-
return _this.eventControlBoardService.fixationService.cancelFixation({
|
|
4963
|
-
fixationId: _this.gridData[AGRO_NUMBERS.ZERO].externalId
|
|
4964
|
-
});
|
|
4965
|
-
}), catchError(function (err) {
|
|
4966
|
-
_this.addMessage('error', 'agro.angular_components.error_cancel_fixation_message_title', 'agro.angular_components.error_cancel_fixation_message_description');
|
|
4967
|
-
_this.gridLoading = false;
|
|
4968
|
-
throw err;
|
|
4969
|
-
}))
|
|
4970
|
-
.subscribe(function () {
|
|
4971
|
-
_this.addMessage('info', 'agro.angular_components.cancel_fixation_message_title', 'agro.angular_components.cancel_fixation_message_description');
|
|
4972
|
-
_this.gridLoading = false;
|
|
4973
5050
|
});
|
|
4974
5051
|
};
|
|
4975
5052
|
EventControlBoardComponent.prototype.confirmModal = function () {
|
|
@@ -4990,7 +5067,7 @@ var EventControlBoardComponent = /** @class */ (function () {
|
|
|
4990
5067
|
{ type: EventControlBoardService },
|
|
4991
5068
|
{ type: PaginatorStorageService },
|
|
4992
5069
|
{ type: MessageService$1 },
|
|
4993
|
-
{ type:
|
|
5070
|
+
{ type: DialogService }
|
|
4994
5071
|
]; };
|
|
4995
5072
|
__decorate([
|
|
4996
5073
|
Input()
|
|
@@ -5019,6 +5096,9 @@ var EventControlBoardComponent = /** @class */ (function () {
|
|
|
5019
5096
|
__decorate([
|
|
5020
5097
|
Input()
|
|
5021
5098
|
], EventControlBoardComponent.prototype, "showCancelButton", void 0);
|
|
5099
|
+
__decorate([
|
|
5100
|
+
Input()
|
|
5101
|
+
], EventControlBoardComponent.prototype, "cancelEventDialogConfig", void 0);
|
|
5022
5102
|
EventControlBoardComponent = __decorate([
|
|
5023
5103
|
Component({
|
|
5024
5104
|
selector: 'event-control-board',
|
|
@@ -5896,6 +5976,27 @@ var FixationModule = /** @class */ (function () {
|
|
|
5896
5976
|
return FixationModule;
|
|
5897
5977
|
}());
|
|
5898
5978
|
|
|
5979
|
+
var CancelEventDialogModule = /** @class */ (function () {
|
|
5980
|
+
function CancelEventDialogModule() {
|
|
5981
|
+
}
|
|
5982
|
+
CancelEventDialogModule = __decorate([
|
|
5983
|
+
NgModule({
|
|
5984
|
+
imports: [
|
|
5985
|
+
CommonModule,
|
|
5986
|
+
ReactiveFormsModule,
|
|
5987
|
+
TooltipModule,
|
|
5988
|
+
ButtonModule,
|
|
5989
|
+
LibTranslationModule,
|
|
5990
|
+
DynamicFormModule,
|
|
5991
|
+
LoadingStateModule
|
|
5992
|
+
],
|
|
5993
|
+
declarations: [CancelEventDialogComponent],
|
|
5994
|
+
exports: [CancelEventDialogComponent],
|
|
5995
|
+
})
|
|
5996
|
+
], CancelEventDialogModule);
|
|
5997
|
+
return CancelEventDialogModule;
|
|
5998
|
+
}());
|
|
5999
|
+
|
|
5899
6000
|
var EventControlBoardModule = /** @class */ (function () {
|
|
5900
6001
|
function EventControlBoardModule() {
|
|
5901
6002
|
}
|
|
@@ -5925,12 +6026,13 @@ var EventControlBoardModule = /** @class */ (function () {
|
|
|
5925
6026
|
TicketModule,
|
|
5926
6027
|
WebsocketModule,
|
|
5927
6028
|
LibTranslationModule,
|
|
5928
|
-
FixationModule
|
|
6029
|
+
FixationModule,
|
|
6030
|
+
CancelEventDialogModule,
|
|
5929
6031
|
],
|
|
5930
6032
|
declarations: [EventControlBoardComponent],
|
|
5931
6033
|
exports: [EventControlBoardComponent],
|
|
5932
6034
|
providers: [E012famService, E205depService, PaginatorStorageService,
|
|
5933
|
-
EventControlService, EventControlBoardService,
|
|
6035
|
+
EventControlService, EventControlBoardService, DialogService],
|
|
5934
6036
|
})
|
|
5935
6037
|
], EventControlBoardModule);
|
|
5936
6038
|
return EventControlBoardModule;
|
|
@@ -5963,5 +6065,5 @@ var AgroAngularComponentsModule = /** @class */ (function () {
|
|
|
5963
6065
|
* Generated bundle index. Do not edit.
|
|
5964
6066
|
*/
|
|
5965
6067
|
|
|
5966
|
-
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFormValidator, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AsyncLock, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule, E070FilModule, E075DerModule, E205depService, EventControlBoardComponent, EventControlBoardModule, EventControlBoardService, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FixationModule, HostProjectConfigsInjectionToken, HttpCodes, InvoiceModule, LibTranslatePipe, LibTranslationModule, LibTranslationService, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerInvoiceModule, RuralEstateModule, SharedModule, TicketModule, TransferModule, UserInformationService, WebsocketModule, WebsocketService, LibTranslationService as ɵa };
|
|
6068
|
+
export { AGRO_NUMBERS, AGRO_REGEX, AgroAngularComponentsModule, AgroArrayUtils, AgroCookieUtils, AgroDateUtils, AgroEntityStatus, AgroFormValidator, AgroNameUtils, AgroNumberUtils, AgroObjectUtils, AgroPlatformUtils, AgroStringMasks, AgroStringUtils, AsyncLock, CancelEventDialogComponent, CancelEventDialogModule, Colors, DateComparisonType, E001TnsModule, E001pesModule, E070EmpModule, E070FilModule, E075DerModule, E205depService, EventControlBoardComponent, EventControlBoardModule, EventControlBoardService, EventControlItemModule, EventControlModule, EventStepsComponent, EventStepsModule, ExternalInvoiceModule, FixationModule, HostProjectConfigsInjectionToken, HttpCodes, InvoiceModule, LibTranslatePipe, LibTranslationModule, LibTranslationService, NumberComparisonType, OriginationModule, PaginatorStorageService, PrimitiveManager, ProducerInvoiceModule, RuralEstateModule, SharedModule, TicketModule, TransferModule, UserInformationService, WebsocketModule, WebsocketService, LibTranslationService as ɵa };
|
|
5967
6069
|
//# sourceMappingURL=senior-agronegocio-angular-components.js.map
|