Commit Graph

180 Commits

Author SHA1 Message Date
Loretta 22821a4b27 Add URL link support to grid columns and info panel
- Introduced UrlLink parameter to MgGridDataColumn for clickable cell links with property placeholder support.
- Updated MgGridInfoPanel to render links for columns with UrlLink.
- Added unit tests for UrlLink rendering and value replacement.
- Added DynamicColumnAddingEventArgs and OnDynamicColumnAttributeAdding for dynamic column customization.
- Refactored layout storage key logic and enabled persistent info panel splitter size in MgGridWithInfoPanel.
- Updated product/order grids to use MgGridDataColumn with UrlLink and switched ProductDtos to AcObservableCollection for reactivity.
- Added AddPartner method to IFruitBankDataControllerCommon and FruitBankSignalRClient.
- Miscellaneous fixes: logger initialization, code cleanup, and improved comments.
2025-12-22 14:37:56 +01:00
Loretta 324f171377 Add MgLazyLoadContent, grid layout refactor, tests
- Introduced MgLazyLoadContent component with JS observer for lazy rendering of heavy content.
- Refactored MgGridBase for user-specific, customizable layout persistence using JS interop.
- Improved MgGridInfoPanel caching and state batching for performance.
- Updated PDF viewer to use lazy loading for better UX.
- Added AyCode.Blazor.Components.Tests project with bUnit/MSTest grid layout tests.
- Updated solution/project files and removed obsolete code.
- Minor UI and JS module loading improvements.
2025-12-21 16:29:37 +01:00
Loretta 271868b4d5 DevExpress Fluent theme: grid/info panel refactor
Major refactor for DevExpress Fluent theme compatibility:
- InfoPanel templates now use strongly-typed context (`InfoPanelContext`)
- Unified grid layout with `MgGridWithInfoPanel` wrapper
- CSS updated to use Fluent theme variables and container queries
- App-wide CSS cleanup and formatting improvements
- `.editorconfig` added for modern CSS support
- Improved InfoPanel instance resolution for nested grids
- Codebase is cleaner, more maintainable, and ready for further customization
2025-12-21 08:24:40 +01:00
Loretta e8d38f0038 Improve info panel tables, PDF support, and splash screen
Refactor shipping document info panel tables for better appearance and responsiveness using Bootstrap classes and improved CSS. Add PDF.js and custom PDF viewer scripts to enable PDF rendering in the info panel. Update splash screen handling for better Windows compatibility. Expand allowed Bash commands for development. Ensure UI updates in MgGridBase are properly scheduled with InvokeAsync.
2025-12-20 10:20:51 +01:00
Loretta d27f53453f Refactor fullscreen grid UI; add serializer diagnostics/tests
- Replaced DxWindow with custom Bootstrap 5 fullscreen overlay for grid components, improving fullscreen UX and styling.
- Added new CSS for fullscreen overlay, header, and body; retained legacy DxWindow styles for compatibility.
- Introduced SignalRSerializerDiagnosticLog flag to control binary serializer diagnostics at runtime.
- Enabled diagnostics in DevAdminSignalRHub, FruitBankSignalRClient, and Program.cs based on the new flag.
- Updated OrderClientTests to use GetStockTakings(false).
- Added StockTakingSerializerTests for binary serialization/deserialization validation and debugging.
2025-12-20 08:40:03 +01:00
Loretta 3c5b737207 Refactor MgGridInfoPanel for theme, UX, and PDF perf
- Refactored MgGridInfoPanel for DevExpress theme compatibility and improved usability; streamlined HTML/CSS, added OnDataItemChanged event, and enhanced empty state handling.
- Updated CSS to use theme variables, improved responsive grid and table styling, and enhanced integration with DevExpress components.
- GridShippingDocumentInfoPanel now uses OnDataItemChanged to load a random PDF per row selection; table layout and totals improved.
- Optimized pdfViewer.js to cache rendered PDFs, skip redundant renders, and improve logging and error handling.
- Added empty helper classes for future extensibility.
- Minor: MainLayout now uses RefreshMainLayout for UI refresh after auto-login.
2025-12-19 13:59:00 +01:00
Loretta ed99db3238 Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2025-12-19 07:16:15 +01:00
Loretta 7923c42a1e Add fullscreen grid support and PDF preview in info panel
- Added fullscreen mode to grid and info panel components, including toolbar toggle and fullscreen styling.
- Introduced embedded PDF viewing in the info panel using PDF.js and a custom JavaScript viewer.
- Updated interfaces, CSS, and toolbar templates to support new features.
- Added new PDF asset (2_BANK  FRA.pdf) for document preview.
- Minor: Added local settings for Bash permission, fixed text encoding, and improved info panel table layout.
- No code changes in other referenced PDF files; added for informational or asset purposes only.
2025-12-19 07:15:54 +01:00
Adam ff1951ff0f ShippingItem.UnitPriceOnDocument added 2025-12-19 01:44:29 +01:00
Loretta 2bcf802da7 Enhance MgGridInfoPanel with responsive/fixed columns
Add support for both responsive and fixed column layouts in MgGridInfoPanel via new parameters (TwoColumnBreakpoint, ThreeColumnBreakpoint, FourColumnBreakpoint, FixedColumnCount). Refactor CSS to use variables for breakpoints, add fixed column classes, and update container queries. Move styles to a new global mg-grid-info-panel.css, referenced in App.razor and index.html. Improve view mode styling and accessibility. Add Partner.Country column to GridPartner.razor.
2025-12-18 11:41:07 +01:00
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