diff --git a/src/components/AddNewCenters.tsx b/src/components/AddNewCenters.tsx index 1a978431..5e721d87 100644 --- a/src/components/AddNewCenters.tsx +++ b/src/components/AddNewCenters.tsx @@ -225,9 +225,13 @@ const AddNewCenters: React.FC = ({ type="submit" form="new-center-form" // Add this line sx={{ - padding: "12px 24px", // Adjust padding as needed - width: "200px", // Set the desired width + fontSize: "14px", + fontWeight: "500", + width: "auto", + height: "40px", + marginLeft: "10px", }} + onClick={onClose} > {t("COMMON.CANCEL")} @@ -237,8 +241,11 @@ const AddNewCenters: React.FC = ({ type="submit" form="new-center-form" // Add this line sx={{ - padding: "12px 24px", // Adjust padding as needed - width: "200px", // Set the desired width + fontSize: "14px", + fontWeight: "500", + width: "auto", + height: "40px", + marginLeft: "10px", }} onClick={() => { setSubmittedButtonStatus(true); diff --git a/src/pages/centers.tsx b/src/pages/centers.tsx index 5242ce7b..53ce5f23 100644 --- a/src/pages/centers.tsx +++ b/src/pages/centers.tsx @@ -85,9 +85,7 @@ const Center: React.FC = () => { const getUserStateName = state ? state.value : null; const stateCode = state ? state?.code : null; // handle states - const [selectedState, setSelectedState] = React.useState([ - getUserStateName, - ]); + const [selectedState, setSelectedState] = React.useState([]); const [selectedDistrict, setSelectedDistrict] = React.useState([]); const [selectedBlock, setSelectedBlock] = React.useState([]); const [selectedSort, setSelectedSort] = useState("Sort"); @@ -114,7 +112,7 @@ const Center: React.FC = () => { const [pageSizeArray, setPageSizeArray] = React.useState([]); const [filters, setFilters] = useState({ type: "COHORT", - states:stateCode + // states: stateCode, }); const [sortBy, setSortBy] = useState(["createdAt", "asc"]); const [selectedStateCode, setSelectedStateCode] = useState(""); @@ -282,15 +280,20 @@ const Center: React.FC = () => { setSelectedState(selected); if (selected[0] === "") { - if (filters.status) setFilters({ type: "COHORT",status: filters.status }); + if (filters.status) + setFilters({ type: "COHORT", status: filters.status }); // else setFilters({ role: role }); } else { const stateCodes = code?.join(","); console.log("stateCodes", stateCodes); setSelectedStateCode(stateCodes); if (filters.status) - setFilters({ type: "COHORT", status: filters.status, states: stateCodes }); - else setFilters({ type: "COHORT",states: stateCodes }); + setFilters({ + type: "COHORT", + status: filters.status, + states: stateCodes, + }); + else setFilters({ type: "COHORT", states: stateCodes }); } console.log("Selected categories:", typeof code[0]); @@ -645,6 +648,8 @@ const Center: React.FC = () => { handleAddUserClick: handleAddUserClick, }; + + return ( <> {/* { type="submit" form="update-center-form" // Add this line sx={{ - padding: "12px 24px", // Adjust padding as needed - width: "200px", // Set the desired width + fontSize: "14px", + fontWeight: "500", + width: "auto", + height: "40px", + marginLeft: "10px", }} onClick={onCloseEditForm} > @@ -775,8 +783,11 @@ const Center: React.FC = () => { type="submit" form="update-center-form" // Add this line sx={{ - padding: "12px 24px", // Adjust padding as needed - width: "200px", // Set the desired width + fontSize: "14px", + fontWeight: "500", + width: "auto", + height: "40px", + marginLeft: "10px", }} onClick={() => { setSubmittedButtonStatus(true); diff --git a/src/styles/globals.css b/src/styles/globals.css index e22415ea..f2a3cfbd 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -75,3 +75,7 @@ ul.MuiList-root li.MuiMenuItem-root[data-value=""] { .Toastify__toast-icon svg { fill: #fff !important; } + +.ka-thead-cell { + font-weight: 600; +}