Skip to content

Commit

Permalink
ONI-255: Styling changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wzgliniecki committed Jun 6, 2024
1 parent e75e7b2 commit 1675d39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/groups-management/TaskGroupHeadPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TaskGroupHeadPanel extends FormPanel {
}
const sourcesIds = taskGroup.taskAllowedSources.map((source) => source.id);
return options.filter((option) => sourcesIds.includes(option.id));
}
};
return (
<>
{renderHeadPanelTitle(classes)}
Expand Down
16 changes: 9 additions & 7 deletions src/pickers/TaskGroupPicker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useState } from "react";
import React, { useState } from 'react';

import { useModulesManager, useTranslations, Autocomplete, useGraphqlQuery } from "@openimis/fe-core";
import {

Check failure on line 3 in src/pickers/TaskGroupPicker.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
useModulesManager, useTranslations, Autocomplete, useGraphqlQuery

Check failure on line 4 in src/pickers/TaskGroupPicker.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed

Check failure on line 4 in src/pickers/TaskGroupPicker.js

View workflow job for this annotation

GitHub Actions / lint

Missing trailing comma
} from '@openimis/fe-core';

function TaskGroupPicker(props) {
const {
Expand All @@ -19,8 +21,8 @@ function TaskGroupPicker(props) {
} = props;

const modulesManager = useModulesManager();
const { formatMessage } = useTranslations("claim", modulesManager);
const [searchString, setSearchString] = useState("");
const { formatMessage } = useTranslations('claim', modulesManager);
const [searchString, setSearchString] = useState('');

const { isLoading, data, error } = useGraphqlQuery(
`
Expand All @@ -46,7 +48,7 @@ function TaskGroupPicker(props) {

const filteredOptionsWithAllowedSources = options.filter((option) => {
const parsedResponse = JSON.parse(option.taskAllowedSources);
const allowedSources = typeof parsedResponse === "object" ? [parsedResponse] : parsedResponse;
const allowedSources = typeof parsedResponse === 'object' ? [parsedResponse] : parsedResponse;
const usersAllowedSources = allowedSources.flatMap((source) => source.task_allowed_sources);

return usersAllowedSources.includes(source);
Expand All @@ -56,8 +58,8 @@ function TaskGroupPicker(props) {
<Autocomplete
multiple={multiple}
required={required}
placeholder={placeholder ?? formatMessage("tasksManagement.taskGroup.placeholder")}
label={label ?? formatMessage("tasksManagement.task.assignee")}
placeholder={placeholder ?? formatMessage('tasksManagement.taskGroup.placeholder')}
label={label ?? formatMessage('tasksManagement.task.assignee')}
error={error}
withLabel={withLabel}
withPlaceholder={withPlaceholder}
Expand Down

0 comments on commit 1675d39

Please sign in to comment.