feat: implement activity feed module with debounced filtering, history tracking, and axios service integration
This commit is contained in:
@@ -58,6 +58,7 @@ interface FeedState {
|
||||
dashboardCache: DashboardCache;
|
||||
searchAnomalyId: string;
|
||||
isRectificationEnabled: boolean;
|
||||
isFeedLoading: boolean;
|
||||
|
||||
// Actions
|
||||
setTabs: (tabs: FeedTab[]) => void;
|
||||
@@ -82,6 +83,7 @@ interface FeedState {
|
||||
setFilterPlaza: (val: string) => void;
|
||||
setSearchAnomalyId: (id: string) => void;
|
||||
setIsRectificationEnabled: (val: boolean) => void;
|
||||
setIsFeedLoading: (val: boolean) => void;
|
||||
resetStore: () => void;
|
||||
}
|
||||
|
||||
@@ -120,6 +122,7 @@ const initialFeedState = {
|
||||
dashboardCache: EMPTY_DASHBOARD_CACHE,
|
||||
searchAnomalyId: '',
|
||||
isRectificationEnabled: false,
|
||||
isFeedLoading: false,
|
||||
};
|
||||
|
||||
export const useFeedStore = create<FeedState>()(
|
||||
@@ -148,6 +151,7 @@ export const useFeedStore = create<FeedState>()(
|
||||
setFilterPlaza: (filterPlaza) => set({ filterPlaza }),
|
||||
setSearchAnomalyId: (searchAnomalyId) => set({ searchAnomalyId }),
|
||||
setIsRectificationEnabled: (isRectificationEnabled) => set({ isRectificationEnabled }),
|
||||
setIsFeedLoading: (isFeedLoading) => set({ isFeedLoading }),
|
||||
addTab: (tab) => set((state) => ({ tabs: [...state.tabs, tab], selectedTabIndex: state.tabs.length })),
|
||||
closeTab: (index) => set((state) => {
|
||||
const newTabs = [...state.tabs];
|
||||
|
||||
Reference in New Issue
Block a user