price calulator changed 4
This commit is contained in:
+16
-1
@@ -99,11 +99,26 @@ export function getStoreTradingHours(): StoreTradingHours {
|
|||||||
export function getEffectiveTradingHours(): EffectiveTradingHours {
|
export function getEffectiveTradingHours(): EffectiveTradingHours {
|
||||||
void productTradingHoursVersion.value
|
void productTradingHoursVersion.value
|
||||||
const settings = getStoreTradingHours()
|
const settings = getStoreTradingHours()
|
||||||
|
if (settings.closePriceEnabled) {
|
||||||
|
return {
|
||||||
|
start: settings.start,
|
||||||
|
end: settings.end,
|
||||||
|
enforced: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (productTradingHours.value?.start && productTradingHours.value?.end) {
|
||||||
|
return {
|
||||||
|
start: productTradingHours.value.start,
|
||||||
|
end: productTradingHours.value.end,
|
||||||
|
enforced: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start: settings.start,
|
start: settings.start,
|
||||||
end: settings.end,
|
end: settings.end,
|
||||||
enforced: settings.closePriceEnabled,
|
enforced: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user