feat: add A-card operations frontend and backend foundation
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { create } from "zustand";
|
||||
import { persist } from "zustand/middleware";
|
||||
|
||||
import { REPORTS, type MonitoringReport } from "./reportData";
|
||||
|
||||
type ReportStore = {
|
||||
reports: MonitoringReport[];
|
||||
updateReport: (reportId: string, updates: Partial<MonitoringReport>) => void;
|
||||
};
|
||||
|
||||
export const useReportStore = create<ReportStore>()(persist((set) => ({
|
||||
reports: REPORTS,
|
||||
updateReport: (reportId, updates) => set((state) => ({
|
||||
reports: state.reports.map((report) => report.reportId === reportId ? { ...report, ...updates } : report),
|
||||
})),
|
||||
}), {
|
||||
name: "a-card-operations-report-mock",
|
||||
version: 1,
|
||||
}));
|
||||
Reference in New Issue
Block a user