Skip to content

Commit 0395786

Browse files
committed
feat: update member service to use NamespaceMember for consistency in data handling
1 parent 58486bb commit 0395786

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/app/(dashboard)/layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ import Image from "next/image";
1717
import {Application, ApplicationService} from "@edition/application/services/Application.service";
1818
import {useUserSession} from "@edition/user/hooks/User.session.hook";
1919
import {OrganizationView} from "@edition/organization/services/Organization.view";
20-
import {MemberView} from "@edition/member/services/Member.view";
2120
import {RoleView} from "@edition/role/services/Role.view";
2221
import {Layout} from "@code0-tech/pictor/dist/components/layout/Layout";
23-
import {Namespace, NamespaceProject, Runtime, User} from "@code0-tech/sagittarius-graphql-types";
22+
import {Namespace, NamespaceMember, NamespaceProject, Runtime, User} from "@code0-tech/sagittarius-graphql-types";
2423
import {ApplicationMiddlewareComponent} from "@edition/application/components/ApplicationMiddlewareComponent";
2524

2625
interface ApplicationLayoutProps {
@@ -39,7 +38,7 @@ const ApplicationLayout: React.FC<ApplicationLayoutProps> = ({children, bar, tab
3938

4039
const user = usePersistentReactiveArrayService<User, UserService>(`dashboard::users::${currentSession?.id}`, (store) => new UserService(graphqlClient, store))
4140
const organization = usePersistentReactiveArrayService<OrganizationView, OrganizationService>(`dashboard::organizations::${currentSession?.id}`, (store) => new OrganizationService(graphqlClient, store))
42-
const member = usePersistentReactiveArrayService<MemberView, MemberService>(`dashboard::members::${currentSession?.id}`, (store) => new MemberService(graphqlClient, store))
41+
const member = usePersistentReactiveArrayService<NamespaceMember, MemberService>(`dashboard::members::${currentSession?.id}`, (store) => new MemberService(graphqlClient, store))
4342
const namespace = usePersistentReactiveArrayService<Namespace, NamespaceService>(`dashboard::namespaces::${currentSession?.id}`, (store) => new NamespaceService(graphqlClient, store))
4443
const runtime = usePersistentReactiveArrayService<Runtime, RuntimeService>(`dashboard::global_runtimes::${currentSession?.id}`, (store) => new RuntimeService(graphqlClient, store))
4544
const project = usePersistentReactiveArrayService<NamespaceProject, ProjectService>(`dashboard::projects::${currentSession?.id}`, (store) => new ProjectService(graphqlClient, store))

src/app/(flow)/layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
Flow,
1111
FlowType,
1212
FunctionDefinition,
13-
Namespace,
13+
Namespace, NamespaceMember,
1414
NamespaceProject,
1515
Runtime, RuntimeModule, User
1616
} from "@code0-tech/sagittarius-graphql-types";
@@ -28,7 +28,6 @@ import {DatatypeService} from "@edition/datatype/services/Datatype.service";
2828
import {FlowTypeService} from "@edition/flowtype/services/FlowType.service";
2929
import Image from "next/image";
3030
import {OrganizationView} from "@edition/organization/services/Organization.view";
31-
import {MemberView} from "@edition/member/services/Member.view";
3231
import {RoleView} from "@edition/role/services/Role.view";
3332
import {useUserSession} from "@edition/user/hooks/User.session.hook";
3433
import {Layout} from "@code0-tech/pictor/dist/components/layout/Layout";
@@ -58,7 +57,7 @@ export default function FlowLayout({bar, tab, children}: {
5857

5958
const user = usePersistentReactiveArrayService<User, UserService>(`dashboard::users::${currentSession?.id}`, (store) => new UserService(graphqlClient, store))
6059
const organization = usePersistentReactiveArrayService<OrganizationView, OrganizationService>(`dashboard::organizations::${currentSession?.id}`, (store) => new OrganizationService(graphqlClient, store))
61-
const member = usePersistentReactiveArrayService<MemberView, MemberService>(`dashboard::members::${currentSession?.id}`, (store) => new MemberService(graphqlClient, store))
60+
const member = usePersistentReactiveArrayService<NamespaceMember, MemberService>(`dashboard::members::${currentSession?.id}`, (store) => new MemberService(graphqlClient, store))
6261
const namespace = usePersistentReactiveArrayService<Namespace, NamespaceService>(`dashboard::namespaces::${currentSession?.id}`, (store) => new NamespaceService(graphqlClient, store))
6362
const runtime = usePersistentReactiveArrayService<Runtime, RuntimeService>(`dashboard::global_runtimes::${currentSession?.id}`, (store) => new RuntimeService(graphqlClient, store))
6463
const project = usePersistentReactiveArrayService<NamespaceProject, ProjectService>(`dashboard::projects::${currentSession?.id}`, (store) => new ProjectService(graphqlClient, store))

0 commit comments

Comments
 (0)