Skip to content

Commit a29f689

Browse files
Merge branch 'StanfordBDHG:main' into main
2 parents c82323e + a9ae364 commit a29f689

20 files changed

Lines changed: 2744 additions & 2786 deletions

.storybook/main.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@
99
import type { StorybookConfig } from "@storybook/react-vite";
1010

1111
const config: StorybookConfig = {
12-
stories: ["../**/*.mdx", "../**/*.stories.@(js|jsx|mjs|ts|tsx)"],
13-
addons: [
14-
"@storybook/addon-onboarding",
15-
"@storybook/addon-essentials",
16-
"@storybook/addon-interactions",
17-
],
12+
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
13+
addons: [],
1814
framework: {
1915
name: "@storybook/react-vite",
2016
options: {},
2117
},
22-
docs: {},
2318
typescript: {
2419
reactDocgen: "react-docgen-typescript",
2520
},
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
//
2-
// This source file is part of the Stanford Biodesign Digital Health Spezi Web Design System open-source project
2+
// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
33
//
4-
// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
4+
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
55
//
66
// SPDX-License-Identifier: MIT
77
//
88

9-
import { type Preview } from "@storybook/react";
10-
import "../modules/globals.css";
9+
import type { Preview } from "@storybook/react-vite";
1110

1211
const preview: Preview = {
1312
parameters: {
14-
layout: "centered",
1513
controls: {
1614
matchers: {
1715
color: /(background|color)$/i,

components/AsideEngageLayout/AsideEngageLayout.tsx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,33 @@
77
//
88

99
import {
10-
type AsideBrandLayoutProps,
11-
AsideBrandLayout,
10+
AsideBrandLayoutAside,
11+
AsideBrandLayoutMain,
12+
AsideBrandLayoutRoot,
1213
} from "@stanfordspezi/spezi-web-design-system/molecules/AsideBrandLayout";
14+
import { type ReactNode } from "react";
1315
import { Logo } from "@/components/icons/Logo";
1416
import { LogoType } from "@/components/icons/LogoType";
1517

16-
export const AsideEngageLayout = (
17-
props: Omit<AsideBrandLayoutProps, "aside">,
18-
) => (
19-
<AsideBrandLayout
20-
aside={
21-
<>
22-
<div className="flex-center text-primary gap-6">
23-
<div className="flex-center bg-primary size-20 rounded-lg">
24-
<Logo className="w-10 text-white" />
25-
</div>
26-
<LogoType className="h-auto w-48" />
18+
interface AsideEngageLayoutProps {
19+
children?: ReactNode;
20+
}
21+
22+
export const AsideEngageLayout = ({ children }: AsideEngageLayoutProps) => (
23+
<AsideBrandLayoutRoot>
24+
<AsideBrandLayoutAside>
25+
<div className="flex-center text-primary gap-6">
26+
<div className="flex-center bg-primary size-20 rounded-lg">
27+
<Logo className="w-10 text-white" />
2728
</div>
28-
<img
29-
src="/stanfordbiodesign.png"
30-
alt="Stanford Biodesign Logo"
31-
className="h-[193px]"
32-
/>
33-
</>
34-
}
35-
{...props}
36-
/>
29+
<LogoType className="h-auto w-48" />
30+
</div>
31+
<img
32+
src="/stanfordbiodesign.png"
33+
alt="Stanford Biodesign Logo"
34+
className="h-[193px]"
35+
/>
36+
</AsideBrandLayoutAside>
37+
<AsideBrandLayoutMain>{children}</AsideBrandLayoutMain>
38+
</AsideBrandLayoutRoot>
3739
);

eslint.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// SPDX-License-Identifier: MIT
77
//
88

9-
const { getEslintConfig } = require("@stanfordspezi/spezi-web-configurations");
9+
const {
10+
getEslintReactConfig,
11+
} = require("@stanfordspezi/spezi-web-configurations");
1012

11-
module.exports = getEslintConfig({ tsconfigRootDir: __dirname });
13+
module.exports = getEslintReactConfig({ tsconfigRootDir: __dirname });

modules/user/patients.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const parsePatientsQueries = async ({
4242
{ userIds, includeUserData: true },
4343
({ auth, user }, id) => ({
4444
...parseAuthToUser(id, auth),
45+
selfManaged: user?.selfManaged,
4546
organization: organizationMap.get(user?.organization ?? ""),
4647
disabled: user?.disabled,
4748
}),

modules/user/queries.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const parseInvitationToUser = (
3939
organization: organizationMap.get(invitation.user.organization ?? ""),
4040
type: invitation.user.type,
4141
disabled: invitation.user.disabled,
42+
selfManaged: invitation.user.selfManaged,
4243
});
4344

4445
export const parseAuthToUser = (

0 commit comments

Comments
 (0)