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 loadSubscription = useCallback(async () => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (subscription[0]) {
|
if (subscription[0]) {
|
||||||
const stripeSubscription = await Stripe.getInstance().getStripeSubscriptionByUid(subscription[0].stripe_subscription_id!);
|
const stripeSubscription = await Stripe.getInstance().getStripeSubscriptionByUid(subscription[0].stripe_subscription_id!);
|
||||||
|
@ -18,6 +18,7 @@ export default function SubscriptionError() {
|
|||||||
|
|
||||||
const loadSubscription = useCallback(async () => {
|
const loadSubscription = useCallback(async () => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) return;
|
if (!subscription[0]) return;
|
||||||
setSubscription(subscription[0]);
|
setSubscription(subscription[0]);
|
||||||
|
@ -42,6 +42,7 @@ export default function SubscriptionFacturation() {
|
|||||||
const manageSubscription = async () => {
|
const manageSubscription = async () => {
|
||||||
try {
|
try {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) return;
|
if (!subscription[0]) return;
|
||||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
||||||
@ -52,6 +53,7 @@ export default function SubscriptionFacturation() {
|
|||||||
const cancelOrReactivateSubscription = async () => {
|
const cancelOrReactivateSubscription = async () => {
|
||||||
try {
|
try {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) return;
|
if (!subscription[0]) return;
|
||||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
||||||
@ -66,6 +68,7 @@ export default function SubscriptionFacturation() {
|
|||||||
const manageBilling = async () => {
|
const manageBilling = async () => {
|
||||||
try {
|
try {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) return;
|
if (!subscription[0]) return;
|
||||||
const stripe_client_portal = await Stripe.getInstance().getClientPortalSession(subscription[0].stripe_subscription_id!);
|
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 loadSubscription = useCallback(async () => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) {
|
if (!subscription[0]) {
|
||||||
router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path);
|
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 loadSubscription = useCallback(async () => {
|
||||||
const jwt = JwtService.getInstance().decodeJwt();
|
const jwt = JwtService.getInstance().decodeJwt();
|
||||||
|
console.log("jwt:", jwt);
|
||||||
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
const subscription = await Subscriptions.getInstance().get({ where: { office: { uid: jwt?.office_Id } } });
|
||||||
if (!subscription[0]) return;
|
if (!subscription[0]) return;
|
||||||
setSubscription(subscription[0]);
|
setSubscription(subscription[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user