Merge pull request #1342 from appwrite/fix-payment-expired-notification

fix: payment expired notification, add sessionstorage check
This commit is contained in:
Steven Nguyen authored and GitHub committed 2024-09-09 16:39:04 +02:00
commit bf5a449c1e
1 file changed
+3
+3
View File
@@ -306,6 +306,8 @@ export async function paymentExpired(org: Organization) {
org.paymentMethodId
);
if (!payment?.expiryYear) return;
const sessionStorageNotification = sessionStorage.getItem('expiredPaymentNotification');
if (sessionStorageNotification === 'true') return;
const year = new Date().getFullYear();
const month = new Date().getMonth();
const expiredMessage = `The default payment method for <b>${org.name}</b> has expired`;
@@ -343,6 +345,7 @@ export async function paymentExpired(org: Organization) {
]
});
}
sessionStorage.setItem('expiredPaymentNotification', 'true');
}
export function checkForMarkedForDeletion(org: Organization) {