updated tasks endpoint to task-data for easier permission setting w/ burnettk

This commit is contained in:
jasquat 2022-12-05 14:56:55 -05:00
parent 688163a1a8
commit 1707396783
7 changed files with 20 additions and 8 deletions

View File

@ -1101,7 +1101,7 @@ paths:
items: items:
$ref: "#/components/schemas/Task" $ref: "#/components/schemas/Task"
/process-instances/{modified_process_model_id}/{process_instance_id}/tasks: /task-data/{modified_process_model_id}/{process_instance_id}:
parameters: parameters:
- name: modified_process_model_id - name: modified_process_model_id
in: path in: path

View File

@ -12,7 +12,6 @@ groups:
mike, mike,
jason, jason,
j, j,
amir,
jarrad, jarrad,
elizabeth, elizabeth,
jon, jon,
@ -98,6 +97,12 @@ permissions:
allowed_permissions: [read] allowed_permissions: [read]
uri: /v1.0/processes uri: /v1.0/processes
task-data-read:
groups: [demo]
users: []
allowed_permissions: [read]
uri: /v1.0/task-data/*
manage-procurement-admin: manage-procurement-admin:
groups: ["Project Lead"] groups: ["Project Lead"]

View File

@ -12,7 +12,6 @@ groups:
mike, mike,
jason, jason,
j, j,
amir,
jarrad, jarrad,
elizabeth, elizabeth,
jon, jon,
@ -98,6 +97,12 @@ permissions:
allowed_permissions: [read] allowed_permissions: [read]
uri: /v1.0/processes uri: /v1.0/processes
task-data-read:
groups: [demo]
users: []
allowed_permissions: [read]
uri: /v1.0/task-data/*
manage-procurement-admin: manage-procurement-admin:
groups: ["Project Lead"] groups: ["Project Lead"]

View File

@ -1166,6 +1166,9 @@ export default function ProcessInstanceListTable({
return ( return (
<> <>
<Grid fullWidth> <Grid fullWidth>
<Column sm={2} md={4} lg={7}>
{reportSearchComponent()}
</Column>
<Column <Column
className="filterIcon" className="filterIcon"
sm={{ span: 1, offset: 3 }} sm={{ span: 1, offset: 3 }}
@ -1204,7 +1207,6 @@ export default function ProcessInstanceListTable({
{reportColumnForm()} {reportColumnForm()}
{processInstanceReportSaveTag()} {processInstanceReportSaveTag()}
{filterComponent()} {filterComponent()}
{reportSearchComponent()}
<PaginationForTable <PaginationForTable
page={page} page={page}
perPage={perPage} perPage={perPage}

View File

@ -11,7 +11,7 @@ export const useUriListForPermissions = () => {
processGroupShowPath: `/v1.0/process-groups/${params.process_group_id}`, processGroupShowPath: `/v1.0/process-groups/${params.process_group_id}`,
processInstanceActionPath: `/v1.0/process-models/${params.process_model_id}/process-instances`, processInstanceActionPath: `/v1.0/process-models/${params.process_model_id}/process-instances`,
processInstanceListPath: '/v1.0/process-instances', processInstanceListPath: '/v1.0/process-instances',
processInstanceTaskListPath: `/v1.0/process-instances/${params.process_model_id}/${params.process_instance_id}/tasks`, processInstanceTaskListPath: `/v1.0/task-data/${params.process_model_id}/${params.process_instance_id}`,
processInstanceReportListPath: '/v1.0/process-instances/reports', processInstanceReportListPath: '/v1.0/process-instances/reports',
processModelCreatePath: `/v1.0/process-models/${params.process_group_id}`, processModelCreatePath: `/v1.0/process-models/${params.process_group_id}`,
processModelFileCreatePath: `/v1.0/process-models/${params.process_model_id}/files`, processModelFileCreatePath: `/v1.0/process-models/${params.process_model_id}/files`,

View File

@ -85,7 +85,7 @@ export default function ProcessInstanceShow() {
} }
if (ability.can('GET', targetUris.processInstanceTaskListPath)) { if (ability.can('GET', targetUris.processInstanceTaskListPath)) {
HttpService.makeCallToBackend({ HttpService.makeCallToBackend({
path: `/process-instances/${modifiedProcessModelId}/${params.process_instance_id}/tasks${taskParams}`, path: `${targetUris.processInstanceTaskListPath}${taskParams}`,
successCallback: setTasks, successCallback: setTasks,
failureCallback: processTaskFailure, failureCallback: processTaskFailure,
}); });

View File

@ -39,9 +39,9 @@ export default function TaskShow() {
const processResult = (result: any) => { const processResult = (result: any) => {
setTask(result); setTask(result);
HttpService.makeCallToBackend({ HttpService.makeCallToBackend({
path: `/process-instances/${modifyProcessIdentifierForPathParam( path: `/task-data/${modifyProcessIdentifierForPathParam(
result.process_model_identifier result.process_model_identifier
)}/${params.process_instance_id}/tasks`, )}/${params.process_instance_id}`,
successCallback: setUserTasks, successCallback: setUserTasks,
}); });
}; };