done
This commit is contained in:
parent
1c64beee61
commit
cc51d06c97
|
@ -59,13 +59,13 @@ export default function AbsensiPage() {
|
|||
</div>
|
||||
<div className="col-span-4 max-h-[640px] flex flex-col gap-4">
|
||||
<div className="bg-white rounded-lg py-4 pl-4 flex flex-col">
|
||||
<div className="text-xl font-bold">Kehadiran Non Staff</div>
|
||||
<div className="text-xl font-bold">Kehadiran Pemanen</div>
|
||||
<div className="flex-1 min-h-[253px] flex justify-center items-center flex-col">
|
||||
<span className="text-gray-600">Data belum tersedia</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-white rounded-lg py-4 pl-4 flex flex-col">
|
||||
<div className="text-xl font-bold">Kehadiran Non Staff</div>
|
||||
<div className="text-xl font-bold">Kehadiran Perawatan</div>
|
||||
<div className="flex-1 min-h-[253px] flex justify-center items-center flex-col">
|
||||
<span className="text-gray-600">Data belum tersedia</span>
|
||||
</div>
|
||||
|
|
|
@ -22,6 +22,7 @@ export default function DashboardLayout({children}:{children: React.ReactNode})
|
|||
const dispatch = useAppDispatch();
|
||||
const filter = useAppSelector((state) => state.filter.filter);
|
||||
const {data: filterOptions } = useGetFilterOptionsQuery(filter);
|
||||
const [region, setRegion] = React.useState("");
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen">
|
||||
|
@ -32,7 +33,7 @@ export default function DashboardLayout({children}:{children: React.ReactNode})
|
|||
<div className="h-4 bg-white"/>
|
||||
<div className="flex flex-col flex-1 from-[#A36A4D] bg-gradient-to-b to-[#5B2D14] text-white py-8">
|
||||
<div className="text-[20px] text-white ml-8 mb-4">Halaman</div>
|
||||
<Link className={`flex gap-4 px-8 py-4 ${pathname === '/dashboard/karyawan' ? `bg-white text-[#664228]`:`text-white hover:bg-white hover:text-[#664228]`} items-center`} href="/karyawan">
|
||||
<Link className={`flex gap-4 px-8 py-4 ${pathname === '/karyawan' ? `bg-white text-[#664228]`:`text-white hover:bg-white hover:text-[#664228]`} items-center`} href="/karyawan">
|
||||
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg" className="fill-current">
|
||||
<path d="M2 16H5V10H11V16H14V7L8 2.5L2 7V16ZM0 18V6L8 0L16 6V18H9V12H7V18H0Z" />
|
||||
</svg>
|
||||
|
@ -103,20 +104,34 @@ export default function DashboardLayout({children}:{children: React.ReactNode})
|
|||
onChange={(date) => dispatch(setFilter({...filter, end_date: format(date ?? new Date(), "yyyy-MM-dd")}))}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex gap-4 w-full mx-24">
|
||||
<div className="flex gap-4 w-full mx-12">
|
||||
<Autocomplete
|
||||
className="w-full"
|
||||
options={filterOptions?.regions ?? []}
|
||||
getOptionLabel={(option) => option.name}
|
||||
renderInput={(params) => <TextField {...params} label="Region" size="small"/>}
|
||||
onChange={(e, value) => dispatch(setFilter({...filter, organization_code: value?.codes ?? ""}))}
|
||||
onChange={(e, value) => {
|
||||
dispatch(setFilter({...filter, organization_code: value?.codes ?? ""}));
|
||||
setRegion(value?.codes ?? "");
|
||||
}}
|
||||
/>
|
||||
<Autocomplete
|
||||
className="w-full"
|
||||
options={filterOptions?.organizations ?? []}
|
||||
getOptionLabel={(option) => option.name}
|
||||
renderInput={(params) => <TextField {...params} label="Company" size="small"/>}
|
||||
onChange={(e, value) => {
|
||||
dispatch(setFilter({...filter, organization_code: value?.code ?? ""}));
|
||||
if (value?.code == undefined) dispatch(setFilter({...filter, organization_code: region}));
|
||||
}}
|
||||
/>
|
||||
<Autocomplete
|
||||
className="w-full"
|
||||
options={filterOptions?.estates ?? []}
|
||||
getOptionLabel={(option) => option.name}
|
||||
renderInput={(params) => <TextField {...params} label="Lokasi" size="small"/>}
|
||||
onChange={(e, value) => dispatch(setFilter({...filter, estate_name: value?.name ?? ""}))}
|
||||
/>
|
||||
<TextField label="Lokasi" size="small" select className="w-full">
|
||||
<MenuItem value="0">Semua Lokasi</MenuItem>
|
||||
<MenuItem value="1">Lokasi 1</MenuItem>
|
||||
<MenuItem value="2">Lokasi 2</MenuItem>
|
||||
<MenuItem value="3">Lokasi 3</MenuItem>
|
||||
</TextField>
|
||||
</div>
|
||||
<div className="flex gap-4">
|
||||
<TextField label="Posisi" size="small" className="w-40" select value={filter.job_name} onChange={(e) => dispatch(setFilter({...filter, job_name: e.target.value}))}>
|
||||
|
|
|
@ -159,7 +159,7 @@ export default function TurnoverPage() {
|
|||
</div>
|
||||
</div>
|
||||
<div className="col-span-4 bg-white py-4 px-4 rounded-lg max-h-[420px] flex flex-col">
|
||||
<div className="text-xl font-bold">Jenis Pemutusan Hubungan Kerja</div>
|
||||
<div className="text-xl font-bold">Alasan Pemutusan Hubungan Kerja</div>
|
||||
<div className={`flex-1 min-h-[300px] gap-3 flex flex-col mt-8 ${resignReason && resignReason.length === 0 ? "justify-center items-center" : ""}`}>
|
||||
{resignReason && resignReason.map((resign, index) => (
|
||||
<div key={index} className="grid grid-cols-12 items-center" data-tooltip-id="tooltip-tor-type" data-tooltip-content={`${resign.count} Employee`}>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { AttendanceRange, AttendanceSummary, EmployeeSummary, FilterOptions, Mon
|
|||
import { Response , Filter} from './types'
|
||||
|
||||
export const api = createApi({
|
||||
baseQuery: fetchBaseQuery({ baseUrl: 'http://localhost:8080' }),
|
||||
baseQuery: fetchBaseQuery({ baseUrl: 'https://erp.julongindonesia.com:8443/api' }),
|
||||
endpoints: (builder) => ({
|
||||
getFilterOptions: builder.query<FilterOptions, Filter>({
|
||||
query: (params) => ({ url: '/dashboard/filter-options', params }),
|
||||
|
|
Loading…
Reference in New Issue