Compare commits
No commits in common. "b645aec55f400c656507cd4c1ddcef3bca1ea3ce" and "e7a0d412786c9be71efe7bc50df6b55acb9190a3" have entirely different histories.
b645aec55f
...
e7a0d41278
@ -73,7 +73,7 @@ const EditProfile = ({ TenantId,onClose }) => {
|
|||||||
|
|
||||||
<div className="col-sm-6 mt-1">
|
<div className="col-sm-6 mt-1">
|
||||||
<Label htmlFor="firstName" required>First Name</Label>
|
<Label htmlFor="firstName" required>First Name</Label>
|
||||||
<input id="firstName" type="text" className="form-control form-control-sm" {...register("firstName")} inputMode='text' />
|
<input id="firstName" type="text" className="form-control form-control-sm" {...register("firstName")} />
|
||||||
{errors.firstName && <div className="danger-text">{errors.firstName.message}</div>}
|
{errors.firstName && <div className="danger-text">{errors.firstName.message}</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import EditProfile from "./EditProfile";
|
|||||||
import GlobalModel from "../common/GlobalModel";
|
import GlobalModel from "../common/GlobalModel";
|
||||||
import { useTenantContext } from "../../pages/Tenant/TenantPage";
|
import { useTenantContext } from "../../pages/Tenant/TenantPage";
|
||||||
import { useTenantDetailsContext } from "../../pages/Tenant/TenantDetails";
|
import { useTenantDetailsContext } from "../../pages/Tenant/TenantDetails";
|
||||||
import IconButton from "../common/IconButton";
|
|
||||||
|
|
||||||
const Profile = ({ data }) => {
|
const Profile = ({ data }) => {
|
||||||
const {setEditTenant} = useTenantDetailsContext()
|
const {setEditTenant} = useTenantDetailsContext()
|
||||||
@ -16,16 +15,12 @@ const Profile = ({ data }) => {
|
|||||||
<div className="col-12 my-2">
|
<div className="col-12 my-2">
|
||||||
<div className="d-flex flex-wrap align-items-start position-relative ">
|
<div className="d-flex flex-wrap align-items-start position-relative ">
|
||||||
<div className=" d-flex align-items-start gap-2">
|
<div className=" d-flex align-items-start gap-2">
|
||||||
{data.logoImage ? (<img
|
<img
|
||||||
src={data.logoImage}
|
src={data.logoImage}
|
||||||
alt="Preview"
|
alt="Preview"
|
||||||
className="img-thumbnail rounded"
|
className="img-thumbnail rounded"
|
||||||
style={{ maxHeight: "35px" }}
|
style={{ maxHeight: "35px" }}
|
||||||
/>):( <IconButton
|
/>
|
||||||
iconClass="bx bx-sm bx-building"
|
|
||||||
color="warning"
|
|
||||||
size={8}
|
|
||||||
/>)}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="ms-2 ">
|
<div className="ms-2 ">
|
||||||
<h4 className="m-0">{data.name}</h4>
|
<h4 className="m-0">{data.name}</h4>
|
||||||
@ -72,43 +67,36 @@ const Profile = ({ data }) => {
|
|||||||
<span className="ms-2">{data.contactNumber}</span>
|
<span className="ms-2">{data.contactNumber}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{data.billingAddress && (
|
<div className="col-12 d-flex text-wrap align-items-start my-2 m-0">
|
||||||
<div className="col-12 d-flex text-wrap align-items-start mt-4 m-0">
|
<i className="bx bx-sm bx-mark me-1"></i>
|
||||||
<i className='bx bxs-flag-alt bx-sm me-1'></i>
|
|
||||||
<span className="fw-semibold">Address:</span>
|
<span className="fw-semibold">Address:</span>
|
||||||
<span className="ms-2">{data.billingAddress}</span>
|
<span className="ms-2">{data.billingAddress}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="divider text-start ">
|
<div className="divider text-start ">
|
||||||
<div className="divider-text">Organization</div>
|
<div className="divider-text">Organization</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-12 d-flex align-items-center mb-2">
|
<div className="col-12 d-flex align-items-center">
|
||||||
<i className="bx bx-sm bxs-building me-1"></i>
|
<i className="bx bx-sm bxs-building"></i>
|
||||||
<span className="fw-semibold">Industry:</span>
|
<span className="fw-semibold">Industry:</span>
|
||||||
<span className="ms-2">{data?.industry?.name}</span>
|
<span className="ms-2">{data?.industry?.name}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="row ">
|
<div className="row ">
|
||||||
{data?.taxId && (
|
{data?.taxId && (
|
||||||
<div className="col-12 col-md-6 d-flex align-items-center ">
|
<div className="col-12 col-md-6 d-flex align-items-center">
|
||||||
<i className="bx bx-sm bx-id-card me-1"></i>
|
<i className="bx bx-sm bx-id-card me-1"></i>
|
||||||
<span className="fw-semibold">Tax Id:</span>
|
<span className="fw-semibold">Tax Id:</span>
|
||||||
<span className="ms-2">{data?.taxId}</span>
|
<span className="ms-2">{data?.taxId}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="col-12 col-md-6 d-flex align-items-center mb-2 m-0">
|
<div className="col-12 col-md-6 d-flex align-items-center my-4 m-0">
|
||||||
<i className="bx bx-sm bx-group me-1"></i>
|
<i className="bx bx-sm bx-group me-1"></i>
|
||||||
<span className="fw-semibold">Organization Size:</span>
|
<span className="fw-semibold">Organization Size:</span>
|
||||||
<span className="ms-2">{data?.organizationSize}</span>
|
<span className="ms-2">{data?.organizationSize}</span>
|
||||||
</div>
|
</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">Seat Available:</span>
|
|
||||||
<span className="ms-2">{data?.seatsAvailable}</span>
|
|
||||||
</div>
|
|
||||||
<div className="col-12 col-md-6 d-flex align-items-center">
|
<div className="col-12 col-md-6 d-flex align-items-center">
|
||||||
<i className="bx bx-sm bxs-calendar me-1"></i>
|
<i className="bx bx-sm bxs-calendar"></i>
|
||||||
<span className="fw-semibold">On-Boarding Date:</span>
|
<span className="fw-semibold">On-Boarding Date:</span>
|
||||||
<span className="ms-2">
|
<span className="ms-2">
|
||||||
{formatUTCToLocalTime(data?.onBoardingDate)}
|
{formatUTCToLocalTime(data?.onBoardingDate)}
|
||||||
|
|||||||
@ -64,50 +64,78 @@ const SubScriptionHistory = ({ tenantId }) => {
|
|||||||
if (percentage < 80) return "warning";
|
if (percentage < 80) return "warning";
|
||||||
return "danger";
|
return "danger";
|
||||||
};
|
};
|
||||||
const SubscriptionColumns = [
|
// const SubscriptionColumns = [
|
||||||
{
|
// {
|
||||||
key: "createdAt",
|
// key: "createdAt",
|
||||||
label: "Date",
|
// label: "Date",
|
||||||
getValue: (e) => formatUTCToLocalTime(e?.createdAt),
|
// getValue: (e) => formatUTCToLocalTime(e?.createdAt),
|
||||||
align: "text-start",
|
// align: "text-start",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: "frequency",
|
// key: "frequency",
|
||||||
label: "Type",
|
// label: "Type",
|
||||||
getValue: (e) =>
|
// getValue: (e) => {
|
||||||
SUBSCRIPTION_PLAN_FREQUENCIES[e.frequency] || "N/A",
|
// switch (e.frequency) {
|
||||||
align: "text-start",
|
// case 1:
|
||||||
},
|
// return "Monthly";
|
||||||
{
|
// case 3:
|
||||||
key: "price",
|
// return "Quarterly";
|
||||||
label: "Amount",
|
// case 12:
|
||||||
getValue: (e) => (
|
// return "Yearly";
|
||||||
<>
|
// default:
|
||||||
{e.currency?.symbol || "₹"} {e.price}
|
// return "N/A";
|
||||||
</>
|
// }
|
||||||
),
|
// },
|
||||||
align: "text-end pe-4",
|
// align: "text-start",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: "planName",
|
// key: "price",
|
||||||
label: "Plan Name",
|
// label: "Amount",
|
||||||
getValue: (e) => e.planName,
|
// getValue: (e) => (
|
||||||
align: "text-start ps-4",
|
// <>
|
||||||
},
|
// {e.currency?.symbol || "₹"} {e.price}
|
||||||
{
|
// </>
|
||||||
key: "action",
|
// ),
|
||||||
label: "Action",
|
// align: "text-end",
|
||||||
getValue: (e) => (
|
// },
|
||||||
<i
|
// {
|
||||||
className="bx bx-cloud-download"
|
// key: "submittedBy",
|
||||||
onClick={() => console.log("Download clicked for", e.id)}
|
// label: "Submitted By",
|
||||||
role="button"
|
// getValue: (e) =>
|
||||||
/>
|
// `${e.createdBy?.firstName ?? ""} ${
|
||||||
),
|
// e.createdBy?.lastName ?? ""
|
||||||
align: "text-center",
|
// }`.trim() || "N/A",
|
||||||
},
|
// customRender: (e) => (
|
||||||
];
|
// <div className="d-flex align-items-center">
|
||||||
|
// <Avatar
|
||||||
|
// size="xs"
|
||||||
|
// classAvatar="m-0 me-2"
|
||||||
|
// firstName={e.createdBy?.firstName}
|
||||||
|
// lastName={e.createdBy?.lastName}
|
||||||
|
// />
|
||||||
|
// <span className="text-truncate">
|
||||||
|
// {`${e.createdBy?.firstName ?? ""} ${
|
||||||
|
// e.createdBy?.lastName ?? ""
|
||||||
|
// }`.trim() || "N/A"}
|
||||||
|
// </span>
|
||||||
|
// </div>
|
||||||
|
// ),
|
||||||
|
// align: "text-start",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// key: "action",
|
||||||
|
// label: "Action",
|
||||||
|
// customRender: (e) => (
|
||||||
|
// <button
|
||||||
|
// className="btn btn-sm btn-outline-primary"
|
||||||
|
// onClick={() => console.log("Action clicked for", e.id)}
|
||||||
|
// >
|
||||||
|
// View
|
||||||
|
// </button>
|
||||||
|
// ),
|
||||||
|
// align: "text-center",
|
||||||
|
// },
|
||||||
|
// ];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className=" p-2">
|
<div className=" p-2">
|
||||||
@ -160,29 +188,35 @@ const SubScriptionHistory = ({ tenantId }) => {
|
|||||||
<table className="table border-top dataTable text-nowrap align-middle">
|
<table className="table border-top dataTable text-nowrap align-middle">
|
||||||
<thead className="align-middle">
|
<thead className="align-middle">
|
||||||
<tr>
|
<tr>
|
||||||
{SubscriptionColumns.map((col) => (
|
<th className="text-start">Date</th>
|
||||||
<th key={col.key} className={col.align}>
|
<th className="text-start">Type</th>
|
||||||
{col.label}
|
<th className="text-center">Amount</th>
|
||||||
</th>
|
<th className="text-start">Plan Name</th>
|
||||||
))}
|
<th className="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="align-middle">
|
<tbody className="align-middle">
|
||||||
{data?.subscriptionHistery
|
{data?.subscriptionHistery?.map((item) => (
|
||||||
?.slice()
|
|
||||||
.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt)) // latest first
|
|
||||||
.map((item) => (
|
|
||||||
<tr key={item.id}>
|
<tr key={item.id}>
|
||||||
{SubscriptionColumns.map((col) => (
|
<td>{formatUTCToLocalTime(item.createdAt)}</td>
|
||||||
<td key={col.key} className={col.align}>
|
<td>
|
||||||
{col.getValue ? col.getValue(item) : item[col.key] || "N/A"}
|
{SUBSCRIPTION_PLAN_FREQUENCIES[item.frequency] || "N/A"}
|
||||||
|
</td>
|
||||||
|
<td className="text-end pe-4 me-3">
|
||||||
|
<span className="px-3">
|
||||||
|
{" "}
|
||||||
|
{item.currency?.symbol}
|
||||||
|
{item.price}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td className="ps-4">{item.planName}</td>
|
||||||
|
<td className="text-center">
|
||||||
|
<i className="bx bx-cloud-download"></i>
|
||||||
</td>
|
</td>
|
||||||
))}
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ const TenantDetails = () => {
|
|||||||
<li key={tab.id} className="nav-item">
|
<li key={tab.id} className="nav-item">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`nav-link d-flex align-items-center text-tiny gap-2 ${
|
className={`nav-link d-flex align-items-center gap-2 ${
|
||||||
index === 0 ? "active" : ""
|
index === 0 ? "active" : ""
|
||||||
}`}
|
}`}
|
||||||
role="tab"
|
role="tab"
|
||||||
|
|||||||
@ -64,9 +64,7 @@ export const EXPENSE_REJECTEDBY = ["d1ee5eec-24b6-4364-8673-a8f859c60729","965ed
|
|||||||
|
|
||||||
export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8"
|
export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8"
|
||||||
|
|
||||||
export const SUPPER_Tenant = "d032cb1a-3f30-462c-bef0-7ace73a71c0b"
|
|
||||||
export const MANAGE_TENANTS = "00e20637-ce8d-4417-bec4-9b31b5e65092"
|
|
||||||
export const VIEW_TENANTS = "647145c6-2108-4c98-aab4-178602236e55"
|
|
||||||
export const ActiveTenant = "297e0d8f-f668-41b5-bfea-e03b354251c8"
|
export const ActiveTenant = "297e0d8f-f668-41b5-bfea-e03b354251c8"
|
||||||
// -------------------Application Role------------------------------
|
// -------------------Application Role------------------------------
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user