@seniorsistemas/yms-integration 1.34.0-f92e36ef-86fe-4fc7-9c1b-d5eb149d27e7 → 1.35.0-edb4b1f3-35b3-4e2e-822e-0ece0140f6fb
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/seniorsistemas-yms-integration.umd.js +63 -21
- package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +3 -9
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +3 -10
- package/esm2015/src/wms/components/document-list/document-list.component.js +48 -5
- package/esm2015/src/wms/components/document-list/document-list.module.js +8 -3
- package/esm2015/src/wms/components/utils/invoice-conditions.js +12 -0
- package/esm5/src/wms/components/document-grid/document-grid.component.js +3 -9
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +3 -10
- package/esm5/src/wms/components/document-list/document-list.component.js +50 -5
- package/esm5/src/wms/components/document-list/document-list.module.js +8 -3
- package/esm5/src/wms/components/utils/invoice-conditions.js +12 -0
- package/fesm2015/seniorsistemas-yms-integration.js +61 -21
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +63 -21
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +4 -4
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +1 -1
- package/src/wms/components/document-list/document-list.component.d.ts +15 -1
- package/src/wms/components/utils/invoice-conditions.d.ts +6 -0
|
@@ -3297,6 +3297,17 @@ var InvoiceCondition;
|
|
|
3297
3297
|
InvoiceCondition["REJECTED"] = "REJECTED";
|
|
3298
3298
|
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3299
3299
|
|
|
3300
|
+
function getInvoiceConditions(translate) {
|
|
3301
|
+
return [
|
|
3302
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3303
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3304
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3305
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3306
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3307
|
+
{ label: translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3308
|
+
];
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3300
3311
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3301
3312
|
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3302
3313
|
this.translate = translate;
|
|
@@ -3308,16 +3319,9 @@ var DocumentGridComponent = /** @class */ (function () {
|
|
|
3308
3319
|
this.viewDocument = new EventEmitter();
|
|
3309
3320
|
this.gridData = [];
|
|
3310
3321
|
this.enableButtonIsClienteExterno = true;
|
|
3322
|
+
this.invoiceConditions = getInvoiceConditions(this.translate);
|
|
3311
3323
|
this.summary = "yms.int.wms_saved_document_message_title";
|
|
3312
3324
|
this.ngUnsubscribe = new Subject();
|
|
3313
|
-
this.invoiceConditions = [
|
|
3314
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3315
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3316
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3317
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3318
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3319
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3320
|
-
];
|
|
3321
3325
|
this.selection = [];
|
|
3322
3326
|
}
|
|
3323
3327
|
DocumentGridComponent.prototype.getFilteredInvoiceConditions = function (invoiceConditions) {
|
|
@@ -3701,14 +3705,7 @@ var RegisterDocumentComponent = /** @class */ (function () {
|
|
|
3701
3705
|
this.visible = new EventEmitter();
|
|
3702
3706
|
this.visibleChange = new EventEmitter();
|
|
3703
3707
|
this.isSaveFormValid = false;
|
|
3704
|
-
this.invoiceCondition =
|
|
3705
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3706
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3707
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3708
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3709
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
3710
|
-
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
3711
|
-
];
|
|
3708
|
+
this.invoiceCondition = getInvoiceConditions(this.translate);
|
|
3712
3709
|
}
|
|
3713
3710
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3714
3711
|
this.getFormGroup();
|
|
@@ -4171,15 +4168,27 @@ var DocumentListDescritor = /** @class */ (function () {
|
|
|
4171
4168
|
}());
|
|
4172
4169
|
var DocumentListComponent = /** @class */ (function (_super) {
|
|
4173
4170
|
__extends(DocumentListComponent, _super);
|
|
4174
|
-
function DocumentListComponent(documentService) {
|
|
4171
|
+
function DocumentListComponent(documentService, translate, utils) {
|
|
4175
4172
|
var _this = _super.call(this) || this;
|
|
4176
4173
|
_this.documentService = documentService;
|
|
4174
|
+
_this.translate = translate;
|
|
4175
|
+
_this.utils = utils;
|
|
4177
4176
|
_this.getColumns = [];
|
|
4178
4177
|
_this.documents = [];
|
|
4178
|
+
_this.amendedDocuments = [];
|
|
4179
4179
|
_this.labels = [];
|
|
4180
4180
|
_this.selected = [];
|
|
4181
4181
|
_this.gridLoading = true;
|
|
4182
4182
|
_this.ngUnsubscribe = new Subject();
|
|
4183
|
+
_this.invoiceConditions = [
|
|
4184
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
4185
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
4186
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
4187
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
4188
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
4189
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
4190
|
+
];
|
|
4191
|
+
_this.isAuthorized = function (condition) { return (condition === InvoiceCondition.AUTHORIZED); };
|
|
4183
4192
|
return _this;
|
|
4184
4193
|
}
|
|
4185
4194
|
DocumentListComponent.prototype.getColumnLabels = function () {
|
|
@@ -4226,6 +4235,34 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4226
4235
|
_this.searchDocument(event);
|
|
4227
4236
|
});
|
|
4228
4237
|
};
|
|
4238
|
+
DocumentListComponent.prototype.onInvoiceConditionChange = function (event, document) {
|
|
4239
|
+
var _this = this;
|
|
4240
|
+
this.disabled = true;
|
|
4241
|
+
document.invoiceCondition = event.value;
|
|
4242
|
+
if (this.amendedDocuments.length > 0) {
|
|
4243
|
+
this.amendedDocuments.forEach(function (doc) {
|
|
4244
|
+
if (doc.id === document.id) {
|
|
4245
|
+
doc.invoiceCondition = event.value;
|
|
4246
|
+
}
|
|
4247
|
+
else {
|
|
4248
|
+
_this.amendedDocuments.push(document);
|
|
4249
|
+
}
|
|
4250
|
+
});
|
|
4251
|
+
}
|
|
4252
|
+
else {
|
|
4253
|
+
this.amendedDocuments.push(document);
|
|
4254
|
+
}
|
|
4255
|
+
};
|
|
4256
|
+
DocumentListComponent.prototype.save = function () {
|
|
4257
|
+
var _this = this;
|
|
4258
|
+
this.amendedDocuments.forEach(function (document) {
|
|
4259
|
+
_this.documentService.update(document.id, document).subscribe(function () {
|
|
4260
|
+
_this.utils.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
4261
|
+
_this.disabled = false;
|
|
4262
|
+
});
|
|
4263
|
+
});
|
|
4264
|
+
this.amendedDocuments = [];
|
|
4265
|
+
};
|
|
4229
4266
|
DocumentListComponent.prototype.searchDocument = function (event) {
|
|
4230
4267
|
var _this = this;
|
|
4231
4268
|
var size = event.rows;
|
|
@@ -4256,10 +4293,12 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4256
4293
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4257
4294
|
DocumentListComponent = __decorate([
|
|
4258
4295
|
Component({
|
|
4259
|
-
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceKey || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n
|
|
4260
|
-
styles: [".table-col-width{width:250px}"]
|
|
4296
|
+
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceKey || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"invoiceConditions\"\n appendTo=\"body\"\n [(ngModel)]=\"rowData.invoiceCondition\"\n [disabled]=\"isAuthorized(rowData.invoiceCondition)\"\n (onChange)=\"onInvoiceConditionChange($event, rowData)\">\n </p-dropdown>\n </td>\n <td>{{ rowData?.notes || 'N/A' }}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td>{{rowData?.key}}</td>\n <td>{{rowData?.partnerName}}</td>\n <td>{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td>{{rowData?.invoiceKey}}</td>\n <td>{{rowData?.invoiceNumber}}</td>\n <td>{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <span>\n {{ gridTotalRecords + \" \" + \n ('yms.int.wms_register_document_total_elements' | translate:{value: gridTotalRecords}) }}\n </span>\n </ng-template>\n </p-table>\n <div class=\"button-save\">\n <s-button priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"!disabled || !this.documents\"\n (click)=\"save()\">\n </s-button>\n </div>\n </div>\n</div>",
|
|
4297
|
+
styles: [".table-col-width{width:250px}.button-save{margin:5px 0}"]
|
|
4261
4298
|
}),
|
|
4262
|
-
__metadata("design:paramtypes", [DocumentService
|
|
4299
|
+
__metadata("design:paramtypes", [DocumentService,
|
|
4300
|
+
TranslateService,
|
|
4301
|
+
UtilsMessageService])
|
|
4263
4302
|
], DocumentListComponent);
|
|
4264
4303
|
return DocumentListComponent;
|
|
4265
4304
|
}(DocumentListDescritor));
|
|
@@ -4275,7 +4314,10 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
4275
4314
|
CommonModule,
|
|
4276
4315
|
TranslateModule,
|
|
4277
4316
|
LoadingStateModule,
|
|
4278
|
-
TableModule
|
|
4317
|
+
TableModule,
|
|
4318
|
+
DropdownModule,
|
|
4319
|
+
ButtonModule,
|
|
4320
|
+
FormsModule
|
|
4279
4321
|
],
|
|
4280
4322
|
declarations: [DocumentListComponent],
|
|
4281
4323
|
entryComponents: [DocumentListComponent],
|