fix responsive admin use access
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { AdminUserAccess_View } from "@/app_modules/admin/user-access";
|
import { AdminUserAccess_View } from "@/app_modules/admin/user-access";
|
||||||
import adminUserAccess_getListUser from "@/app_modules/admin/user-access/fun/get/get_list_all_user";
|
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
// const listUser = await adminUserAccess_getListUser({ page: 1 });
|
// const listUser = await adminUserAccess_getListUser({ page: 1 });
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||||
|
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||||
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
|
import { IRealtimeData } from "@/lib/global_state";
|
||||||
import { clientLogger } from "@/util/clientLogger";
|
import { clientLogger } from "@/util/clientLogger";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -15,18 +18,16 @@ import {
|
|||||||
Table,
|
Table,
|
||||||
TextInput,
|
TextInput,
|
||||||
Title,
|
Title,
|
||||||
|
Text,
|
||||||
|
Box
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { IconSearch } from "@tabler/icons-react";
|
import { IconSearch } from "@tabler/icons-react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import adminUserAccess_funEditAccess from "../fun/edit/fun_edit_access";
|
|
||||||
import adminUserAccess_getListUser from "../fun/get/get_list_all_user";
|
|
||||||
import { WibuRealtime } from "wibu-pkg";
|
import { WibuRealtime } from "wibu-pkg";
|
||||||
import { gs_access_user, IRealtimeData } from "@/lib/global_state";
|
|
||||||
import { useAtom } from "jotai";
|
|
||||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { apiGetUserAccess } from "../_lib/api_fetch_user_access";
|
import { apiGetUserAccess } from "../_lib/api_fetch_user_access";
|
||||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
import adminUserAccess_funEditAccess from "../fun/edit/fun_edit_access";
|
||||||
|
import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/comp_pagination_breakpoint";
|
||||||
|
|
||||||
export default function AdminUserAccess_View() {
|
export default function AdminUserAccess_View() {
|
||||||
const [data, setData] = useState<MODEL_USER[]>([]);
|
const [data, setData] = useState<MODEL_USER[]>([]);
|
||||||
@@ -126,10 +127,14 @@ export default function AdminUserAccess_View() {
|
|||||||
const tableBody = data.map((e, i) => (
|
const tableBody = data.map((e, i) => (
|
||||||
<tr key={e.id}>
|
<tr key={e.id}>
|
||||||
<td>
|
<td>
|
||||||
<Center c={AdminColor.white}>{e.username}</Center>
|
<Box w={200}>
|
||||||
|
<Text c={AdminColor.white}>{e.username}</Text>
|
||||||
|
</Box>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Center c={AdminColor.white}>+{e.nomor}</Center>
|
<Box w={200}>
|
||||||
|
<Text c={AdminColor.white}>+{e.nomor}</Text>
|
||||||
|
</Box>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{e.active === false ? (
|
{e.active === false ? (
|
||||||
@@ -195,10 +200,10 @@ export default function AdminUserAccess_View() {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<Center c={AdminColor.white}>Username</Center>
|
<Text c={AdminColor.white}>Username</Text>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center c={AdminColor.white}>Nomor</Center>
|
<Text c={AdminColor.white}>Nomor</Text>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<Center c={AdminColor.white}>Aksi</Center>
|
<Center c={AdminColor.white}>Aksi</Center>
|
||||||
@@ -208,15 +213,13 @@ export default function AdminUserAccess_View() {
|
|||||||
<tbody>{tableBody}</tbody>
|
<tbody>{tableBody}</tbody>
|
||||||
</Table>
|
</Table>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
<Center mt={"xl"}>
|
<Admin_V3_ComponentPaginationBreakpoint
|
||||||
<Pagination
|
value={isActivePage}
|
||||||
value={isActivePage}
|
total={nPage}
|
||||||
total={nPage}
|
onChange={(val) => {
|
||||||
onChange={(val) => {
|
onPageClick(val);
|
||||||
onPageClick(val);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
|
||||||
</Center>
|
|
||||||
</Paper>
|
</Paper>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user