import { DetailMessage, TableStyle, TableWrapper } from '../../../styles/Components'; import { StatusLabel } from '../../../styles/ModuleComponents'; import { Button, CheckBox } from '../index'; import { convertKTC, getOptionsArray } from '../../../utils'; import { styled } from 'styled-components'; const CaliTable = ({ columns, data, selectedRows = [], onSelectRow, onAction, refProp }) => { const renderCell = (column, item) => { const { type, id, option_name, format, action } = column; const value = item[id]; const options = getOptionsArray(option_name); switch (type) { case 'text': return value; case 'date': return convertKTC(value); case 'status': const statusOption = options.find(opt => opt.value === value); return ( {statusOption ? statusOption.name : value} ); case 'button': return (