Skip to content

Commit

Permalink
Changes for popup in userAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
abishekTa-egov committed Nov 14, 2024
1 parent 8379e33 commit dd7325a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ const FacilityPopUp = ({ details, onClose, updateDetails }) => {
setSelectedRows([]);
setIsAllSelected(false);
updateDetails(newDetails);
if(facilityAssignedStatus){
setShowToast({ key: "success", label: `${ t("UNASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, transitionTime: 5000 });


}else{
setShowToast({ key: "success", label: `${ t("ASSIGNED_SUCESS")} ${details?.additionalDetails?.facilityName}`, transitionTime: 5000 });
}
},
onError: async (result) => {
// setDownloadError(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function UserAccess({ category, setData, nationalRoles }) {
const queryClient = useQueryClient();
const [showPopUp, setShowPopUp] = useState(null);
const [chipPopUp, setChipPopUp] = useState(null);
const [chipPopUpRowId, setChipPopUpRowId] = useState(null);
const [showToast, setShowToast] = useState(null);
const [currentPage, setCurrentPage] = useState(1);
const [rowsPerPage, setRowsPerPage] = useState(5);
Expand Down Expand Up @@ -172,7 +173,7 @@ function UserAccess({ category, setData, nationalRoles }) {
{row.jurisdiction.length > 2 && (
<Button
label={`+${row.jurisdiction.length - 2} ${t("ES_MORE")}`}
onClick={() => setChipPopUp(true)}
onClick={() => setChipPopUpRowId(row.id)}
variation="link"
style={{
height: "2rem",
Expand All @@ -193,7 +194,10 @@ function UserAccess({ category, setData, nationalRoles }) {
/>
)}

{chipPopUp && <Wrapper setShowPopUp={setChipPopUp} alreadyQueuedSelectedState={row.jurisdiction} />}
{/* {chipPopUp && <Wrapper setShowPopUp={setChipPopUp} alreadyQueuedSelectedState={row.jurisdiction} />} */}
{chipPopUpRowId === row.id && (
<Wrapper setShowPopUp={setChipPopUpRowId} alreadyQueuedSelectedState={row.jurisdiction} />
)}
</>
)}
</div>
Expand Down

0 comments on commit dd7325a

Please sign in to comment.