# style
- UI Job di bagian user selesai

# fix
- Scroll data untuk beranda dan tampilan yang lain selesi

## No issue
This commit is contained in:
2024-07-05 16:29:54 +08:00
parent bca5a2ac15
commit ac12dd4a98
93 changed files with 2008 additions and 901 deletions

View File

@@ -58,7 +58,7 @@ export default function HomeLayout({
}) {
const router = useRouter();
// const [user, setUser] = useState(dataUser);
const [idLoadingProfil, setIsLoadingProfile] = useState(false);
const [isLoadingProfil, setIsLoadingProfile] = useState(false);
const [isLoadingUS, setIsLoadingUS] = useState(false);
const [isLoadingBell, setIsLoadingBell] = useState(false);
const [isLoadingPage, setIsLoadingPage] = useState(false);
@@ -144,7 +144,7 @@ export default function HomeLayout({
}}
>
{isLoadingUS ? (
<Loader size={20} />
<Loader color={AccentColor.yellow} size={20} />
) : (
<IconUserSearch color="white" />
)}
@@ -167,12 +167,16 @@ export default function HomeLayout({
}}
>
{isLoadingBell ? (
<Loader size={20} />
<Loader color={AccentColor.yellow} size={20} />
) : (
<Indicator
processing
color={MainColor.yellow}
label={<Text fz={10} c={MainColor.darkblue}>{countNotif}</Text>}
label={
<Text fz={10} c={MainColor.darkblue}>
{countNotif}
</Text>
}
>
<IconBell color="white" />
</Indicator>
@@ -182,7 +186,6 @@ export default function HomeLayout({
</Box>
{/* Children */}
<Box h={"82vh"} pos={"static"}>
<ScrollArea h={"100%"}>
{/* {Array(10)
@@ -201,14 +204,6 @@ export default function HomeLayout({
/>
</Box>
{/* <Box h={"100%"} pos={"static"}>
<ScrollArea h={"100%"}>{children}</ScrollArea>
<Box
style={{
height: "10vh",
}}
/>
</Box> */}
{/* Footer */}
<Box
@@ -216,9 +211,9 @@ export default function HomeLayout({
zIndex: 99,
borderRadius: "20px 20px 0px 0px",
}}
bg={MainColor.darkblue}
// bg={MainColor.darkblue}
w={"100%"}
color="blue"
// color="blue"
pos={"fixed"}
bottom={0}
h={"10vh"}
@@ -228,94 +223,84 @@ export default function HomeLayout({
cols={4}
style={{
borderRadius: "20px 20px 0px 0px",
border: `1px solid ${AccentColor.blue}`,
borderTop: `2px solid ${AccentColor.blue}`,
}}
>
{listHalamanFooter.map((e, i) => (
<Center h={"10vh"} key={e.id}>
{isLoadingPage && e.id === pageId ? (
<Center>
<Loader size={"sm"} />
</Center>
) : (
<Stack align="center" spacing={0}>
<ActionIcon
radius={"xl"}
// loading={isLoadingPage && e.id === pageId ? true : false}
c={e.link === "" ? "gray" : "white"}
variant="transparent"
onClick={() => {
if (dataUser?.Profile === null) {
ComponentGlobal_NotifikasiPeringatan(
"Lengkapi Profile"
);
} else {
e.link === ""
? ComponentGlobal_NotifikasiPeringatan(
"Cooming Soon"
)
: (router.push(e.link),
setIsLoadingPage(true),
setPageId(e?.id));
}
}}
>
{e.icon}
</ActionIcon>
<Text c={e.link === "" ? "gray" : "white"} fz={"xs"}>
{e.name}
</Text>
</Stack>
)}
<Stack align="center" spacing={0}>
<ActionIcon
radius={"xl"}
// loading={isLoadingPage && e.id === pageId ? true : false}
c={e.link === "" ? "gray" : "white"}
variant="transparent"
onClick={() => {
if (dataUser?.Profile === null) {
ComponentGlobal_NotifikasiPeringatan(
"Lengkapi Profile"
);
} else {
e.link === ""
? ComponentGlobal_NotifikasiPeringatan("Cooming Soon")
: (router.push(e.link),
setIsLoadingPage(true),
setPageId(e?.id));
}
}}
>
{isLoadingPage && e.id === pageId ? (
<Loader color={AccentColor.yellow} size={20} />
) : (
e.icon
)}
</ActionIcon>
<Text c={e.link === "" ? "gray" : "white"} fz={"xs"}>
{e.name}
</Text>
</Stack>
</Center>
))}
<Center h={"10vh"}>
{idLoadingProfil ? (
<Center>
<Loader size={"sm"} />
</Center>
) : (
<Center>
<Stack
align="center"
spacing={2}
onClick={() => {
setIsLoadingProfile(true);
if (dataUser?.Profile === null) {
router.push(RouterProfile.create);
} else {
router.push(
RouterProfile.katalog + `${dataUser.Profile.id}`
);
<Stack
align="center"
spacing={2}
onClick={() => {
setIsLoadingProfile(true);
if (dataUser?.Profile === null) {
router.push(RouterProfile.create);
} else {
router.push(
RouterProfile.katalog + `${dataUser.Profile.id}`
);
}
}}
>
<ActionIcon variant={"transparent"}>
{dataUser?.Profile === null ? (
<IconUserCircle color="white" />
) : isLoadingProfil ? (
<Loader color={AccentColor.yellow} size={20} />
) : (
<Avatar
radius={"xl"}
size={25}
sx={{
borderStyle: "solid",
borderWidth: "0.5px",
borderColor: "white",
}}
src={
RouterProfile.api_foto_profile +
`${dataUser?.Profile.imagesId}`
}
}}
>
<ActionIcon variant={"transparent"}>
{dataUser?.Profile === null ? (
<IconUserCircle color="white" />
) : (
<Avatar
radius={"xl"}
size={25}
sx={{
borderStyle: "solid",
borderWidth: "0.5px",
borderColor: "white",
}}
src={
RouterProfile.api_foto_profile +
`${dataUser?.Profile.imagesId}`
}
/>
)}
</ActionIcon>
<Text fz={"xs"} c={"white"}>
Profile
</Text>
</Stack>
</Center>
)}
/>
)}
</ActionIcon>
<Text fz={"xs"} c={"white"}>
Profile
</Text>
</Stack>
</Center>
</SimpleGrid>
</Box>

View File

@@ -47,6 +47,7 @@ export default function HomeView({
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [pageId, setPageId] = useState(0);
const [isLoadingJob, setLoadingJob] = useState(false);
const listPageOnBox = [
{
@@ -140,7 +141,11 @@ export default function HomeView({
variant="transparent"
c={e.link === "" ? "gray.3" : "white"}
>
{isLoading && e.id === pageId ? <Loader /> : e.icon}
{isLoading && e.id === pageId ? (
<Loader color={AccentColor.yellow} />
) : (
e.icon
)}
</ActionIcon>
<Text c={e.link === "" ? "gray.3" : "white"} fz={"sm"}>
{e.name}
@@ -173,6 +178,7 @@ export default function HomeView({
"Cooming Soon !!"
);
} else {
setLoadingJob(true);
return router.push(routePageJob.link);
}
}
@@ -183,7 +189,11 @@ export default function HomeView({
size={40}
c={routePageJob.link === "" ? "gray.3" : "white"}
>
{routePageJob.icon}
{isLoadingJob ? (
<Loader color={AccentColor.yellow} size={20} />
) : (
routePageJob.icon
)}
</ActionIcon>
<Text c={routePageJob.link === "" ? "gray.3" : "white"}>
{routePageJob.name}