@colijnit/catalog 12.1.50 → 12.1.52

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.
@@ -30,6 +30,8 @@ import { UserGroup } from '@colijnit/mainapi/build/model/user-group.bo';
30
30
  import { PriceList } from '@colijnit/transactionapi/build/model/price-list';
31
31
  import { Transaction } from '@colijnit/transactionapi/build/transaction';
32
32
  import { ExternalCatalogStartupInfo } from '@colijnit/articleapi/build/model/external-catalog-startup-info';
33
+ import { Color } from '@colijnit/mainapi/build/model/color.bo';
34
+ import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
33
35
  import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
34
36
  import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
35
37
  import { FilterViewmodel, FilterItemViewmodel, FilterItemModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule } from '@colijnit/corecomponents_v12';
@@ -47,8 +49,8 @@ class Version {
47
49
  constructor() {
48
50
  this.name = "@colijnit/catalog";
49
51
  this.description = "iOne Catalog module based on Angular 12";
50
- this.symVer = "12.1.50";
51
- this.publishDate = "19-10-2023 12:13:28";
52
+ this.symVer = "12.1.52";
53
+ this.publishDate = "9-11-2023 10:43:48";
52
54
  }
53
55
  }
54
56
 
@@ -517,6 +519,17 @@ class CatalogConnectorAdapterService {
517
519
  }
518
520
  });
519
521
  }
522
+ getColors() {
523
+ return __awaiter(this, void 0, void 0, function* () {
524
+ const response = yield this.mainConnector.getColors();
525
+ if (response && response.validationResult && response.validationResult.success) {
526
+ return this._boFactory.makeBOArrayFromRawBackendDataArray(Color, response.resultObjects);
527
+ }
528
+ else {
529
+ console.error(response.validationMessagesAsString);
530
+ }
531
+ });
532
+ }
520
533
  getDomainCollection(domainName) {
521
534
  return __awaiter(this, void 0, void 0, function* () {
522
535
  const response = yield this.mainConnector.getDomainCollection(this.connectorOptions.languageCode, domainName);
@@ -727,14 +740,14 @@ class CatalogConnectorAdapterService {
727
740
  }
728
741
  });
729
742
  }
730
- addWebSessionTransactionLine(sku, quantity) {
731
- return __awaiter(this, void 0, void 0, function* () {
732
- return yield this.transactionConnector.addWebSessionTransactionLine(sku, quantity);
733
- });
734
- }
735
- getWebTransaction() {
743
+ addWebSessionTransactionLine(transactionUuid, sku, quantity) {
736
744
  return __awaiter(this, void 0, void 0, function* () {
737
- return yield this.transactionConnector.getWebSessionSalesOrder();
745
+ const response = yield this.transactionConnector.addWebSessionTransactionLine(transactionUuid, sku, quantity);
746
+ if (response && response.validationResult && response.validationResult.success) {
747
+ const infoResponse = this._boFactory.makeWithRawBackendData(TransactionInfoResponse, response.resultObject);
748
+ return infoResponse.transactionInfo.uuid;
749
+ }
750
+ return "";
738
751
  });
739
752
  }
740
753
  getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId = undefined, configuratorStatistics) {
@@ -1263,6 +1276,11 @@ class CatalogConnectorService {
1263
1276
  return this._adapterService.getCategories();
1264
1277
  });
1265
1278
  }
