Add verbosity
This commit is contained in:
parent
2d28f1a21a
commit
ea7e74ba06
@ -36,6 +36,7 @@ export default function Header(props: IProps) {
|
||||
|
||||
const loadSubscription = useCallback(async () => {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (subscription[0]) {
|
||||
const stripeSubscription = await Stripe.getInstance().getStripeSubscriptionByUid(subscription[0].stripe_subscription_id!);
|
||||
|
@ -18,6 +18,7 @@ export default function SubscriptionError() {
|
||||
|
||||
const loadSubscription = useCallback(async () => {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) return;
|
||||
setSubscription(subscription[0]);
|
||||
|
@ -42,6 +42,7 @@ export default function SubscriptionFacturation() {
|
||||
const manageSubscription = async () => {
|
||||
try {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) return;
|
||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
||||
@ -52,6 +53,7 @@ export default function SubscriptionFacturation() {
|
||||
const cancelOrReactivateSubscription = async () => {
|
||||
try {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) return;
|
||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
||||
@ -66,6 +68,7 @@ export default function SubscriptionFacturation() {
|
||||
const manageBilling = async () => {
|
||||
try {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) return;
|
||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
||||
@ -75,6 +78,7 @@ export default function SubscriptionFacturation() {
|
||||
|
||||
const loadSubscription = useCallback(async () => {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) {
|
||||
router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path);
|
||||
|
@ -21,6 +21,7 @@ export default function SubscriptionSuccess() {
|
||||
|
||||
const loadSubscription = useCallback(async () => {
|
||||
const jwt = JwtService.getInstance().decodeJwt();
|
||||
console.log("jwt:", jwt);
|
||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||
if (!subscription[0]) return;
|
||||
setSubscription(subscription[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user