se default freq. 3

This commit is contained in:
pramod mahajan 2025-08-19 13:39:03 +05:30
parent 7808a39aa0
commit 4a98c3d5e8
4 changed files with 30 additions and 20 deletions

View File

@ -107,6 +107,11 @@ const Profile = ({ data }) => {
<span className="fw-semibold">Seat Available:</span>
<span className="ms-2">{data?.seatsAvailable}</span>
</div>
<div className="col-12 col-md-6 d-flex align-items-center my-2 m-0">
<i className="bx bx-sm bx-group me-1"></i>
<span className="fw-semibold">Total Seat:</span>
<span className="ms-2">{data?.currentPlan?.maxUsers}</span>
</div>
<div className="col-12 col-md-6 d-flex align-items-center">
<i className="bx bx-sm bxs-calendar me-1"></i>
<span className="fw-semibold">On-Boarding Date:</span>

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
const SegmentedControl = ({setFrequency}) => {
const [selected, setSelected] = useState(3);
const SegmentedControl = ({setFrequency,defultFequency}) => {
const [selected, setSelected] = useState(defultFequency);
useEffect(()=>{
setFrequency(selected)
},[selected])

View File

@ -8,7 +8,7 @@ import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
const SubScription = ({ onSubmitSubScription, onNext }) => {
const [frequency, setFrequency] = useState(2);
const [frequency, setFrequency] = useState(3);
const [selectedPlanId, setSelectedPlanId] = useState(null);
const selectedTenant = useSelector(
(store) => store.globalVariables.currentTenant
@ -79,7 +79,7 @@ const SubScription = ({ onSubmitSubScription, onNext }) => {
if(isError) return <div className="text-center">{subscriptionGettingError?.message}</div>
return (
<div className="text-start">
<SegmentedControl setFrequency={setFrequency} />
<SegmentedControl setFrequency={setFrequency} defultFequency = {frequency}/>
{!isLoading && !isError && plans.length > 0 && (
<div className="row g-4 my-6">

View File

@ -78,22 +78,27 @@ const SubScriptionHistory = ({ tenantId }) => {
SUBSCRIPTION_PLAN_FREQUENCIES[e.frequency] || "N/A",
align: "text-start",
},
{
key: "price",
label: "Amount",
getValue: (e) => (
<>
{e.currency?.symbol || "₹"} {e.price}
</>
),
align: "text-end pe-4",
},
{
key: "planName",
label: "Plan Name",
getValue: (e) => e.planName,
align: "text-start ps-4",
},
{
key: "price",
label: "Amount",
getValue: (e) => (
<span className="d-inline-block px-3">
{e.currency?.symbol || "₹"} {e.price}
</span>
),
align: "text-end",
},
{
key: "planName",
label: "Plan Name",
getValue: (e) => (
<span className="d-inline-block ps-4">
{e.planName}
</span>
),
align: "text-start",
},
{
key: "action",
label: "Action",