1279
+ getColors() {
1280
+ return __awaiter(this, void 0, void 0, function* () {
1281
+ return this._adapterService.getColors();
1282
+ });
1283
+ }
1266
1284
  getDomainCollection(domainName) {
1267
1285
  return __awaiter(this, void 0, void 0, function* () {
1268
1286
  return this._adapterService.getDomainCollection(domainName);
@@ -1323,14 +1341,9 @@ class CatalogConnectorService {
1323
1341
  getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId = undefined, configuratorStatistics) {
1324
1342
  return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, undefined, configuratorStatistics);
1325
1343
  }
1326
- addWebSessionTransactionLine(sku, quantity) {
1344
+ addWebSessionTransactionLine(transactionUuid, sku, quantity) {
1327
1345
  return __awaiter(this, void 0, void 0, function* () {
1328
- return yield this._adapterService.addWebSessionTransactionLine(sku, quantity);
1329
- });
1330
- }
1331
- getWebTransaction() {
1332
- this._adapterService.getWebTransaction().then((response) => {
1333
- console.log(response);
1346
+ return yield this._adapterService.addWebSessionTransactionLine(transactionUuid, sku, quantity);
1334
1347
  });
1335
1348
  }
1336
1349
  }
@@ -2447,6 +2460,7 @@ class CatalogFilterContentGeneralComponent {
2447
2460
  this._setPublicationCodesSales();
2448
2461
  this._setPriceList();
2449
2462
  this._setCategories();
2463
+ this._setColors();
2450
2464
  }
2451
2465
  _setStoreGroups() {
2452
2466
  this._catalogConnectorService.getStoreGroups().then((storeGroups) => {
@@ -2468,6 +2482,11 @@ class CatalogFilterContentGeneralComponent {
2468
2482
  this.categoryCollection = this.filterService.createFilterSelectionsCollection(categories, "categoryCode", "description");
2469
2483
  });
2470
2484
  }
2485
+ _setColors() {
2486
+ this._catalogConnectorService.getColors().then((colors) => {
2487
+ this.colorCollection = this.filterService.createFilterSelectionsCollection(colors, "colorCode", "description");
2488
+ });
2489
+ }
2471
2490
  _setPublicationCodes() {
2472
2491
  this._catalogConnectorService.getRVDomainCollection(DomainName.ArtPublication).then((publicationCodes) => {
2473
2492
  this.artPublicationCollection = this.filterService.createFilterSelectionsCollection(publicationCodes, "code", "description");
@@ -2546,6 +2565,14 @@ CatalogFilterContentGeneralComponent.decorators = [
2546
2565
  >
2547
2566
  </co-catalog-filter-item>
2548
2567
  </div>
2568
+ <div class="filter-item-wrapper">
2569
+ <co-catalog-filter-item [placeholder]="'COLOR'"
2570
+ [(model)]="catalogSearchService.searchRequest.colourCodes"
2571
+ [mode]="modes.SelectListWithStringCollectionOutput"
2572
+ [collection]="colorCollection"
2573
+ >
2574
+ </co-catalog-filter-item>
2575
+ </div>
2549
2576
  <div class="filter-item-wrapper">
2550
2577
  <co-catalog-filter-item
2551
2578
  [placeholder]="'ARTICLE_TYPE'"
@@ -3866,24 +3893,6 @@ class ArticleBaseComponent {
3866
3893
  return __awaiter(this, void 0, void 0, function* () {
3867
3894
  event.stopPropagation();
3868
3895
  const json = yield this._getJSONFromArticleObject(this.article);
3869
- if (this._settingsService.settings.createWebOrder) {
3870
- if (json) {
3871
- const articleTreeData = JSON.parse(json);
3872
- if (articleTreeData.articleTree && articleTreeData.articleTree.article) {
3873
- if (articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
3874
- articleTreeData.articleTree.compositeGoods.length > 0 && articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles)) {
3875
- for (let i = 0; i < articleTreeData.articleTree.compositeGoods.length - 1; i++) {
3876
- const good = articleTreeData.articleTree.compositeGoods[i];
3877
- const subArticle = articleTreeData.articleTree.subArticles[i];
3878
- yield this._iOne.addWebSessionTransactionLine(subArticle.articleNumber, good.quantity);
3879
- }
3880
- }
3881
- else {
3882
- yield this._iOne.addWebSessionTransactionLine(articleTreeData.articleTree.article.articleNumber, 1);
3883
- }
3884
- }
3885
- }
3886
- }
3887
3896
  this._appEventService.addArticleButtonClick.next(json);
3888
3897
  this.onAddArticleButtonClick.emit(json);
3889
3898
  });
@@ -4439,6 +4448,7 @@ class CatalogExternalSourceComponent {
4439
4448
  this.iFrameFeedbackReceived = new EventEmitter();
4440
4449
  this.showClass = true;
4441
4450
  this.showCatalog = false;
4451
+ this.vadainCounter = 0;
4442
4452
  this.loaded = false;
4443
4453
  this.externalSettings = {};
4444
4454
  this._subs = [];
@@ -4492,6 +4502,14 @@ class CatalogExternalSourceComponent {
4492
4502
  'PASSWORD': this.password
4493
4503
  }, '*');
4494
4504
  }
4505
+ if (this.externalOrderNr && this.vadainCounter === 1) {
4506
+ event.target.contentWindow.postMessage({
4507
+ 'EDIT_ORDER': true,
4508
+ 'ORDER_ID': this.externalOrderNr
4509
+ }, '*');
4510
+ this.externalOrderNr = null;
4511
+ }
4512
+ this.vadainCounter++;
4495
4513
  }
4496
4514
  _prepareExternalSource() {
4497
4515
  return __awaiter(this, void 0, void 0, function* () {
@@ -4520,9 +4538,7 @@ class CatalogExternalSourceComponent {
4520
4538
  if (this._externalSource.type === ExternalCatalogTypes.Vadain) {
4521
4539
  this.username = this._externalCatalogStartupInfo.username;
4522
4540
  this.password = this._externalCatalogStartupInfo.password;
4523
- }
4524
- else if (this._externalSource.type == ExternalCatalogTypes.Woontotaal) {
4525
- this.externalUrl += "?token=" + this._externalCatalogStartupInfo.token + "&isEmbedded=true";
4541
+ this.externalOrderNr = this._externalCatalogStartupInfo.orderId;
4526
4542
  }
4527
4543
  }
4528
4544
  else {