Initial pannel layout
This commit is contained in:
@@ -2,7 +2,21 @@ import { create } from "zustand";
|
||||
|
||||
interface Mission {
|
||||
id: string;
|
||||
name: string;
|
||||
addressLat: number;
|
||||
addressLng: number;
|
||||
addressStreet: string;
|
||||
addressCity: string;
|
||||
addressZip: string;
|
||||
missionCategory: string;
|
||||
missionKeyword: string;
|
||||
missionSummary: string;
|
||||
missionPatientInfo: string;
|
||||
missionAdditionalInfo: string;
|
||||
hpgAmbulanceState?: "ready" | "arrived" | "onway";
|
||||
hpgFireEngineState?: "ready" | "arrived" | "onway";
|
||||
hpgPoliceState?: "ready" | "arrived" | "onway";
|
||||
hpgLocationLat?: number;
|
||||
hpgLocationLng?: number;
|
||||
}
|
||||
|
||||
interface MissionStore {
|
||||
@@ -10,7 +24,21 @@ interface MissionStore {
|
||||
setMissions: (missions: Mission[]) => void;
|
||||
}
|
||||
|
||||
export const missionsStore = create<MissionStore>((set) => ({
|
||||
missions: [],
|
||||
export const useMissionsStore = create<MissionStore>((set) => ({
|
||||
missions: [
|
||||
{
|
||||
id: "01250325",
|
||||
addressLat: 52.520008,
|
||||
addressLng: 13.404954,
|
||||
addressStreet: "Alexanderplatz",
|
||||
addressCity: "Berlin",
|
||||
addressZip: "10178",
|
||||
missionAdditionalInfo: "Additional info",
|
||||
missionCategory: "Category",
|
||||
missionKeyword: "Keyword",
|
||||
missionPatientInfo: "Patient info",
|
||||
missionSummary: "Summary",
|
||||
},
|
||||
],
|
||||
setMissions: (missions) => set({ missions }),
|
||||
}));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"use client";
|
||||
import { create } from "zustand";
|
||||
|
||||
interface PannelStore {
|
||||
@@ -6,6 +7,6 @@ interface PannelStore {
|
||||
}
|
||||
|
||||
export const usePannelStore = create<PannelStore>((set) => ({
|
||||
isOpen: true,
|
||||
isOpen: false,
|
||||
setOpen: (isOpen) => set({ isOpen }),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user