fix: detail categories
This commit is contained in:
commit
a07fd232c6
|
|
@ -125,19 +125,20 @@ export default function CategoriesDetailForm() {
|
||||||
{/* Creator */}
|
{/* Creator */}
|
||||||
<div>
|
<div>
|
||||||
<Label>Created By</Label>
|
<Label>Created By</Label>
|
||||||
|
<Input
|
||||||
|
readOnly
|
||||||
|
value={
|
||||||
|
currentUser && currentUser.id === detail.createdById
|
||||||
|
? currentUser.fullname || currentUser.username
|
||||||
|
: `User ID ${detail.createdById}`
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* <Input
|
{/* <Input
|
||||||
type="text"
|
type="text"
|
||||||
value={detail.createdByName || detail.createdById}
|
value={detail.createdByName || detail.createdById}
|
||||||
readOnly
|
readOnly
|
||||||
/> */}
|
/> */}
|
||||||
<Input
|
|
||||||
readOnly
|
|
||||||
value={
|
|
||||||
currentUser?.id === detail.createdById
|
|
||||||
? currentUser.username
|
|
||||||
: `User ID ${detail.createdById}`
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Status */}
|
{/* Status */}
|
||||||
|
|
|
||||||
|
|
@ -58,13 +58,13 @@ const columns: ColumnDef<any>[] = [
|
||||||
<span className="normal-case">{row.getValue("userLevelGroup") || "-"}</span>
|
<span className="normal-case">{row.getValue("userLevelGroup") || "-"}</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
accessorKey: "statusId",
|
// accessorKey: "statusId",
|
||||||
header: "Status ID",
|
// header: "Status ID",
|
||||||
cell: ({ row }) => (
|
// cell: ({ row }) => (
|
||||||
<span>{row.getValue("statusId")}</span>
|
// <span>{row.getValue("statusId")}</span>
|
||||||
),
|
// ),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
accessorKey: "createdAt",
|
accessorKey: "createdAt",
|
||||||
header: "Tanggal Unggah",
|
header: "Tanggal Unggah",
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,8 @@ import { httpGetInterceptor } from "./http-config/http-interceptor-service";
|
||||||
export function getUserInfo() {
|
export function getUserInfo() {
|
||||||
return httpGetInterceptor("users/info");
|
return httpGetInterceptor("users/info");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getUserById(userId: number) {
|
||||||
|
return httpGetInterceptor(`users/${userId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue