Skip to content

Commit 6474144

Browse files
committed
fix: fix table printing and chip styles in table
1 parent 91b10d4 commit 6474144

5 files changed

Lines changed: 14 additions & 13 deletions

File tree

web/components/patients/PatientStateChip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const PatientStateChip = ({ state, ...props }: PatientStateChipProps) =>
3131
{...props}
3232
color={getColor(state)}
3333
size={props.size ?? 'sm'}
34-
className={clsx('font-[var(--font-space-grotesk)] uppercase text-xs', props.className)}
34+
className={clsx('font-semibold uppercase text-xs', props.className)}
3535
>
3636
{translation('patientState', { state: state as string })}
3737
</Chip>

web/components/tables/PatientList.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ export const PatientList = forwardRef<PatientListRef, PatientListProps>(({ initi
244244
if (refreshingPatientIds.has(row.original.id)) return rowLoadingCell
245245
const sex = row.original.sex
246246
const colorClass = sex === Sex.Male
247-
? '!gender-male'
247+
? 'gender-male'
248248
: sex === Sex.Female
249-
? '!gender-female'
250-
: 'bg-gray-600 text-white'
249+
? 'gender-female'
250+
: 'gender-neutral'
251251

252252
const label = {
253253
[Sex.Male]: translation('male'),
@@ -259,10 +259,10 @@ export const PatientList = forwardRef<PatientListRef, PatientListProps>(({ initi
259259
<>
260260
<span className="print:block hidden">{label}</span>
261261
<Chip
262-
color={sex === Sex.Unknown ? 'neutral' : undefined}
262+
color={undefined}
263263
coloringStyle="tonal"
264264
size="sm"
265-
className={`${colorClass} font-[var(--font-space-grotesk)] uppercase text-xs print:hidden`}
265+
className={`${colorClass} uppercase font-semibold text-xs print:hidden`}
266266
>
267267
<span>{label}</span>
268268
</Chip>
@@ -447,7 +447,7 @@ export const PatientList = forwardRef<PatientListRef, PatientListProps>(({ initi
447447
</IconButton>
448448
</div>
449449
</div>
450-
<div className="relative">
450+
<div className="relative print:static">
451451
{patientsLoading && (
452452
<div className="absolute inset-0 z-10 flex items-center justify-center bg-surface/80 rounded-lg min-h-48">
453453
<HelpwaveLogo animate="loading" color="currentColor" height={64} width={64} />

web/components/tables/TaskList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ export const TaskList = forwardRef<TaskListRef, TaskListProps>(({ tasks: initial
610610
</IconButton>
611611
</div>
612612
</div>
613-
<div className="flex-col-3 items-center relative">
613+
<div className="flex-col-3 items-center relative print:static">
614614
{loading && (
615615
<div className="absolute inset-0 z-10 flex items-center justify-center bg-surface/80 rounded-lg min-h-48">
616616
<HelpwaveLogo animate="loading" color="currentColor" height={64} width={64} />

web/style/colors.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
--color-gender-on-male: var(--color-white);
1212
--color-gender-male-hover: var(--color-blue-600);
1313

14-
--color-gender-neutral: var(--color-blue-500);
14+
--color-gender-neutral: var(--color-gray-600);
1515
--color-gender-on-neutral: var(--color-white);
16-
--color-gender-neutral-hover: var(--color-blue-600);
16+
--color-gender-neutral-hover: var(--color-gray-700);
1717

1818
--color-location-hospital: var(--color-red-100);
1919
--color-location-on-hospital: var(--color-red-700);

web/style/table-printing.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
height: auto !important;
2121
margin: 0 !important;
2222
padding: 0 !important;
23-
overflow: hidden !important;
23+
overflow: auto !important;
2424
overflow-x: hidden !important;
25-
overflow-y: hidden !important;
25+
overflow-y: auto !important;
2626
max-height: none !important;
2727
max-width: 100% !important;
2828
background: white !important;
@@ -39,7 +39,8 @@
3939
}
4040

4141
.print-content {
42-
position: fixed;
42+
position: absolute;
43+
z-index: 10000 !important;
4344
width: 100% !important;
4445
max-width: 100% !important;
4546
left: 0 !important;

0 commit comments

Comments
 (0)