(row)
| 11 | // if data is of object type then it Name values will be show in row |
| 12 | // if no data available it will show hyphen "-" |
| 13 | const formatRow = (row) => { |
| 14 | if (Array.isArray(row)) { |
| 15 | return row.map((x) => x.Name).join(", "); |
| 16 | } else if (typeof row === "object" && row !== null) { |
| 17 | return row?.iso ? formatDateToDdMmmYyyy(row?.iso) : row?.Name || "-"; |
| 18 | } else if (typeof row === "boolean" && row !== null) { |
| 19 | return row ? row?.toString() : "false"; |
| 20 | } else if (isValidDateString(row) && row !== null) { |
| 21 | // handle createdAt and updatedAt |
| 22 | return formatDateToDdMmmYyyy(row) || "-"; |
| 23 | } else { |
| 24 | return row || "-"; |
| 25 | } |
| 26 | }; |
| 27 | // Renders a report cell based on the report's heading position |
| 28 | export const RenderReportCell = ({ |
| 29 | col, |
no test coverage detected