Merged in fix/LOY-358-SAS-expiry-date (pull request #2813)

fix(LOY-358): Proper SAS tier expiration date check

* fix(LOY-358): Proper SAS tier expiration date check


Approved-by: Erik Tiekstra
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-09-18 13:39:37 +00:00
parent 948c86479a
commit cc99f26727
4 changed files with 20 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
import type { EurobonusMembership } from "@scandic-hotels/trpc/types/user"
/**
* Get SAS tier expiration date, checking boostedTierExpires first, then falling back to tierExpires
*/
export function getSasTierExpirationDate(
sasMembership: EurobonusMembership
): string | null {
return sasMembership.boostedTierExpires || sasMembership.tierExpires
}