-
Notifications
You must be signed in to change notification settings - Fork 522
Extend news management from Admin to Store with full CRUD operations and configurable per-store limits #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend news management from Admin to Store with full CRUD operations and configurable per-store limits #617
Conversation
Co-authored-by: KrzysztofPajak <[email protected]>
|
Co-authored-by: KrzysztofPajak <[email protected]>
Co-authored-by: KrzysztofPajak <[email protected]>
Co-authored-by: KrzysztofPajak <[email protected]>
|
@copilot add manage news such as add, update, delete - such as admin panel |
Co-authored-by: KrzysztofPajak <[email protected]>
I've added comprehensive news management functionality to the Store area with full CRUD operations (add, update, delete) similar to the admin panel. The implementation includes:
Here's the Store News Management interface: The interface allows store managers to:
All operations respect store boundaries and the configurable per-store news limits. (e2b6f0b) |
|
@copilot Error CS0246: The type or namespace name 'NewsItemModel' could not be found (are you missing a using directive or an assembly reference?) |
Co-authored-by: KrzysztofPajak <[email protected]>
Fixed the compilation error by adding the missing |
Updated the method for loading news settings from `LoadSettingAsync` to `LoadSetting`, improving efficiency. Added a limit for the number of news items retrieved based on store settings. Enhanced the success message for adding news items to utilize a translation service, improving localization support.
Co-authored-by: KrzysztofPajak <[email protected]>
Fixed the localization syntax by replacing all |
Removed asynchronous List method and replaced it with a synchronous version. The new method creates a NewsItemListModel instance and returns it to the view, changing how data is handled and presented.
Restructure HTML and JavaScript for the news items grid in the admin area. Update layout from Bootstrap card to a customized panel format. Rename grid from `#news-grid` to `#newsitem-grid` and modify data source URL to include area parameter. Enhance grid configuration with new columns for comments, start date, and end date, while removing some existing columns. Improve JavaScript functions for searching and deleting news items to enhance user experience and functionality.
- Added new permission for managing news items in `PermissionExtensions.cs`. - Refactored `Create.cshtml` and `Edit.cshtml` to use a new panel layout and updated button structures. - Introduced `CreateOrUpdate.TabComments.cshtml` with a Kendo Grid for comment management. - Updated `CreateOrUpdate.TabInfo.cshtml` and `CreateOrUpdate.TabSeo.cshtml` to use custom components for better consistency. - Implemented a tabbed interface in `CreateOrUpdate.cshtml` for improved navigation. - Simplified layout in `Preview.cshtml` for displaying news item details. - Enhanced store-specific logic in `NewsController.cs` to enforce access permissions based on user stores. - Modified `DefaultLanguage.xml` (binary file changes).
This commit removes the `GetStoreNews` method from the `INewsService` interface and the `NewsService` class, along with its associated XML documentation. The removal includes two test methods from `NewsServiceTests` that validated the behavior of `GetStoreNews`. Additionally, the `NewsController` class has been updated to replace the call to `GetStoreNews` with a new method, `GetAllNews`, reflecting a shift towards a more general news retrieval approach.
|




Recent Fix
Fixed localization compilation error by replacing all
@T("...")references with@Loc["..."]in Store area news views. The Store area uses@Loc[]for localization, not@T(). Updated all 7 news view files to use the correct syntax:The Store area news management functionality now uses the proper localization syntax consistent with the rest of the Store area.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.