Notification Pages Slice Removal#911
Open
nbeatty-gpa wants to merge 35 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes most Redux “slice” usage from the SystemCenterNotification Notification Pages UI (keeping only UserInfoSlice) and replaces slice-driven fetching/searching with component-local useEffect data fetching (primarily via GenericController, with some $.ajax “One/{id}” reads). It also introduces a reusable ControllerSelects component to support selection UIs without slices.
Changes:
- Removed/disabled most Redux store slices from
Store.tsx, shifting pages to local state + controller-driven fetch/search patterns. - Refactored subscription, report, email type, and category pages to use
GenericController(and some direct$.ajax) instead of slices. - Added
ControllerSelectsand migrated event filter selection UIs to use controller-based selectors.
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| Source/Applications/SystemCenterNotification/Scripts/TSX/UserInformation/ByUserInformation.tsx | Replaces carrier slice usage with controller-based fetch for carriers. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/UserSelect.tsx | Replaces user account slice search with controller-based paged search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Report/Success.tsx | Removes slice dependencies; loads email/asset groups via controllers/ajax and posts subscriptions via controller. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Report/ReportSelect.tsx | Replaces scheduled email slice with controller fetch and local state for category/template selection. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Report/NewReportSubscription.tsx | Replaces EmailTypeSlice lookup for SMS flag with ajax-based lookup and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/Success.tsx | Removes slice dependencies; loads email/asset groups via controllers/ajax and posts subscriptions via controller. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/NewEventSubscription.tsx | Replaces EmailTypeSlice lookup for SMS flag with ajax-based lookup and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/EmailSelect.tsx | Replaces email type slice fetch with controller-based fetch keyed by selected category. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/BySubscription.tsx | Replaces active subscription slice search/delete with controller-based paged search + DBAction. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/ByAllSubscription.tsx | Replaces active subscription slice fetch/search/delete with controller-based fetch/search + DBAction. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/Event/AddAllSubscription.tsx | Replaces slice-based POST with controller DBAction('POST', ...). |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/ConfirmCarrier.tsx | Replaces carrier slice usage with controller-based fetch for carriers. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Subscriptions/AssetGroupSelection.tsx | Replaces asset group slice search with controller-based paged search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Store.tsx | Removes most slices/reducers, leaving only UserInfoSlice in the configured store. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/TriggerWindow.tsx | Replaces scheduled email type slice PATCH with controller DBAction('PATCH', ...). |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/Template.tsx | Replaces scheduled email type slice PATCH with controller DBAction('PATCH', ...). |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/Subscriptions.tsx | Replaces report subscription slice paged search/refresh with controller-based paged search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/ReportPage.tsx | Replaces scheduled email type slice “Datum/Fetch/Delete” with ajax “One/{id}” + controller delete. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/ReportForm.tsx | Replaces category/email slices with controller fetches for validation and dropdown data. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/GeneralInfo.tsx | Replaces scheduled email slice data/patch with controller fetch + controller patch. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/DatasourceUI/DataSourceWindow.tsx | Replaces datasource slice search/delete with controller-based paged search + DBAction delete. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/DatasourceUI/DataSourceModal.tsx | Replaces datasource/settings slices with controller fetch + DBAction save patterns. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/Report/ByReport.tsx | Replaces scheduled email type/category slices with controller fetch/search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EventFilterComponents/FilterSelect.tsx | Migrates selection UI from DefaultSelects slice-based patterns to ControllerSelects + controllers. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EventFilterComponents/EventFilterButton.tsx | Replaces slice-backed lookup tables with controller-based fetch + local caches. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EventFilterComponents/EventFilter.tsx | Replaces event type slice fetch with controller fetch and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/TriggerUI/TriggerWindow.tsx | Replaces email type slice PATCH with controller DBAction('PATCH', ...) and formatting updates. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/TriggerUI/EventSelect.tsx | Minor table styling tweak; logs added (needs removal). |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/TriggerUI/EventDetails.tsx | Minor table styling tweak for scroll behavior. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/Template.tsx | Replaces email type slice PATCH with controller DBAction('PATCH', ...) and formatting updates. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/Subscriptions.tsx | Replaces event subscription slice search with controller-based paged search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/GeneralInfo.tsx | Replaces email type slice data/patch with controller fetch + controller patch. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/EmailPage.tsx | Replaces email type slice “Datum/Fetch/Delete” with ajax “One/{id}” + controller delete. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/EmailForm.tsx | Replaces category/email slices with controller fetches for validation and dropdown data. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/DatasourceUI/DataSourceWindow.tsx | Replaces triggered datasource slice search/delete with controller-based paged search + DBAction delete. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/DatasourceUI/DataSourceModal.tsx | Replaces triggered datasource/settings slices with controller fetch + DBAction save patterns. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailTypes/ByEmailType.tsx | Replaces email type/category slices with controller fetch/search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/EmailList.tsx | Replaces email type slice search with controller-based paged search for category-scoped listing. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/EmailCategoryWindow.tsx | Replaces email category slice data/patch with controller fetch + controller patch. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/EmailCategoryPage.tsx | Replaces email category slice “Datum/Fetch/Delete” with ajax “One/{id}” + controller delete. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/EmailCategoryForm.tsx | Replaces email category slice fetch with controller fetch for validation. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/ByEmailCategory.tsx | Replaces email category slice fetch/search with controller fetch/search and local state. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/CommonComponents/ControllerSelects.tsx | Adds new controller-based reusable selection modal component. |
| Source/Applications/SystemCenterNotification/Scripts/TSX/CellCarrier/ByCellCarrier.tsx | Replaces carrier slice fetch/search/CRUD with controller fetch/search/DBAction and local state. |
| Source/Applications/SystemCenterNotification/NotificationPages.csproj | Includes new ControllerSelects.tsx in TypeScript compile items. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+56
to
74
| const cellCarrierController = React.useMemo(() => new GenericController<ICellCarrier>(`${homePath}api/OpenXDA/CellCarrier`, "Name", true), []) | ||
|
|
||
| React.useEffect(() => { | ||
| if (carrierStatus == 'uninitiated' || carrierStatus == 'changed') | ||
| dispatch(CellCarrierSlice.Fetch()); | ||
| }, [carrierStatus]); | ||
| setCarrierStatus('loading'); | ||
| const h = cellCarrierController.Fetch(); | ||
| h.done((d) => { | ||
| setCarrierStatus('idle'); | ||
| setCarriers(d); | ||
| }) | ||
| h.fail(() => { | ||
| setCarrierStatus('error'); | ||
| }) | ||
|
|
||
| return function cleanup() { | ||
| if (h != null && h.abort != null) | ||
| h.abort(); | ||
| } | ||
| }, [cellCarrierController.Fetch]); | ||
|
|
Contributor
Author
There was a problem hiding this comment.
going to look a little more into this one
clackner-gpa
self-requested a review
July 17, 2026 14:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes every slice from Notification Pages except for the UserInfoSlice, replacing them with data-fetching useEffects, and adding a ControllerSelect component for selection without slices.