fix: detail categories

This commit is contained in:
Sabda Yagra 2026-02-10 13:27:38 +07:00
commit a07fd232c6
3 changed files with 23 additions and 17 deletions

View File

@ -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 */}

View File

@ -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",

View File

@ -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}`);
}