Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Public Facilities Filters #291

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/Forms/BasicDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ export function BasicDeatilsForm({ editMode }) {
className='flex flex-col w-full mt-4 items-start bg-blue-50 p-3 justify-start gap-3'>

{
formError && <Alert severity='error' className='w-full'>{formError}</Alert>
formError && <Alert severity='error' className='w-full border-2 border-red-500 rounded-none'>{formError}</Alert>
}

{/* Facility Official Name */}
Expand Down
2 changes: 1 addition & 1 deletion components/Forms/FacilityContactsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export function FacilityContactsForm() {

>
{
formError && <Alert severity='error' className='w-full'>{formError}</Alert>
formError && <Alert severity='error' className='w-full border-2 border-red-500 rounded-none'>{formError}</Alert>
}

{/* Contacts */}
Expand Down
4 changes: 2 additions & 2 deletions components/Forms/GeolocationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export function GeolocationForm({ editMode }) {
>

{
formError && <Alert severity='error' className='w-full'>{formError}</Alert>
formError && <Alert severity='error' className='w-full border-2 border-red-500 rounded-none'>{formError}</Alert>
}

{/* Collection Date */}
Expand Down Expand Up @@ -431,7 +431,7 @@ export function GeolocationForm({ editMode }) {

<Map markerCoordinates={[latitude, longitude]} geoJSON={geoJSON} from={from} ward={wardName} center={geoCenter} />
:
<Alert severity='warning' className='w-full p-1'>Geolocation Data is Missing For this facility</Alert>
<Alert severity='warning' className='w-full p-1 border-2 border-yellow-500 rounded-none'>Geolocation Data is Missing For this facility</Alert>
}
</Suspense>
</div>
Expand Down
6 changes: 3 additions & 3 deletions components/HeaderLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default function HeaderLayout({
hidden
sm:inline
cursor-pointer
${(currentPath == "/public/facility/facilities" || currentPath == "/public/chu/community_units"
${(currentPath == "/public/facilities" || currentPath == "/public/chu/community_units"
? activeClasses
: inactiveClasses)
}`}>
Expand Down Expand Up @@ -429,13 +429,13 @@ export default function HeaderLayout({
className="inline-flex flex-row justify-start flex-grow mt-2 lg:py-0"
action= {(()=>{
if(searchOption == "Facilities"){
return "/public/facility/facilities"
return "/public/facilities"
}else if(searchOption == "Community Health Unit"){
return "/public/chu/community_units"
}else if(searchOption == "Services"){
return "/public/services"
}else{
return router.asPath.includes('searchTerm')? router.route : "/public/facility/facilities"
return router.asPath.includes('searchTerm')? router.route : "/public/facilities"
}
})()}
>
Expand Down
2 changes: 1 addition & 1 deletion pages/facilities/approve_reject/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function ApproveReject(props) {
>
{/* Alert Section */}

{formError && <Alert severity='error' className='w-full'>{formError}</Alert>}
{formError && <Alert severity='error' className='w-full border-2 border-red-500 rounded-none'>{formError}</Alert>}


{
Expand Down
9 changes: 4 additions & 5 deletions pages/public/chu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {SearchIcon } from "@heroicons/react/solid";
import Select from 'react-select'



const Home = (props) => {
function Home(props) {
const router = useRouter();
// const cus = props?.data?.results;
const [cus, setcus] = useState([])
Expand Down Expand Up @@ -180,11 +179,11 @@ const Home = (props) => {
</div>

{/* Filter section */}
<form className='col-span-1 w-full flex flex-col item-center justify-start md:col-start-1 gap-8 ' onSubmit={(e)=>filterCHUs(e)}>
<form className='col-span-1 w-full flex flex-col item-center justify-start md:col-start-1 gap-8' onSubmit={(e)=>filterCHUs(e)}>
{/* <div className='card flex flex-wrap'> */}
<div className="card col-span-6 md:col-span-2 flex flex-col items-start justify-start p-3 shadow-lg border border-gray-300/70 bg-blue-50" style={{ minHeight: '50px' }}>

{/* <label className="text-gray-600">Search all CHUs</label> */}
<h2>Search for a Community Health Unit</h2>
{/* &nbsp; */}
<input
name="allchus"
Expand Down Expand Up @@ -254,7 +253,7 @@ const Home = (props) => {
<div className="card col-span-6 md:col-span-2 flex flex-col items-start justify-start p-3 shadow-lg border border-gray-300/70 bg-blue-50" style={{ minHeight: '50px' }}>
<h2>Administrative Units</h2> &nbsp;
<div className="w-full max-w-xs flex flex-col gap-3 items-start justify-start mb-3" id='first'>
{administrative_units.map(ct=>(
{administrative_units?.map(ct=>(
<>
{/* <label htmlFor={ct.label} className="text-gray-600 capitalize text-sm ml-1">{ct.label}:</label> */}
<Select name={ct.label} ref={ct.ref} defaultValue={drillDown[ct.label] || "national"} id={ct.label} className="w-full max-w-xs border border-gray-400"
Expand Down
Loading
Loading