upd: edit profile
Deskripsi: - view edit profile - component ui profile No Issues
This commit is contained in:
23
src/module/user/profile/component/ui/header_edit_profile.tsx
Normal file
23
src/module/user/profile/component/ui/header_edit_profile.tsx
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
'use client'
|
||||||
|
import { LayoutIconBack, LayoutNavbarHome } from '@/module/_global';
|
||||||
|
import { Box, Grid, Text } from '@mantine/core';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export default function HeaderEditProfile() {
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
<LayoutNavbarHome>
|
||||||
|
<Grid justify='center' align='center'>
|
||||||
|
<Grid.Col span="auto">
|
||||||
|
<LayoutIconBack />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6}>
|
||||||
|
<Text ta={'center'} fw={'bold'} c={'white'}>EDIT PROFIL</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span="auto"></Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</LayoutNavbarHome>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
14
src/module/user/profile/component/ui/ui_profile.tsx
Normal file
14
src/module/user/profile/component/ui/ui_profile.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
'use client'
|
||||||
|
import { Group, Text } from "@mantine/core";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
|
||||||
|
export function InfoTitleProfile() {
|
||||||
|
const router = useRouter()
|
||||||
|
return (
|
||||||
|
<Group justify="space-between" grow py={5}>
|
||||||
|
<Text fw={'bold'} fz={20}>Informasi</Text>
|
||||||
|
<Text ta={"right"} c={"blue"} onClick={() => router.push('/profile/edit')}>Edit</Text>
|
||||||
|
</Group>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,9 +1,77 @@
|
|||||||
import { Box } from "@mantine/core";
|
import { WARNA } from "@/module/_global";
|
||||||
|
import { Box, Button, Stack, TextInput } from "@mantine/core";
|
||||||
|
import HeaderEditProfile from "../component/ui/header_edit_profile";
|
||||||
|
import { HiUser } from "react-icons/hi2";
|
||||||
|
|
||||||
export default function ViewEditProfile() {
|
export default function ViewEditProfile() {
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
Edit profile
|
<HeaderEditProfile />
|
||||||
|
<Stack
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
gap="xs"
|
||||||
|
pt={30}
|
||||||
|
px={20}
|
||||||
|
>
|
||||||
|
<Box bg={WARNA.biruTua} py={30} px={50}
|
||||||
|
style={{
|
||||||
|
borderRadius: 10,
|
||||||
|
}}>
|
||||||
|
<HiUser size={100} color={WARNA.bgWhite} />
|
||||||
|
</Box>
|
||||||
|
<TextInput
|
||||||
|
size="md" type="number" radius={30} placeholder="NIK" withAsterisk label="NIK" w={"100%"}
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
color: WARNA.biruTua,
|
||||||
|
borderRadius: WARNA.biruTua,
|
||||||
|
borderColor: WARNA.biruTua,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<TextInput
|
||||||
|
size="md" type="text" radius={30} placeholder="Nama" withAsterisk label="Nama" w={"100%"}
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
color: WARNA.biruTua,
|
||||||
|
borderRadius: WARNA.biruTua,
|
||||||
|
borderColor: WARNA.biruTua,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<TextInput
|
||||||
|
size="md" type="email" radius={30} placeholder="Email" withAsterisk label="Email" w={"100%"}
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
color: WARNA.biruTua,
|
||||||
|
borderRadius: WARNA.biruTua,
|
||||||
|
borderColor: WARNA.biruTua,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<TextInput
|
||||||
|
size="md" type="number" radius={30} placeholder="+62...." withAsterisk label="Nomor Telepon" w={"100%"}
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
color: WARNA.biruTua,
|
||||||
|
borderRadius: WARNA.biruTua,
|
||||||
|
borderColor: WARNA.biruTua,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
<Box mt={30} mx={20}>
|
||||||
|
<Button
|
||||||
|
c={"white"}
|
||||||
|
bg={WARNA.biruTua}
|
||||||
|
size="md"
|
||||||
|
radius={30}
|
||||||
|
fullWidth
|
||||||
|
>
|
||||||
|
Simpan
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
import { LayoutNavbarHome, WARNA } from "@/module/_global";
|
import { LayoutIconBack, LayoutNavbarHome, WARNA } from "@/module/_global";
|
||||||
import { ActionIcon, Anchor, Box, Flex, Group, Stack, Text } from "@mantine/core";
|
import { ActionIcon, Anchor, Box, Button, Flex, Group, Stack, Text } from "@mantine/core";
|
||||||
import { BsInfo } from "react-icons/bs";
|
import { BsInfo } from "react-icons/bs";
|
||||||
import { HiUser } from "react-icons/hi2";
|
import { HiUser } from "react-icons/hi2";
|
||||||
import { RiIdCardFill } from "react-icons/ri";
|
import { RiIdCardFill } from "react-icons/ri";
|
||||||
import { FaSquarePhone } from "react-icons/fa6";
|
import { FaSquarePhone } from "react-icons/fa6";
|
||||||
import { MdEmail } from "react-icons/md";
|
import { MdEmail } from "react-icons/md";
|
||||||
|
import { InfoTitleProfile } from "../component/ui/ui_profile";
|
||||||
|
|
||||||
export default function ViewProfile() {
|
export default function ViewProfile() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutNavbarHome>
|
<LayoutNavbarHome>
|
||||||
<Group justify="space-between">
|
<Group justify="space-between">
|
||||||
<Text fw={'bold'} c={'white'}>Profile</Text>
|
<LayoutIconBack />
|
||||||
<ActionIcon variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Info">
|
<ActionIcon variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Info">
|
||||||
<BsInfo size={20} color='white' />
|
<BsInfo size={20} color='white' />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@@ -27,29 +28,24 @@ export default function ViewProfile() {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</LayoutNavbarHome>
|
</LayoutNavbarHome>
|
||||||
<Box p={20}>
|
<Box p={20}>
|
||||||
<Group justify="space-between" grow py={5}>
|
<InfoTitleProfile />
|
||||||
<Text fw={'bold'} fz={20}>Informasi</Text>
|
|
||||||
<Anchor href="profile/edit" ta={"right"}>
|
|
||||||
Edit
|
|
||||||
</Anchor>
|
|
||||||
</Group>
|
|
||||||
<Group justify="space-between" grow py={5}>
|
<Group justify="space-between" grow py={5}>
|
||||||
<Group>
|
<Group>
|
||||||
<RiIdCardFill size={28}/>
|
<RiIdCardFill size={28} />
|
||||||
<Text fz={18}>NIK</Text>
|
<Text fz={18}>NIK</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Text fz={18} fw={'bold'} ta={"right"}>513177782899</Text>
|
<Text fz={18} fw={'bold'} ta={"right"}>513177782899</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Group justify="space-between" grow py={5}>
|
<Group justify="space-between" grow py={5}>
|
||||||
<Group>
|
<Group>
|
||||||
<FaSquarePhone size={28}/>
|
<FaSquarePhone size={28} />
|
||||||
<Text fz={18}>NoTelepon</Text>
|
<Text fz={18}>NoTelepon</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Text fz={18} fw={'bold'} ta={"right"}>+62038939293</Text>
|
<Text fz={18} fw={'bold'} ta={"right"}>+62038939293</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Group justify="space-between" grow py={5}>
|
<Group justify="space-between" grow py={5}>
|
||||||
<Group>
|
<Group>
|
||||||
<MdEmail size={28}/>
|
<MdEmail size={28} />
|
||||||
<Text fz={18}>Email</Text>
|
<Text fz={18}>Email</Text>
|
||||||
</Group>
|
</Group>
|
||||||
<Text fz={18} fw={'bold'} ta={"right"}>marcel@gmail.com</Text>
|
<Text fz={18} fw={'bold'} ta={"right"}>marcel@gmail.com</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user