lint w/ burnettk
This commit is contained in:
parent
e969ea05d3
commit
d441d082b1
|
@ -48,57 +48,58 @@ export default function ProcessInstanceLogList({ variant }: OwnProps) {
|
|||
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 rows = processInstanceLogs.map((row) => {
|
||||
const rowToUse = row as any;
|
||||
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>;
|
||||
return getTableRow(row);
|
||||
});
|
||||
|
||||
const tableHeaders = [];
|
||||
|
|
Loading…
Reference in New Issue