diff --git a/resources/js/Components/Billing/BillingBanner.vue b/resources/js/Components/Billing/BillingBanner.vue index 60dc8385..b194b04c 100644 --- a/resources/js/Components/Billing/BillingBanner.vue +++ b/resources/js/Components/Billing/BillingBanner.vue @@ -35,11 +35,90 @@ const hideFreeUpgradeBanner = useSessionStorage( false ); const showFreeUpgradeBanner = computed( - () => isFreePlan() && !isBlocked() && !hideFreeUpgradeBanner.value + () => + isFreePlan() && + !isBlocked() && + !hideFreeUpgradeBanner.value && + !showBlackFridayBanner.value ); +const hideBlackFridayBanner = useSessionStorage( + 'hideBlackFridayBanner-' + getCurrentOrganizationId(), + false +); + +const showBlackFridayBanner = computed(() => { + if (hideBlackFridayBanner.value) { + return false; + } + const today = new Date(); + const blackFriday = new Date(2024, 10, 30); + return today < blackFriday; +});