Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*]
indent_style = space
indent_size = 2
15 changes: 15 additions & 0 deletions web/api/graphql/test.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
query MyQuery {
tasks(patientId: "") {
assignee {
avatarUrl
id
name
}
creationDate
description
done
id
title
updateDate
}
}
34 changes: 34 additions & 0 deletions web/codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { CodegenConfig } from '@graphql-codegen/cli'
import 'dotenv/config'
import { getConfig } from './utils/config'

const config: CodegenConfig = {
schema: [
{
[getConfig().graphqlEndpoint]: {
headers: {
cookie: `access_token=${process.env.GRAPHQL_TOKEN}`,
},
},
},
],
documents: 'api/graphql/**/*.graphql',
generates: {
'api/gql/generated.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-react-query',
],
config: {
fetcher: {
func: './fetcher#fetcher',
isReactHook: false,
},
reactQueryVersion: 5,
},
},
},
}

export default config
23 changes: 15 additions & 8 deletions web/components/layout/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PropsWithChildren } from 'react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import { useEffect, useState } from 'react'
import Head from 'next/head'
import titleWrapper from '@/utils/titleWrapper'
Expand Down Expand Up @@ -57,13 +57,19 @@ export const StagingDisclaimerDialog = () => {
}


type HeaderProps = HTMLAttributes<HTMLHeadElement>

/**
* The basic header for most pages
*/
export const Header = () => {
export const Header = ({ ...props }: HeaderProps) => {
return (
<header
className="flex-row-8 items-center justify-between w-full h-18 px-8 py-4 bg-header-background text-header-text shadow-md rounded-lg"
{...props}
className={clsx(
'flex-row-8 items-center justify-between grow h-18 px-8 py-4 bg-header-background text-header-text shadow-md rounded-lg',
props.className
)}
>
<Link href="/" className="bg-surface text-on-surface rounded-lg px-6 py-4">
<HelpwaveLogo className="min-h-12 min-w-12"/>
Expand All @@ -87,18 +93,19 @@ export const Page = ({
pageTitle,
}: PageWithHeaderProps) => {
return (
<div className="flex-col-4 w-screen h-screen overflow-hidden p-4">
<div className="flex-col-4 h-screen w-screen overflow-hidden pt-4 pl-4">
<Head>
<title>{titleWrapper(pageTitle)}</title>
</Head>
<StagingDisclaimerDialog />
<Header />
<div className="flex-row-4 grow">
<aside className="flex-col-4 w-40 rounded-lg bg-surface text-on-surface">
<Header className="mr-4" />
<div className="flex-row-4 grow overflow-hidden">
<aside className="flex-col-2 w-40 min-w-40 rounded-lg bg-surface text-on-surface overflow-auto mb-4">

</aside>
<main className="flex-col-2 grow">
<main className="flex-col-2 grow overflow-auto">
{children}
<div className="min-h-16"/>
</main>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions web/environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ declare namespace NodeJS {
NEXT_PUBLIC_FEATURES_FEED_URL?: string,
NEXT_PUBLIC_IMPRINT_URL?: string,
NEXT_PUBLIC_PRIVACY_URL?: string,
GRAPHQL_TOKEN?: string,
NEXT_PUBLIC_GRAPHQL_ENDPOINT?: string,
NEXT_PUBLIC_ISSUER_URI?: string,
NEXT_PUBLIC_CLIENT_ID?: string,
Expand Down
11 changes: 11 additions & 0 deletions web/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,14 @@
--color-twocolum-text: var(--color-description);
}
}

@layer components {
#__next, body {
@apply w-screen max-w-screen h-screen max-h-screen overflow-hidden;
}

/* Need for development to move the next portal properly out of the body */
nextjs-portal {
@apply left-0 bottom-0 ml-16 text-[1.5em] mb-[0.5em];
}
}
6 changes: 3 additions & 3 deletions web/i18n/translations.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// AUTO-GENERATED. DO NOT EDIT.



/* eslint-disable @stylistic/quote-props */
/* eslint-disable no-useless-escape */
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { Translation } from '@helpwave/internationalization'
import { TranslationGen } from '@helpwave/internationalization'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading