upd: test update created At client
This commit is contained in:
@@ -394,7 +394,16 @@ function DetailDataHistori({ data }: { data: any }) {
|
|||||||
{
|
{
|
||||||
data?.map((item: any) => (
|
data?.map((item: any) => (
|
||||||
<Table.Tr key={item.id}>
|
<Table.Tr key={item.id}>
|
||||||
<Table.Td style={{ whiteSpace: "nowrap" }}>{item.createdAt}</Table.Td>
|
<Table.Td style={{ whiteSpace: "nowrap" }}>{
|
||||||
|
item.createdAt.toLocaleString("id-ID", {
|
||||||
|
day: "2-digit",
|
||||||
|
month: "short",
|
||||||
|
year: "numeric",
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
hour12: false
|
||||||
|
})
|
||||||
|
}</Table.Td>
|
||||||
<Table.Td>{item.deskripsi}</Table.Td>
|
<Table.Td>{item.deskripsi}</Table.Td>
|
||||||
<Table.Td>{item.status}</Table.Td>
|
<Table.Td>{item.status}</Table.Td>
|
||||||
<Table.Td style={{ whiteSpace: "nowrap" }}>{item.nameUser ? item.nameUser : "-"}</Table.Td>
|
<Table.Td style={{ whiteSpace: "nowrap" }}>{item.nameUser ? item.nameUser : "-"}</Table.Td>
|
||||||
|
|||||||
@@ -357,14 +357,7 @@ const PengaduanRoute = new Elysia({
|
|||||||
const dataHistoryFix = dataHistory.map((item: any) => ({
|
const dataHistoryFix = dataHistory.map((item: any) => ({
|
||||||
..._.omit(item, ["User", "createdAt"]),
|
..._.omit(item, ["User", "createdAt"]),
|
||||||
nameUser: item.User?.name,
|
nameUser: item.User?.name,
|
||||||
createdAt: item.createdAt.toLocaleString("id-ID", {
|
createdAt: item.createdAt
|
||||||
day: "2-digit",
|
|
||||||
month: "short",
|
|
||||||
year: "numeric",
|
|
||||||
hour: "2-digit",
|
|
||||||
minute: "2-digit",
|
|
||||||
hour12: false
|
|
||||||
}),
|
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user