Skip to content

Commit

Permalink
Merge pull request #520 from helpwave/patch/clear-app
Browse files Browse the repository at this point in the history
  • Loading branch information
felixevers authored Jul 24, 2023
2 parents 3fdf94a + 7971708 commit 296838a
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 57 deletions.
12 changes: 7 additions & 5 deletions tasks/components/cards/TaskCard.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { tw, tx } from '@helpwave/common/twind'
import { tw } from '@helpwave/common/twind'
import type { CardProps } from '@helpwave/common/components/Card'
import { Card } from '@helpwave/common/components/Card'
import { ProgressIndicator } from '@helpwave/common/components/ProgressIndicator'
import { Span } from '@helpwave/common/components/Span'
import type { TaskDTO } from '../../mutations/task_mutations'
import { TaskStatus } from '@helpwave/proto-ts/proto/services/task_svc/v1/task_svc_pb'
import { LockIcon } from 'lucide-react'

export type TaskCardProps = CardProps & {
Expand All @@ -20,15 +19,18 @@ export const TaskCard = ({
onTileClick = () => undefined
}: TaskCardProps) => {
const progress = task.subtasks.length === 0 ? 1 : task.subtasks.filter(value => value.isDone).length / task.subtasks.length
const isOverDue = task.dueDate < new Date() && task.status !== TaskStatus.TASK_STATUS_DONE
// const isOverDue = task.dueDate < new Date() && task.status !== TaskStatus.TASK_STATUS_DONE
return (
<Card
onTileClick={onTileClick}
isSelected={isSelected}
className={tx('bg-white', {
// TODO enable overDue indication when datetime picker works
/* {
'!border-hw-negative-400 !hover:border-hw-negative-600': isOverDue,
'!border-hw-negative-600': isOverDue && isSelected,
})}
} */

className={tw('bg-white')}
>
<div className={tw('flex flex-row justify-between w-full')}>
<div className={tw('flex flex-col overflow-hidden')}>
Expand Down
2 changes: 1 addition & 1 deletion tasks/components/layout/TaskDetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const TaskDetailView = ({
}}/>
</div>
<div className={tw('flex flex-col justify-between min-w-[250px]')}>
<div className={tw('flex flex-col gap-y-4')}>
<div className={tw('flex flex-col gap-y-4 hidden')}>
<div>
<label><Span type="labelMedium">{translation.assignee}</Span></label>
<Select
Expand Down
82 changes: 71 additions & 11 deletions tasks/mutations/organization_mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export type OrganizationDTO = {
// TODO remove once backend is implemented
export let organizations: OrganizationDTO[] = [
{
id: 'org1',
shortName: 'UKM',
longName: 'Uniklinkum Münster',
email: 'ukm@helpwave.de',
id: 'e25256a4-830d-4af3-baa2-81ad8dc50e04',
shortName: 'UKA',
longName: 'Uniklinik Aachen',
email: 'uka@helpwave.de',
isVerified: false,
wards: [{ name: 'ICU' }, { name: 'Radiology' }, { name: 'Cardiology' }],
wards: [],
members: [
{
name: 'User1',
Expand Down Expand Up @@ -60,19 +60,78 @@ export let organizations: OrganizationDTO[] = [
]
},
{
id: 'org2',
shortName: 'ORGA',
longName: 'Organame',
email: 'orga@helpwave.de',
id: 'e25256a4-830d-4af3-baa2-81ad8dc50e04',
shortName: 'UKM',
longName: 'Uniklinik Münster',
email: 'ukm@helpwave.de',
isVerified: false,
wards: [{ name: 'ICU' }, { name: 'Radiology' }, { name: 'Cardiology' }],
wards: [],
members: [
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
}, {
},
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
},
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
},
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
},
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
},
{
name: 'User1',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.admin
},
{
name: 'User2',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.user
},
{
name: 'User3',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.user
},
{
name: 'User4',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
role: Role.user
}
]
},
{
id: 'f6e0f961-6a2e-4ddd-bac3-7c29485b75d5',
shortName: 'UKGM',
longName: 'Uniklinikum Giessen und Marburg',
email: '[email protected]',
isVerified: false,
wards: [],
members: [
{
name: 'User2',
avatarURL: 'https://source.boringavatars.com/',
email: '[email protected]',
Expand All @@ -92,6 +151,7 @@ export let organizations: OrganizationDTO[] = [
}
]
},

]

export const useOrganizationQuery = () => {
Expand Down
24 changes: 0 additions & 24 deletions tasks/mutations/patient_mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,34 +165,10 @@ export const usePatientListQuery = (wardID: string) => {
},
initialData: {
active: [
{
id: 'patient2',
human_readable_identifier: 'Patient B',
bed: { id: 'bed1', index: 1 },
room: { id: 'room2', name: 'Room 2' },
},
{
id: 'patient4',
human_readable_identifier: 'Patient D',
bed: { id: 'bed2', index: 2 },
room: { id: 'room1', name: 'Room 1' },
}
],
unassigned: [
{
id: 'patient1',
human_readable_identifier: 'Patient A',
},
{
id: 'patient3',
human_readable_identifier: 'Patient C',
}
],
discharged: [
{
id: 'patient5',
human_readable_identifier: 'Patient E',
}
]
}
})
Expand Down
27 changes: 11 additions & 16 deletions tasks/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,24 @@ const Dashboard: NextPage = ({ language }: PropsWithLanguage<DashboardTranslatio
width={width}
features={[
{
title: 'Feature 1',
date: new Date('2023-04-22T14:09:58+00:00'),
title: 'mission - Was ist helpwave?',
date: new Date('10 July 2023'),
externalResource: new URL('https://podcasters.spotify.com/pod/show/helpwave/episodes/mission---Was-ist-helpwave-e26n9gi/a-aa3paqd'),
description: [
new URL('https://images.unsplash.com/photo-1606327054536-e37e655d4f4a?ixlib=rb-4.0.3&ixid=MnwxM[…]90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80'),
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod no sea takimata sanctus est Lorem ipsum dolor sit amet.'
new URL('https://images.unsplash.com/photo-1505740420928-5e560c06d30e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80'),
'Hallo, willkommen zur allerersten richtigen Folge von helpwave talks! Heute wird es konkret: Was ist eigentlich helpwave? Was ist die Vision? Und vor allem wer ist helpwave und wie genau will helpwave mittels Informatik das Gesundheitswesen revolutionieren? Max Schäfer und Christian Porschen haben die Antworten und geben einen detaillieren Einblick in das "Was", "Wie" und vor allem "Warum" von helpwave.'
]
},

{
title: 'Feature 2',
date: new Date('2022-12-31T14:09:58+00:00'),
externalResource: new URL('https://helpwave.de'),
title: 'trailer - Fusionsküche Medizin und Informatik',
date: new Date('30 June 2023'),
externalResource: new URL('https://podcasters.spotify.com/pod/show/helpwave/episodes/trailer---Fusionskche-Medizin-und-Informatik-e26dbf7/a-aa2rb9o'),
description: [
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod no sea takimata sanctus est Lorem ipsum dolor sit amet.'
new URL('https://images.unsplash.com/photo-1478737270239-2f02b77fc618?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2970&q=80'),
'Hey! Willkommen bei helpwave talks unserem einzigartigen Format rund um die medizinische Informatik mit vielen interessanten Gästen aus Forschung, Entwicklung, Pflege, Recht, ...'
]
},
{
title: 'Feature 3',
date: new Date('2021-01-22T14:09:58+00:00'),
description: [
new URL('https://images.unsplash.com/photo-1606327054536-e37e655d4f4a?ixlib=rb-4.0.3&ixid=MnwxM[…]90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80'),
'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod no sea takimata sanctus est Lorem ipsum dolor sit amet.'
]
}
]}
/>
)}
Expand Down

0 comments on commit 296838a

Please sign in to comment.