From fef90c45e98c6bda62dd72e1b43efd74af184355 Mon Sep 17 00:00:00 2001 From: zuies Date: Mon, 22 Jan 2024 14:46:46 +0300 Subject: [PATCH] fix filtering issue on users --- src/store/slices/announcementsSlice.ts | 2 -- src/store/slices/platformSlice.ts | 3 +++ src/store/types/IAnnouncements.ts | 1 - src/store/types/IPlatform.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/slices/announcementsSlice.ts b/src/store/slices/announcementsSlice.ts index 9ad03234..984afcd4 100644 --- a/src/store/slices/announcementsSlice.ts +++ b/src/store/slices/announcementsSlice.ts @@ -10,7 +10,6 @@ const createAnnouncementsSlice: StateCreator = (set, get) => ({ page, limit, sortBy, - ngu, timeZone, startDate, endDate, @@ -24,7 +23,6 @@ const createAnnouncementsSlice: StateCreator = (set, get) => ({ ...(timeZone ? { timeZone } : {}), ...(startDate ? { startDate } : {}), ...(endDate ? { endDate } : {}), - ...(ngu ? { name } : {}), }; const { data } = await axiosInstance.get( diff --git a/src/store/slices/platformSlice.ts b/src/store/slices/platformSlice.ts index 243096e1..8bee293b 100644 --- a/src/store/slices/platformSlice.ts +++ b/src/store/slices/platformSlice.ts @@ -72,6 +72,7 @@ const createPlatfromSlice: StateCreator = (set, get) => ({ platformId, property = 'channel', name, + ngu, sortBy, page, limit, @@ -89,6 +90,8 @@ const createPlatfromSlice: StateCreator = (set, get) => ({ if (name) params.append('name', name); + if (ngu) params.append('ngu', ngu); + if (page !== undefined) { params.append('page', page.toString()); } diff --git a/src/store/types/IAnnouncements.ts b/src/store/types/IAnnouncements.ts index 37937eac..224c3f15 100644 --- a/src/store/types/IAnnouncements.ts +++ b/src/store/types/IAnnouncements.ts @@ -2,7 +2,6 @@ export interface IRetrieveAnnouncementsProps { page: number; limit: number; sortBy?: string; - ngu?: string; community: string; startDate?: string; endDate?: string; diff --git a/src/store/types/IPlatform.ts b/src/store/types/IPlatform.ts index f88e42ca..16c7574d 100644 --- a/src/store/types/IPlatform.ts +++ b/src/store/types/IPlatform.ts @@ -13,6 +13,7 @@ export interface IRetrivePlatformRolesOrChannels { limit?: number; sortBy?: string; name?: string; + ngu?: string; platformId: string; property: 'channel' | 'role' | 'guildMember'; }