Compare commits

..

20 Commits

Author SHA1 Message Date
victorAnumudu c19cfdd524 fixed template data bug 2025-08-26 18:15:55 +01:00
ameye 2476c491be Merge branch 'template-api-fix' of MERMS/MermsPanelReactJS into master 2025-08-26 15:57:36 +00:00
victorAnumudu ece281ef8a API data added 2025-08-26 16:04:02 +01:00
ameye 8ae0de1004 Merge branch 'template-api' of MERMS/MermsPanelReactJS into master 2025-08-25 19:43:40 +00:00
victorAnumudu 13ac1d1f85 added template API 2025-08-25 19:55:01 +01:00
CHIEFSOFT\ameye 5a408311ae Activation button 2025-08-25 09:09:42 -04:00
CHIEFSOFT\ameye 9c64d8178e Fix text 2025-08-24 08:30:42 -04:00
CHIEFSOFT\ameye be8f54bb42 Fix text 2025-08-24 08:06:06 -04:00
CHIEFSOFT\ameye 2c6102dfa5 options 2025-08-23 23:02:53 -04:00
CHIEFSOFT\ameye bbd6ecac58 Added link 2025-08-23 18:31:01 -04:00
CHIEFSOFT\ameye 56ce8f0556 pakage json 2025-08-23 17:06:21 -04:00
CHIEFSOFT\ameye 9e4de10251 stripe button 2025-08-23 16:53:50 -04:00
CHIEFSOFT\ameye 777f3cbec4 merms panel 2025-08-23 08:30:32 -04:00
CHIEFSOFT\ameye a6e9d507ae fix sub page 2025-08-23 08:10:06 -04:00
CHIEFSOFT\ameye c1af89919e fix description 2025-08-23 07:22:03 -04:00
CHIEFSOFT\ameye a8686ac2e7 fix descriptions 2025-08-23 07:15:19 -04:00
ameye 591b1fa3b9 Merge branch 'payment-switch' of MERMS/MermsPanelReactJS into master 2025-08-19 18:28:58 +00:00
victorAnumudu 3d5bdc2afd fixed payment switch btn 2025-08-19 19:11:49 +01:00
CHIEFSOFT\ameye cdb676a047 payment forms 2025-08-19 11:54:55 -04:00
ameye 34febdedfa Merge branch 'selected-subscribe' of MERMS/MermsPanelReactJS into master 2025-08-18 19:09:17 +00:00
16 changed files with 352 additions and 111 deletions
+2
View File
@@ -10,6 +10,8 @@
"@fullcalendar/timegrid": "^6.1.15",
"@popperjs/core": "^2.11.8",
"@reduxjs/toolkit": "^2.4.0",
"@stripe/react-stripe-js": "^3.9.1",
"@stripe/stripe-js": "^7.8.0",
"@tanstack/react-query": "^5.62.3",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
+1
View File
@@ -52,6 +52,7 @@ function AppRouters() {
<Route path={siteLinks.contacts} element={<ContactsPage />} />
<Route path={siteLinks.user} element={<UserPage />} />
<Route path={siteLinks.subscription} element={<SubscriptionPage />} />
<Route path={siteLinks.subscription_success} element={<SubscriptionPage />} />
<Route path={siteLinks.onboard} element={<OnboardPage />} />
<Route path={siteLinks.calendar} element={<CalendarPage />} />
<Route path={siteLinks.settings} element={<SettingsPage />} />
+2 -1
View File
@@ -1,6 +1,7 @@
import { useQuery } from '@tanstack/react-query'
import { topBar } from '../../services/services'
import queryKeys from '../../services/queryKeys'
import { Link } from 'react-router-dom'
export default function TopBar() {
@@ -68,7 +69,7 @@ export default function TopBar() {
<small className="d-block">{item?.data_span}</small>
</div>
<div className="col text-right">
<h5 className="text-muted mb-0"><a href={item?.link}>{item?.description}</a></h5>
<h5 className="text-muted mb-0"><Link to={item?.link}>{item?.description}</Link></h5>
</div>
</div>
<div className="apexchart-wrapper">
+9 -13
View File
@@ -83,7 +83,7 @@ export default function ProductStart(props){
<img className="card-img-top" src={getImage(productBanner)} alt="Card image cap" />
<div className="card-body">
<h4 className="card-title">{productTitle}</h4>
<div className="card-text" dangerouslySetInnerHTML={{__html: productDescription}}/>
<div className="card-text" style={{fontSize: '14px'}} dangerouslySetInnerHTML={{__html: productDescription}}/>
{/* <p className="card-text">{productDescription}</p> */}
</div>
</div>
@@ -97,7 +97,7 @@ export default function ProductStart(props){
</>
<div className="card-body">
<p className="card-text">Start with your goals in mind and then work possible. </p>
<p className="card-text">We are actively working to launch this feature soon and will keep you informed every step of the way. </p>
</div>
<ul className="list-group list-group-flush">
<li className="list-group-item"><h4>Coming soon!!!</h4></li>
@@ -109,19 +109,15 @@ export default function ProductStart(props){
{/*<img className="card-img-top" src={getImage('widget/01.jpg')} alt="Card image cap" />*/}
<div className="card-body">
<h4 className="card-title">Subscription</h4>
<p className="card-text">Start with your goals in mind and then work possible.ith yand Goals. If the plan doesnt support the vision then change it! </p>
<p className="card-text">Launch your <span style={{color: '#148399' , fontWeight: 'bolder'}}>{productTitle}</span> with us for free! Benefit from our dedicated support and customize features that align perfectly with your goals. Experience everything at no cost! </p>
</div>
<ul className="list-group list-group-flush">
<li className="list-group-item"><h4>{promotion_text}</h4></li>
<li className="list-group-item">90 days free and 3.95/Month</li>
<li className="list-group-item">90 days free and $5.99/Month</li>
<li className="list-group-item"></li>
</ul>
{/*<div className="card-body">*/}
{/* <a href="javascript:void(0)" className="card-link">Card link</a>*/}
{/* <a href="javascript:void(0)" className="card-link">Another link</a>*/}
{/*</div>*/}
<div className="subscribe-box">
<button className="btn btn-primary mt-2" data-bs-toggle="modal" data-bs-target="#verticalCenter">Start Subscription</button>
<button className="btn btn-primary mt-2" data-bs-toggle="modal" data-bs-target="#verticalCenter">Activate Now!</button>
</div>
</div>
</>
@@ -134,13 +130,13 @@ export default function ProductStart(props){
<div className="modal-dialog modal-dialog-centered" role="document">
<div className="modal-content">
<div className="modal-header">
<h5 className="modal-title" id="verticalCenterTitle">{productTitle}</h5>
<h5 className="modal-title" style={{fontSize: '18px'}} id="verticalCenterTitle">{productTitle}</h5>
<button type="button" className="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div className="modal-body">
<div className="" dangerouslySetInnerHTML={{__html: saleText}}/>
<div style={{fontSize: '18px'}} className="" dangerouslySetInnerHTML={{__html: saleText}}/>
{/* {mutation.error &&
<>
<div className="col-12">
@@ -162,8 +158,8 @@ export default function ProductStart(props){
)}
</div>
<div className="modal-footer">
<button type="button" className="btn btn-danger" data-bs-dismiss="modal">Close</button>
<button type="button" className="btn btn-success" disabled={mutation.isSuccess} onClick={handleSubscribe}>{mutation.isPending ? 'loading...' : 'Start'}</button>
<button type="button" className="btn btn-danger" data-bs-dismiss="modal">Cancel</button>
<button type="button" className="btn btn-primary" disabled={mutation.isSuccess} onClick={handleSubscribe}>{mutation.isPending ? 'activating...' : 'Start Activation'}</button>
</div>
</div>
</div>
@@ -20,7 +20,7 @@ const GeneralTab = memo(({name='Full Name', data, isCustom, productData, backend
fieldData[item?.setting_key?.toLowerCase().replaceAll(" ", "_")] = item?.setting_value
})
console.log('fieldData', fieldData)
// console.log('fieldData', fieldData)
const [fields, setFields] = useState(fieldData)
@@ -1,14 +1,69 @@
import React, {memo} from 'react'
import getImage from "../../../utils/getImage";
import { useQuery } from '@tanstack/react-query';
import queryKeys from '../../../services/queryKeys';
import { getProductTemplateData } from '../../../services/services';
const SiteTemplateSelector = memo(({name='Full Name', data}) =>{
console.log("Page data == ", data)
const SiteTemplateSelector = memo(({name='Full Name', data, productData}) =>{
const {data:templateData, isFetching, isError, error} = useQuery({
queryKey: queryKeys.productTemplateData,
queryFn: () => {
let reqData = {
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid'), // USER UID
product_id: productData?.product_id
}
return getProductTemplateData(reqData)
},
staleTime: 0
})
const templateResponse = templateData?.data
const templates = templateResponse?.templates
// console.log('data Template', templates)
// console.log("Page data == ", data)
return (
<div className="page-account-form">
<div className="p-0">
{isFetching ?
<>
<div className="row">
<div className="col-12">
<p className='text-mute'>Loading...</p>
</div>
</div>
</>
: isError ?
<div className="row">
<div className="col-12">
<p className='text-danger'>{error?.message}</p>
</div>
</div>
:
<div className="row">
<>
{Object.entries(data)?.map(([key, value]) => (
{!templates.length ?
<p>No data Found</p>
:
templates.map(template => (
<div key={template.template_uid} className="col-xl-6 col-sm-6">
<div className="card card-statistics">
<div className="card-body">
<div className="text-center p-2">
<div className="mb-2">
<img src={getImage('file-icon/svg.png')} alt={template.title} />
</div>
<h4 className="mb-0">{template.title}</h4>
<a href="#" className="btn btn-light">Activate</a>
</div>
</div>
</div>
</div>
))
}
{/* {Object.entries(data)?.map(([key, value]) => (
<div key={key} className="col-xl-6 col-sm-6">
<div className="card card-statistics">
<div className="card-body">
@@ -22,9 +77,10 @@ const SiteTemplateSelector = memo(({name='Full Name', data}) =>{
</div>
</div>
</div>
))}
))} */}
</>
</div>
}
</div>
</div>
)
@@ -0,0 +1,57 @@
import React from 'react';
import { loadStripe } from '@stripe/stripe-js';
import { Elements, useStripe, useElements, CardElement } from '@stripe/react-stripe-js';
import {MyProductData, StripeSubscriptionCreate} from '../../services/services';
import {useQuery} from "@tanstack/react-query";
import queryKeys from "../../services/queryKeys";
import { useNavigate } from 'react-router-dom';
//const stripePromise = loadStripe('your_stripe_publishable_key');
const stripePromise = loadStripe('pk_test_51RqL5WLjZLojw6IZmEpwFidNZSl9lLlVUHNvuFZNEz1eTR9XXepnyyVhfvXe9cp4eMnqkDPpoe9wxLLRSV0dxRee00UfhayUOT');
const CheckoutForm = ({ priceId, customerId ,option_name }) => {
const stripe = useStripe();
const elements = useElements();
const navigate = useNavigate();
const handleSubmit = async (event) => {
event.preventDefault();
if (!stripe || !elements) {
return;
}
let reqData = {
priceId : priceId,
customerId: customerId,
option_name: option_name,
token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid') // USER UID
}
StripeSubscriptionCreate(reqData).then( (res)=>{
console.log(res);
console.log(res.data.stripe_session);
//navigate(res.data.stripe_session)
window.location.replace(res.data.stripe_session);
});
};
return (
<form onSubmit={handleSubmit}>
<CardElement />
<button type="submit" disabled={!stripe}>
Subscribe
</button>
</form>
);
};
const StripeSubscriptionButton = ({ priceId, customerId ,option_name}) => {
return (
<Elements stripe={stripePromise}>
<CheckoutForm priceId={priceId} customerId={customerId} option_name={option_name} />
</Elements>
);
};
export default StripeSubscriptionButton;
@@ -1,6 +1,11 @@
import React from 'react'
export default function SubcribePaymentOptions(){
export default function SubcribePaymentOptions({activePaymentType, setActivePaymentType}){
const handleSwitch = ({target:{name, value}}) => {
console.log('SWITCH', name, value)
setActivePaymentType(value)
}
return <>
@@ -13,13 +18,13 @@ export default function SubcribePaymentOptions(){
<div className="card-body">
<div className="form-check form-check-inline">
<input className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1"
value="option1" />
<input onChange={handleSwitch} className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1"
value="previous" checked={activePaymentType == 'previous'} />
<label className="form-check-label" htmlFor="inlineRadio1">Previous Cards</label>
</div>
<div className="form-check form-check-inline">
<input className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2"
value="option2" />
<input onChange={handleSwitch} className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2"
value="new" checked={activePaymentType == 'new'} />
<label className="form-check-label" htmlFor="inlineRadio2">Add New card</label>
</div>
</div>
+39 -31
View File
@@ -1,24 +1,26 @@
import React from 'react'
import React, {useState} from 'react'
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
import getImage from "../../utils/getImage";
import { getSubscriptions } from '../../services/services';
import { useQuery } from '@tanstack/react-query';
import queryKeys from '../../services/queryKeys';
import siteLinks from "../../links/siteLinks";
import { Link, useLocation } from 'react-router-dom'
import {Link, useLocation} from 'react-router-dom'
import SubscribeNewCard from "./SubscribeNewCard";
import SubscribePreviousCard from "./SubscribePreviousCard";
import SubcribePaymentOptions from "./SubcribePaymentOptions";
import StripeSubscriptionButton from "./StripeSubscriptionButton";
export default function Subscribe() {
const {state: {selectedSubscription,customerId}} = useLocation()
const {state:{selectedSubscription}} = useLocation()
console.log('selectedSubscription', selectedSubscription)
console.log('selectedSubscription.option_name',selectedSubscription.option_name)
console.log('customerId', customerId)
// console.log('selectedSubscription', selectedSubscription)
let [activePaymentType, setActivePaymentType] = useState('previous')
return (
<>
<BreadcrumbComBS title='Activate or Update your Subscription' paths={['Dashboard', 'subscribe']} />
<BreadcrumbComBS title='Activate or Update your Subscription' paths={['Dashboard', 'subscribe']}/>
<div className="row">
<div className="col-12 col-lg-6 col-xl-6">
@@ -27,36 +29,42 @@ export default function Subscribe() {
<div className="pricing-content-card">
<h5>Current Subscription(s)</h5>
{/*<h2 className="text-primary pt-3">{currentSubscription?.display_name}</h2>*/}
<SubcribePaymentOptions />
<SubscribeNewCard />
<SubscribePreviousCard />
<SubcribePaymentOptions activePaymentType={activePaymentType}
setActivePaymentType={setActivePaymentType}/>
{activePaymentType == 'new' ?
<SubscribeNewCard/>
:
<SubscribePreviousCard/>
}
<>
<StripeSubscriptionButton priceId={selectedSubscription.stripe_price_id} customerId={customerId} option_name={selectedSubscription.option_name} />
</>
</div>
</div>
</div>
</div>
<>
<div key="basic" className="col-12 col-lg-6 col-xl-6">
<div className="card card-statistics text-center py-3">
<div className="card-body pricing-content">
<div className="pricing-content-card">
<h5>{selectedSubscription.display_name}</h5>
<h2 className="text-primary pt-3">${selectedSubscription.monthly}</h2>
<p className="text-primary pb-3">/ Monthly</p>
<ul className="py-2">
{selectedSubscription?.items?.map(item =>(
<li key={item}>{item}</li>
))}
</ul>
{/*<div className="pt-2">*/}
{/* <button className="btn btn-inverse-secondary btn-round btn-sm">Go {subscriptionSelection.display_name}</button>*/}
{/*</div>*/}
<div key="basic" className="col-12 col-lg-6 col-xl-6">
<div className="card card-statistics text-center py-3">
<div className="card-body pricing-content">
<div className="pricing-content-card">
<h5>{selectedSubscription.display_name}</h5>
<h2 className="text-primary pt-3">${selectedSubscription.monthly}</h2>
<p className="text-primary pb-3">/ Monthly</p>
<ol className="py-2"
style={{fontSize: '16px', fontWeight: 'bold', textAlign: 'left'}}>
{selectedSubscription?.items?.map(item => (
<li key={item.description}>{item.description}</li>
))}
</ol>
{/*<div className="pt-2">*/}
{/* <button className="btn btn-inverse-secondary btn-round btn-sm">Go {subscriptionSelection.display_name}</button>*/}
{/*</div>*/}
</div>
</div>
</div>
</div>
</div>
</>
</div>
</>
+23 -1
View File
@@ -1,6 +1,28 @@
import React from 'react'
export default function SubscribeNewCard(){
return <>Previous Card</>
return <>
<div className="row">
<div className="col-md-12 col-12 selects-contant">
<div className="card card-statistics">
<div className="card-header">
<div className="card-heading" style={{textAlign: 'left'}}>
<h4 className="card-title">Pay with New Card</h4>
</div>
</div>
<div className="card-body">
<div className="form-group mb-0">
</div>
</div>
</div>
</div>
</div>
</>
}
@@ -1,6 +1,36 @@
import React from 'react'
export default function SubscribePreviousCard(){
import { IoMdArrowDropdown } from 'react-icons/io'
return <>Previous Card</>
export default function SubscribePreviousCard() {
return <>
{/*<div className="row select-wrapper">*/}
{/* <div className="col-md-12 col-12 selects-contant">*/}
<div className="row">
<div className="col-md-12 col-12 selects-contant">
<div className="card card-statistics">
<div className="card-header">
<div className="card-heading" style={{textAlign: 'left'}}>
<h4 className="card-title">Pay with Previous Card</h4>
</div>
</div>
<div className="card-body">
<div className="position-relative form-group mb-0">
<select className="js-basic-single form-control" name="state">
<option value="AK">Visa xxxx xxxx xxxx 1234</option>
<option value="HI">Mastercard xxxx xxxx xxxx 1234</option>
</select>
<IoMdArrowDropdown className='position-absolute w-auto' style={{top: '50%', right: '2px', transform: 'translateY(-50%)'}} />
</div>
</div>
</div>
</div>
{/* </div>*/}
{/*</div>*/}
</div>
</>
}
+66 -53
View File
@@ -1,18 +1,19 @@
import React from 'react'
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
import getImage from "../../utils/getImage";
import { getSubscriptions } from '../../services/services';
import { useQuery } from '@tanstack/react-query';
import {getSubscriptions} from '../../services/services';
import {useQuery} from '@tanstack/react-query';
import queryKeys from '../../services/queryKeys';
import siteLinks from "../../links/siteLinks";
import { Link, useNavigate } from 'react-router-dom'
import {Link, useNavigate} from 'react-router-dom'
import getDateFromDateString from '../../helpers/GetDateFromDateString';
export default function Subscription() {
const navigate = useNavigate()
const pricingFields ={
starter: { name: 'Starter', price: 5.99, active: true },
basic: { name: 'Basic', price: 12.99, active: true },
premium: { name: 'Premium', price: 20.00, active: true },
const pricingFields = {
starter: {name: 'Starter', price: 5.99, active: true},
basic: {name: 'Basic', price: 12.99, active: true},
premium: {name: 'Premium', price: 20.00, active: true},
}
const {data, isFetching, isError, error} = useQuery({
@@ -28,63 +29,75 @@ export default function Subscription() {
const currentSubscription = data?.data?.current_product
const otherSubscriptions = data?.data?.options
const stripe_customer_id = data?.data.stripe_customer_id
// console.log('urlData', data?.data)
return (
<>
<BreadcrumbComBS title='Subscription' paths={['Dashboard', 'Subscription']} />
{isFetching ?
<>
<div className="col-12">
<p className='text-mute'>Loading...</p>
</div>
</>
: isError ?
<div className="col-12">
<p className='text-danger'>{error.message}</p>
</div>
:
<div className="row">
<div className="col-12 col-lg-6 col-xl-3">
<div className="card card-statistics text-center py-3">
<div className="card-body pricing-content">
<div className="pricing-content-card">
<h5>Current Subscription(s)</h5>
<h2 className="text-primary pt-3">{currentSubscription?.display_name}</h2>
</div>
</div>
</div>
</div>
<BreadcrumbComBS title='Subscription' paths={['Dashboard', 'Subscription']}/>
{isFetching ?
<>
{Object.entries(otherSubscriptions)?.map(([key, value]) => (
<div key={key} className="col-12 col-lg-6 col-xl-3">
<div className="card card-statistics text-center py-3">
<div className="card-body pricing-content">
<div className="pricing-content-card">
<h5>{value.display_name}</h5>
<h2 className="text-primary pt-3">${value.monthly}</h2>
<p className="text-primary pb-3">/ Monthly</p>
<ul className="py-2">
{value?.items?.map(item =>(
<li key={item}>{item}</li>
))}
</ul>
<div className="pt-2">
<button onClick={()=>{navigate(siteLinks.subscribe, {state:{selectedSubscription: value}})}} className="btn btn-inverse-secondary btn-round btn-sm">Go {value.display_name}</button>
<div className="col-12">
<p className='text-mute'>Loading...</p>
</div>
</>
: isError ?
<div className="col-12">
<p className='text-danger'>{error.message}</p>
</div>
:
<div className="row">
<div className="col-12 col-lg-6 col-xl-3">
<div className="card card-statistics text-center py-3" style={{backgroundColor: '#e6f5f4'}}>
<div className="card-body pricing-content">
<div className="pricing-content-card" style={{minHeight: '350px'}}>
<h5>Your Subscription(s)</h5>
<h2 className="text-primary pt-3">{currentSubscription?.display_name}</h2>
</div>
<div className="pt-2" style={{textAlign: 'left'}}>
<div style={{fontSize: '10px'}}>
Next Payment: {getDateFromDateString(currentSubscription?.next_payment)}
</div>
</div>
</div>
</div>
</div>
<>
{Object.entries(otherSubscriptions)?.map(([key, value]) => (
<div key={key} className="col-12 col-lg-6 col-xl-3">
<div className="card card-statistics text-center py-3">
<div className="card-body pricing-content">
<div className="pricing-content-card" style={{minHeight: '350px'}}>
<h5>{value.display_name}</h5>
<h2 className="text-primary pt-3">${value.monthly}</h2>
<p className="text-primary pb-3">/ Monthly</p>
<ol className="py-2"
style={{fontSize: '16px', fontWeight: 'bold', textAlign: 'left'}}>
{value?.items?.map(item => (
<li key={item.description}>{item.description}</li>
))}
</ol>
</div>
</div>
<div className="pt-2">
<button onClick={() => {
navigate(siteLinks.subscribe, {state: {selectedSubscription: value, customerId: stripe_customer_id }})
}}
className="btn btn-inverse-secondary btn-round btn-sm">Go {value.display_name}</button>
</div>
</div>
</div>
))}
</>
</div>
))}
</>
</div>
}
}
</>
)
}
+33
View File
@@ -0,0 +1,33 @@
function getDateFromDateString(dateString) {
const date = new Date(dateString);
const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const dayName = days[date.getDay()];
const monthName = months[date.getMonth()];
const day = date.getDate();
const year = date.getFullYear();
// Add ordinal suffix
function getOrdinal(n) {
if (n > 3 && n < 21) return "th"; // 4-20 are all "th"
switch (n % 10) {
case 1: return "st";
case 2: return "nd";
case 3: return "rd";
default: return "th";
}
}
// Format time in 12hr with AM/PM
let hours = date.getHours();
const minutes = date.getMinutes().toString().padStart(2, "0");
const ampm = hours >= 12 ? "PM" : "AM";
hours = hours % 12 || 12;
return `${dayName}, ${monthName} ${day}${getOrdinal(day)} ${year} ${hours}:${minutes}${ampm}`;
}
export default getDateFromDateString
+1
View File
@@ -9,6 +9,7 @@ const siteLinks = {
comments: '/comments',
reports: '/reports',
subscription: '/subscription',
subscription_success:'/subscription-success',
subscribe: '/subscribe',
onboard: '/subscription',
user: '/user',
+1
View File
@@ -6,6 +6,7 @@ const queryKeys = {
product_page: ['product_page'],
recentAction: ['recent-action'],
settingsData: ['settings_data'],
productTemplateData: ['product_template_data'],
subscriptions: ['subscriptions'],
dashboard: ['dashboard'],
+15
View File
@@ -83,6 +83,13 @@ export const MyProductData = (reqData) => {
return postAuxEnd(`/panel/myproduct/dash`, postData, false)
}
export const StripeSubscriptionCreate = (reqData) => {
let postData = {
...reqData,
}
return postAuxEnd(`/panel/subscription/start`, postData, false)
}
// FUNCTION TO GET CALENDAR EVENTS
export const getCalendarEvents = (reqData) => {
let postData = {
@@ -166,6 +173,14 @@ export const getSettingsData = (reqData) => {
return postAuxEnd(`/panel/myproduct/settings/values`, postData, false)
}
// FUNCTION TO GET SETTINGS DATA
export const getProductTemplateData = (reqData) => {
let postData = {
...reqData,
}
return postAuxEnd(`/panel/account/products/templates`, postData, false)
}
// FUNCTION TO GET PRODUCT SUBSCRIPTIONS
export const completeProfile = (reqData) => {
let postData = {