@colijnit/sharedcomponents 1.0.20 → 1.0.22
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 +161 -122
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +3 -3
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +4 -4
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +39 -33
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +7 -4
- package/esm2015/lib/components/stock/stock.component.js +33 -18
- package/esm2015/lib/components/stock/stock.module.js +2 -4
- package/esm2015/lib/service/shared-connector.service.js +37 -19
- package/esm2015/lib/service/stock.service.js +31 -22
- package/fesm2015/colijnit-sharedcomponents.js +160 -111
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +6 -7
- package/lib/components/stock/stock.component.d.ts +10 -6
- package/lib/components/stock/style/_layout.scss +1 -2
- package/lib/components/stock/style/_material-definition.scss +1 -1
- package/lib/service/shared-connector.service.d.ts +5 -3
- package/lib/service/stock.service.d.ts +9 -4
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry';
|
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import SignaturePad from 'signature_pad';
|
|
10
10
|
import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
|
|
11
|
+
import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
|
|
11
12
|
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
12
13
|
import { Sharedapi } from '@colijnit/sharedapi/build/sharedapi';
|
|
13
14
|
import { Printer } from '@colijnit/sharedapi/build/model/report/printer.bo';
|
|
@@ -26,7 +27,7 @@ import { JsonFieldFieldDecorator } from '@colijnit/articleapi/build/factory/deco
|
|
|
26
27
|
import { ComplexArrayDecorator as ComplexArrayDecorator$1 } from '@colijnit/articleapi/build/factory/decorators/complex-array.decorator';
|
|
27
28
|
import { ArticleStock } from '@colijnit/articleapi/build/model/article-stock.bo';
|
|
28
29
|
import { StockHistoryBo } from '@colijnit/articleapi/build/model/stock-history.bo';
|
|
29
|
-
import {
|
|
30
|
+
import { StockStickersPrintLayouts } from '@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo';
|
|
30
31
|
import { ArticleDetailsBo } from '@colijnit/articleapi/build/model/article-details.bo';
|
|
31
32
|
import { StockStatus } from '@colijnit/articleapi/build/model/stock-status.bo';
|
|
32
33
|
import { StockManagementWarehouses } from '@colijnit/articleapi/build/model/stock-management-warehouses.bo';
|
|
@@ -1275,9 +1276,10 @@ class SharedConnectorService {
|
|
|
1275
1276
|
}
|
|
1276
1277
|
connect() {
|
|
1277
1278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1278
|
-
this.
|
|
1279
|
+
this.articleConnector = new Articles(this._optionsService.options);
|
|
1279
1280
|
this.sharedConnector = new Sharedapi(this._optionsService.options);
|
|
1280
|
-
|
|
1281
|
+
console.log(this.articleConnector);
|
|
1282
|
+
console.log(this.sharedConnector);
|
|
1281
1283
|
});
|
|
1282
1284
|
}
|
|
1283
1285
|
getAllPrinters(showAll = true) {
|
|
@@ -1312,12 +1314,28 @@ class SharedConnectorService {
|
|
|
1312
1314
|
});
|
|
1313
1315
|
});
|
|
1314
1316
|
}
|
|
1315
|
-
|
|
1317
|
+
getPrintPriceStickers(request) {
|
|
1318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1319
|
+
return new Promise((resolve, reject) => {
|
|
1320
|
+
return this.sharedConnector.printPriceStickers(request).then((result) => {
|
|
1321
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1322
|
+
if (result.resultObject) {
|
|
1323
|
+
resolve(this._boFactory.makeWithRawBackendData(PrintPriceStickers, result.resultObject));
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
else {
|
|
1327
|
+
reject(result.validationMessagesAsString);
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
});
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
// public async getStockStickerPrintLayouts(stockStickersPrintLayouts: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1316
1334
|
// return new Promise((resolve: Function, reject: Function) => {
|
|
1317
|
-
// return this.sharedConnector.getStockStickerPrintLayouts(
|
|
1335
|
+
// return this.sharedConnector.getStockStickerPrintLayouts(stockStickersPrintLayouts).then((result: DataServiceResponse) => {
|
|
1318
1336
|
// if (result.validationResult && result.validationResult.success) {
|
|
1319
1337
|
// if (result.resultObject) {
|
|
1320
|
-
// resolve(this._boFactory.makeWithRawBackendData(
|
|
1338
|
+
// resolve(this._boFactory.makeWithRawBackendData(stockStickersPrintLayouts, result.resultObject));
|
|
1321
1339
|
// }
|
|
1322
1340
|
// } else {
|
|
1323
1341
|
// reject(result.validationMessagesAsString);
|
|
@@ -1328,7 +1346,7 @@ class SharedConnectorService {
|
|
|
1328
1346
|
getArticleFullObject(goodId) {
|
|
1329
1347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1330
1348
|
return new Promise((resolve, reject) => {
|
|
1331
|
-
return this.
|
|
1349
|
+
return this.articleConnector.getArticleFullObject(goodId).then((result) => {
|
|
1332
1350
|
// if (result.validationResult && result.validationResult.success) {
|
|
1333
1351
|
// if (result.resultObject) {
|
|
1334
1352
|
// resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
|
|
@@ -1343,7 +1361,7 @@ class SharedConnectorService {
|
|
|
1343
1361
|
getStockHistory(request) {
|
|
1344
1362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1345
1363
|
return new Promise((resolve, reject) => {
|
|
1346
|
-
return this.
|
|
1364
|
+
return this.articleConnector.getStockHistory(request).then((result) => {
|
|
1347
1365
|
if (result.validationResult && result.validationResult.success) {
|
|
1348
1366
|
if (result.resultObject && result.resultObject.hasOwnProperty("stockHistory")) {
|
|
1349
1367
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockHistoryBo, result.resultObject.stockHistory));
|
|
@@ -1359,7 +1377,7 @@ class SharedConnectorService {
|
|
|
1359
1377
|
getStockInformation(data) {
|
|
1360
1378
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1361
1379
|
return new Promise((resolve, reject) => {
|
|
1362
|
-
return this.
|
|
1380
|
+
return this.articleConnector.getStockInformation(data).then((result) => {
|
|
1363
1381
|
if (result.validationResult && result.validationResult.success) {
|
|
1364
1382
|
if (result.resultObjects) {
|
|
1365
1383
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleStock, result.resultObjects));
|
|
@@ -1375,7 +1393,7 @@ class SharedConnectorService {
|
|
|
1375
1393
|
getStockManagementWarehouses() {
|
|
1376
1394
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1377
1395
|
return new Promise((resolve, reject) => {
|
|
1378
|
-
return this.
|
|
1396
|
+
return this.articleConnector.getStockManagementWarehouses().then((result) => {
|
|
1379
1397
|
if (result.validationResult && result.validationResult.success) {
|
|
1380
1398
|
if (result.resultObjects) {
|
|
1381
1399
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockManagementWarehouses, result.resultObjects));
|
|
@@ -1391,7 +1409,7 @@ class SharedConnectorService {
|
|
|
1391
1409
|
getStockManagementLocations(warehouseNo) {
|
|
1392
1410
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1393
1411
|
return new Promise((resolve, reject) => {
|
|
1394
|
-
return this.
|
|
1412
|
+
return this.articleConnector.getStockManagementLocations(warehouseNo).then((result) => {
|
|
1395
1413
|
if (result.validationResult && result.validationResult.success) {
|
|
1396
1414
|
if (result.resultObjects) {
|
|
1397
1415
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockLocation, result.resultObjects));
|
|
@@ -1407,7 +1425,7 @@ class SharedConnectorService {
|
|
|
1407
1425
|
getArticleDetails(data) {
|
|
1408
1426
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1409
1427
|
return new Promise((resolve, reject) => {
|
|
1410
|
-
return this.
|
|
1428
|
+
return this.articleConnector.getArticleDetails(data).then((result) => {
|
|
1411
1429
|
if (result.validationResult && result.validationResult.success) {
|
|
1412
1430
|
if (result.resultObjects) {
|
|
1413
1431
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleDetailsBo, result.resultObjects));
|
|
@@ -1423,7 +1441,7 @@ class SharedConnectorService {
|
|
|
1423
1441
|
updateArticleDetails(data) {
|
|
1424
1442
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1425
1443
|
return new Promise((resolve, reject) => {
|
|
1426
|
-
return this.
|
|
1444
|
+
return this.articleConnector.updateArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
|
|
1427
1445
|
if (result.validationResult && result.validationResult.success) {
|
|
1428
1446
|
yield this.commit();
|
|
1429
1447
|
resolve(true);
|
|
@@ -1438,7 +1456,7 @@ class SharedConnectorService {
|
|
|
1438
1456
|
lockArticleDetails(data) {
|
|
1439
1457
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1440
1458
|
return new Promise((resolve, reject) => {
|
|
1441
|
-
return this.
|
|
1459
|
+
return this.articleConnector.lockArticleDetails(data).then((result) => __awaiter(this, void 0, void 0, function* () {
|
|
1442
1460
|
if (result.validationResult && result.validationResult.success) {
|
|
1443
1461
|
yield this.commit();
|
|
1444
1462
|
resolve(true);
|
|
@@ -1453,7 +1471,7 @@ class SharedConnectorService {
|
|
|
1453
1471
|
getStockStatus() {
|
|
1454
1472
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1455
1473
|
return new Promise((resolve, reject) => {
|
|
1456
|
-
return this.
|
|
1474
|
+
return this.articleConnector.getStockState().then((result) => {
|
|
1457
1475
|
if (result.validationResult && result.validationResult.success) {
|
|
1458
1476
|
if (result.resultObjects) {
|
|
1459
1477
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStatus, result.resultObjects));
|
|
@@ -1472,7 +1490,7 @@ class SharedConnectorService {
|
|
|
1472
1490
|
return this.sharedConnector.getStockStickerPrintLayouts(data).then((result) => {
|
|
1473
1491
|
if (result.validationResult && result.validationResult.success) {
|
|
1474
1492
|
if (result.resultObject) {
|
|
1475
|
-
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(
|
|
1493
|
+
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStickersPrintLayouts, result.resultObject));
|
|
1476
1494
|
}
|
|
1477
1495
|
}
|
|
1478
1496
|
else {
|
|
@@ -1485,7 +1503,7 @@ class SharedConnectorService {
|
|
|
1485
1503
|
getArticleTransaction(data) {
|
|
1486
1504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1487
1505
|
return new Promise((resolve, reject) => {
|
|
1488
|
-
return this.
|
|
1506
|
+
return this.articleConnector.getArticleTransaction(data).then((result) => {
|
|
1489
1507
|
if (result.validationResult && result.validationResult.success) {
|
|
1490
1508
|
if (result.resultObjects) {
|
|
1491
1509
|
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleTransaction, result.resultObjects));
|
|
@@ -1499,7 +1517,7 @@ class SharedConnectorService {
|
|
|
1499
1517
|
});
|
|
1500
1518
|
}
|
|
1501
1519
|
commit() {
|
|
1502
|
-
return this.
|
|
1520
|
+
return this.articleConnector.commit();
|
|
1503
1521
|
}
|
|
1504
1522
|
}
|
|
1505
1523
|
SharedConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedConnectorService_Factory() { return new SharedConnectorService(i0.ɵɵinject(OptionsService)); }, token: SharedConnectorService, providedIn: "root" });
|
|
@@ -1512,131 +1530,108 @@ SharedConnectorService.ctorParameters = () => [
|
|
|
1512
1530
|
{ type: OptionsService }
|
|
1513
1531
|
];
|
|
1514
1532
|
|
|
1515
|
-
class
|
|
1516
|
-
constructor(
|
|
1517
|
-
this.
|
|
1518
|
-
this.
|
|
1533
|
+
class StockService {
|
|
1534
|
+
constructor(_sharedService) {
|
|
1535
|
+
this._sharedService = _sharedService;
|
|
1536
|
+
this.printSticker = new PrintStockStickers();
|
|
1537
|
+
this.printPriceSticker = new PrintPriceStickers();
|
|
1519
1538
|
}
|
|
1520
|
-
|
|
1539
|
+
getPrintStockStickers(data) {
|
|
1521
1540
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1522
|
-
yield this.
|
|
1523
|
-
this.connector.connect();
|
|
1541
|
+
yield this._sharedService.getPrintStockStickers(data);
|
|
1524
1542
|
});
|
|
1525
1543
|
}
|
|
1526
|
-
|
|
1527
|
-
SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
1528
|
-
SharedService.decorators = [
|
|
1529
|
-
{ type: Injectable, args: [{
|
|
1530
|
-
providedIn: "root"
|
|
1531
|
-
},] }
|
|
1532
|
-
];
|
|
1533
|
-
SharedService.ctorParameters = () => [
|
|
1534
|
-
{ type: OptionsService },
|
|
1535
|
-
{ type: SharedConnectorService }
|
|
1536
|
-
];
|
|
1537
|
-
|
|
1538
|
-
class StockService extends SharedService {
|
|
1539
|
-
constructor() {
|
|
1540
|
-
super(...arguments);
|
|
1541
|
-
this.printSticker = new PrintStockStickers();
|
|
1542
|
-
}
|
|
1543
|
-
getPrintStockStickers(data) {
|
|
1544
|
+
getPrintPriceStickers(data) {
|
|
1544
1545
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1545
|
-
yield this.
|
|
1546
|
+
yield this._sharedService.getPrintPriceStickers(data);
|
|
1546
1547
|
});
|
|
1547
1548
|
}
|
|
1548
1549
|
getAllPrinters(showAll = true) {
|
|
1549
1550
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1550
|
-
return yield this.
|
|
1551
|
+
return yield this._sharedService.getAllPrinters(showAll);
|
|
1551
1552
|
});
|
|
1552
1553
|
}
|
|
1553
1554
|
getStockHistory(data) {
|
|
1554
1555
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1555
|
-
return yield this.
|
|
1556
|
+
return yield this._sharedService.getStockHistory(data);
|
|
1556
1557
|
});
|
|
1557
1558
|
}
|
|
1558
1559
|
getStockInformation(data) {
|
|
1559
1560
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1560
|
-
return yield this.
|
|
1561
|
+
return yield this._sharedService.getStockInformation(data);
|
|
1561
1562
|
});
|
|
1562
1563
|
}
|
|
1563
|
-
// public async getStockStickerPrintLayouts(data:
|
|
1564
|
+
// public async getStockStickerPrintLayouts(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1564
1565
|
// return await this._connector.getStockStickerPrintLayouts(data);
|
|
1565
1566
|
// }
|
|
1566
1567
|
getArticleDetails(data) {
|
|
1567
1568
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1568
|
-
return yield this.
|
|
1569
|
+
return yield this._sharedService.getArticleDetails(data);
|
|
1569
1570
|
});
|
|
1570
1571
|
}
|
|
1571
1572
|
updateArticleDetails(data) {
|
|
1572
1573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1573
|
-
return yield this.
|
|
1574
|
+
return yield this._sharedService.updateArticleDetails(data);
|
|
1574
1575
|
});
|
|
1575
1576
|
}
|
|
1576
1577
|
getStockState() {
|
|
1577
1578
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1578
|
-
return yield this.
|
|
1579
|
+
return yield this._sharedService.getStockStatus();
|
|
1579
1580
|
});
|
|
1580
1581
|
}
|
|
1581
1582
|
getStockStickerTemplates(data) {
|
|
1582
1583
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1583
|
-
return yield this.
|
|
1584
|
+
return yield this._sharedService.getStockStickerTemplates(data);
|
|
1584
1585
|
});
|
|
1585
1586
|
}
|
|
1586
1587
|
getStockManagementWarehouses() {
|
|
1587
1588
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1588
|
-
return yield this.
|
|
1589
|
+
return yield this._sharedService.getStockManagementWarehouses();
|
|
1589
1590
|
});
|
|
1590
1591
|
}
|
|
1591
1592
|
getStockManagementLocations(warehouseNo) {
|
|
1592
1593
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1593
|
-
return yield this.
|
|
1594
|
+
return yield this._sharedService.getStockManagementLocations(warehouseNo);
|
|
1594
1595
|
});
|
|
1595
1596
|
}
|
|
1596
1597
|
getArticleTransaction(data) {
|
|
1597
1598
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1598
|
-
return yield this.
|
|
1599
|
+
return yield this._sharedService.getArticleTransaction(data);
|
|
1599
1600
|
});
|
|
1600
1601
|
}
|
|
1601
1602
|
lockArticleDetails(data) {
|
|
1602
1603
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1603
|
-
return yield this.
|
|
1604
|
+
return yield this._sharedService.lockArticleDetails(data);
|
|
1604
1605
|
});
|
|
1605
1606
|
}
|
|
1606
1607
|
commit() {
|
|
1607
|
-
return this.
|
|
1608
|
+
return this._sharedService.commit();
|
|
1608
1609
|
}
|
|
1609
1610
|
}
|
|
1610
|
-
StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(
|
|
1611
|
+
StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
|
|
1611
1612
|
StockService.decorators = [
|
|
1612
1613
|
{ type: Injectable, args: [{
|
|
1613
1614
|
providedIn: 'root',
|
|
1614
1615
|
},] }
|
|
1616
|
+
];
|
|
1617
|
+
StockService.ctorParameters = () => [
|
|
1618
|
+
{ type: SharedConnectorService }
|
|
1615
1619
|
];
|
|
1616
1620
|
|
|
1617
1621
|
class StockComponent {
|
|
1618
|
-
constructor(stockService, _optionsService) {
|
|
1622
|
+
constructor(stockService, _optionsService, _dictionary, _changeDetector) {
|
|
1619
1623
|
this.stockService = stockService;
|
|
1620
1624
|
this._optionsService = _optionsService;
|
|
1625
|
+
this._dictionary = _dictionary;
|
|
1626
|
+
this._changeDetector = _changeDetector;
|
|
1621
1627
|
this.handleStickerClicked = new EventEmitter();
|
|
1622
1628
|
this.showStockInformationGrid = true;
|
|
1623
1629
|
this.showStockLocation = false;
|
|
1624
1630
|
this.showStockTransfer = false;
|
|
1625
1631
|
this.allAvailableStock = 0;
|
|
1626
1632
|
this.allTechnicalStock = 0;
|
|
1627
|
-
this.
|
|
1628
|
-
|
|
1629
|
-
set options(value) {
|
|
1630
|
-
if (value) {
|
|
1631
|
-
if (typeof value === "string") {
|
|
1632
|
-
this._options = JSON.parse(value);
|
|
1633
|
-
}
|
|
1634
|
-
else {
|
|
1635
|
-
this._options = value;
|
|
1636
|
-
}
|
|
1637
|
-
this._publicOptions = true;
|
|
1638
|
-
this._optionsService.initialize(this._options).then();
|
|
1639
|
-
}
|
|
1633
|
+
this._subscriptions = [];
|
|
1634
|
+
this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
|
|
1640
1635
|
}
|
|
1641
1636
|
set article(article) {
|
|
1642
1637
|
this.articleExtended = article;
|
|
@@ -1646,6 +1641,9 @@ class StockComponent {
|
|
|
1646
1641
|
showClass() {
|
|
1647
1642
|
return true;
|
|
1648
1643
|
}
|
|
1644
|
+
ngOnDestroy() {
|
|
1645
|
+
this._subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
1646
|
+
}
|
|
1649
1647
|
backToStockLinesClicked() {
|
|
1650
1648
|
this.showStockLocation = false;
|
|
1651
1649
|
this.showStockInformationGrid = true;
|
|
@@ -1678,6 +1676,25 @@ class StockComponent {
|
|
|
1678
1676
|
this.stockInformation.forEach((articleStock) => this.allTechnicalStock += articleStock.technicalStock);
|
|
1679
1677
|
});
|
|
1680
1678
|
}
|
|
1679
|
+
_handleSettingsLoaded(loaded) {
|
|
1680
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1681
|
+
if (loaded) {
|
|
1682
|
+
yield this._initConnection().then();
|
|
1683
|
+
}
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
_initConnection() {
|
|
1687
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1688
|
+
// await this._connector.connect(this._optionsService.options);
|
|
1689
|
+
if (this._optionsService.options.url) {
|
|
1690
|
+
this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
|
|
1691
|
+
}
|
|
1692
|
+
yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
|
|
1693
|
+
setTimeout(() => {
|
|
1694
|
+
this._changeDetector.detectChanges();
|
|
1695
|
+
});
|
|
1696
|
+
});
|
|
1697
|
+
}
|
|
1681
1698
|
}
|
|
1682
1699
|
StockComponent.decorators = [
|
|
1683
1700
|
{ type: Component, args: [{
|
|
@@ -1720,12 +1737,13 @@ StockComponent.decorators = [
|
|
|
1720
1737
|
];
|
|
1721
1738
|
StockComponent.ctorParameters = () => [
|
|
1722
1739
|
{ type: StockService },
|
|
1723
|
-
{ type: OptionsService }
|
|
1740
|
+
{ type: OptionsService },
|
|
1741
|
+
{ type: DictionaryService },
|
|
1742
|
+
{ type: ChangeDetectorRef }
|
|
1724
1743
|
];
|
|
1725
1744
|
StockComponent.propDecorators = {
|
|
1726
1745
|
stock: [{ type: ViewChild, args: [StockComponent,] }],
|
|
1727
1746
|
handleStickerClicked: [{ type: Output }],
|
|
1728
|
-
options: [{ type: Input }],
|
|
1729
1747
|
article: [{ type: Input }],
|
|
1730
1748
|
articleWarehouse: [{ type: Input }],
|
|
1731
1749
|
allWarehouses: [{ type: Input }],
|
|
@@ -1900,7 +1918,6 @@ class StockInformationGridComponent {
|
|
|
1900
1918
|
}
|
|
1901
1919
|
}
|
|
1902
1920
|
handleTabClick(tabData) {
|
|
1903
|
-
console.log(tabData);
|
|
1904
1921
|
this.activeTab = tabData;
|
|
1905
1922
|
if (this.activeTab === "IN_ORDER2") {
|
|
1906
1923
|
this.getInOrderData();
|
|
@@ -1989,7 +2006,6 @@ class StockInformationGridComponent {
|
|
|
1989
2006
|
inOrderData.type = "V";
|
|
1990
2007
|
inOrderData.goodId = this.articleStockInformation[0].goodId.toString();
|
|
1991
2008
|
this.inOrderInformation = yield this._stockService.getArticleTransaction(inOrderData);
|
|
1992
|
-
console.log(this.inOrderInformation);
|
|
1993
2009
|
});
|
|
1994
2010
|
}
|
|
1995
2011
|
getOrderData() {
|
|
@@ -2029,6 +2045,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2029
2045
|
[showToolbar]="true"
|
|
2030
2046
|
(addRow)="addNewRow()"
|
|
2031
2047
|
[inlineEdit]="true"
|
|
2048
|
+
[rowsPerPage]="20"
|
|
2032
2049
|
>
|
|
2033
2050
|
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNo'" [order]="10"></co-simple-grid-column>
|
|
2034
2051
|
<co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseName'" [order]="11"></co-simple-grid-column>
|
|
@@ -2045,6 +2062,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2045
2062
|
<co-simple-grid *ngIf="activeTab === tabs[1]"
|
|
2046
2063
|
[data]="inOrderInformation"
|
|
2047
2064
|
class="simple-grid"
|
|
2065
|
+
[rowsPerPage]="20"
|
|
2048
2066
|
>
|
|
2049
2067
|
<co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'transactionNr'"></co-simple-grid-column>
|
|
2050
2068
|
<co-simple-grid-column [headerText]="'CUSTOMER'" [field]="'user'"></co-simple-grid-column>
|
|
@@ -2068,6 +2086,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2068
2086
|
<co-simple-grid *ngIf="activeTab === tabs[2]"
|
|
2069
2087
|
[data]="orderInformation"
|
|
2070
2088
|
class="simple-grid"
|
|
2089
|
+
[rowsPerPage]="20"
|
|
2071
2090
|
>
|
|
2072
2091
|
<co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'transactionNr'"></co-simple-grid-column>
|
|
2073
2092
|
<co-simple-grid-column [headerText]="'DATE'" [field]="'transactionDate'"></co-simple-grid-column>
|
|
@@ -2098,6 +2117,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2098
2117
|
<!-- TODO move to own component stock-location-->
|
|
2099
2118
|
<co-simple-grid [data]="articleDetails"
|
|
2100
2119
|
class="simple-grid"
|
|
2120
|
+
[rowsPerPage]="20"
|
|
2101
2121
|
>
|
|
2102
2122
|
<div class="stock-location-group">
|
|
2103
2123
|
<div class="stock-location-left-group">
|
|
@@ -2145,6 +2165,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2145
2165
|
</div>
|
|
2146
2166
|
<co-simple-grid [data]="stockHistoryInformation"
|
|
2147
2167
|
class="simple-grid"
|
|
2168
|
+
[rowsPerPage]="20"
|
|
2148
2169
|
>
|
|
2149
2170
|
<co-simple-grid-column [headerText]="'MUTATION_DATE'" [field]="'mutationDate'"></co-simple-grid-column>
|
|
2150
2171
|
<co-simple-grid-column [headerText]="'MUTATION_TIME'" [field]="'mutationTime'"></co-simple-grid-column>
|
|
@@ -2170,7 +2191,7 @@ StockInformationGridComponent.decorators = [
|
|
|
2170
2191
|
|
|
2171
2192
|
<div class="stock-button-toolbar">
|
|
2172
2193
|
<div class="stock-button-left-group">
|
|
2173
|
-
<co-button [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
|
|
2194
|
+
<co-button *ngIf="activeTab === tabs[0]" [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
|
|
2174
2195
|
</div>
|
|
2175
2196
|
<div class="stock-button-middle-group">
|
|
2176
2197
|
<div class="button-left">
|
|
@@ -2411,22 +2432,20 @@ class SendMethodDialogComponent {
|
|
|
2411
2432
|
this.showPrintOption = true;
|
|
2412
2433
|
this.showPdfOption = true;
|
|
2413
2434
|
this.showXmlOption = true;
|
|
2435
|
+
this.showPrintPriceStickers = false;
|
|
2436
|
+
this.showPrintStockStickers = true;
|
|
2414
2437
|
this.sendOptions = [
|
|
2415
2438
|
{ option: SendOption.Email,
|
|
2416
2439
|
iconName: this.icons.Email,
|
|
2417
|
-
show: this.showEmailOption,
|
|
2418
2440
|
},
|
|
2419
2441
|
{ option: SendOption.Print,
|
|
2420
2442
|
iconName: this.icons.Print,
|
|
2421
|
-
show: this.showPrintOption,
|
|
2422
2443
|
},
|
|
2423
2444
|
{ option: SendOption.Pdf,
|
|
2424
2445
|
iconName: this.icons.Pdf,
|
|
2425
|
-
show: this.showPdfOption,
|
|
2426
2446
|
},
|
|
2427
2447
|
{ option: SendOption.Xml,
|
|
2428
2448
|
iconName: this.icons.Xml,
|
|
2429
|
-
show: this.showXmlOption,
|
|
2430
2449
|
}
|
|
2431
2450
|
];
|
|
2432
2451
|
this.activeSendOption = SendOption.Email;
|
|
@@ -2434,6 +2453,7 @@ class SendMethodDialogComponent {
|
|
|
2434
2453
|
this.showPrinterSelections = false;
|
|
2435
2454
|
this.showExitButton = true;
|
|
2436
2455
|
this.printTemplatesField = { text: "name", value: "reportId" };
|
|
2456
|
+
this.priceListDataField = { text: "name", value: "priceListCode" };
|
|
2437
2457
|
this.upAndLoaded = false;
|
|
2438
2458
|
this.emails = ['lars.vdv@colijn-it.nl', 'david@colijn-it.nl', 'ruben@colijn-it.nl'];
|
|
2439
2459
|
this.models = [false, false, true];
|
|
@@ -2442,24 +2462,8 @@ class SendMethodDialogComponent {
|
|
|
2442
2462
|
this.startSignatureClicked = new EventEmitter();
|
|
2443
2463
|
this.printButtonClicked = new EventEmitter();
|
|
2444
2464
|
this._subscriptions = [];
|
|
2445
|
-
this._publicOptions = true;
|
|
2446
2465
|
this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
|
|
2447
2466
|
}
|
|
2448
|
-
set options(value) {
|
|
2449
|
-
if (value) {
|
|
2450
|
-
if (typeof value === "string") {
|
|
2451
|
-
this._options = JSON.parse(value);
|
|
2452
|
-
}
|
|
2453
|
-
else {
|
|
2454
|
-
this._options = value;
|
|
2455
|
-
}
|
|
2456
|
-
this._publicOptions = true;
|
|
2457
|
-
this._optionsService.initialize(this._options).then();
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
get options() {
|
|
2461
|
-
return this._options;
|
|
2462
|
-
}
|
|
2463
2467
|
set articleData(data) {
|
|
2464
2468
|
this.stockService.printSticker.goodId = data.goodId;
|
|
2465
2469
|
this.stockService.printSticker.warehouse = data.warehouseNo;
|
|
@@ -2486,7 +2490,6 @@ class SendMethodDialogComponent {
|
|
|
2486
2490
|
}
|
|
2487
2491
|
handlePrintClicked() {
|
|
2488
2492
|
// this.printButtonClicked.emit();
|
|
2489
|
-
console.log(this.stockService.printSticker);
|
|
2490
2493
|
if (this.stockService.printSticker.printerName) {
|
|
2491
2494
|
this.stockService.getPrintStockStickers(this.stockService.printSticker);
|
|
2492
2495
|
}
|
|
@@ -2509,7 +2512,7 @@ class SendMethodDialogComponent {
|
|
|
2509
2512
|
}
|
|
2510
2513
|
getPrintTemplates() {
|
|
2511
2514
|
if (!this.printTemplates) {
|
|
2512
|
-
const data = new
|
|
2515
|
+
const data = new StockStickersPrintLayouts();
|
|
2513
2516
|
this.stockService.getStockStickerTemplates(data).then((templates) => {
|
|
2514
2517
|
this.printTemplates = templates;
|
|
2515
2518
|
});
|
|
@@ -2548,7 +2551,8 @@ SendMethodDialogComponent.decorators = [
|
|
|
2548
2551
|
<div class="dialog-content-wrapper">
|
|
2549
2552
|
<div class="main-content-container" *ngIf="!showPrinterSelections">
|
|
2550
2553
|
<div class="send-options-wrapper">
|
|
2551
|
-
<div class="custom-button-wrapper"
|
|
2554
|
+
<div class="custom-button-wrapper"
|
|
2555
|
+
*ngFor="let sendOption of sendOptions"
|
|
2552
2556
|
[class.selected-option]="sendOption.option === activeSendOption"
|
|
2553
2557
|
(click)="activeSendOption = sendOption.option">
|
|
2554
2558
|
<co-icon [iconData]="iconCacheService.getIcon(sendOption.iconName)"></co-icon>
|
|
@@ -2583,13 +2587,34 @@ SendMethodDialogComponent.decorators = [
|
|
|
2583
2587
|
</div>
|
|
2584
2588
|
|
|
2585
2589
|
<div class="email-option-content" *ngIf="activeSendOption === sendOption.Print" (click)="getPrintTemplates()">
|
|
2586
|
-
<div
|
|
2587
|
-
<
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2590
|
+
<div *ngIf="showPrintPriceStickers">
|
|
2591
|
+
<div class="lov-wrapper">
|
|
2592
|
+
<co-input-combo-box
|
|
2593
|
+
[(model)]="stockService.printPriceSticker.reportId"
|
|
2594
|
+
[collection]="printTemplates"
|
|
2595
|
+
[fields]="printTemplatesField"
|
|
2596
|
+
placeholder="Layout"
|
|
2597
|
+
></co-input-combo-box>
|
|
2598
|
+
</div>
|
|
2599
|
+
<div class="lov-wrapper" *ngIf="priceListCodeData">
|
|
2600
|
+
<co-input-combo-box
|
|
2601
|
+
[(model)]="stockService.printPriceSticker.priceListCode"
|
|
2602
|
+
[collection]="priceListCodeData"
|
|
2603
|
+
[fields]="priceListDataField"
|
|
2604
|
+
placeholder="Layout"
|
|
2605
|
+
></co-input-combo-box>
|
|
2606
|
+
</div>
|
|
2607
|
+
</div>
|
|
2608
|
+
|
|
2609
|
+
<div *ngIf="showPrintStockStickers">
|
|
2610
|
+
<div class="lov-wrapper">
|
|
2611
|
+
<co-input-combo-box
|
|
2612
|
+
[(model)]="stockService.printSticker.reportId"
|
|
2613
|
+
[collection]="printTemplates"
|
|
2614
|
+
[fields]="printTemplatesField"
|
|
2615
|
+
placeholder="Layout"
|
|
2616
|
+
></co-input-combo-box>
|
|
2617
|
+
</div>
|
|
2593
2618
|
</div>
|
|
2594
2619
|
|
|
2595
2620
|
<div class="lov-wrapper clickable" (click)="togglePrinterSelection()">
|
|
@@ -2681,7 +2706,9 @@ SendMethodDialogComponent.propDecorators = {
|
|
|
2681
2706
|
showPrintOption: [{ type: Input }],
|
|
2682
2707
|
showPdfOption: [{ type: Input }],
|
|
2683
2708
|
showXmlOption: [{ type: Input }],
|
|
2684
|
-
|
|
2709
|
+
showPrintPriceStickers: [{ type: Input }],
|
|
2710
|
+
showPrintStockStickers: [{ type: Input }],
|
|
2711
|
+
priceListCodeData: [{ type: Input }],
|
|
2685
2712
|
showDialog: [{ type: Input }],
|
|
2686
2713
|
headerTitle: [{ type: Input }],
|
|
2687
2714
|
printerList: [{ type: Input }],
|
|
@@ -2814,8 +2841,7 @@ StockModule.decorators = [
|
|
|
2814
2841
|
StockComponent
|
|
2815
2842
|
],
|
|
2816
2843
|
providers: [
|
|
2817
|
-
StockService
|
|
2818
|
-
SharedConnectorService
|
|
2844
|
+
StockService
|
|
2819
2845
|
]
|
|
2820
2846
|
},] }
|
|
2821
2847
|
];
|
|
@@ -3143,6 +3169,29 @@ LayoutSwitcherModule.decorators = [
|
|
|
3143
3169
|
},] }
|
|
3144
3170
|
];
|
|
3145
3171
|
|
|
3172
|
+
class SharedService {
|
|
3173
|
+
constructor(options, connector) {
|
|
3174
|
+
this.options = options;
|
|
3175
|
+
this.connector = connector;
|
|
3176
|
+
}
|
|
3177
|
+
init(options) {
|
|
3178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3179
|
+
yield this.options.initialize(options);
|
|
3180
|
+
this.connector.connect();
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
3185
|
+
SharedService.decorators = [
|
|
3186
|
+
{ type: Injectable, args: [{
|
|
3187
|
+
providedIn: "root"
|
|
3188
|
+
},] }
|
|
3189
|
+
];
|
|
3190
|
+
SharedService.ctorParameters = () => [
|
|
3191
|
+
{ type: OptionsService },
|
|
3192
|
+
{ type: SharedConnectorService }
|
|
3193
|
+
];
|
|
3194
|
+
|
|
3146
3195
|
/*
|
|
3147
3196
|
* Public API Surface of sharedcomponents
|
|
3148
3197
|
*/
|
|
@@ -3151,5 +3200,5 @@ LayoutSwitcherModule.decorators = [
|
|
|
3151
3200
|
* Generated bundle index. Do not edit.
|
|
3152
3201
|
*/
|
|
3153
3202
|
|
|
3154
|
-
export { DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc,
|
|
3203
|
+
export { DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc, SharedConnectorService as ɵd, OptionsService as ɵe, DictionaryService as ɵf, IconCacheService as ɵg, StockInformationComponent as ɵh, StockInformationGridComponent as ɵi, StockLocationComponent as ɵj, StockTransferComponent as ɵk, StockChangeAmountComponent as ɵl };
|
|
3155
3204
|
//# sourceMappingURL=colijnit-sharedcomponents.js.map
|