Merge pull request 'missed Function' (#131) from enhancement/entryandquickadd into main

Reviewed-on: Pozomind/pozo-retail-app#131
This commit is contained in:
karthikalakshmi 2026-02-11 18:20:58 +05:30
commit f798cb2f15
1 changed files with 17 additions and 3 deletions

View File

@ -53,7 +53,7 @@ const useSubscriptionManager = (sessionData, logout) => {
try {
const UserId = getSession('UserId');
const AppId = getSession('UserId')
const AppId = getSession('AppId')
// Current date
const now = new Date();
const currentDate = formatDate(now);
@ -138,9 +138,23 @@ const useSubscriptionManager = (sessionData, logout) => {
expData.RemainingSeconds < 1 &&
UserType !== 'Super Admin'
) {
alert('Subscription expired');
logout();
if (
(UserType !== 'Super Admin' ||
UserType !== 'Super Admin User') && (expData?.PlanType?.toLowerCase() == "extend expired")
) {
console.log('Subscription expired, logging out...');
alert('Subscription expired');
logout();
}
else if (
(UserType !== 'Super Admin' ||
UserType !== 'Super Admin User') && (expData?.PlanType?.toLowerCase() == "plan expired")
) {
setExtendModel(true)
}
}
}
};