date and status fixed
This commit is contained in:
@@ -90,14 +90,15 @@ export default function RecentActions() {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody className="text-muted">
|
<tbody className="text-muted">
|
||||||
{actionData && actionData?.actions.map((action, index) => {
|
{actionData && actionData?.actions.map((action, index) => {
|
||||||
let bgColor = action?.status == 'completed' ? 'badge-success-inverse' : action?.status == 'verifying' ? 'badge-info-inverse' : action?.status == 'processing' ? 'badge-warning-inverse' : 'badge-primary-inverse'
|
let bgColor = action?.status == '5' ? 'badge-success-inverse' : action?.status == '3' ? 'badge-info-inverse' : action?.status == '0' ? 'badge-warning-inverse' : 'badge-primary-inverse'
|
||||||
|
let text = action?.status == '5' ? 'completed' : action?.status == '3' ? 'verifying' : action?.status == '0' ? 'processing' : 'processing'
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{action?.no}</td>
|
<td>{action?.no}</td>
|
||||||
<td>{action?.description}</td>
|
<td>{action?.description}</td>
|
||||||
<td>{new Date(action?.date).toDateString()}</td>
|
<td>{new Date(action?.date).toDateString()}</td>
|
||||||
<td>
|
<td>
|
||||||
<label className={`badge mb-0 ${bgColor}`}>{action?.status}</label>
|
<label className={`badge mb-0 ${bgColor}`}>{text}</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user