mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-27 00:40:37 +00:00
lint w/ burnettk
This commit is contained in:
parent
e969ea05d3
commit
d441d082b1
@ -48,57 +48,58 @@ export default function ProcessInstanceLogList({ variant }: OwnProps) {
|
|||||||
isDetailedView,
|
isDetailedView,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const getTableRow = (row: any) => {
|
||||||
|
const tableRow = [];
|
||||||
|
const taskNameCell = (
|
||||||
|
<td>
|
||||||
|
{row.bpmn_task_name ||
|
||||||
|
(row.bpmn_task_type === 'Default Start Event'
|
||||||
|
? 'Process Started'
|
||||||
|
: '') ||
|
||||||
|
(row.bpmn_task_type === 'End Event' ? 'Process Ended' : '')}
|
||||||
|
</td>
|
||||||
|
);
|
||||||
|
if (isDetailedView) {
|
||||||
|
tableRow.push(
|
||||||
|
<>
|
||||||
|
<td data-qa="paginated-entity-id">{row.id}</td>
|
||||||
|
<td>{row.bpmn_process_identifier}</td>
|
||||||
|
{taskNameCell}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
tableRow.push(
|
||||||
|
<>
|
||||||
|
{taskNameCell}
|
||||||
|
<td>{row.bpmn_process_identifier}</td>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (isDetailedView) {
|
||||||
|
tableRow.push(
|
||||||
|
<>
|
||||||
|
<td>{row.bpmn_task_type}</td>
|
||||||
|
<td>{row.message}</td>
|
||||||
|
<td>{row.username === userEmail ? 'me 🔥' : row.username}</td>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
tableRow.push(
|
||||||
|
<td>
|
||||||
|
<Link
|
||||||
|
data-qa="process-instance-show-link"
|
||||||
|
to={`${processInstanceShowPageBaseUrl}/${row.process_instance_id}/${row.spiff_step}`}
|
||||||
|
>
|
||||||
|
{convertSecondsToFormattedDateTime(row.timestamp)}
|
||||||
|
</Link>
|
||||||
|
</td>
|
||||||
|
);
|
||||||
|
return <tr key={row.id}>{tableRow}</tr>;
|
||||||
|
};
|
||||||
|
|
||||||
const buildTable = () => {
|
const buildTable = () => {
|
||||||
const rows = processInstanceLogs.map((row) => {
|
const rows = processInstanceLogs.map((row) => {
|
||||||
const rowToUse = row as any;
|
return getTableRow(row);
|
||||||
const tableRow = [];
|
|
||||||
const taskNameCell = (
|
|
||||||
<td>
|
|
||||||
{rowToUse.bpmn_task_name ||
|
|
||||||
(rowToUse.bpmn_task_type === 'Default Start Event'
|
|
||||||
? 'Process Started'
|
|
||||||
: '') ||
|
|
||||||
(rowToUse.bpmn_task_type === 'End Event' ? 'Process Ended' : '')}
|
|
||||||
</td>
|
|
||||||
);
|
|
||||||
if (isDetailedView) {
|
|
||||||
tableRow.push(
|
|
||||||
<>
|
|
||||||
<td data-qa="paginated-entity-id">{rowToUse.id}</td>
|
|
||||||
<td>{rowToUse.bpmn_process_identifier}</td>
|
|
||||||
{taskNameCell}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
tableRow.push(
|
|
||||||
<>
|
|
||||||
{taskNameCell}
|
|
||||||
<td>{rowToUse.bpmn_process_identifier}</td>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (isDetailedView) {
|
|
||||||
tableRow.push(
|
|
||||||
<>
|
|
||||||
<td>{rowToUse.bpmn_task_type}</td>
|
|
||||||
<td>{rowToUse.message}</td>
|
|
||||||
<td>
|
|
||||||
{rowToUse.username === userEmail ? 'me 🔥' : rowToUse.username}
|
|
||||||
</td>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
tableRow.push(
|
|
||||||
<td>
|
|
||||||
<Link
|
|
||||||
data-qa="process-instance-show-link"
|
|
||||||
to={`${processInstanceShowPageBaseUrl}/${rowToUse.process_instance_id}/${rowToUse.spiff_step}`}
|
|
||||||
>
|
|
||||||
{convertSecondsToFormattedDateTime(rowToUse.timestamp)}
|
|
||||||
</Link>
|
|
||||||
</td>
|
|
||||||
);
|
|
||||||
return <tr key={rowToUse.id}>{tableRow}</tr>;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableHeaders = [];
|
const tableHeaders = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user