@seniorsistemas/yms-integration 1.35.0 → 1.36.0-15117912-25b1-4e30-9f5f-7a7f4d9cc22e
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 +72 -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/insert-key/insert-key.component.js +2 -1
- 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 +56 -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/esm2015/src/wms/entities/document/find-documents-input.js +1 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +3 -9
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +2 -1
- 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 +58 -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/esm5/src/wms/entities/document/find-documents-input.js +1 -1
- package/fesm2015/seniorsistemas-yms-integration.js +70 -21
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +72 -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 +19 -1
- package/src/wms/components/utils/invoice-conditions.d.ts +6 -0
- package/src/wms/entities/document/find-documents-input.d.ts +1 -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();
|
|
@@ -3907,6 +3904,7 @@ var InsertKeyComponent = /** @class */ (function () {
|
|
|
3907
3904
|
var _this = this;
|
|
3908
3905
|
this.isLoading = true;
|
|
3909
3906
|
var key = {
|
|
3907
|
+
purchaseOrder: this.formGroup.get('purchaseOrder').value,
|
|
3910
3908
|
documentKeys: [this.formGroup.get('key').value],
|
|
3911
3909
|
invoices: [{
|
|
3912
3910
|
number: this.formGroup.get('invoiceNumber').value,
|
|
@@ -4171,15 +4169,27 @@ var DocumentListDescritor = /** @class */ (function () {
|
|
|
4171
4169
|
}());
|
|
4172
4170
|
var DocumentListComponent = /** @class */ (function (_super) {
|
|
4173
4171
|
__extends(DocumentListComponent, _super);
|
|
4174
|
-
function DocumentListComponent(documentService) {
|
|
4172
|
+
function DocumentListComponent(documentService, translate, utils) {
|
|
4175
4173
|
var _this = _super.call(this) || this;
|
|
4176
4174
|
_this.documentService = documentService;
|
|
4175
|
+
_this.translate = translate;
|
|
4176
|
+
_this.utils = utils;
|
|
4177
4177
|
_this.getColumns = [];
|
|
4178
4178
|
_this.documents = [];
|
|
4179
|
+
_this.amendedDocuments = [];
|
|
4179
4180
|
_this.labels = [];
|
|
4180
4181
|
_this.selected = [];
|
|
4181
4182
|
_this.gridLoading = true;
|
|
4182
4183
|
_this.ngUnsubscribe = new Subject();
|
|
4184
|
+
_this.invoiceConditions = [
|
|
4185
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
4186
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
4187
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
4188
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
4189
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolution"), value: InvoiceCondition.DEVOLUTION },
|
|
4190
|
+
{ label: _this.translate.instant("yms.int.wms_grid_document_invoice_condition_rejected"), value: InvoiceCondition.REJECTED },
|
|
4191
|
+
];
|
|
4192
|
+
_this.isAuthorized = function (condition) { return (condition === InvoiceCondition.AUTHORIZED); };
|
|
4183
4193
|
return _this;
|
|
4184
4194
|
}
|
|
4185
4195
|
DocumentListComponent.prototype.getColumnLabels = function () {
|
|
@@ -4226,6 +4236,42 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4226
4236
|
_this.searchDocument(event);
|
|
4227
4237
|
});
|
|
4228
4238
|
};
|
|
4239
|
+
DocumentListComponent.prototype.getFilteredInvoiceConditions = function (invoiceConditions) {
|
|
4240
|
+
if (invoiceConditions === InvoiceCondition.AUTHORIZED) {
|
|
4241
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value === InvoiceCondition.AUTHORIZED; });
|
|
4242
|
+
}
|
|
4243
|
+
else {
|
|
4244
|
+
return this.invoiceConditions.filter(function (cond) { return cond.value !== InvoiceCondition.AUTHORIZED; });
|
|
4245
|
+
}
|
|
4246
|
+
};
|
|
4247
|
+
DocumentListComponent.prototype.onInvoiceConditionChange = function (event, document) {
|
|
4248
|
+
var _this = this;
|
|
4249
|
+
this.disabled = true;
|
|
4250
|
+
document.invoiceCondition = event.value;
|
|
4251
|
+
if (this.amendedDocuments.length > 0) {
|
|
4252
|
+
this.amendedDocuments.forEach(function (doc) {
|
|
4253
|
+
if (doc.id === document.id) {
|
|
4254
|
+
doc.invoiceCondition = event.value;
|
|
4255
|
+
}
|
|
4256
|
+
else {
|
|
4257
|
+
_this.amendedDocuments.push(document);
|
|
4258
|
+
}
|
|
4259
|
+
});
|
|
4260
|
+
}
|
|
4261
|
+
else {
|
|
4262
|
+
this.amendedDocuments.push(document);
|
|
4263
|
+
}
|
|
4264
|
+
};
|
|
4265
|
+
DocumentListComponent.prototype.save = function () {
|
|
4266
|
+
var _this = this;
|
|
4267
|
+
this.amendedDocuments.forEach(function (document) {
|
|
4268
|
+
_this.documentService.update(document.id, document).subscribe(function () {
|
|
4269
|
+
_this.utils.message("success", "yms.int.wms_saved_document_message_title", "saved_message_content");
|
|
4270
|
+
_this.disabled = false;
|
|
4271
|
+
});
|
|
4272
|
+
});
|
|
4273
|
+
this.amendedDocuments = [];
|
|
4274
|
+
};
|
|
4229
4275
|
DocumentListComponent.prototype.searchDocument = function (event) {
|
|
4230
4276
|
var _this = this;
|
|
4231
4277
|
var size = event.rows;
|
|
@@ -4256,10 +4302,12 @@ var DocumentListComponent = /** @class */ (function (_super) {
|
|
|
4256
4302
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4257
4303
|
DocumentListComponent = __decorate([
|
|
4258
4304
|
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}"]
|
|
4305
|
+
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]=\"getFilteredInvoiceConditions(rowData?.invoiceCondition)\"\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>",
|
|
4306
|
+
styles: [".table-col-width{width:250px}.button-save{margin:5px 0}"]
|
|
4261
4307
|
}),
|
|
4262
|
-
__metadata("design:paramtypes", [DocumentService
|
|
4308
|
+
__metadata("design:paramtypes", [DocumentService,
|
|
4309
|
+
TranslateService,
|
|
4310
|
+
UtilsMessageService])
|
|
4263
4311
|
], DocumentListComponent);
|
|
4264
4312
|
return DocumentListComponent;
|
|
4265
4313
|
}(DocumentListDescritor));
|
|
@@ -4275,7 +4323,10 @@ var DocumentListModule = /** @class */ (function () {
|
|
|
4275
4323
|
CommonModule,
|
|
4276
4324
|
TranslateModule,
|
|
4277
4325
|
LoadingStateModule,
|
|
4278
|
-
TableModule
|
|
4326
|
+
TableModule,
|
|
4327
|
+
DropdownModule,
|
|
4328
|
+
ButtonModule,
|
|
4329
|
+
FormsModule
|
|
4279
4330
|
],
|
|
4280
4331
|
declarations: [DocumentListComponent],
|
|
4281
4332
|
entryComponents: [DocumentListComponent],
|