Commit Graph

170 Commits

Author SHA1 Message Date
Loretta 7f4052faa2 Refactor: decouple InfoPanel using MgGridWithInfoPanel
Major refactor to decouple InfoPanel logic from grid base. Introduces MgGridWithInfoPanel wrapper component to manage grid and InfoPanel layout and communication. InfoPanels are now customizable via Razor templates with named slots (header, footer, etc.), and grid-to-InfoPanel communication is routed through the wrapper. Removes legacy C#-only InfoPanel base classes and parameters from grid base. This improves flexibility, composability, and maintainability of grid+InfoPanel UIs.
2025-12-18 11:02:53 +01:00
Loretta 031fd9226b Add extensible InfoPanel system with custom templates
Introduce a flexible InfoPanel architecture for grid components, allowing per-grid customization via a new InfoPanelType parameter. Add MgInfoPanelTemplateBase for code-based InfoPanel templates with overridable header, content, and footer sections. Support custom templates in MgGridInfoPanel via new RenderFragment parameters. Add MgGridDataColumn for InfoPanel-specific column settings. Demonstrate usage with a custom InfoPanel for ShippingDocument grid. Maintains backward compatibility with default InfoPanel behavior.
2025-12-18 10:03:32 +01:00
Loretta 21548376ba Refactor grid toolbar and InfoPanel for reusability
Introduce reusable MgGridToolbarBase and MgGridToolbarTemplate components, replacing old toolbar implementations. InfoPanel now displays grid captions and includes a toolbar for quick actions. Refactor InfoPanel value rendering for improved DevExpress-like appearance. Update IMgGridBase and related classes to support captions and use new abstractions. Update usings and project structure accordingly.
2025-12-17 18:31:59 +01:00
Loretta 903711ed04 Refactor InfoPanel: non-generic, nested grid support
- Replace generic InfoPanel with non-generic version using IInfoPanelBase
- Add ParentGrid, GetRootGrid, and InfoPanelInstance to IMgGridBase for nested grid hierarchy
- Only root grid displays InfoPanel; nested grids inherit context
- InfoPanel now handles any data type via reflection and object
- All grid-to-InfoPanel communication routed through root grid
- Add option to show/hide readonly fields in edit mode
- Improve InfoPanel CSS for up to 4 responsive columns
- Remove redundant code and add debug output for InfoPanel data flow
2025-12-17 13:54:08 +01:00
Loretta a0f7ac6a29 Refactor grid InfoPanel: sticky, responsive, new icons
- Redesigned MgGridInfoPanel to use a sticky, scroll-aware layout via JavaScript for better UX when scrolling.
- InfoPanel now uses a responsive CSS grid layout with container queries for 1/2/3 column display based on width.
- Added new toolbar icons using SVG masks for a modern, consistent look; updated toolbar item class names.
- Added "Prev Row" and "Next Row" navigation buttons to the grid toolbar, with corresponding methods in grid base classes.
- Unified edit state enum naming to MgGridEditState and updated all references.
- Improved InfoPanel cell rendering for better text overflow handling and tooltips.
- Updated CSS for InfoPanel and grid, including sticky pane support and icon styles.
- Registered mgGridInfoPanel.js in App.razor and index.html for JS interop.
- Minor UI/UX tweaks: InfoPanel header, background colors, and panel sizing.
2025-12-17 10:20:18 +01:00
Loretta fbe09be307 Refactor grid editing, info panel, and toolbar system
- Introduce MgEditState enum and expose EditState on IMgGridBase
- Replace event-based syncing state with property-based state
- Redesign MgGridInfoPanel to support both view and edit modes with dynamic DevExpress editors and two-way binding
- Add visual distinction for edit/view modes in info panel
- Replace FruitBankToolbarTemplate with generic MgGridToolbarTemplate; toolbar adapts to grid edit/sync state
- Update all grid usages to use new toolbar
- Improve robustness, error handling, and maintainability throughout grid, info panel, and toolbar code
2025-12-17 06:21:21 +01:00
Loretta b3ddc86639 Add dynamic Info Panel to grids and update app splash image
Introduced a dynamic Info Panel to MgGridBase, allowing users to view details of the selected row in a side panel. Added the MgGridInfoPanel component with automatic form generation and styling. Updated all grid usages to use the new OnGridFocusedRowChanged event and enabled the info panel in GridPartner. Changed app logo and splash screen references in the Windows packaging manifest and added a placeholder splash image. Also included minor using fixes.
2025-12-16 16:12:38 +01:00
Loretta 80a1ce6a44 Refactor SignalR handling; add stock history tab
Refactored SignalR message handling to use strongly-typed SignalResponseDataMessage objects instead of JSON strings, updating event signatures and deserialization logic in MainLayout, MeasuringOut, and FruitBankSignalRClient. Added a new "Stock quantity changes" tab for administrators in GridProductDtoTemplate. Also added Microsoft.Extensions.ObjectPool package to the project.
2025-12-14 01:45:12 +01:00
Loretta ba05b5f37e Add bunit & Newtonsoft.Json refs, add (commented) test stubs
Added bunit and Newtonsoft.Json package references to the test project for Blazor component and JSON testing support. Introduced two new test files, GridPartnerBaseTests.cs and GridPartnerRazorTests.cs, containing commented-out MSTest and bUnit test stubs for GridPartnerBase and GridPartner components. No active tests are enabled yet.
2025-12-13 12:31:46 +01:00
Loretta 62e8294448 Initialize SerializerOptions in DevAdminSignalRHub ctor
Set SerializerOptions to AcBinarySerializerOptions in the DevAdminSignalRHub constructor, enabling configurable serialization (binary or JSON) for SignalR communication. Includes a commented option for AcJsonSerializerOptions. No other logic affected.
2025-12-13 00:16:41 +01:00
Loretta fdcd47fa75 Update UI access from Developer to Administrator role
Replaced all checks and UI visibility conditions using LoggedInModel.IsDeveloper with LoggedInModel.IsAdministrator across Blazor components and grid templates. This change restricts advanced features and UI elements to administrator users instead of developer users. The "Delete" toolbar item remains accessible to developers. No other logic or functionality was modified.
2025-12-13 00:16:34 +01:00
Loretta 056a69ecc8 Update local HTTPS, layout auth, deps, and add SignalR tests
- Switch FruitBankConstClient.BaseUrl to HTTPS for localhost.
- Pin DevExpress.Blazor to 25.1.3 in client project.
- Add Microsoft.Extensions.ObjectPool v9 to test project for SignalR.
- Reformat App.razor markup; comment out ResourcePreloader.
- Render @Body only if logged in or on login page in MainLayout.
- Redirect to /Login if not authenticated after auto-login.
- Add SandboxEndpointSimpleTests.cs for HTTP/SignalR endpoint tests against local sandbox.
2025-12-11 23:46:20 +01:00
Adam 01ffd22fca Allowed Martin to access edit 2025-12-11 18:32:29 +01:00
Loretta 0d9ced990a Add secure cross-platform auto-login with credential storage
Introduces ISecureCredentialService abstraction and platform-specific implementations for secure credential storage (WebAssembly, MAUI, server). Refactors LoggedInModel to support async auto-login, login, and logout using stored credentials. Updates DI and UI logic to enable seamless auto-login and logout across all platforms. Cleans up redundant navigation checks and improves maintainability.
2025-12-09 16:46:47 +01:00
Loretta 4ef318973f Add grid sync state tracking and robust login redirection
Introduce IsSyncing and OnSyncingStateChanged to IMgGridBase and MgGridBase for real-time sync state tracking and event notification. Update FruitBankToolbarTemplate to enable/disable the reload button based on grid sync and reload state, subscribing to sync events and cleaning up on disposal. Implement IAsyncDisposable in MgGridBase to prevent memory leaks. Update login navigation to use forceLoad for reliability. These changes improve UI responsiveness and resource management.
2025-12-09 11:27:21 +01:00
Loretta 346d433196 Refactor, enhance, and improve test coverage
Refactored `OnDataSourceLoaded` to be asynchronous for better state handling. Downgraded `Newtonsoft.Json` to version `13.0.3` across multiple projects for compatibility. Enhanced `MeasuringItemPalletBase` with `SetParentPropToNull` and `SetForeignKey` methods. Refactored `OrderItemPallet`, `ShippingItemPallet`, and `StockTakingItemPallet` to simplify table attributes and improve parent-child relationship handling.

