show diffrent between welfare and navy to user
This commit is contained in:
@@ -3,14 +3,25 @@ import DashboardLayouts from "@/layouts/dashboardLayouts";
|
|||||||
import useUser from "@/lib/app/hooks/useUser";
|
import useUser from "@/lib/app/hooks/useUser";
|
||||||
import NavyForm from "./NavyForm";
|
import NavyForm from "./NavyForm";
|
||||||
import WelfareServicesForm from "./WelfareServicesForm";
|
import WelfareServicesForm from "./WelfareServicesForm";
|
||||||
|
import { Divider, Chip, Box } from "@mui/material";
|
||||||
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const DashboardLoanRequestComponent = () => {
|
const DashboardLoanRequestComponent = () => {
|
||||||
|
const t = useTranslations();
|
||||||
const { token, user } = useUser();
|
const { user } = useUser();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardLayouts>
|
<DashboardLayouts>
|
||||||
<CenterLayout>
|
<CenterLayout>
|
||||||
|
<Box sx={{ width: "80%", my: 2 }}>
|
||||||
|
<Divider>
|
||||||
|
<Chip
|
||||||
|
label={`${t("LoanRequest.loan_request_page")} | ${
|
||||||
|
user.type_name
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</Divider>
|
||||||
|
</Box>
|
||||||
{user.type_id == 1 ? <NavyForm /> : <WelfareServicesForm />}
|
{user.type_id == 1 ? <NavyForm /> : <WelfareServicesForm />}
|
||||||
</CenterLayout>
|
</CenterLayout>
|
||||||
</DashboardLayouts>
|
</DashboardLayouts>
|
||||||
|
|||||||
Reference in New Issue
Block a user