upd: api address
Deskripsi: - hapus semua penggunaan api address - fungetall member in index No Issues
This commit is contained in:
@@ -3,9 +3,11 @@ import { apiUser } from "./api/api_user";
|
||||
import createLogUser from "./log/fun/createLogUser";
|
||||
import ViewEditProfile from "./profile/view/view_edit_profile";
|
||||
import ViewProfile from "./profile/view/view_profile";
|
||||
import { funGetAllmember } from './member/lib/api_member';
|
||||
|
||||
export { ViewProfile };
|
||||
export { ViewEditProfile };
|
||||
export { apiUser };
|
||||
export { createLogUser };
|
||||
export type { TypeUser }
|
||||
export { funGetAllmember }
|
||||
|
||||
@@ -8,4 +8,4 @@ export { NavbarListMember }
|
||||
export { ListMember }
|
||||
export { CreateMember }
|
||||
export { NavbarDetailMember }
|
||||
export {EditMember}
|
||||
export {EditMember}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import { API_ADDRESS, WARNA } from "@/module/_global";
|
||||
import { WARNA } from "@/module/_global";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
import { funGetAllGroup, IDataGroup } from "@/module/group";
|
||||
import { Box, Button, Select, Stack, TextInput } from "@mantine/core";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import { API_ADDRESS, WARNA } from "@/module/_global";
|
||||
import { WARNA } from "@/module/_global";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
import { Box, Flex, SimpleGrid, Stack, Text } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
@@ -28,7 +28,7 @@ export default function DrawerDetailMember({
|
||||
isActive: status,
|
||||
});
|
||||
|
||||
if (res.success) {
|
||||
if (res.success) {
|
||||
toast.success(res.message);
|
||||
onDeleted(true);
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import { API_ADDRESS, WARNA } from "@/module/_global";
|
||||
import { WARNA } from "@/module/_global";
|
||||
import LayoutModal from "@/module/_global/layout/layout_modal";
|
||||
import { funGetAllGroup, IDataGroup } from "@/module/group";
|
||||
import { funGetAllPosition } from "@/module/position/lib/api_position";
|
||||
@@ -13,7 +13,7 @@ import { IDataPositionMember, IDataROleMember, IEditDataMember, IFormMember } fr
|
||||
import { funEditMember, funGetOneMember, funGetRoleUser } from "../lib/api_member";
|
||||
|
||||
|
||||
export default function EditMember({ id }: { id: string}) {
|
||||
export default function EditMember({ id }: { id: string }) {
|
||||
const [isModal, setModal] = useState(false)
|
||||
const router = useRouter()
|
||||
const [listGroup, setListGorup] = useState<IDataGroup[]>([])
|
||||
@@ -47,7 +47,7 @@ export default function EditMember({ id }: { id: string}) {
|
||||
|
||||
async function getOneData() {
|
||||
try {
|
||||
const res = await funGetOneMember(id)
|
||||
const res = await funGetOneMember(id)
|
||||
setData(res.data)
|
||||
getAllPosition(res.data?.idGroup)
|
||||
} catch (error) {
|
||||
@@ -59,8 +59,8 @@ export default function EditMember({ id }: { id: string}) {
|
||||
try {
|
||||
const res = await funGetAllPosition(
|
||||
"?active=true" + "&group=" + `${val}`
|
||||
);
|
||||
setListPosition(res.data);
|
||||
);
|
||||
setListPosition(res.data);
|
||||
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -96,7 +96,7 @@ export default function EditMember({ id }: { id: string}) {
|
||||
async function onSubmit(val: boolean) {
|
||||
try {
|
||||
|
||||
const res = await funEditMember(id,{
|
||||
const res = await funEditMember(id, {
|
||||
id: data.id,
|
||||
nik: data.nik,
|
||||
name: data.name,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import { LayoutNavbarHome, LayoutIconBack, WARNA, LayoutDrawer, API_ADDRESS } from "@/module/_global";
|
||||
import { LayoutNavbarHome, LayoutIconBack, WARNA, LayoutDrawer } from "@/module/_global";
|
||||
import { Box, Group, ActionIcon, Stack, Text, Center, Avatar } from "@mantine/core";
|
||||
import { HiMenu } from "react-icons/hi";
|
||||
import { HiUser } from "react-icons/hi2";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import { API_ADDRESS, WARNA } from "@/module/_global"
|
||||
import { WARNA } from "@/module/_global"
|
||||
import { Box, Group, ActionIcon, Text, TextInput } from "@mantine/core"
|
||||
import { useShallowEffect } from "@mantine/hooks"
|
||||
import { useRouter, useSearchParams } from "next/navigation"
|
||||
|
||||
Reference in New Issue
Block a user