@solidpepper/solidpepper-solidgeneration 0.2.8 → 0.2.9

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.
@@ -8523,13 +8523,21 @@ class DataSheetController {
8523
8523
  dataSheet.progress = 25;
8524
8524
  let files = [];
8525
8525
  switch (source) {
8526
- case 1: // All SKUS
8526
+ case 1: // All SKUS or Selected SKUS Batch
8527
8527
  //console.log('[PDF] Fetching SKU list for global batch generation...');
8528
8528
  try {
8529
- const res = await this._generationService
8530
- .getSkusDatas(json.language, json.attributeSkuGuid, templateGuid, json.onlyNeedRegeneration)
8531
- .toPromise();
8532
- const skuGuids = res.skuGuids || [];
8529
+ let skuGuids = [];
8530
+ if (Array.isArray(json.sourceGuid) &&
8531
+ json.sourceGuid.length > 0 &&
8532
+ json.sourceGuid[0] !== 'all') {
8533
+ skuGuids = json.sourceGuid;
8534
+ }
8535
+ else {
8536
+ const res = await this._generationService
8537
+ .getSkusDatas(json.language, json.attributeSkuGuid, templateGuid, json.onlyNeedRegeneration)
8538
+ .toPromise();
8539
+ skuGuids = res.skuGuids || [];
8540
+ }
8533
8541
  const concurrencyLimit = 5;
8534
8542
  let currentIndex = 0;
8535
8543
  const executeTask = async () => {