@contrail/flexplm 1.1.5 → 1.1.6
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.
|
@@ -94,15 +94,19 @@ class BaseProcessPublishAssortment {
|
|
|
94
94
|
const sinceDateString = String(this.config['sinceDate'] || '');
|
|
95
95
|
if (sinceDateString.includes('-')) {
|
|
96
96
|
const [year, month, day] = sinceDateString.split('-').map(Number);
|
|
97
|
-
const
|
|
98
|
-
|
|
97
|
+
const d = new Date(year, month - 1, day, 0, 0);
|
|
98
|
+
const minutes = -d.getTimezoneOffset();
|
|
99
|
+
d.setUTCMinutes(minutes);
|
|
100
|
+
return d;
|
|
99
101
|
}
|
|
100
102
|
if (sinceDateString.includes(':')) {
|
|
101
103
|
const [type, countStr] = sinceDateString.split(':');
|
|
102
104
|
const count = parseInt(countStr);
|
|
103
105
|
if (type.trim().toLowerCase() === 'numberofdays') {
|
|
104
106
|
const currentDate = new Date();
|
|
105
|
-
|
|
107
|
+
const d = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate() - count, 0, 0);
|
|
108
|
+
d.setUTCMinutes(-d.getTimezoneOffset());
|
|
109
|
+
return d;
|
|
106
110
|
}
|
|
107
111
|
if (type.trim().toLowerCase() === 'numberofpublishes') {
|
|
108
112
|
const apcHistory = await this.getApcHistory(assortmentId);
|
|
@@ -449,7 +453,7 @@ class BaseProcessPublishAssortment {
|
|
|
449
453
|
data: seasonalData
|
|
450
454
|
};
|
|
451
455
|
if ('ASSORTMENT' === projectItem.addedFromSource && projectItem.addedFromAssortment) {
|
|
452
|
-
const carriedFromSeason = this.getCarriedFromSeason(projectItem);
|
|
456
|
+
const carriedFromSeason = await this.getCarriedFromSeason(projectItem);
|
|
453
457
|
if (carriedFromSeason) {
|
|
454
458
|
psUpsert['carriedFromSeason'] = carriedFromSeason;
|
|
455
459
|
}
|
|
@@ -478,7 +482,7 @@ class BaseProcessPublishAssortment {
|
|
|
478
482
|
data: seasonalData
|
|
479
483
|
};
|
|
480
484
|
if ('ASSORTMENT' === projectItem.addedFromSource && projectItem.addedFromAssortment) {
|
|
481
|
-
const carriedFromSeason = this.getCarriedFromSeason(projectItem);
|
|
485
|
+
const carriedFromSeason = await this.getCarriedFromSeason(projectItem);
|
|
482
486
|
if (carriedFromSeason) {
|
|
483
487
|
csUpsert['carriedFromSeason'] = carriedFromSeason;
|
|
484
488
|
}
|