Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f46713ef00 | |||
| 992993b710 | |||
| 617df4200e | |||
| a47e398e87 | |||
| 281c4c7ab7 |
@@ -38,7 +38,7 @@ const validationSchema = Yup.object().shape({
|
||||
};
|
||||
|
||||
|
||||
export default function InviteRelative({action, situation, setReloadRelList}) {
|
||||
export default function InviteRelative({action, situation, setReloadRelList, relativeList}) {
|
||||
|
||||
const api = new usersService()
|
||||
|
||||
@@ -167,7 +167,7 @@ export default function InviteRelative({action, situation, setReloadRelList}) {
|
||||
|
||||
{/* Type */}
|
||||
<div className="md:flex md:space-x-7 items-end mb-6">
|
||||
<div className="field w-full mb-6 md:mb-0">
|
||||
{/* <div className="field w-full mb-6 md:mb-0">
|
||||
<InputCom
|
||||
fieldClass="px-6"
|
||||
label="Type"
|
||||
@@ -179,6 +179,52 @@ export default function InviteRelative({action, situation, setReloadRelList}) {
|
||||
blurHandler={props.handleBlur}
|
||||
error={(props.errors.family_type && props.touched.family_type) ? props.errors.family_type : '' }
|
||||
/>
|
||||
</div> */}
|
||||
<div className="field w-full mb-6 xl:mb-0">
|
||||
<label
|
||||
htmlFor="family_type"
|
||||
className="input-label text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold flex item-center gap-1"
|
||||
>
|
||||
Family Type
|
||||
{props.errors.family_type && props.touched.family_type && (
|
||||
<span className="text-[12px] text-red-500">
|
||||
{props.errors.family_type}
|
||||
</span>
|
||||
)}
|
||||
</label>
|
||||
<select
|
||||
id="family_type"
|
||||
name="family_type"
|
||||
value={props.values.family_type}
|
||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none border`}
|
||||
onChange={props.handleChange}
|
||||
onBlur={props.handleBlur}
|
||||
>
|
||||
{relativeList?.loading ? (
|
||||
<option className="text-slate-500 text-lg" value="">
|
||||
Loading...
|
||||
</option>
|
||||
) : relativeList?.family_types?.length ? (
|
||||
<>
|
||||
<option className="text-slate-500 text-lg" value="">
|
||||
Select Family Type
|
||||
</option>
|
||||
{relativeList?.family_types?.map((item, index) => (
|
||||
<option
|
||||
key={index}
|
||||
className="text-slate-500 text-lg"
|
||||
value={item?.ty}
|
||||
>
|
||||
{item?.ty}
|
||||
</option>
|
||||
))}
|
||||
</>
|
||||
) : (
|
||||
<option className="text-slate-500 text-lg" value="">
|
||||
No Options Found! Try Again
|
||||
</option>
|
||||
)}
|
||||
</select>
|
||||
</div>
|
||||
<div className="field w-full flex justify-end">
|
||||
<div className="flex">
|
||||
|
||||
@@ -12,7 +12,7 @@ const Relatives = () => {
|
||||
|
||||
const [invitePopout, setInvitePopout] = useState(false)
|
||||
|
||||
const [relativeList, setRelativeList] = useState({loading: true, data:[]})
|
||||
const [relativeList, setRelativeList] = useState({loading: true, result_list:[], family_types:[]})
|
||||
|
||||
const showInviteMemberPopout = () => {
|
||||
setInvitePopout(true)
|
||||
@@ -21,14 +21,14 @@ const Relatives = () => {
|
||||
const getRelativeList = () => {
|
||||
setRelativeList(prev => ({...prev, loading: true}))
|
||||
api.getFamilyRelativeList().then(response => {
|
||||
let {data:{result_list}} = response
|
||||
if(!result_list || result_list?.length <= 0){
|
||||
setRelativeList({loading:false, data:[]})
|
||||
let {status, data} = response
|
||||
if(status != 200 || !data){
|
||||
setRelativeList({loading:false, result_list:[], family_types:[]})
|
||||
return
|
||||
}
|
||||
setRelativeList({loading:false, data:result_list})
|
||||
setRelativeList({loading:false, result_list:data?.result_list, family_types:data?.family_types})
|
||||
}).catch(error => {
|
||||
setRelativeList({loading:false, data:[]})
|
||||
setRelativeList({loading:false, result_list:[], family_types:[]})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ const Relatives = () => {
|
||||
{relativeList.loading ?
|
||||
<LoadingSpinner size='8' height='h-full' />
|
||||
:
|
||||
<RelativeTable relativeList={relativeList.data} />
|
||||
<RelativeTable relativeList={relativeList.result_list} />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,6 +58,7 @@ const Relatives = () => {
|
||||
action={()=>setInvitePopout(false)}
|
||||
situation={invitePopout}
|
||||
setReloadRelList={setReloadRelList}
|
||||
relativeList={relativeList}
|
||||
/>
|
||||
}
|
||||
{/* END OF INVITE RELATIVE POPOUT */}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function GroupList({
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="p-5 w-full lg:w-[400px] min-h-[300px] bg-sky-100 dark:bg-dark-gray rounded-2xl">
|
||||
<div className="p-5 w-full lg:w-[400px] min-h-[300px] bg-sky-100 dark:bg-dark-gray rounded-2xl flex flex-col">
|
||||
{/* <h1 className='mb-5 text-lg lg:text-2xl tracking-wide font-bold text-slate-900 dark:text-slate-100'>Jobs Groups</h1> */}
|
||||
<div className="flex justify-end items-center">
|
||||
<button
|
||||
@@ -46,7 +46,7 @@ export default function GroupList({
|
||||
No Group Found!
|
||||
</h1>
|
||||
) : (
|
||||
<div className="my-4 max-h-[400px] overflow-y-auto">
|
||||
<div className="my-4 max-h-[596px] bg-[#fffef6] rounded overflow-y-auto flex-1">
|
||||
<div className="flex flex-col">
|
||||
{groupList.map((item) => (
|
||||
<div
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function JobGroups() {
|
||||
<Layout>
|
||||
<div>
|
||||
<h1 className="mb-5 text-lg lg:text-2xl tracking-wide font-bold text-slate-900 dark:text-slate-100">
|
||||
Jobs Groups
|
||||
Job Groups
|
||||
</h1>
|
||||
</div>
|
||||
<div className="p-5 w-full min-h-[400px] flex flex-col lg:flex-row gap-3 lg:gap-6 rounded-lg shadow-md bg-white dark:bg-dark-white">
|
||||
|
||||
Reference in New Issue
Block a user