Merged in fix/SW-2236-remove-modify-for-save (pull request #1771)
fix(SW-2236): show modify by only if changable * fix(SW-2236): show modify by only if changable Approved-by: Niclas Edenvin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ChildBedTypeEnum } from "@/constants/booking"
|
||||
import { CancellationRuleEnum, ChildBedTypeEnum } from "@/constants/booking"
|
||||
|
||||
export function formatChildBedPreferences({
|
||||
childrenAges,
|
||||
@@ -61,3 +61,10 @@ export function formatChildBedPreferences({
|
||||
// Filter out any null values and join the results
|
||||
return `[${preferences.filter((pref) => typeof pref === "string").join(", ")}]`
|
||||
}
|
||||
|
||||
export function hasModifiableRate(cancellationRule: string | null): boolean {
|
||||
return (
|
||||
cancellationRule === CancellationRuleEnum.CancellableBefore6PM ||
|
||||
cancellationRule === CancellationRuleEnum.Changeable
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user