upd: form surat
Deskripsi: - api detail categori list - form awal buat surat No Issues
This commit is contained in:
@@ -134,7 +134,7 @@ function ListPengaduan({ status }: { status: StatusKey }) {
|
||||
take: "",
|
||||
page: page.toString(),
|
||||
},
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
useShallowEffect(() => {
|
||||
@@ -175,7 +175,6 @@ function ListPengaduan({ status }: { status: StatusKey }) {
|
||||
const pageNow = data?.data?.page || 1;
|
||||
const toDate = (d: any) => new Date(d);
|
||||
|
||||
|
||||
return (
|
||||
<Stack gap="xl">
|
||||
<Grid>
|
||||
@@ -197,8 +196,16 @@ function ListPengaduan({ status }: { status: StatusKey }) {
|
||||
</Grid.Col>
|
||||
<Grid.Col span={3}>
|
||||
<Group justify="flex-end">
|
||||
<Text size="sm" c="gray.5">{`${pageSize * (page - 1) + 1} – ${Math.min(total, pageSize * page)} of ${total}`}</Text>
|
||||
<Pagination total={totalPage} value={page} onChange={setPage} withPages={false} />
|
||||
<Text
|
||||
size="sm"
|
||||
c="gray.5"
|
||||
>{`${pageSize * (page - 1) + 1} – ${Math.min(total, pageSize * page)} of ${total}`}</Text>
|
||||
<Pagination
|
||||
total={totalPage}
|
||||
value={page}
|
||||
onChange={setPage}
|
||||
withPages={false}
|
||||
/>
|
||||
</Group>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
@@ -212,7 +219,8 @@ function ListPengaduan({ status }: { status: StatusKey }) {
|
||||
</Stack>
|
||||
</Flex>
|
||||
) : (
|
||||
Array.isArray(list) && list?.map((v: any) => (
|
||||
Array.isArray(list) &&
|
||||
list?.map((v: any) => (
|
||||
<Card
|
||||
key={v.id}
|
||||
radius="lg"
|
||||
@@ -272,7 +280,13 @@ function ListPengaduan({ status }: { status: StatusKey }) {
|
||||
Tanggal Aduan
|
||||
</Text>
|
||||
</Group>
|
||||
<Text size="md">{toDate(v.createdAt).toLocaleDateString("id-ID", { day: "numeric", month: "long", year: "numeric" })}</Text>
|
||||
<Text size="md">
|
||||
{toDate(v.createdAt).toLocaleDateString("id-ID", {
|
||||
day: "numeric",
|
||||
month: "long",
|
||||
year: "numeric",
|
||||
})}
|
||||
</Text>
|
||||
</Flex>
|
||||
<Flex direction={"column"} justify="flex-start">
|
||||
<Group gap="xs">
|
||||
|
||||
Reference in New Issue
Block a user