Remove default

This commit is contained in:
Adria Navarro 2025-05-19 12:05:49 +02:00
parent 8f652a8b79
commit 199c612da4
2 changed files with 3 additions and 15 deletions

View File

@ -315,7 +315,7 @@ export class ScreenStore extends BudiStore<ScreenState> {
} }
return this.save({ return this.save({
...clone, ...clone,
workspaceAppId: screen.workspaceAppId || "default", workspaceAppId: clone.workspaceAppId!,
}) })
} }
) )

View File

@ -13,8 +13,6 @@ interface DerivedWorkspaceAppStoreState {
workspaceApps: UIWorkspaceApp[] workspaceApps: UIWorkspaceApp[]
} }
const DEFAULT_PROJECT_APP_ID = "default"
export class WorkspaceAppStore extends DerivedBudiStore< export class WorkspaceAppStore extends DerivedBudiStore<
WorkspaceAppStoreState, WorkspaceAppStoreState,
DerivedWorkspaceAppStoreState DerivedWorkspaceAppStoreState
@ -27,9 +25,7 @@ export class WorkspaceAppStore extends DerivedBudiStore<
return { return {
...workspaceApp, ...workspaceApp,
screens: $screenStore.screens.filter( screens: $screenStore.screens.filter(
s => s => s.workspaceAppId === workspaceApp._id
(s.workspaceAppId || DEFAULT_PROJECT_APP_ID) ===
workspaceApp._id
), ),
} }
} }
@ -41,15 +37,7 @@ export class WorkspaceAppStore extends DerivedBudiStore<
super( super(
{ {
workspaceApps: [ workspaceApps: [],
{
_id: DEFAULT_PROJECT_APP_ID,
urlPrefix: "/",
name: "Default",
icon: "Monitoring",
iconColor: "",
},
],
loading: true, loading: true,
}, },
makeDerivedStore makeDerivedStore