Added `IsReadyForClose` to `StockTaking` for better closure validation. Updated SignalR tag constants to reflect new functionality. Improved Razor components (`PalletItemComponent`, `StockTakingTemplate`, `MeasuringIn`, `MeasuringOut`) to streamline logic and maintain proper references.

Introduced `JsonExtensionTests` for comprehensive validation of JSON serialization/deserialization, including deep hierarchies, circular references, and hybrid references. Added `test_debug.ps1` for streamlined test debugging. Performed general code cleanup and improved test coverage.
2025-12-08 15:50:57 +01:00
Loretta 1b6aae83f1 StockTaking in progress... 2025-12-04 13:52:51 +01:00
Loretta e13e32dc57 .Net10, VS2026; StockTaking in progress... 2025-12-01 16:18:47 +01:00
Loretta 7e4d0a85e8 Upgrade to .net10 and Visual Studio 2026; StockTaking in progress... 2025-11-28 08:15:58 +01:00
Adam 71c47d26ca Merge 2025-11-26 10:59:32 +01:00
Adam cd338d3978 removed stateful 2025-11-26 10:59:04 +01:00
Loretta 2d1693423d Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-26 10:18:54 +01:00
Loretta cf66d8b6a2 BaseUrl fix 2025-11-26 09:45:08 +01:00
Loretta b6248d68f3 improvements, fixes 2025-11-26 09:42:17 +01:00
Adam e4cbd6f723 Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-24 16:34:41 +01:00
Loretta 2253f0f534 improvements, fixes, etc... 2025-11-24 08:27:07 +01:00
Adam ebb522ce5c Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-22 01:25:20 +01:00
Loretta 7c1cd6574e OrderItemGrid improvement, fixes 2025-11-21 17:16:59 +01:00
Loretta 34be547e85 improvements 2025-11-21 16:28:49 +01:00
Loretta 264ad6256f improvements 2025-11-21 07:20:26 +01:00
Adam 401d78aebc Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-20 13:33:48 +01:00
Adam af2e79bfa9 debug// 2025-11-20 13:33:42 +01:00
Loretta 5c6aa6a80f improvements, fixes 2025-11-20 08:30:49 +01:00
Loretta 4fb643bcdc Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-18 12:52:29 +01:00
Loretta c4c58163ec improvements, fixes 2025-11-18 12:52:23 +01:00
Adam c5e019f051 Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-18 11:24:38 +01:00
Loretta a43c7e6858 MapHub TransportSendTimeout, WebSockets.CloseTimeout fix; etc... 2025-11-16 19:21:06 +01:00
Loretta d2d4ea56c5 improvements, fixes 2025-11-15 15:42:43 +01:00
Loretta 5e574cd19e fixes 2025-11-15 08:13:35 +01:00
Adam 04a1526d46 merge 2025-11-14 21:14:44 +01:00
Adam b16608ae3a test fix 2025-11-14 21:14:17 +01:00
Loretta 9731e15944 IsIncosistent... 2025-11-14 18:44:49 +01:00
Loretta 66764b3dd5 fixes 2025-11-14 17:56:39 +01:00
Loretta 8b9cf1ea8d StockQuantityHistoryExt, StockQuantityHistoryDto; improvements, fixes; 2025-11-13 19:58:45 +01:00
Loretta c51467d32c Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-11-12 19:12:02 +01:00
Loretta e6306c5205 test fix 2025-11-12 19:11:49 +01:00
Adam 1322290d88 merge 2025-11-12 18:03:59 +01:00
Adam 052649010e ui changes 2025-11-12 18:01:53 +01:00
Loretta aad3a59383 fixes 2025-11-12 17:56:56 +01:00
Loretta cfe9c2c3fd improvements, fixes, etc... 2025-11-12 17:19:03 +01:00