Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
alexd-bes committed Jun 21, 2024
1 parent 75179ae commit fa82eb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/datatrak-web-server/src/routes/TasksRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const FIELDS = [
'assignee_id',
'status',
'due_date',
'repeat_frequency',
'repeat_schedule',
'survey_id',
'entity_id',
];
Expand Down Expand Up @@ -77,7 +77,7 @@ const formatFilters = (filters: Record<string, string>[]) => {
return;
}

if (id === 'repeat_frequency') {
if (id === 'repeat_schedule') {
formattedFilters[id] = {
comparator: 'ilike',
comparisonValue: `${value}%`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ const ActionButton = (task: Task) => {
const location = useLocation();
if (!task) return null;
const { assignee, survey, entity, status } = task;
if (
status === TaskStatus.overdue ||
status === TaskStatus.cancelled ||
status === TaskStatus.completed
)
return null;
if (status === TaskStatus.cancelled || status === TaskStatus.completed) return null;
if (!assignee) {
return <ActionButtonComponent variant="outlined">Assign</ActionButtonComponent>;
}
Expand Down Expand Up @@ -106,7 +101,7 @@ const COLUMNS = [
// TODO: Update this display once RN-1341 is done. Also handle sorting on this column in this issue.
accessor: row =>
row.status === TaskStatus.repeating ? JSON.stringify(row.repeatFrequency) : 'Doesn’t repeat',
id: 'repeat_frequency',
id: 'repeat_schedule',
filterable: true,
disableResizing: true,
},
Expand Down
5 changes: 2 additions & 3 deletions packages/types/src/schemas/schemas.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fa82eb7

Please sign in to comment.