gunsmith-common 2.3.22 → 2.3.24
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/esm2020/shared/services/finish-date-helper.service.mjs +8 -4
- package/esm2020/shared/types/milling-detail.mjs +1 -1
- package/esm2020/shared/types/milling-item.mjs +1 -1
- package/fesm2015/gunsmith-common.mjs +7 -3
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +7 -3
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.3.24.tgz +0 -0
- package/package.json +1 -1
- package/shared/types/milling-detail.d.ts +2 -0
- package/shared/types/milling-item.d.ts +2 -0
- package/gunsmith-common-2.3.22.tgz +0 -0
|
@@ -1959,7 +1959,7 @@ class FinishDateHelperService {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
return finishDate;
|
|
1961
1961
|
}
|
|
1962
|
-
calculateFinishDate(receivedDate, workOrderType) {
|
|
1962
|
+
calculateFinishDate(receivedDate, workOrderType, hasRefinish = false) {
|
|
1963
1963
|
let finishDate = DateTime.fromJSDate(receivedDate).startOf("day");
|
|
1964
1964
|
if (workOrderType === WorkOrderType.Warranty) {
|
|
1965
1965
|
finishDate = finishDate.plus({ weeks: this.configs.warrantyWeeks });
|
|
@@ -1968,10 +1968,14 @@ class FinishDateHelperService {
|
|
|
1968
1968
|
finishDate = finishDate.plus({ weeks: this.configs.expeditedWeeks });
|
|
1969
1969
|
}
|
|
1970
1970
|
else if (workOrderType === WorkOrderType.NewInBox) {
|
|
1971
|
-
finishDate =
|
|
1971
|
+
finishDate = hasRefinish
|
|
1972
|
+
? finishDate.plus({ weeks: this.configs.refinishWeeks })
|
|
1973
|
+
: finishDate.plus({ weeks: this.configs.newInBoxWeeks });
|
|
1972
1974
|
}
|
|
1973
1975
|
else {
|
|
1974
|
-
finishDate =
|
|
1976
|
+
finishDate = hasRefinish
|
|
1977
|
+
? finishDate.plus({ weeks: this.configs.refinishWeeks })
|
|
1978
|
+
: finishDate.plus({ weeks: this.configs.standardWeeks });
|
|
1975
1979
|
}
|
|
1976
1980
|
return this.adjustHoliday(finishDate.toJSDate());
|
|
1977
1981
|
}
|