final changes and fixes added

This commit is contained in:
sara-pervana
2024-01-16 22:05:09 +01:00
committed by Sara Pervana
parent 13de134bb0
commit 51859b148b
3 changed files with 79 additions and 30 deletions

View File

@@ -59,22 +59,31 @@ export const APServiceRepositoryTableConfig = [
{
key: "status",
label: "Status",
},
{
key: "other",
label: "Type",
render: (value: any) => {
let renderedValue: any = "";
if (typeof value === "object") {
const label = Object.keys(value)[0];
const info = value[label];
renderedValue = (
<code>
{label} {info}
</code>
);
if (Array.isArray(value.data)) {
renderedValue = value.data.join(", ");
} else {
console.error("Status is not an array", value);
}
return renderedValue;
},
},
// {
// key: "other",
// label: "Type",
// render: (value: any) => {
// let renderedValue: any = "";
// if (typeof value === "object") {
// const label = Object.keys(value)[0];
// const info = value[label];
// renderedValue = (
// <code>
// {label} {info}
// </code>
// );
// }
// return renderedValue;
// },
// },
];