updated missing columns on homepage to go to instance page and fixed waiting for me table returning incorrect tasks
This commit is contained in:
parent
ea3a9ed7aa
commit
6aac21ebef
|
@ -617,6 +617,10 @@ class ProcessInstanceReportService:
|
||||||
HumanTaskUserModel,
|
HumanTaskUserModel,
|
||||||
and_(HumanTaskUserModel.human_task_id == HumanTaskModel.id, HumanTaskUserModel.user_id == user.id),
|
and_(HumanTaskUserModel.human_task_id == HumanTaskModel.id, HumanTaskUserModel.user_id == user.id),
|
||||||
)
|
)
|
||||||
|
if report_filter.has_active_status:
|
||||||
|
process_instance_query = process_instance_query.filter(
|
||||||
|
HumanTaskModel.completed.is_(False) # type: ignore
|
||||||
|
)
|
||||||
|
|
||||||
if report_filter.with_tasks_assigned_to_my_group is True:
|
if report_filter.with_tasks_assigned_to_my_group is True:
|
||||||
group_model_join_conditions = [GroupModel.id == HumanTaskModel.lane_assignment_id]
|
group_model_join_conditions = [GroupModel.id == HumanTaskModel.lane_assignment_id]
|
||||||
|
|
|
@ -1396,12 +1396,22 @@ export default function ProcessInstanceListTable({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (column.accessor === 'waiting_for') {
|
if (column.accessor === 'waiting_for') {
|
||||||
return <td>{getWaitingForTableCellComponent(row)}</td>;
|
return (
|
||||||
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
||||||
|
<td
|
||||||
|
onClick={navigateToProcessInstance}
|
||||||
|
onKeyDown={navigateToProcessInstance}
|
||||||
|
>
|
||||||
|
{getWaitingForTableCellComponent(row)}
|
||||||
|
</td>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (column.accessor === 'updated_at_in_seconds') {
|
if (column.accessor === 'updated_at_in_seconds') {
|
||||||
return (
|
return (
|
||||||
<TableCellWithTimeAgoInWords
|
<TableCellWithTimeAgoInWords
|
||||||
timeInSeconds={row.updated_at_in_seconds}
|
timeInSeconds={row.updated_at_in_seconds}
|
||||||
|
onClick={navigateToProcessInstance}
|
||||||
|
onKeyDown={navigateToProcessInstance}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1419,7 @@ export default function ProcessInstanceListTable({
|
||||||
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
||||||
<td
|
<td
|
||||||
data-qa={`process-instance-show-link-${column.accessor}`}
|
data-qa={`process-instance-show-link-${column.accessor}`}
|
||||||
onKeyDown={navigateToProcessModel}
|
onKeyDown={navigateToProcessInstance}
|
||||||
onClick={navigateToProcessInstance}
|
onClick={navigateToProcessInstance}
|
||||||
>
|
>
|
||||||
{formatter(row, value)}
|
{formatter(row, value)}
|
||||||
|
|
|
@ -4,13 +4,22 @@ import { convertSecondsToFormattedDateTime } from '../helpers';
|
||||||
|
|
||||||
type OwnProps = {
|
type OwnProps = {
|
||||||
timeInSeconds: number;
|
timeInSeconds: number;
|
||||||
|
onClick?: any;
|
||||||
|
onKeyDown?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function TableCellWithTimeAgoInWords({
|
export default function TableCellWithTimeAgoInWords({
|
||||||
timeInSeconds,
|
timeInSeconds,
|
||||||
|
onClick = null,
|
||||||
|
onKeyDown = null,
|
||||||
}: OwnProps) {
|
}: OwnProps) {
|
||||||
return (
|
return (
|
||||||
<td title={convertSecondsToFormattedDateTime(timeInSeconds) || '-'}>
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
||||||
|
<td
|
||||||
|
title={convertSecondsToFormattedDateTime(timeInSeconds) || '-'}
|
||||||
|
onClick={onClick}
|
||||||
|
onKeyDown={onKeyDown}
|
||||||
|
>
|
||||||
{timeInSeconds ? TimeAgo.inWords(timeInSeconds) : '-'}
|
{timeInSeconds ? TimeAgo.inWords(timeInSeconds) : '-'}
|
||||||
</td>
|
</td>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue