Fix dibagian auth dan profile
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
RouterPortofolio,
|
||||
RouterProfile,
|
||||
} from "@/app/lib/router_hipmi/router_katalog";
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import {
|
||||
gs_admin_navbar_menu,
|
||||
gs_admin_navbar_subMenu,
|
||||
@@ -48,25 +48,25 @@ export default function DrawerKatalogNew({
|
||||
{
|
||||
id: "1",
|
||||
name: "Edit profile",
|
||||
icon: <IconEdit />,
|
||||
icon: <IconEdit color={MainColor.white} />,
|
||||
path: RouterProfile.edit + param.id,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "Ubah foto profile",
|
||||
icon: <IconPhotoEdit />,
|
||||
icon: <IconPhotoEdit color={MainColor.white} />,
|
||||
path: RouterProfile.update_foto_profile + param.id,
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "Ubah latar belakang",
|
||||
icon: <IconPolaroid />,
|
||||
icon: <IconPolaroid color={MainColor.white} />,
|
||||
path: RouterProfile.update_foto_background + param.id,
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
name: "Tambah portofolio",
|
||||
icon: <IconPencilPlus />,
|
||||
icon: <IconPencilPlus color={MainColor.white} />,
|
||||
path: RouterPortofolio.create + param.id,
|
||||
},
|
||||
];
|
||||
@@ -95,7 +95,7 @@ export default function DrawerKatalogNew({
|
||||
borderRight: `1px solid ${AccentColor.blue}`,
|
||||
borderLeft: `1px solid ${AccentColor.blue}`,
|
||||
borderRadius: "20px 20px 0px 0px",
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
paddingBottom: "5%",
|
||||
},
|
||||
}}
|
||||
@@ -103,7 +103,7 @@ export default function DrawerKatalogNew({
|
||||
<Stack spacing={"xs"}>
|
||||
<Group position="right">
|
||||
<ActionIcon onClick={close} variant="transparent">
|
||||
<IconX color="white" />
|
||||
<IconX color={MainColor.white} />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
<SimpleGrid cols={4}>
|
||||
@@ -113,10 +113,10 @@ export default function DrawerKatalogNew({
|
||||
router.push(e.path, { scroll: false });
|
||||
}}
|
||||
>
|
||||
<ActionIcon variant="transparent" c="white" >
|
||||
<ActionIcon variant="transparent" c={MainColor.white} >
|
||||
{e.icon}
|
||||
</ActionIcon>
|
||||
<Text align="center" color="white">
|
||||
<Text align="center" color={MainColor.white}>
|
||||
{e.name}
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -136,7 +136,7 @@ export default function DrawerKatalogNew({
|
||||
});
|
||||
}}
|
||||
>
|
||||
<IconDashboard />
|
||||
<IconDashboard color={MainColor.white} />
|
||||
</ActionIcon>
|
||||
<Text align="center" color="white">
|
||||
Dashboard Admin
|
||||
|
||||
@@ -67,8 +67,14 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
},
|
||||
required: {
|
||||
color: MainColor.red,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Nama Bisnis"
|
||||
@@ -82,10 +88,17 @@ export default function CreatePortofolio({
|
||||
}}
|
||||
/>
|
||||
<Select
|
||||
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
},
|
||||
required: {
|
||||
color: MainColor.red,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Bidang Bisnis"
|
||||
@@ -104,8 +117,14 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
},
|
||||
required: {
|
||||
color: MainColor.red,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Alamat Bisnis"
|
||||
@@ -121,8 +140,14 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
},
|
||||
required: {
|
||||
color: MainColor.red,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Nomor Telepon "
|
||||
@@ -139,8 +164,14 @@ export default function CreatePortofolio({
|
||||
<Textarea
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
},
|
||||
required: {
|
||||
color: MainColor.red,
|
||||
}
|
||||
}}
|
||||
maxLength={300}
|
||||
autosize
|
||||
@@ -164,7 +195,7 @@ export default function CreatePortofolio({
|
||||
</Stack>
|
||||
|
||||
<Stack>
|
||||
<ComponentGlobal_BoxInformation informasi="Upload Logo Bisnis Anda!" />
|
||||
<ComponentGlobal_BoxInformation informasi="Upload Logo Bisnis Anda" />
|
||||
<ComponentGlobal_BoxUploadImage>
|
||||
{img ? (
|
||||
<AspectRatio ratio={1 / 1} mah={265} mx={"auto"}>
|
||||
@@ -177,8 +208,8 @@ export default function CreatePortofolio({
|
||||
</AspectRatio>
|
||||
) : (
|
||||
<Stack spacing={5} justify="center" align="center" h={"100%"}>
|
||||
<Title order={3}>Upload Logo Bisnis</Title>
|
||||
<Text fs={"italic"} fz={10} align="center">
|
||||
<Title c={MainColor.white} order={3}>Upload Logo Bisnis</Title>
|
||||
<Text c={MainColor.white} fs={"italic"} fz={10} align="center">
|
||||
Masukan logo bisnis anda untuk ditampilkan dalam portofolio
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -275,8 +306,11 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
}
|
||||
}}
|
||||
label="Facebook"
|
||||
maxLength={100}
|
||||
@@ -291,8 +325,11 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
}
|
||||
}}
|
||||
label="Instagram"
|
||||
maxLength={100}
|
||||
@@ -307,8 +344,11 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
}
|
||||
}}
|
||||
label="Tiktok"
|
||||
maxLength={100}
|
||||
@@ -323,8 +363,11 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
}
|
||||
}}
|
||||
label="Twitter"
|
||||
maxLength={100}
|
||||
@@ -339,8 +382,11 @@ export default function CreatePortofolio({
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white
|
||||
}
|
||||
}}
|
||||
label="Youtube"
|
||||
maxLength={100}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Center, Image, Skeleton } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
|
||||
export function Profile_ComponentLoadBackgroundImage({
|
||||
fileId,
|
||||
@@ -41,7 +42,7 @@ export function Profile_ComponentLoadBackgroundImage({
|
||||
if (!isImage)
|
||||
return (
|
||||
<>
|
||||
<Center h={200} bg={"white"} style={{ borderRadius: "10px" }}>
|
||||
<Center h={200} bg={MainColor.white} style={{ borderRadius: "10px" }}>
|
||||
<Image
|
||||
alt="No Image"
|
||||
maw={150}
|
||||
@@ -64,7 +65,7 @@ export function Profile_ComponentLoadBackgroundImage({
|
||||
});
|
||||
}}
|
||||
style={{
|
||||
borderColor: "white",
|
||||
borderColor: MainColor.white,
|
||||
borderStyle: "solid",
|
||||
borderWidth: "1px",
|
||||
borderRadius: "5px",
|
||||
|
||||
@@ -54,7 +54,7 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
}}
|
||||
withAsterisk
|
||||
@@ -66,7 +66,7 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
}}
|
||||
withAsterisk
|
||||
@@ -92,8 +92,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Nama"
|
||||
@@ -118,8 +121,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Email"
|
||||
@@ -146,8 +152,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<TextInput
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Alamat"
|
||||
@@ -172,8 +181,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||
<Select
|
||||
styles={{
|
||||
label: {
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
},
|
||||
input: {
|
||||
backgroundColor: MainColor.white,
|
||||
}
|
||||
}}
|
||||
withAsterisk
|
||||
label="Jenis Kelamin"
|
||||
|
||||
@@ -42,7 +42,7 @@ export default function ListPortofolioProfileNew() {
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
borderRadius: "10px ",
|
||||
padding: "15px",
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
}}
|
||||
>
|
||||
<Stack spacing={"sm"}>
|
||||
@@ -84,7 +84,7 @@ export default function ListPortofolioProfileNew() {
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
borderRadius: "10px ",
|
||||
padding: "15px",
|
||||
color: "white",
|
||||
color: MainColor.white,
|
||||
}}
|
||||
>
|
||||
<Group position="apart">
|
||||
@@ -97,7 +97,7 @@ export default function ListPortofolioProfileNew() {
|
||||
</Text>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<IconCaretRight color="white" size={25} />
|
||||
<IconCaretRight color={MainColor.white} size={25} />
|
||||
</Stack>
|
||||
</Group>
|
||||
</Paper>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { apiGetUserProfile, IUserProfile } from "@/app_modules/user";
|
||||
import { Box, Center, Group, Stack, Text, ThemeIcon } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
@@ -14,23 +14,23 @@ export default function ProfileDetail() {
|
||||
const [dataProfile, setDataProfile] = useState<IUserProfile>()
|
||||
const listInformation = [
|
||||
{
|
||||
icon: <IconPhone />,
|
||||
icon: <IconPhone color={MainColor.white} />,
|
||||
value: "+" + dataProfile?.nomor,
|
||||
},
|
||||
{
|
||||
icon: <IconBrandGmail />,
|
||||
icon: <IconBrandGmail color={MainColor.white} />,
|
||||
value: dataProfile?.email,
|
||||
},
|
||||
{
|
||||
icon: <IconHome />,
|
||||
icon: <IconHome color={MainColor.white} />,
|
||||
value: dataProfile?.alamat,
|
||||
},
|
||||
{
|
||||
icon:
|
||||
dataProfile?.jenisKelamin === "Laki-laki" ? (
|
||||
<IconGenderMale />
|
||||
<IconGenderMale color={MainColor.white} />
|
||||
) : (
|
||||
<IconGenderFemale />
|
||||
<IconGenderFemale color={MainColor.white}/>
|
||||
),
|
||||
value: dataProfile?.jenisKelamin,
|
||||
},
|
||||
@@ -64,7 +64,7 @@ export default function ProfileDetail() {
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
borderRadius: "10px ",
|
||||
padding: "15px",
|
||||
color: "white",
|
||||
color: MainColor.white
|
||||
}}
|
||||
>
|
||||
{
|
||||
@@ -96,11 +96,11 @@ export default function ProfileDetail() {
|
||||
}}
|
||||
/>
|
||||
</Center>
|
||||
<Stack align="center" c={"white"} mt={"xs"} spacing={0}>
|
||||
<Text fw={"bold"} lineClamp={1}>
|
||||
<Stack align="center" c={MainColor.white} mt={"xs"} spacing={0}>
|
||||
<Text fw={"bold"} lineClamp={1} c={MainColor.white}>
|
||||
{dataProfile?.name}
|
||||
</Text>
|
||||
<Text fs={"italic"} fz={"sm"} lineClamp={1}>
|
||||
<Text fs={"italic"} fz={"sm"} c={MainColor.white} lineClamp={1}>
|
||||
@{dataProfile?.username}
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -118,7 +118,7 @@ export default function ProfileDetail() {
|
||||
{e.icon}
|
||||
</ThemeIcon>
|
||||
<Box w={"85%"}>
|
||||
<Text fw={"bold"}>{e?.value}</Text>
|
||||
<Text c={MainColor.white} fw={"bold"}>{e?.value}</Text>
|
||||
</Box>
|
||||
</Group>
|
||||
))}
|
||||
|
||||
@@ -14,27 +14,29 @@ export default function SkeletonProfile() {
|
||||
}}
|
||||
>
|
||||
<Center>
|
||||
<Avatar radius={"50%"} size={100} bg={"gray"} />
|
||||
<Avatar radius={"50%"} size={100} />
|
||||
</Center>
|
||||
</Box>
|
||||
<Stack align="center" justify="center" spacing={"xs"}>
|
||||
<Skeleton height={15} radius={"md"} width={"50%"} />
|
||||
<Skeleton height={15} radius={"md"} width={"20%"} />
|
||||
<Skeleton height={15} radius={"md"} width={"50%"} />
|
||||
</Stack>
|
||||
|
||||
<Box mt={"lg"}>
|
||||
{[...Array(4)].map((_, index) => (
|
||||
<Box key={index} py={5}>
|
||||
<Grid align="center">
|
||||
<Grid.Col span={1}>
|
||||
<Skeleton w={25} h={25} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={11}>
|
||||
<Skeleton w={"100%"} h={15} />
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
))}
|
||||
<Stack spacing={"xs"}>
|
||||
{[...Array(4)].map((_, index) => (
|
||||
<Box key={index} py={5}>
|
||||
<Grid align="center">
|
||||
<Grid.Col span={1}>
|
||||
<Skeleton w={25} h={25} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={11}>
|
||||
<Skeleton w={"50%"} h={15} />
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Box>
|
||||
))}
|
||||
</Stack>
|
||||
</Box>
|
||||
</Box>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user