feat:status table konten
This commit is contained in:
parent
82cccdf94f
commit
a2cee179d5
|
|
@ -121,13 +121,13 @@ const useTableColumns = () => {
|
||||||
"menunggu review": "bg-orange-100 text-orange-600",
|
"menunggu review": "bg-orange-100 text-orange-600",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mengambil `statusName` dari data API
|
const isPublish = row.original.isPublish;
|
||||||
const status = row.getValue("statusName") as string;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const statusName = status?.toLocaleLowerCase(); // Ubah ke huruf kecil
|
|
||||||
|
|
||||||
// Gunakan `statusName` untuk pencocokan
|
const status =
|
||||||
const statusStyles =
|
isPublish || isPublishOnPolda ? "diterima" : "menunggu review";
|
||||||
statusColors[statusName] || "bg-gray-100 text-gray-600";
|
|
||||||
|
const statusStyles = statusColors[status] || "bg-red-200 text-red-600";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
|
|
@ -136,7 +136,7 @@ const useTableColumns = () => {
|
||||||
statusStyles
|
statusStyles
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{status} {/* Tetap tampilkan nilai asli */}
|
{status}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,13 @@ const useTableColumns = () => {
|
||||||
"menunggu review": "bg-orange-100 text-orange-600",
|
"menunggu review": "bg-orange-100 text-orange-600",
|
||||||
};
|
};
|
||||||
|
|
||||||
const status = row.getValue("statusName") as string;
|
const isPublish = row.original.isPublish;
|
||||||
const statusName = status?.toLocaleLowerCase();
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const statusStyles =
|
|
||||||
statusColors[statusName] || "bg-red-200 text-red-600";
|
const status =
|
||||||
|
isPublish || isPublishOnPolda ? "diterima" : "menunggu review";
|
||||||
|
|
||||||
|
const statusStyles = statusColors[status] || "bg-red-200 text-red-600";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
|
|
@ -137,7 +140,7 @@ const useTableColumns = () => {
|
||||||
statusStyles
|
statusStyles
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{status} {/* Tetap tampilkan nilai asli */}
|
{status}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -122,13 +122,13 @@ const useTableColumns = () => {
|
||||||
"menunggu review": "bg-orange-100 text-orange-600",
|
"menunggu review": "bg-orange-100 text-orange-600",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Mengambil `statusName` dari data API
|
const isPublish = row.original.isPublish;
|
||||||
const status = row.getValue("statusName") as string;
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const statusName = status?.toLocaleLowerCase(); // Ubah ke huruf kecil
|
|
||||||
|
|
||||||
// Gunakan `statusName` untuk pencocokan
|
const status =
|
||||||
const statusStyles =
|
isPublish || isPublishOnPolda ? "diterima" : "menunggu review";
|
||||||
statusColors[statusName] || "bg-gray-100 text-gray-600";
|
|
||||||
|
const statusStyles = statusColors[status] || "bg-red-200 text-red-600";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
|
|
@ -137,7 +137,7 @@ const useTableColumns = () => {
|
||||||
statusStyles
|
statusStyles
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{status} {/* Tetap tampilkan nilai asli */}
|
{status}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,13 @@ const useTableColumns = () => {
|
||||||
"menunggu review": "bg-orange-100 text-orange-600",
|
"menunggu review": "bg-orange-100 text-orange-600",
|
||||||
};
|
};
|
||||||
|
|
||||||
const status = row.getValue("statusName") as string;
|
const isPublish = row.original.isPublish;
|
||||||
const statusName = status?.toLocaleLowerCase();
|
const isPublishOnPolda = row.original.isPublishOnPolda;
|
||||||
const statusStyles =
|
|
||||||
statusColors[statusName] || "bg-red-200 text-red-600";
|
const status =
|
||||||
|
isPublish || isPublishOnPolda ? "diterima" : "menunggu review";
|
||||||
|
|
||||||
|
const statusStyles = statusColors[status] || "bg-red-200 text-red-600";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge
|
||||||
|
|
@ -135,7 +138,7 @@ const useTableColumns = () => {
|
||||||
statusStyles
|
statusStyles
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{status} {/* Tetap tampilkan nilai asli */}
|
{status}
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue