Skip to content

Commit b26a55f

Browse files
authored
Merge pull request #3 from helpwave/table
Add Index page
2 parents a7c568b + b57b9a5 commit b26a55f

File tree

14 files changed

+5992
-468
lines changed

14 files changed

+5992
-468
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2

web/api/graphql/test.graphql

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
query MyQuery {
2+
tasks(patientId: "") {
3+
assignee {
4+
avatarUrl
5+
id
6+
name
7+
}
8+
creationDate
9+
description
10+
done
11+
id
12+
title
13+
updateDate
14+
}
15+
}

web/codegen.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { CodegenConfig } from '@graphql-codegen/cli'
2+
import 'dotenv/config'
3+
import { getConfig } from './utils/config'
4+
5+
const config: CodegenConfig = {
6+
schema: [
7+
{
8+
[getConfig().graphqlEndpoint]: {
9+
headers: {
10+
cookie: `access_token=${process.env.GRAPHQL_TOKEN}`,
11+
},
12+
},
13+
},
14+
],
15+
documents: 'api/graphql/**/*.graphql',
16+
generates: {
17+
'api/gql/generated.ts': {
18+
plugins: [
19+
'typescript',
20+
'typescript-operations',
21+
'typescript-react-query',
22+
],
23+
config: {
24+
fetcher: {
25+
func: './fetcher#fetcher',
26+
isReactHook: false,
27+
},
28+
reactQueryVersion: 5,
29+
},
30+
},
31+
},
32+
}
33+
34+
export default config

web/components/layout/Page.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { PropsWithChildren } from 'react'
1+
import type { HTMLAttributes, PropsWithChildren } from 'react'
22
import { useEffect, useState } from 'react'
33
import Head from 'next/head'
44
import titleWrapper from '@/utils/titleWrapper'
@@ -57,13 +57,19 @@ export const StagingDisclaimerDialog = () => {
5757
}
5858

5959

60+
type HeaderProps = HTMLAttributes<HTMLHeadElement>
61+
6062
/**
6163
* The basic header for most pages
6264
*/
63-
export const Header = () => {
65+
export const Header = ({ ...props }: HeaderProps) => {
6466
return (
6567
<header
66-
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"
68+
{...props}
69+
className={clsx(
70+
'flex-row-8 items-center justify-between grow h-18 px-8 py-4 bg-header-background text-header-text shadow-md rounded-lg',
71+
props.className
72+
)}
6773
>
6874
<Link href="/" className="bg-surface text-on-surface rounded-lg px-6 py-4">
6975
<HelpwaveLogo className="min-h-12 min-w-12"/>
@@ -87,18 +93,19 @@ export const Page = ({
8793
pageTitle,
8894
}: PageWithHeaderProps) => {
8995
return (
90-
<div className="flex-col-4 w-screen h-screen overflow-hidden p-4">
96+
<div className="flex-col-4 h-screen w-screen overflow-hidden pt-4 pl-4">
9197
<Head>
9298
<title>{titleWrapper(pageTitle)}</title>
9399
</Head>
94100
<StagingDisclaimerDialog />
95-
<Header />
96-
<div className="flex-row-4 grow">
97-
<aside className="flex-col-4 w-40 rounded-lg bg-surface text-on-surface">
101+
<Header className="mr-4" />
102+
<div className="flex-row-4 grow overflow-hidden">
103+
<aside className="flex-col-2 w-40 min-w-40 rounded-lg bg-surface text-on-surface overflow-auto mb-4">
98104

99105
</aside>
100-
<main className="flex-col-2 grow">
106+
<main className="flex-col-2 grow overflow-auto">
101107
{children}
108+
<div className="min-h-16"/>
102109
</main>
103110
</div>
104111
</div>

web/environment.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ declare namespace NodeJS {
88
NEXT_PUBLIC_FEATURES_FEED_URL?: string,
99
NEXT_PUBLIC_IMPRINT_URL?: string,
1010
NEXT_PUBLIC_PRIVACY_URL?: string,
11+
GRAPHQL_TOKEN?: string,
1112
NEXT_PUBLIC_GRAPHQL_ENDPOINT?: string,
1213
NEXT_PUBLIC_ISSUER_URI?: string,
1314
NEXT_PUBLIC_CLIENT_ID?: string,

web/globals.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,14 @@
4848
--color-twocolum-text: var(--color-description);
4949
}
5050
}
51+
52+
@layer components {
53+
#__next, body {
54+
@apply w-screen max-w-screen h-screen max-h-screen overflow-hidden;
55+
}
56+
57+
/* Need for development to move the next portal properly out of the body */
58+
nextjs-portal {
59+
@apply left-0 bottom-0 ml-16 text-[1.5em] mb-[0.5em];
60+
}
61+
}

web/i18n/translations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// AUTO-GENERATED. DO NOT EDIT.
2-
3-
4-
2+
/* eslint-disable @stylistic/quote-props */
3+
/* eslint-disable no-useless-escape */
4+
/* eslint-disable @typescript-eslint/no-unused-vars */
55
import type { Translation } from '@helpwave/internationalization'
66
import { TranslationGen } from '@helpwave/internationalization'
77

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)