Skip to content

Commit

Permalink
Ran format command
Browse files Browse the repository at this point in the history
  • Loading branch information
vsvishalsharma committed Jan 4, 2025
1 parent d8d5bd9 commit 056fb24
Showing 1 changed file with 32 additions and 20 deletions.
52 changes: 32 additions & 20 deletions frontend/src/components/pathology/PathologyDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ function PathologyDashboard() {
searchTerm: "",
myCases: false,
statuses: [
{id: 'GROSSING'},
{id: 'CUTTING'},
{id: 'PROCESSING'},
{id: 'SLICING'},
{id: 'STAINING'}
]
{ id: "GROSSING" },
{ id: "CUTTING" },
{ id: "PROCESSING" },
{ id: "SLICING" },
{ id: "STAINING" },
],
});
const [counts, setCounts] = useState({
inProgress: 0,
Expand Down Expand Up @@ -160,12 +160,12 @@ function PathologyDashboard() {
setFilters({
...filters,
statuses: [
{id: 'GROSSING'},
{id: 'CUTTING'},
{id: 'PROCESSING'},
{id: 'SLICING'},
{id: 'STAINING'}
]
{ id: "GROSSING" },
{ id: "CUTTING" },
{ id: "PROCESSING" },
{ id: "SLICING" },
{ id: "STAINING" },
],
});
} else {
setFilters({ ...filters, statuses: [{ id: event.target.value }] });
Expand Down Expand Up @@ -263,12 +263,18 @@ function PathologyDashboard() {

useEffect(() => {
componentMounted.current = true;
const inProgressStatuses = ['GROSSING', 'CUTTING', 'PROCESSING', 'SLICING', 'STAINING'].map(id => ({id}));
const inProgressStatuses = [
"GROSSING",
"CUTTING",
"PROCESSING",
"SLICING",
"STAINING",
].map((id) => ({ id }));
setFilters({
...filters,
statuses: inProgressStatuses
statuses: inProgressStatuses,
});

return () => {
componentMounted.current = false;
};
Expand Down Expand Up @@ -343,13 +349,19 @@ function PathologyDashboard() {
labelText={intl.formatMessage({ id: "label.filters.status" })}
value={
filters.statuses.length === 5 &&
filters.statuses.every(status =>
['GROSSING', 'CUTTING', 'PROCESSING', 'SLICING', 'STAINING'].includes(status.id)
filters.statuses.every((status) =>
[
"GROSSING",
"CUTTING",
"PROCESSING",
"SLICING",
"STAINING",
].includes(status.id),
)
? "IN_PROGRESS"
: filters.statuses.length > 1
? "All"
: filters.statuses[0].id
: filters.statuses.length > 1
? "All"
: filters.statuses[0].id
}
onChange={setStatusFilter}
noLabel
Expand Down

0 comments on commit 056fb24

Please sign in to comment.