Redirect to new subscription if no subscription
This commit is contained in:
parent
84e2b05fc9
commit
028c974232
@ -45,8 +45,11 @@ export default function SubscriptionFacturation() {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
console.log(subscription);
|
||||
if (!subscription[0]) return;
|
||||
if (!subscription[0]) {
|
||||
router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path);
|
||||
} else {
|
||||
setSubscription(subscription[0]);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user