commented out disable feature on toggle in agency master

This commit is contained in:
rockyeverlast
2025-09-09 17:52:55 +05:30
parent 1fafdfe54d
commit 32ccea4917

View File

@@ -94,10 +94,10 @@ const AgencyMaster = () => {
agency?.gst_number.toLowerCase().includes(searchTerm.toLowerCase())
);
const activeCount = filteredData?.filter((a: any) => a.is_active === 1).length ?? 0;
// const activeCount = filteredData?.filter((a: any) => a.is_active === 1).length ?? 0;
const managepost = filteredData?.map((agency: any, index: number) => {
const isOnlyActive = activeCount === 1 && agency.is_active === 1;
// const isOnlyActive = activeCount === 1 && agency.is_active === 1;
return {
id: agency.id,
@@ -120,7 +120,7 @@ const AgencyMaster = () => {
size={"xs"}
onChange={() => handleToggle(agency.id.toString(), Number(agency.is_active))}
checked={Boolean(Number(agency.is_active))}
disabled={isOnlyActive}
// disabled={isOnlyActive}
/>
</Box>
</HStack>