added small ui changed like table b-padding, button size and fixd delete activity and group
This commit is contained in:
parent
52e12426af
commit
4e315aafcf
@ -248,7 +248,7 @@ const AssignOrg = ({ setStep }) => {
|
|||||||
? "Please wait..."
|
? "Please wait..."
|
||||||
: flowType === "default"
|
: flowType === "default"
|
||||||
? "Assign Organization"
|
? "Assign Organization"
|
||||||
: "Add"}
|
: "Assign Project"}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -84,10 +84,7 @@ const OrgPickerFromSPId = ({ title, placeholder }) => {
|
|||||||
height={50}
|
height={50}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className="d-flex flex-column p-0 m-0 cursor-pointer">
|
||||||
className="d-flex flex-column p-0 m-0 cursor-pointer"
|
|
||||||
onClick={() => onOpen({ startStep: 3, orgData: org })}
|
|
||||||
>
|
|
||||||
<span className="fs-6 fw-semibold">{org.name}</span>
|
<span className="fs-6 fw-semibold">{org.name}</span>
|
||||||
<div className="d-flex gap-2">
|
<div className="d-flex gap-2">
|
||||||
<small
|
<small
|
||||||
@ -102,6 +99,16 @@ const OrgPickerFromSPId = ({ title, placeholder }) => {
|
|||||||
<small className="text-small fw-semibold">Address:</small>
|
<small className="text-small fw-semibold">Address:</small>
|
||||||
<div className="d-flex text-wrap">{org.address}</div>
|
<div className="d-flex text-wrap">{org.address}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="m-0 p-0">
|
||||||
|
{" "}
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="btn btn-sm btn-primary"
|
||||||
|
onClick={() => onOpen({ startStep: 3, orgData: org })}
|
||||||
|
>
|
||||||
|
Select
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
@ -85,7 +85,7 @@ const OrgPickerfromTenant = ({ title }) => {
|
|||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div>Loading....</div>
|
<div>Loading....</div>
|
||||||
) : data && data?.data?.length > 0 ? (
|
) : data && data?.data?.length > 0 ? (
|
||||||
<div className="dataTables_wrapper no-footer pb-2">
|
<div className="dataTables_wrapper no-footer pb-5">
|
||||||
<table className="table dataTable text-nowrap">
|
<table className="table dataTable text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="table_header_border">
|
<tr className="table_header_border">
|
||||||
@ -99,28 +99,41 @@ const OrgPickerfromTenant = ({ title }) => {
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
|
||||||
{Array.isArray(data.data) && data.data.length > 0
|
|
||||||
? data.data.map((row, i) => (
|
|
||||||
<tr key={i}>
|
|
||||||
{contactList.map((col) => (
|
|
||||||
<td key={col.key} className={col.align}>
|
|
||||||
{col.getValue(row)}
|
|
||||||
</td>
|
|
||||||
))}
|
|
||||||
<td className="sticky-action-column bg-white">
|
|
||||||
<button
|
|
||||||
className="btn btn-sm btn-primary"
|
|
||||||
onClick={() => onOpen({ startStep: 3, orgData: row })}
|
|
||||||
>
|
|
||||||
Select
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))
|
|
||||||
: null}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className="scrollable-tbody overflow-y-auto"
|
||||||
|
style={{ maxHeight: "350px", overflowY: "auto" }}
|
||||||
|
>
|
||||||
|
<table className="table dataTable text-nowrap mb-0">
|
||||||
|
<tbody>
|
||||||
|
{Array.isArray(data.data) && data.data.length > 0
|
||||||
|
? data.data.map((row, i) => (
|
||||||
|
<tr key={i}>
|
||||||
|
{contactList.map((col) => (
|
||||||
|
<td key={col.key} className={col.align}>
|
||||||
|
{col.getValue(row)}
|
||||||
|
</td>
|
||||||
|
))}
|
||||||
|
<td className="sticky-action-column p-0 bg-white">
|
||||||
|
<div className="p-1">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="btn btn-sm btn-primary"
|
||||||
|
onClick={() =>
|
||||||
|
onOpen({ startStep: 3, orgData: row })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Select
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
))
|
||||||
|
: null}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<div className="d-flex flex-column align-items-center text-center text-wrap text-black gap-2">
|
<div className="d-flex flex-column align-items-center text-center text-wrap text-black gap-2">
|
||||||
|
@ -60,7 +60,7 @@ const OrganizationModal = () => {
|
|||||||
if (startStep === 1) {
|
if (startStep === 1) {
|
||||||
return orgData && orgData !== null
|
return orgData && orgData !== null
|
||||||
? "Add Organization"
|
? "Add Organization"
|
||||||
: "Choose Organization1";
|
: "Choose Organization";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startStep === 2) {
|
if (startStep === 2) {
|
||||||
|
@ -93,7 +93,7 @@ const OrganizationsList = ({searchText}) => {
|
|||||||
if (isError) return <div>{error?.message || "Something went wrong"}</div>;
|
if (isError) return <div>{error?.message || "Something went wrong"}</div>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card px-0 px-sm-4">
|
<div className="card px-0 px-sm-4 pb-12 pt-5">
|
||||||
<div className="card-datatable table-responsive" id="horizontal-example">
|
<div className="card-datatable table-responsive" id="horizontal-example">
|
||||||
<div className="dataTables_wrapper no-footer px-2">
|
<div className="dataTables_wrapper no-footer px-2">
|
||||||
<table className="table border-top dataTable text-nowrap">
|
<table className="table border-top dataTable text-nowrap">
|
||||||
|
@ -7,7 +7,7 @@ const ProjectAssignedOrgs = () => {
|
|||||||
const { data, isLoading, isError, error } =
|
const { data, isLoading, isError, error } =
|
||||||
useProjectAssignedOrganizations(selectedProject);
|
useProjectAssignedOrganizations(selectedProject);
|
||||||
|
|
||||||
const contactList = [
|
const orgList = [
|
||||||
{
|
{
|
||||||
key: "name",
|
key: "name",
|
||||||
label: "Organization Name",
|
label: "Organization Name",
|
||||||
@ -23,6 +23,16 @@ const ProjectAssignedOrgs = () => {
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
align: "text-start",
|
align: "text-start",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "service",
|
||||||
|
label: "Service Name",
|
||||||
|
getValue: (org) => (
|
||||||
|
<div className="d-flex gap-2 py-1 ">
|
||||||
|
N/A
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
align: "text-start",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "sprid",
|
key: "sprid",
|
||||||
@ -61,7 +71,7 @@ const ProjectAssignedOrgs = () => {
|
|||||||
<table className="table dataTable text-nowrap">
|
<table className="table dataTable text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr className="table_header_border">
|
<tr className="table_header_border">
|
||||||
{contactList.map((col) => (
|
{orgList.map((col) => (
|
||||||
<th key={col.key} className={col.align}>
|
<th key={col.key} className={col.align}>
|
||||||
{col.label}
|
{col.label}
|
||||||
</th>
|
</th>
|
||||||
@ -72,7 +82,7 @@ const ProjectAssignedOrgs = () => {
|
|||||||
{Array.isArray(data) && data.length > 0 ? (
|
{Array.isArray(data) && data.length > 0 ? (
|
||||||
data.map((row, i) => (
|
data.map((row, i) => (
|
||||||
<tr key={i}>
|
<tr key={i}>
|
||||||
{contactList.map((col) => (
|
{orgList.map((col) => (
|
||||||
<td key={col.key} className={col.align}>
|
<td key={col.key} className={col.align}>
|
||||||
{col.getValue(row)}
|
{col.getValue(row)}
|
||||||
</td>
|
</td>
|
||||||
@ -82,7 +92,7 @@ const ProjectAssignedOrgs = () => {
|
|||||||
) : (
|
) : (
|
||||||
<tr style={{ height: "200px" }}>
|
<tr style={{ height: "200px" }}>
|
||||||
<td
|
<td
|
||||||
colSpan={contactList.length}
|
colSpan={orgList.length}
|
||||||
className="text-center align-middle"
|
className="text-center align-middle"
|
||||||
>
|
>
|
||||||
Not Assigned yet
|
Not Assigned yet
|
||||||
|
@ -7,12 +7,12 @@ const ProjectOrganizations = () => {
|
|||||||
const { onOpen, startStep, flowType } = useOrganizationModal();
|
const { onOpen, startStep, flowType } = useOrganizationModal();
|
||||||
const selectedProject = useSelectedProject();
|
const selectedProject = useSelectedProject();
|
||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card pb-10" >
|
||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<div className="d-flex justify-content-end px-2">
|
<div className="d-flex justify-content-end px-2">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="link-button btn btn-xs rounded-md link-button-sm m-1 btn-primary"
|
className="link-button btn btn-sm rounded-md link-button-sm m-1 btn-primary"
|
||||||
onClick={() => onOpen({ startStep: 1, flowType: "assign" })}
|
onClick={() => onOpen({ startStep: 1, flowType: "assign" })}
|
||||||
>
|
>
|
||||||
<i className="bx bx-plus-circle me-2"></i>
|
<i className="bx bx-plus-circle me-2"></i>
|
||||||
|
@ -135,7 +135,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
let isPending = isLoading || isUpdating;
|
let isPending = isLoading || isUpdating;
|
||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit(onSubmit)}>
|
<form onSubmit={handleSubmit(onSubmit)} className="px-7">
|
||||||
{/* <h6>Create Activity</h6> */}
|
{/* <h6>Create Activity</h6> */}
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-6 text-start">
|
<div className="col-6 text-start">
|
||||||
@ -171,13 +171,19 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-md-12 text-start mt-1">
|
<div className="col-md-12 text-start mt-1">
|
||||||
<p className="py-1 my-0">
|
<label className="py-1 form-label my-0">
|
||||||
{checkListItems.length > 0 ? "Check List" : "Add Check List"}
|
Add Check List <i
|
||||||
</p>
|
className="bx bx-plus-circle text-primary cursor-pointer"
|
||||||
{checkListItems.length > 0 && (
|
data-bs-toggle="tooltip"
|
||||||
<table className="table mt-1 border-0">
|
title="Add Check"
|
||||||
<thead className="py-0 my-0 table-border-top-0">
|
data-bs-original-title="Add check"
|
||||||
<tr className="py-1">
|
onClick={addChecklistItem}
|
||||||
|
></i>
|
||||||
|
</label>
|
||||||
|
{checkListItems.length > 0 ? (
|
||||||
|
<table className="table mt-1 border-none">
|
||||||
|
<thead className="py-0 my-0 border-none ">
|
||||||
|
<tr className="py-1 border-secondary ">
|
||||||
<th colSpan={2} className="py-1">
|
<th colSpan={2} className="py-1">
|
||||||
<small>Name</small>
|
<small>Name</small>
|
||||||
</th>
|
</th>
|
||||||
@ -187,10 +193,10 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
<th className="text-center py-1">Action</th>
|
<th className="text-center py-1">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="table-border-bottom-0 ">
|
<tbody className="table-border-bottom-0 border-secondary ">
|
||||||
{checkListItems.map((item, index) => (
|
{checkListItems.map((item, index) => (
|
||||||
<tr key={index} className="border-top-0">
|
<tr key={index}>
|
||||||
<td colSpan={2} className="border-top-0 border-0">
|
<td colSpan={2} className="border-none" >
|
||||||
<input
|
<input
|
||||||
className="d-none"
|
className="d-none"
|
||||||
{...register(`checkList.${index}.id`)}
|
{...register(`checkList.${index}.id`)}
|
||||||
@ -212,7 +218,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td colSpan={2} className="text-center border-0">
|
<td colSpan={2} className="text-center border-none">
|
||||||
<input
|
<input
|
||||||
className="form-check-input"
|
className="form-check-input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@ -220,7 +226,7 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
defaultChecked={item.isMandatory}
|
defaultChecked={item.isMandatory}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td className="text-center border-0">
|
<td className="text-center border-none">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => removeChecklistItem(index)}
|
onClick={() => removeChecklistItem(index)}
|
||||||
@ -238,31 +244,20 @@ const ManageActivity = ({ activity = null, whichGroup = null, close }) => {
|
|||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
)}
|
):(<div className="d-flex justify-content-center my-0"><p className="text-secondary m-0">Not Yet Added</p> </div>)}
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn btn-xs btn-primary mt-2"
|
|
||||||
onClick={addChecklistItem}
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
className="bx bx-plus-circle"
|
|
||||||
data-bs-toggle="tooltip"
|
|
||||||
title="Add Check"
|
|
||||||
data-bs-original-title="Add check"
|
|
||||||
></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-12 text-end mt-3">
|
<div className="col-12 text-end mt-3">
|
||||||
<button
|
<button
|
||||||
type="reset"
|
type="reset"
|
||||||
className="btn btn-xs btn-label-secondary me-3"
|
className="btn btn-sm btn-label-secondary me-3"
|
||||||
onClick={handleClose}
|
onClick={handleClose}
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" className="btn btn-xs btn-primary">
|
<button type="submit" className="btn btn-sm btn-primary">
|
||||||
{isPending ? "Please Wait" : activity ? "Update" : "Submit"}
|
{isPending ? "Please Wait" : activity ? "Update" : "Submit"}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +53,7 @@ const ManageGroup = ({ group = null, whichService = null, close }) => {
|
|||||||
|
|
||||||
let isPending = isCreating || isUpdating;
|
let isPending = isCreating || isUpdating;
|
||||||
return (
|
return (
|
||||||
<form className="row px-2" onSubmit={handleSubmit(onSubmit)}>
|
<form className="row px-12" onSubmit={handleSubmit(onSubmit)} cl>
|
||||||
<div className="col-12 col-md-12 text-start">
|
<div className="col-12 col-md-12 text-start">
|
||||||
<Label className="form-label" required>
|
<Label className="form-label" required>
|
||||||
Group Name
|
Group Name
|
||||||
|
@ -44,7 +44,7 @@ const ServiceGroups = ({ service }) => {
|
|||||||
<div className="d-flex justify-content-between text-start align-items-center accordion-header py-1">
|
<div className="d-flex justify-content-between text-start align-items-center accordion-header py-1">
|
||||||
<p className="m-0 fw-bold fs-6">{service.name}</p>
|
<p className="m-0 fw-bold fs-6">{service.name}</p>
|
||||||
<button
|
<button
|
||||||
className="btn btn-xs btn-primary"
|
className="btn btn-sm btn-primary"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setManageGroup({
|
setManageGroup({
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
@ -93,7 +93,7 @@ const ServiceGroups = ({ service }) => {
|
|||||||
>
|
>
|
||||||
<div className="d-flex justify-content-between text-start accordion-header">
|
<div className="d-flex justify-content-between text-start accordion-header">
|
||||||
{/* Show group toggle button only if ManageGroup is not open */}
|
{/* Show group toggle button only if ManageGroup is not open */}
|
||||||
<div className="d-flex gap-4 align-items-center">
|
<div className="d-flex gap-1 align-items-center">
|
||||||
{!isManageGroup.isOpen && (
|
{!isManageGroup.isOpen && (
|
||||||
<span
|
<span
|
||||||
onClick={() => toggleGroup(group.id)}
|
onClick={() => toggleGroup(group.id)}
|
||||||
@ -118,10 +118,6 @@ const ServiceGroups = ({ service }) => {
|
|||||||
<i
|
<i
|
||||||
className="bx bx-plus-circle text-primary cursor-pointer"
|
className="bx bx-plus-circle text-primary cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
console.log(
|
|
||||||
"Opening new activity for group:",
|
|
||||||
group.id
|
|
||||||
);
|
|
||||||
setManageActivity({
|
setManageActivity({
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
activity: null, // Indicating new activity creation
|
activity: null, // Indicating new activity creation
|
||||||
@ -182,7 +178,7 @@ const ServiceGroups = ({ service }) => {
|
|||||||
aria-labelledby={group.id}
|
aria-labelledby={group.id}
|
||||||
data-bs-parent="#accordionOne"
|
data-bs-parent="#accordionOne"
|
||||||
>
|
>
|
||||||
<div className="accordion-body">
|
<div className="accordion-body ">
|
||||||
{isOpen && actLoading && (
|
{isOpen && actLoading && (
|
||||||
<p className="text-center m-0">
|
<p className="text-center m-0">
|
||||||
Loading activities...
|
Loading activities...
|
||||||
@ -192,7 +188,7 @@ const ServiceGroups = ({ service }) => {
|
|||||||
{isOpen && activities?.data?.length > 0 ? (
|
{isOpen && activities?.data?.length > 0 ? (
|
||||||
<div className="row border-top-2">
|
<div className="row border-top-2">
|
||||||
{/* Header Row */}
|
{/* Header Row */}
|
||||||
<div className="col-12 d-flex justify-content-between py-2 border-bottom">
|
<div className="col-12 d-flex justify-content-between py-2 border-bottom px-4">
|
||||||
<span className="fw-semibold text-uppercase">
|
<span className="fw-semibold text-uppercase">
|
||||||
Activity Name
|
Activity Name
|
||||||
</span>
|
</span>
|
||||||
|
@ -719,7 +719,7 @@ export const useCreateService = (onSuccessCallback) => {
|
|||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
debugger;
|
debugger;
|
||||||
showToast(error.message || "Something went wrong", "error");
|
showToast( error?.response?.data?.message || error?.message || "Something went wrong", "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -742,7 +742,7 @@ export const useUpdateService = (onSuccessCallback) => {
|
|||||||
if (onSuccessCallback) onSuccessCallback(data);
|
if (onSuccessCallback) onSuccessCallback(data);
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(error?.message || "Something went wrong", "error");
|
showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -759,16 +759,16 @@ export const useCreateActivityGroup = (onSuccessCallback) => {
|
|||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ["groups"],
|
queryKey: ["groups"],
|
||||||
});
|
});
|
||||||
|
debugger
|
||||||
showToast(
|
showToast( data?.message ||
|
||||||
data.message || "Activity Group created successfully.",
|
data?.response?.data?.message || "Activity Group created successfully.",
|
||||||
"success"
|
"success"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (onSuccessCallback) onSuccessCallback(data);
|
if (onSuccessCallback) onSuccessCallback(data);
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(error?.message || "Something went wrong", "error");
|
showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -786,7 +786,8 @@ export const useUpdateActivityGroup = (onSuccessCallback) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
showToast(
|
showToast(
|
||||||
data.message || "Activity Group Updated successfully.",
|
data?.message ||
|
||||||
|
data?.response?.data?.message|| "Activity Group Updated successfully.",
|
||||||
"success"
|
"success"
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -812,7 +813,7 @@ export const useCreateActivity = (onSuccessCallback) => {
|
|||||||
if (onSuccessCallback) onSuccessCallback(data);
|
if (onSuccessCallback) onSuccessCallback(data);
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(error.message || "Something went wrong", "error");
|
showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -834,7 +835,7 @@ export const useUpdateActivity = (onSuccessCallback) => {
|
|||||||
if (onSuccessCallback) onSuccessCallback(data);
|
if (onSuccessCallback) onSuccessCallback(data);
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(error.message || "Something went wrong", "error");
|
showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ const OrganizationPage = () => {
|
|||||||
<div className="col-6 text-end mt-2 mt-sm-0">
|
<div className="col-6 text-end mt-2 mt-sm-0">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="p-1 me-1 m-sm-0 bg-primary rounded-circle"
|
className="p-1 me-1 m-sm-0 bg-primary rounded-circle"
|
||||||
title="Add New Organization"
|
title="Add New Organization"
|
||||||
onClick={()=>onOpen({ startStep: 2,flowType:"default" })}
|
onClick={()=>onOpen({ startStep: 2,flowType:"default" })}
|
||||||
>
|
>
|
||||||
|
@ -91,7 +91,8 @@ const MasterPage = () => {
|
|||||||
|
|
||||||
const handleDeleteServiceItem =()=>{
|
const handleDeleteServiceItem =()=>{
|
||||||
if(!isDeleletingServiceItem.ItemId) return
|
if(!isDeleletingServiceItem.ItemId) return
|
||||||
if(isDeleletingServiceItem.whichItem == "activiy"){
|
debugger
|
||||||
|
if(isDeleletingServiceItem.whichItem === "activity"){
|
||||||
DeleteAcivity(isDeleletingServiceItem.ItemId,{onSuccess:()=>setDeleletingServiceItem({isOpen:false,ItemId:null,whichItem:null})})
|
DeleteAcivity(isDeleletingServiceItem.ItemId,{onSuccess:()=>setDeleletingServiceItem({isOpen:false,ItemId:null,whichItem:null})})
|
||||||
}else{
|
}else{
|
||||||
DeleteSericeGroup(isDeleletingServiceItem.ItemId,{onSuccess:()=>setDeleletingServiceItem({isOpen:false,ItemId:null,whichItem:null})})
|
DeleteSericeGroup(isDeleletingServiceItem.ItemId,{onSuccess:()=>setDeleletingServiceItem({isOpen:false,ItemId:null,whichItem:null})})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user