@colijnit/sharedcomponents 1.0.50 → 1.0.51
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/colijnit-sharedcomponents.umd.js +124 -44
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +163 -110
- package/esm2015/lib/components/stock/components/stock-prognose/stock-prognose.component.js +20 -11
- package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +5 -3
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +5 -9
- package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +13 -6
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +37 -23
- package/esm2015/lib/components/stock/stock.module.js +4 -3
- package/esm2015/lib/components/tab-bar/tab-bar.component.js +4 -2
- package/esm2015/lib/service/stock.service.js +3 -2
- package/fesm2015/colijnit-sharedcomponents.js +241 -159
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/stock/components/stock-location/stock-location.component.d.ts +16 -14
- package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +2 -1
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +9 -3
- package/lib/components/stock/style/_layout.scss +89 -8
- package/lib/components/stock/style/_material-definition.scss +4 -3
- package/lib/components/tab-bar/style/_layout.scss +28 -29
- package/lib/components/tab-bar/style/_material-definition.scss +6 -0
- package/lib/service/stock.service.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1446,6 +1446,7 @@
|
|
|
1446
1446
|
var StockService = /** @class */ (function () {
|
|
1447
1447
|
function StockService(_sharedService) {
|
|
1448
1448
|
this._sharedService = _sharedService;
|
|
1449
|
+
this.warehouseSelected = new i0.EventEmitter();
|
|
1449
1450
|
}
|
|
1450
1451
|
// public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
|
|
1451
1452
|
// await this._sharedService.getPrintStockStickers(data);
|
|
@@ -1810,7 +1811,7 @@
|
|
|
1810
1811
|
StockInformationComponent.decorators = [
|
|
1811
1812
|
{ type: i0.Component, args: [{
|
|
1812
1813
|
selector: "co-stock-information",
|
|
1813
|
-
template: "\n <div class=\"stock-info\" *ngIf=\"article\">\n <div class=\"stock-info-row\" >\n <div class=\"stock-info-row-image\">\n <div class=\"stock-image\">\n <co-image class=\"stock-image\" [source]=\"article.imageData\"></co-image>\n </div>\n </div>\n <div class=\"stock-
|
|
1814
|
+
template: "\n <div class=\"stock-info\" *ngIf=\"article\">\n <div class=\"stock-info-row\" >\n <div class=\"stock-info-row-image\">\n <div class=\"stock-image\">\n <co-image class=\"stock-image\" [source]=\"article.imageData\"></co-image>\n </div>\n </div>\n <div class=\"stock-status\">\n <label class=\"stock-label\" [textContent]=\"'DESCRIPTION' | localize\"></label>\n <span class=\"stock-span\" [textContent]=\"article.description\"></span>\n </div>\n </div>\n <div class=\"stock-status\">\n <label class=\"stock-label\" [textContent]=\"'STOCK_STATUS' | localize\"></label>\n <span class=\"stock-span\" [textContent]=\"article.stockStatus\"></span>\n <co-stock-statusbar [value]=\"articleStockState\"></co-stock-statusbar>\n </div>\n <div class=\"stock-status\">\n <label class=\"stock-label\" [textContent]=\"'AMOUNT_IN_STOCK' | localize\"></label>\n <span class=\"stock-span\" [textContent]=\"allTechnicalStockInformation\"></span>\n </div>\n <div class=\"stock-status\">\n <label class=\"stock-label\" [textContent]=\"'AMOUNT_AVAILABLE' | localize\"></label>\n <span class=\"stock-span\" [textContent]=\"allAvailableStockInformation\"></span>\n </div>\n <div class=\"stock-status\">\n <label class=\"stock-label\" [textContent]=\"'ECONOMICAL_STOCK' | localize\"></label>\n <span class=\"stock-span\" [textContent]=\"\"></span>\n </div>\n </div>\n ",
|
|
1814
1815
|
encapsulation: i0.ViewEncapsulation.None
|
|
1815
1816
|
},] }
|
|
1816
1817
|
];
|
|
@@ -2182,8 +2183,9 @@
|
|
|
2182
2183
|
};
|
|
2183
2184
|
|
|
2184
2185
|
var StockTransferComponent = /** @class */ (function () {
|
|
2185
|
-
function StockTransferComponent(_stockService) {
|
|
2186
|
+
function StockTransferComponent(_stockService, iconCacheService) {
|
|
2186
2187
|
this._stockService = _stockService;
|
|
2188
|
+
this.iconCacheService = iconCacheService;
|
|
2187
2189
|
this.handleClick = new i0.EventEmitter();
|
|
2188
2190
|
this.handleStickerClicked = new i0.EventEmitter();
|
|
2189
2191
|
this.allWarehousesDropdownFields = { text: "warehouseDescription", value: "warehouseNo" };
|
|
@@ -2191,6 +2193,7 @@
|
|
|
2191
2193
|
this.showSendMethodDialog = false;
|
|
2192
2194
|
this.stockState = [];
|
|
2193
2195
|
this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
|
|
2196
|
+
this.icons = exports["ɵbr"];
|
|
2194
2197
|
}
|
|
2195
2198
|
StockTransferComponent.prototype.ngAfterViewInit = function () {
|
|
2196
2199
|
this.getStockManagementWarehouses();
|
|
@@ -2216,8 +2219,15 @@
|
|
|
2216
2219
|
this.handleClick.emit();
|
|
2217
2220
|
};
|
|
2218
2221
|
StockTransferComponent.prototype.handleSelectedWarehouse = function (event) {
|
|
2222
|
+
this.articleToTransfer.targetWarehouse = event.warehouseNo;
|
|
2219
2223
|
this.selectedWarehouse = event;
|
|
2220
|
-
this.getStockManagementLocations(this.selectedWarehouse);
|
|
2224
|
+
this.getStockManagementLocations(this.selectedWarehouse.warehouseNo);
|
|
2225
|
+
};
|
|
2226
|
+
StockTransferComponent.prototype.handleSelectedLocation = function (event) {
|
|
2227
|
+
this.articleToTransfer.targetLocation = event.locationNo;
|
|
2228
|
+
};
|
|
2229
|
+
StockTransferComponent.prototype.handleSelectedStockState = function (event) {
|
|
2230
|
+
this.articleToTransfer.stockStateId = event.stockStateId;
|
|
2221
2231
|
};
|
|
2222
2232
|
StockTransferComponent.prototype.handleStickerClick = function () {
|
|
2223
2233
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2251,12 +2261,13 @@
|
|
|
2251
2261
|
StockTransferComponent.decorators = [
|
|
2252
2262
|
{ type: i0.Component, args: [{
|
|
2253
2263
|
selector: "co-stock-transfer",
|
|
2254
|
-
template: "\n <div class=\"stock-transfer\">\n <div class=\"stock-transfer-columns\">\n <div *ngIf=\"articleToTransfer\" class=\"stock-transfer-left-column\">\n <co-input-text
|
|
2264
|
+
template: "\n <div class=\"stock-transfer\">\n <span [textContent]=\"'TRANSFER_STOCK' | localize\"></span>\n <div class=\"stock-transfer-columns\">\n <div *ngIf=\"articleToTransfer\" class=\"stock-transfer-left-column\">\n <co-input-text [readonly]=\"true\"\n [(model)]=\"articleToTransfer.warehouseDescription\"\n [placeholder]=\"'STANDARD_WAREHOUSE' | localize\"\n >\n </co-input-text>\n <co-input-text [readonly]=\"true\"\n [(model)]=\"articleToTransfer.locationNo\"\n [placeholder]=\"'STANDARD_LOCATION' | localize\">\n </co-input-text>\n <co-input-text [readonly]=\"true\"\n [(model)]=\"articleToTransfer.batchItem\"\n [placeholder]=\"'BATCH_NO' | localize\">\n </co-input-text>\n <co-input-text [readonly]=\"true\"\n [(model)]=\"articleToTransfer.serialNo\"\n [placeholder]=\"'SERIE_NO' | localize\">\n </co-input-text>\n <co-input-text\n [(model)]=\"articleToTransfer.amountTransfer\"\n [placeholder]=\"'Aantal' | localize\">\n </co-input-text>\n </div>\n\n <div class=\"icon-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.ArrowFatRight)\"></co-icon>\n </div>\n\n <div class=\"stock-transfer-right-column\">\n\n <co-list-of-values [collection]=\"warehouses\"\n [displayField]=\"'warehouseDescription'\"\n (modelChange)=\"handleSelectedWarehouse($event)\"\n [label]=\"'Magazijn' | localize\"\n >\n </co-list-of-values>\n <co-list-of-values [collection]=\"locations\"\n [displayField]=\"'description'\"\n (modelChange)=\"handleSelectedLocation($event)\"\n [label]=\"'Locatie' | localize\"\n >\n </co-list-of-values>\n <co-list-of-values [collection]=\"stockState\"\n [displayField]=\"'stateDescription'\"\n [label]=\"'Voorraadstatus' | localize\"\n (modelChange)=\"handleSelectedStockState($event)\"\n >\n </co-list-of-values>\n\n <co-input-text [placeholder]=\"'Omschrijving' | localize\"\n [(model)]=\"articleToTransfer.stockStateRemark\">\n </co-input-text>\n </div>\n </div>\n\n <div class=\"ok-cancel-buttons\">\n <co-button [textContent]=\"'OK' | localize\" (click)=\"handleOkClick(articleToTransfer)\"></co-button>\n <co-button [textContent]=\"'STICKER' | localize\" (click)=\"handleStickerClick()\"></co-button>\n </div>\n </div>\n ",
|
|
2255
2265
|
encapsulation: i0.ViewEncapsulation.None
|
|
2256
2266
|
},] }
|
|
2257
2267
|
];
|
|
2258
2268
|
StockTransferComponent.ctorParameters = function () { return [
|
|
2259
|
-
{ type: StockService }
|
|
2269
|
+
{ type: StockService },
|
|
2270
|
+
{ type: IconCacheService }
|
|
2260
2271
|
]; };
|
|
2261
2272
|
StockTransferComponent.propDecorators = {
|
|
2262
2273
|
stockSticker: [{ type: i0.Input }],
|
|
@@ -3021,9 +3032,10 @@
|
|
|
3021
3032
|
var StockTabComponent = /** @class */ (function () {
|
|
3022
3033
|
function StockTabComponent() {
|
|
3023
3034
|
this.locationClicked = new i0.EventEmitter();
|
|
3035
|
+
this.warehouseToShow = new stockManagementWarehouses_bo.StockManagementWarehouses();
|
|
3024
3036
|
}
|
|
3025
3037
|
StockTabComponent.prototype.onLocationClick = function (data) {
|
|
3026
|
-
this.warehouseToShow.warehouseNo =
|
|
3038
|
+
this.warehouseToShow.warehouseNo = +data.warehouseNo;
|
|
3027
3039
|
this.locationClicked.emit(this.warehouseToShow);
|
|
3028
3040
|
};
|
|
3029
3041
|
return StockTabComponent;
|
|
@@ -3031,7 +3043,7 @@
|
|
|
3031
3043
|
StockTabComponent.decorators = [
|
|
3032
3044
|
{ type: i0.Component, args: [{
|
|
3033
3045
|
selector: "co-stock-tab",
|
|
3034
|
-
template: "\n <co-simple-grid [data]=\"articleStockInformation\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE' | localize\" [field]=\"'warehouseNo'\" [order]=\"10\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION' | localize\" [field]=\"'warehouseName'\" [order]=\"11\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK' | localize\" [field]=\"'technicalStock'\" [order]=\"12\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK' | localize\" [field]=\"'availableStock'\" [order]=\"13\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK' | localize\" [field]=\"'economicalStock'\" [order]=\"14\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION' | localize\" [field]=\"'locationNo'\" [order]=\"15\">\n <ng-template #template let-row=\"row\">\n <span class=\"location-link\" [textContent]=\"'LOOK_AT' | localize\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n ",
|
|
3046
|
+
template: "\n <co-simple-grid [data]=\"articleStockInformation\"a\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'WAREHOUSE' | localize\" [field]=\"'warehouseNo'\" [order]=\"10\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DESCRIPTION' | localize\" [field]=\"'warehouseName'\" [order]=\"11\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK' | localize\" [field]=\"'technicalStock'\" [order]=\"12\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK' | localize\" [field]=\"'availableStock'\" [order]=\"13\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ECONOMICAL_STOCK' | localize\" [field]=\"'economicalStock'\" [order]=\"14\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'LOCATION' | localize\" [field]=\"'locationNo'\" [order]=\"15\">\n <ng-template #template let-row=\"row\">\n <span class=\"location-link\" [textContent]=\"'LOOK_AT' | localize\" (click)=\"onLocationClick(row)\"></span>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n ",
|
|
3035
3047
|
encapsulation: i0.ViewEncapsulation.None
|
|
3036
3048
|
},] }
|
|
3037
3049
|
];
|
|
@@ -3105,13 +3117,13 @@
|
|
|
3105
3117
|
{ title: this._localizeService.get('ORDER'), active: false, clickHandler: function () { return _this.getOrderStockHistory(); } },
|
|
3106
3118
|
{ title: this._localizeService.get('ALLOCATION'), active: false, clickHandler: function () { return _this.getAllocationStockHistory(); } },
|
|
3107
3119
|
];
|
|
3108
|
-
|
|
3109
|
-
console.log(this.historyTabs[5]);
|
|
3120
|
+
this.historyTabs[0].clickHandler();
|
|
3110
3121
|
};
|
|
3111
3122
|
StockTabsComponent.prototype.handleLocationClicked = function (data) {
|
|
3112
|
-
this.selectedLocation = data.warehouseNo;
|
|
3113
3123
|
this.tabs[0].active = false;
|
|
3114
3124
|
this.tabs[2].active = true;
|
|
3125
|
+
this.selectedWarehouse = this.wareHouseForCode(data.warehouseNo);
|
|
3126
|
+
this.handleWarehouseSelected(this.selectedWarehouse);
|
|
3115
3127
|
};
|
|
3116
3128
|
StockTabsComponent.prototype.getStockHistory = function () {
|
|
3117
3129
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3271,6 +3283,7 @@
|
|
|
3271
3283
|
StockTabsComponent.prototype.handleWarehouseSelected = function (event) {
|
|
3272
3284
|
var _this = this;
|
|
3273
3285
|
this.selectedWarehouse = event;
|
|
3286
|
+
this._stockService.warehouseSelected.emit(event);
|
|
3274
3287
|
if (this.tabs[1].active) {
|
|
3275
3288
|
this.getStockPrognose(this.selectedWarehouse.warehouseNo);
|
|
3276
3289
|
}
|
|
@@ -3282,12 +3295,15 @@
|
|
|
3282
3295
|
});
|
|
3283
3296
|
}
|
|
3284
3297
|
};
|
|
3298
|
+
StockTabsComponent.prototype.wareHouseForCode = function (code) {
|
|
3299
|
+
return this.warehouses.find(function (warehouse) { return warehouse.warehouseNo === code; });
|
|
3300
|
+
};
|
|
3285
3301
|
return StockTabsComponent;
|
|
3286
3302
|
}());
|
|
3287
3303
|
StockTabsComponent.decorators = [
|
|
3288
3304
|
{ type: i0.Component, args: [{
|
|
3289
3305
|
selector: "co-stock-tabs",
|
|
3290
|
-
template: "\n <co-tab-bar [wareHouseLabel]=\"'CHOICES' | localize\"\n [wareHouseSearchLabel]=\"'SEARCH' | localize\"\n [tabs]=\"tabs\"\n [dataWareHouseCode]=\"warehouses\"\n [secondaryTabs]=\"historyTabs\"\n [ActivateSecondaryTabs]=\"tabs[5].active\"\n [showWarehouseSelection]=\"tabs[1].active || tabs[2].active\"\n (warehouseSelected)=\"handleWarehouseSelected($event)\"\n ></co-tab-bar>\n\n <co-stock-tab *ngIf=\"tabs[0].active\"\n [articleStockInformation]=\"stockInformation\"\n (locationClicked)=\"handleLocationClicked($event)\"\n ></co-stock-tab>\n\n <co-stock-prognose *ngIf=\"tabs[1].active\"\n [stockPrognose]=\"stockPrognose\"\n ></co-stock-prognose>\n\n <co-stock-location *ngIf=\"tabs[2].active\"\n [articleStockInfo]=\"articleDetails\"\n [articleStockInformation]=\"stockInformation\"\n [article]=\"article\"\n [
|
|
3306
|
+
template: "\n <co-tab-bar [wareHouseLabel]=\"'CHOICES' | localize\"\n [wareHouseSearchLabel]=\"'SEARCH' | localize\"\n [tabs]=\"tabs\"\n [dataWareHouseCode]=\"warehouses\"\n [selectedWarehouse]=\"selectedWarehouse\"\n [secondaryTabs]=\"historyTabs\"\n [ActivateSecondaryTabs]=\"tabs[5].active\"\n [showWarehouseSelection]=\"tabs[1].active || tabs[2].active\"\n (warehouseSelected)=\"handleWarehouseSelected($event)\"\n ></co-tab-bar>\n\n <co-stock-tab *ngIf=\"tabs[0].active\"\n [articleStockInformation]=\"stockInformation\"\n (locationClicked)=\"handleLocationClicked($event)\"\n ></co-stock-tab>\n\n <co-stock-prognose *ngIf=\"tabs[1].active\"\n [stockPrognose]=\"stockPrognose\"\n ></co-stock-prognose>\n\n <co-stock-location *ngIf=\"tabs[2].active\"\n [articleStockInfo]=\"articleDetails\"\n [articleStockInformation]=\"stockInformation\"\n [article]=\"article\"\n [selectedWarehouse]=\"selectedWarehouse\"\n [dataWareHouseCode]=\"warehouses\"\n (transferIconClicked)=\"transferIconClicked.emit($event)\"\n (sendMethodDialogClicked)=\"sendMethodDialogClicked.emit($event)\"\n (locationAddedOrUpdated)=\"articleDetails = $event\"\n\n ></co-stock-location>\n\n <co-order-tab *ngIf=\"tabs[3].active\"\n [articleStockInformation]=\"stockInformation\"\n [inOrderInformation]=\"inOrderInformation\"\n (transferIconClicked)=\"transferIconClicked.emit($event)\"\n (sendMethodDialogClicked)=\"sendMethodDialogClicked.emit($event)\"\n ></co-order-tab>\n\n <co-order-stock-tab *ngIf=\"tabs[4].active\"\n [orderInformation]=\"orderInformation\"\n ></co-order-stock-tab>\n\n <co-stock-history *ngIf=\"historyTabs[0].active && tabs[5].active\"\n [stockHistory]=\"stockHistory\"\n ></co-stock-history>\n\n <co-order-supply-stock-history *ngIf=\"historyTabs[1].active && tabs[5].active\"\n [orderSupplyStockHistory]=\"orderSupplyStockHistory\"\n ></co-order-supply-stock-history>\n\n <co-order-stock-commission-history *ngIf=\"historyTabs[2].active && tabs[5].active\"\n [orderStockCommissionHistory]=\"orderCommissionStockHistory\"\n ></co-order-stock-commission-history>\n\n <co-order-stock-history *ngIf=\"historyTabs[3].active && tabs[5].active\"\n [orderStockHistory]=\"orderStockHistory\"\n ></co-order-stock-history>\n\n <co-allocation-stock-history *ngIf=\"historyTabs[4].active && tabs[5].active\"\n [allocationStockHistory]=\"orderAllocationStockHistory\"\n ></co-allocation-stock-history>\n\n ",
|
|
3291
3307
|
encapsulation: i0.ViewEncapsulation.None
|
|
3292
3308
|
},] }
|
|
3293
3309
|
];
|
|
@@ -3352,38 +3368,69 @@
|
|
|
3352
3368
|
this.icons = exports["ɵbr"];
|
|
3353
3369
|
this.transferIconClicked = new i0.EventEmitter();
|
|
3354
3370
|
this.sendMethodDialogClicked = new i0.EventEmitter();
|
|
3355
|
-
this.
|
|
3356
|
-
this.
|
|
3371
|
+
this.locationAddedOrUpdated = new i0.EventEmitter();
|
|
3372
|
+
this.showConfirmationDialog = false;
|
|
3357
3373
|
this.articleDetailsInformation = new articleStockManagement.ArticleStockManagement();
|
|
3374
|
+
this.stockStatus = [];
|
|
3358
3375
|
this.selectedArticleDetailsData = new articleDetails_bo.ArticleDetailsBo();
|
|
3376
|
+
this._subs = [];
|
|
3359
3377
|
}
|
|
3360
3378
|
StockLocationComponent.prototype.ngOnInit = function () {
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
this
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3379
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3380
|
+
var _d;
|
|
3381
|
+
var _this = this;
|
|
3382
|
+
return __generator(this, function (_e) {
|
|
3383
|
+
switch (_e.label) {
|
|
3384
|
+
case 0:
|
|
3385
|
+
_d = this;
|
|
3386
|
+
return [4 /*yield*/, this._stockService.getStockState()];
|
|
3387
|
+
case 1:
|
|
3388
|
+
_d.stockStatus = _e.sent();
|
|
3389
|
+
this._subs.push(this._stockService.warehouseSelected.subscribe(function (selectedWarehouse) { return __awaiter(_this, void 0, void 0, function () {
|
|
3390
|
+
var _d;
|
|
3391
|
+
return __generator(this, function (_e) {
|
|
3392
|
+
switch (_e.label) {
|
|
3393
|
+
case 0:
|
|
3394
|
+
_d = this;
|
|
3395
|
+
return [4 /*yield*/, this._stockService.getStockManagementLocations(selectedWarehouse.warehouseNo)];
|
|
3396
|
+
case 1:
|
|
3397
|
+
_d.stockLocations = _e.sent();
|
|
3398
|
+
return [2 /*return*/];
|
|
3399
|
+
}
|
|
3400
|
+
});
|
|
3401
|
+
}); }));
|
|
3402
|
+
return [2 /*return*/];
|
|
3403
|
+
}
|
|
3373
3404
|
});
|
|
3374
|
-
}
|
|
3405
|
+
});
|
|
3375
3406
|
};
|
|
3376
3407
|
StockLocationComponent.prototype.lockSelectedRow = function (row) {
|
|
3377
|
-
this
|
|
3408
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3409
|
+
var _d;
|
|
3410
|
+
return __generator(this, function (_e) {
|
|
3411
|
+
switch (_e.label) {
|
|
3412
|
+
case 0:
|
|
3413
|
+
_d = this;
|
|
3414
|
+
return [4 /*yield*/, this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo)];
|
|
3415
|
+
case 1:
|
|
3416
|
+
_d.stockLocations = _e.sent();
|
|
3417
|
+
this.selectedLocationNo = row.locationNo;
|
|
3418
|
+
this._stockService.lockArticleDetails(row);
|
|
3419
|
+
this.selectedArticleDetailsData = row;
|
|
3420
|
+
return [2 /*return*/];
|
|
3421
|
+
}
|
|
3422
|
+
});
|
|
3423
|
+
});
|
|
3378
3424
|
};
|
|
3379
3425
|
StockLocationComponent.prototype.onLocationDropdownClick = function () {
|
|
3380
3426
|
var _this = this;
|
|
3381
|
-
this._stockService.getStockManagementLocations(this.selectedWarehouse).then(function (locations) {
|
|
3427
|
+
this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then(function (locations) {
|
|
3382
3428
|
_this.stockLocations = locations;
|
|
3383
3429
|
});
|
|
3384
3430
|
};
|
|
3385
|
-
StockLocationComponent.prototype.locationChanged = function (event) {
|
|
3386
|
-
this.
|
|
3431
|
+
StockLocationComponent.prototype.locationChanged = function (row, event) {
|
|
3432
|
+
this.selectedLocationNo = event.locationNo;
|
|
3433
|
+
row.locationNo = event.locationNo;
|
|
3387
3434
|
};
|
|
3388
3435
|
StockLocationComponent.prototype.amountInStockChanged = function (data) {
|
|
3389
3436
|
this.selectedArticleDetailsData.amountInStock = data;
|
|
@@ -3395,35 +3442,65 @@
|
|
|
3395
3442
|
this.transferIconClicked.emit(event);
|
|
3396
3443
|
};
|
|
3397
3444
|
StockLocationComponent.prototype.onOkClickSendLocations = function () {
|
|
3445
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3446
|
+
return __generator(this, function (_d) {
|
|
3447
|
+
this.showConfirmationDialog = true;
|
|
3448
|
+
return [2 /*return*/];
|
|
3449
|
+
});
|
|
3450
|
+
});
|
|
3451
|
+
};
|
|
3452
|
+
StockLocationComponent.prototype.handleOkClick = function () {
|
|
3453
|
+
var _a, _b;
|
|
3398
3454
|
return __awaiter(this, void 0, void 0, function () {
|
|
3399
3455
|
var _this = this;
|
|
3400
|
-
return __generator(this, function (
|
|
3401
|
-
switch (
|
|
3456
|
+
return __generator(this, function (_d) {
|
|
3457
|
+
switch (_d.label) {
|
|
3402
3458
|
case 0:
|
|
3403
3459
|
this.selectedArticleDetailsData.selected = true;
|
|
3404
3460
|
this.selectedArticleDetailsData.goodId = this.article.goodId;
|
|
3405
3461
|
this.selectedArticleDetailsData.entryDate = new Date();
|
|
3406
|
-
this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse;
|
|
3407
|
-
this.selectedArticleDetailsData.locationNo = this.
|
|
3462
|
+
this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse.warehouseNo;
|
|
3463
|
+
this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
|
|
3408
3464
|
return [4 /*yield*/, this._stockService.updateArticleDetails(this.selectedArticleDetailsData)];
|
|
3409
3465
|
case 1:
|
|
3410
|
-
|
|
3466
|
+
_d.sent();
|
|
3467
|
+
this.articleDetailsInformation.goodId = (_b = this.selectedArticleDetailsData.goodId) === null || _b === void 0 ? void 0 : _b.toString();
|
|
3468
|
+
this.articleDetailsInformation.warehouseNumber = this.selectedArticleDetailsData.warehouseNo;
|
|
3411
3469
|
return [4 /*yield*/, this._stockService.getArticleDetails(this.articleDetailsInformation).then(function (details) {
|
|
3412
|
-
_this.
|
|
3470
|
+
_this.showConfirmationDialog = false;
|
|
3471
|
+
_this._changeDetector.detectChanges();
|
|
3472
|
+
_this.locationAddedOrUpdated.emit(details);
|
|
3413
3473
|
})];
|
|
3414
3474
|
case 2:
|
|
3415
|
-
|
|
3475
|
+
_d.sent();
|
|
3416
3476
|
return [2 /*return*/];
|
|
3417
3477
|
}
|
|
3418
3478
|
});
|
|
3419
3479
|
});
|
|
3420
3480
|
};
|
|
3481
|
+
StockLocationComponent.prototype.handleStockStatusChange = function (status) {
|
|
3482
|
+
this.selectedArticleDetailsData.stockStateId = status.stockStateId;
|
|
3483
|
+
};
|
|
3484
|
+
StockLocationComponent.prototype.handleStockStatusRemarkChange = function (remark) {
|
|
3485
|
+
this.selectedArticleDetailsData.stockStateRemark = remark;
|
|
3486
|
+
};
|
|
3487
|
+
StockLocationComponent.prototype.disabled = function () {
|
|
3488
|
+
var _a, _b, _c;
|
|
3489
|
+
return (!((_a = this.selectedArticleDetailsData) === null || _a === void 0 ? void 0 : _a.stockStateId) && ((_c = (_b = this.selectedArticleDetailsData) === null || _b === void 0 ? void 0 : _b.stockStateRemark) === null || _c === void 0 ? void 0 : _c.length) <= 1);
|
|
3490
|
+
};
|
|
3491
|
+
StockLocationComponent.prototype.statusForId = function (id) {
|
|
3492
|
+
return this.stockStatus.find(function (status) { return status.stockStateId === id; });
|
|
3493
|
+
};
|
|
3494
|
+
StockLocationComponent.prototype.locationForNumber = function (number) {
|
|
3495
|
+
var _a;
|
|
3496
|
+
return (_a = this.stockLocations) === null || _a === void 0 ? void 0 : _a.find(function (location) { return location.locationNo === (number === null || number === void 0 ? void 0 : number.toString()); });
|
|
3497
|
+
};
|
|
3421
3498
|
return StockLocationComponent;
|
|
3422
3499
|
}());
|
|
3423
3500
|
StockLocationComponent.decorators = [
|
|
3424
3501
|
{ type: i0.Component, args: [{
|
|
3425
3502
|
selector: "co-stock-location",
|
|
3426
|
-
template: "\n
|
|
3503
|
+
template: "\n <div class=\"stock-grid\">\n <co-dialog *ngIf=\"showConfirmationDialog\" [showCloseIcon]=\"true\" [modal]=\"true\" [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\">\n <ng-template #headerTemplate>\n <div class=\"header-wrapper\">\n <span [textContent]=\"'CONFIRM_STOCK_CHANGE' | localize\"></span>\n </div>\n </ng-template>\n <div class=\"dialog-wrapper\">\n <co-list-of-values [label]=\"'STATUS' | localize\"\n [model]=\"statusForId(selectedArticleDetailsData.stockStateId)\"\n [collection]=\"stockStatus\"\n [displayField]=\"'stateDescription'\"\n (modelChange)=\"handleStockStatusChange($event)\"\n ></co-list-of-values>\n <co-input-text [placeholder]=\"'REMARK' | localize\"\n (modelChange)=\"handleStockStatusRemarkChange($event)\"></co-input-text>\n </div>\n <ng-template #footerTemplate>\n <div class=\"button-wrapper\">\n <co-button (click)=\"handleOkClick()\" [label]=\"'OK'| localize\" [disabled]=\"disabled()\"></co-button>\n <co-button class=\"cancel-button\" (click)=\"showConfirmationDialog = false\"\n [label]=\"'CANCEL'| localize \"></co-button>\n </div>\n </ng-template>\n </co-dialog>\n <co-simple-grid [data]=\"articleStockInfo\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n [showAdd]=\"true\"\n [inlineEdit]=\"true\"\n (dblClickRow)=\"lockSelectedRow($event)\"\n [showToolbar]=\"true\"\n (keydown.enter)=\"onOkClickSendLocations()\"\n\n >\n <co-simple-grid-column [headerText]=\"'LOCATION' | localize\" [field]=\"'locationNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-list-of-values [model]=\"locationForNumber(row['locationNo'])\"\n [collection]=\"stockLocations\"\n [displayField]=\"'description'\"\n [label]=\"'LOCATION' | localize\"\n (click)=\"onLocationDropdownClick()\"\n [required]=\"true\"\n (modelChange)=\"locationChanged(row, $event)\"\n ></co-list-of-values>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column *ngIf=\"articleDetails\" [headerText]=\"'BATCH' | localize\" [field]=\"'batchNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.batchNo\"\n [placeholder]=\"'BATCH' | localize\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column *ngIf=\"articleDetails\" [headerText]=\"'SERIAL_NO' | localize\" [field]=\"'serialNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.serialNo\"\n [placeholder]=\"'SERIAL_NO' | localize\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STOCK' | localize\" [field]=\"'amountInStock'\">\n <ng-template #editTemplate let-row=\"row\">\n <co-input-text [(model)]=\"row.amountInStock\"\n [label]=\"'STOCK' | localize\"\n (modelChange)=\"amountInStockChanged($event)\"\n ></co-input-text>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'ALLOCATED' | localize\" [field]=\"'stockAssigned'\">\n <ng-template #editTemplate let-row=\"row\">\n <span [textContent]=\"row.stockAssigned\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'AVAILABLE_STOCK' | localize\" [field]=\"'amountInStockFree'\">\n <ng-template #editTemplate let-row=\"row\">\n <span [textContent]=\"row.amountInStockFree\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'VALUTA' | localize\" [field]=\"'currency'\">\n <ng-template #editTemplate let-row=\"row\">\n <span [textContent]=\"row.currency\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_PRICE' | localize\" [field]=\"'purchasePrice'\">\n <ng-template #editTemplate let-row=\"row\">\n <span [textContent]=\"row.purchasePrice\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'SUPPLIERNR' | localize\" [field]=\"'supplierNo'\">\n <ng-template #editTemplate let-row=\"row\">\n <span [textContent]=\"row.supplierNo\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'TRANSFER' | localize\" [field]=\"'transfer'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruck)\"\n (click)=\"handleStockTransferClick(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'STICKER' | localize\" [field]=\"'sticker'\">\n <ng-template #template let-row=\"row\">\n <co-icon class=\"menu-icon\" [iconData]=\"iconCacheService.getIcon(icons.Print)\"\n (click)=\"openSendMethodDialog(row)\"></co-icon>\n </ng-template>\n </co-simple-grid-column>\n </co-simple-grid>\n </div>\n ",
|
|
3427
3504
|
encapsulation: i0.ViewEncapsulation.None
|
|
3428
3505
|
},] }
|
|
3429
3506
|
];
|
|
@@ -3436,10 +3513,11 @@
|
|
|
3436
3513
|
articleStockInfo: [{ type: i0.Input }],
|
|
3437
3514
|
articleStockInformation: [{ type: i0.Input }],
|
|
3438
3515
|
article: [{ type: i0.Input }],
|
|
3439
|
-
clickedLocation: [{ type: i0.Input }],
|
|
3440
3516
|
dataWareHouseCode: [{ type: i0.Input }],
|
|
3441
3517
|
transferIconClicked: [{ type: i0.Output }],
|
|
3442
|
-
sendMethodDialogClicked: [{ type: i0.Output }]
|
|
3518
|
+
sendMethodDialogClicked: [{ type: i0.Output }],
|
|
3519
|
+
locationAddedOrUpdated: [{ type: i0.Output }],
|
|
3520
|
+
selectedWarehouse: [{ type: i0.Input }]
|
|
3443
3521
|
};
|
|
3444
3522
|
|
|
3445
3523
|
var StockHistoryComponent = /** @class */ (function () {
|
|
@@ -3496,7 +3574,7 @@
|
|
|
3496
3574
|
TabBarComponent.decorators = [
|
|
3497
3575
|
{ type: i0.Component, args: [{
|
|
3498
3576
|
selector: "co-tab-bar",
|
|
3499
|
-
template: "\n <div class=\"tab-bar-wrapper\">\n <div class=\"tab-bar-warehouse-wrapper\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-right-group\">\n <co-list-of-values *ngIf=\"showWarehouseSelection\"\n [label]=\"wareHouseLabel\"\n [displayField]=\"'warehouseDescription'\"\n [collection]=\"dataWareHouseCode\"\n [multiselect]=\"false\"\n [required]=\"false\"\n [readonly]=\"false\"\n [customCssClass]=\"'mini-scrollbar'\"\n [searchPlaceholder]=\"wareHouseSearchLabel\"\n [model]=\"selectedWarehouse\"\n (modelChange)=\"onSelectWarehouse($event)\"\n >\n </co-list-of-values>\n </div>\n </div>\n </div>\n <div class=\"tab-bar\">\n <div class=\"tab-bar-primary\">\n <button *ngFor=\"let tab of tabs\" [class.active]=\"tab.active\" (click)=\"selectTab(tab)\">\n {{tab.title}}\n </button>\n </div>\n <div class=\"secondary-tab-bar\" *ngIf=\"ActivateSecondaryTabs\">\n <button *ngFor=\"let tab of secondaryTabs\" [class.active]=\"tab.active\" (click)=\"selectSecondaryTab(tab)\">\n {{tab.title}}\n </button>\n </div>\n </div>\n </div>\n ",
|
|
3577
|
+
template: "\n <div class=\"tab-bar-wrapper\">\n <div class=\"tab-bar-warehouse-wrapper\">\n <div class=\"stock-location-group\">\n <div class=\"stock-location-right-group\">\n <co-list-of-values *ngIf=\"showWarehouseSelection\"\n [label]=\"wareHouseLabel\"\n [displayField]=\"'warehouseDescription'\"\n [collection]=\"dataWareHouseCode\"\n [multiselect]=\"false\"\n [required]=\"false\"\n [readonly]=\"false\"\n [customCssClass]=\"'mini-scrollbar'\"\n [searchPlaceholder]=\"wareHouseSearchLabel\"\n [model]=\"selectedWarehouse\"\n (modelChange)=\"onSelectWarehouse($event)\"\n class=\"custom-height\"\n >\n </co-list-of-values>\n </div>\n </div>\n </div>\n <div class=\"tab-bar\">\n <div class=\"tab-bar-primary\">\n <button *ngFor=\"let tab of tabs\" [class.active]=\"tab.active\" (click)=\"selectTab(tab)\">\n {{tab.title}}\n </button>\n </div>\n <div class=\"secondary-tab-bar\" *ngIf=\"ActivateSecondaryTabs\">\n <button *ngFor=\"let tab of secondaryTabs\" [class.active]=\"tab.active\" (click)=\"selectSecondaryTab(tab)\">\n {{tab.title}}\n </button>\n </div>\n </div>\n </div>\n ",
|
|
3500
3578
|
encapsulation: i0.ViewEncapsulation.None
|
|
3501
3579
|
},] }
|
|
3502
3580
|
];
|
|
@@ -3512,7 +3590,8 @@
|
|
|
3512
3590
|
dataWareHouseCode: [{ type: i0.Input }],
|
|
3513
3591
|
article: [{ type: i0.Input }],
|
|
3514
3592
|
showWarehouseSelection: [{ type: i0.Input }],
|
|
3515
|
-
warehouseSelected: [{ type: i0.Output }]
|
|
3593
|
+
warehouseSelected: [{ type: i0.Output }],
|
|
3594
|
+
selectedWarehouse: [{ type: i0.Input }]
|
|
3516
3595
|
};
|
|
3517
3596
|
|
|
3518
3597
|
var TabBarModule = /** @class */ (function () {
|
|
@@ -3936,7 +4015,7 @@
|
|
|
3936
4015
|
StockPrognoseComponent.decorators = [
|
|
3937
4016
|
{ type: i0.Component, args: [{
|
|
3938
4017
|
selector: "co-stock-prognose",
|
|
3939
|
-
template: "\n <co-simple-grid [data]=\"stockPrognose\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'AVAILABILITY'\" [field]=\"'available'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK'\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'IN_ORDER'\" [field]=\"'inOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER'\" [field]=\"'transNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_DATE'\" [field]=\"'transactionDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE'\" [
|
|
4018
|
+
template: "\n <co-simple-grid [data]=\"stockPrognose\"\n class=\"simple-grid\"\n [rowsPerPage]=\"20\"\n >\n <co-simple-grid-column [headerText]=\"'AVAILABILITY' | localize\" [field]=\"'available'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FREE_STOCK' | localize\" [field]=\"'freeStock'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'IN_ORDER' | localize\" [field]=\"'inOrder'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER' | localize\" [field]=\"'transNr'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'PURCHASE_ORDER_DATE' | localize\" [field]=\"'transactionDate'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE' | localize\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row['arrivalDate'] | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'REFERENCE' | localize\" [field]=\"'reference'\"></co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DELIVERY_DATE_CONFIRMED' | localize\" [field]=\"'transConfirmedDate'\">\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'DATE_DELIVERED' | localize\">\n <ng-template #template let-row=\"row\">\n <span [textContent]=\"row['transDeliveryDate'] | date:'dd-MM-yyyy'\"></span>\n </ng-template>\n </co-simple-grid-column>\n <co-simple-grid-column [headerText]=\"'FUTURE_FREE_STOCK' | localize\" [field]=\"'laterAvailable'\"></co-simple-grid-column>\n </co-simple-grid>\n ",
|
|
3940
4019
|
encapsulation: i0.ViewEncapsulation.None
|
|
3941
4020
|
},] }
|
|
3942
4021
|
];
|
|
@@ -4019,7 +4098,8 @@
|
|
|
4019
4098
|
StatusbarModule,
|
|
4020
4099
|
StockStatusbarModule,
|
|
4021
4100
|
corecomponents_v12.ListOfValuesModule,
|
|
4022
|
-
LocalizationModule
|
|
4101
|
+
LocalizationModule,
|
|
4102
|
+
corecomponents_v12.PopupModule
|
|
4023
4103
|
],
|
|
4024
4104
|
declarations: [
|
|
4025
4105
|
StockComponent,
|