Skip to content

Commit a48b88e

Browse files
committed
fixes
1 parent 63f2761 commit a48b88e

8 files changed

+51
-45
lines changed

src/delete/DeleteQueues.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ const DeleteQueues = () => {
2424
if (isPending) return <Spinner />;
2525

2626
return (
27-
<div className="flex flex-col w-full p-4">
27+
<div className="flex flex-col">
2828
<p className="text-lg font-semibold text-center">Progress </p>
29-
<div className="flex flex-col space-y-4">
29+
<div className="flex gap-4">
3030
{existingDeleteQueues?.map((uuid) => (
3131
<div key={uuid} >
3232
<ProgressQueue

src/delete/ProgressQueue.tsx

+22-22
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@ type ProgressQueueProps = {
99

1010
const ProgressQueue = ({ uuid }: ProgressQueueProps) => {
1111
const { data, isPending } = useCustomQuery(
12-
['queue', 'delete', uuid],
13-
() => getDeleteQueue(uuid),
12+
['queue', 'delete', uuid],
13+
() => getDeleteQueue(uuid),
1414
{ refetchInterval: 2000 }
1515
);
16-
16+
1717
const { mutate: mutateDeleteQueue } = useCustomMutation(
18-
() => deleteDeleteQueue(uuid),
18+
() => deleteDeleteQueue(uuid),
1919
[['queue', 'delete']]
2020
);
2121

2222
if (isPending) return <Spinner />;
2323

2424
return (
25-
<div className="relative flex items-center justify-center">
26-
<ProgressCircle text={data?.state} progress={data?.progress || 0} size={150} />
27-
<div className="absolute bottom-0 flex flex-col items-center space-y-1 transform -translate-x-1/2 left-1/2">
28-
<Button
29-
color={Colors.danger}
30-
onClick={() => mutateDeleteQueue({})}
31-
className="flex items-center"
32-
>
33-
<FaTrash className="mr-1" /> {/* Delete icon */}
34-
</Button>
35-
<Button
36-
color={Colors.warning}
37-
onClick={() => {/* Implement pause functionality here */}}
38-
className="flex items-center"
39-
>
40-
<FaPause className="mr-1" /> {/* Pause icon */}
41-
</Button>
42-
</div>
25+
<div className="flex-col items-center justify-center">
26+
<ProgressCircle text={data?.state} progress={data?.progress || 0} size={150} >
27+
<div className="flex justify-center">
28+
<Button
29+
color={Colors.danger}
30+
onClick={() => mutateDeleteQueue({})}
31+
>
32+
<FaTrash className="mr-1" /> {/* Delete icon */}
33+
</Button>
34+
<Button
35+
color={Colors.warning}
36+
onClick={() => {/* Implement pause functionality here */ }}
37+
>
38+
<FaPause className="mr-1" /> {/* Pause icon */}
39+
</Button>
40+
</div>
41+
</ProgressCircle>
42+
4343
</div>
4444
);
4545
};

src/export/ExportRoot.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const ExportRoot = () => {
8181
(mb) => updateExistingToast(id, "Downloaded " + mb + " mb"),
8282
undefined,
8383
hierarchical,
84-
transferSyntax != "None" ? transferSyntax : undefined
84+
transferSyntax != "None" ? transferSyntax : undefined
8585
);
8686
};
8787

@@ -154,18 +154,19 @@ const ExportRoot = () => {
154154
return (
155155
<Card>
156156
<CardHeader
157-
className="flex items-center justify-between rounded-t-lg text-bg-light"
158157
color={Colors.primary}
159-
title={"Export Resources"}
160158
>
161-
<div className="flex space-x-3">
162-
<Button color={Colors.secondary} className="flex items-center rounded-lg">
163-
<Button color={Colors.secondary}>Download as CSV</Button>
164-
<DownloadIcon className="" />
165-
</Button>
166-
<Button onClick={handleClearList} color={Colors.warning} className="flex items-center rounded-lg">
167-
<EmptyIcon className="" />
168-
</Button>
159+
<div className="flex items-center w-full">
160+
<div className="w-4/5 text-lg font-bold text-center">Export Ressources</div>
161+
<div className="flex justify-end w-1/5 gap-1 p-3">
162+
<SelectTransferSyntax value={transferSyntax} onChange={(value) => setTrasferSyntax(value)} />
163+
<Button color={Colors.secondary} className="rounded-lg">
164+
<Download onClick={handleDownloadCsv} />
165+
</Button>
166+
<Button onClick={handleClearList} color={Colors.warning} className="rounded-lg">
167+
<EmptyIcon className="" />
168+
</Button>
169+
</div>
169170

170171
</div>
171172
</CardHeader>
@@ -182,13 +183,12 @@ const ExportRoot = () => {
182183
<CardFooter color={Colors.light} className="flex justify-center flex-grow gap-3">
183184
<div className="flex justify-center w-4/5 gap-3">
184185
<DropdownButton row={null} buttonText="Download" options={downloadOptions} />
185-
<SelectTransferSyntax value={transferSyntax} onChange={(value)=>setTrasferSyntax(value)} />
186186
<DropdownButton row={null} buttonText="Send To Modality" options={modalitiesOptions} />
187187
{storeJobId && <ProgressJobs size={50} jobId={storeJobId} />}
188188
<DropdownButton row={null} buttonText="Send To Peer" options={peersOptions} />
189189
{sendPeerJobId && <ProgressJobs size={50} jobId={sendPeerJobId} />}
190-
<Button className="text-white bg-cyan-700" disabled>
191-
Send To GaelO
190+
<Button color={Colors.primary} className="text-white bg-cyan-700" disabled>
191+
<GaeloIcon />
192192
</Button>
193193
</div>
194194
</CardFooter>

src/export/ExportSeriesTable.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Colors, Series } from "../utils";
44
import { useMemo } from "react";
55
import { useDispatch } from "react-redux";
66
import { removeSeriesFromExportList } from "../reducers/ExportSlice";
7+
import { Trash } from "../icons";
78

89
type ExportSeriesTableProps = {
910
series: Series[]
@@ -45,7 +46,7 @@ const ExportSeriesTable = ({ series }: ExportSeriesTableProps) => {
4546
onClick={() => handleDelete(row.original.id)}
4647
color={Colors.danger}
4748
>
48-
Remove
49+
<Trash />
4950
</Button>
5051
</div>
5152
),

src/export/ExportStudyTable.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ColumnDef } from "@tanstack/react-table";
55
import { Table, Button } from "../ui";
66
import { Colors, Study } from "../utils";
77
import { removeSeriesFromExportList } from "../reducers/ExportSlice";
8+
import { Trash } from "../icons";
89

910
type ExportStudyTableProps = {
1011
studies: Study[];
@@ -55,7 +56,7 @@ const ExportStudyTable = ({ studies, onClickStudy }: ExportStudyTableProps) => {
5556
onClick={() => handleDelete(row.original.id)}
5657
color={Colors.danger}
5758
>
58-
Remove
59+
<Trash />
5960
</Button>
6061
</div>
6162
),

src/query/QueryRoot.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const QueryRoot = ({ className }: QueryFormProps) => {
9494
<div className="flex items-center justify-between mb-4">
9595
<div className="text-2xl font-bold text-primary">Results</div>
9696
<div className="text-lg text-gray-600">
97-
{studies.length} {studies.length === 1 ? "result" : "results"} found
97+
{studies.length} {studies.length === 1 ? "study" : "studies"} found
9898
</div>
9999
</div>
100100

src/ui/Card.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type CardProps = {
88
};
99

1010
type CardHeaderProps = {
11-
title: string;
11+
title?: string;
1212
centerTitle?: boolean;
1313
className?: string;
1414
children?: React.ReactNode;
@@ -70,8 +70,8 @@ const CardHeader = ({ title, centerTitle, className = "", children, color }: Car
7070
const headerClass = getColorClass(color);
7171

7272
return (
73-
<div data-gaelo-flow="Card-header" className={`${headerClass} text-white ${shadowClass} rounded-t-2xl ${className} flex items-center ${centerTitle ? 'justify-center' : ''} text-center`}>
74-
{title && <h2 className="flex-1 p-3 mx-auto text-lg font-bold">{title}</h2>}
73+
<div data-gaelo-flow="Card-header" className={`${headerClass} w-full min-h-12 text-white ${shadowClass} rounded-t-2xl flex items-center ${centerTitle ? 'justify-center' : ''} ${className}`}>
74+
{title && <div className="text-lg font-bold">{title}</div>}
7575
{children}
7676
</div>
7777
);

src/ui/ProgressCircle.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ type ProgressCircleProps = {
22
progress: number;
33
text?: string;
44
size?: number;
5+
children?: React.ReactNode
56
};
67

7-
const ProgressCircle = ({ progress, text = 'mph', size = 150 }: ProgressCircleProps) => {
8+
const ProgressCircle = ({ progress, text = '%', size = 150, children }: ProgressCircleProps) => {
89
const radius = 16;
910
const circumference = 2 * Math.PI * radius;
1011
const progressValue = (progress / 100) * circumference;
@@ -45,6 +46,9 @@ const ProgressCircle = ({ progress, text = 'mph', size = 150 }: ProgressCirclePr
4546
{progress}
4647
</span>
4748
<span className="block text-primary dark:text-primary">{text}</span>
49+
<span>
50+
{children}
51+
</span>
4852
</div>
4953
</div>
5054
);

0 commit comments

Comments
 (0)