Commit Graph

66 Commits

Author SHA1 Message Date
OlgunR
8bf172755b Update using directives in _Imports.razor for clarity
Added @using DbFirst.BlazorWebApp and reorganized the placement of @using Microsoft.Extensions.Options to improve code organization and maintain consistent dependency order.
2026-04-20 11:34:15 +02:00
OlgunR
27c8f92a3b Refactor API base URL config to use AppSettings class
Replaced direct IConfiguration usage with a strongly-typed AppSettings class for accessing the API base URL. Registered AppSettings with DI and updated Dashboard.razor to use IOptions<AppSettings>. Updated using statements and DI setup for improved type safety and centralized configuration management.
2026-04-20 11:32:45 +02:00
OlgunR
cd0a824064 Refactor grid logic into BandGridBase<TItem> base class
Move shared state and methods from CatalogsGrid and MassDataGrid into BandGridBase<TItem>. This centralizes edit context handling, validation, popup header logic, row editing/deleting, and layout feedback, reducing duplication and improving maintainability. Individual grid components now only override OnEditFieldChanged for custom validation.
2026-04-20 10:52:05 +02:00
OlgunR
0008fac1d2 Refactor HTTP client registration for API clients
Simplified registration of CatalogApiClient, DashboardApiClient, MassDataApiClient, and LayoutApiClient by introducing a ConfigureClient method. This method sets the BaseAddress if ApiBaseUrl is configured, removing the previous if-else logic and reducing code duplication.
2026-04-20 10:29:17 +02:00
OlgunR
4659913711 Move ApiResult<T> to ApiResult.cs with proper namespace
ApiResult<T> and its static methods were relocated from CatalogApiClient.cs to a new ApiResult.cs file. The new file now includes the DbFirst.BlazorWebApp.Models namespace for better code organization.
2026-04-20 10:24:47 +02:00
OlgunR
bb23cb6629 Refactor error handling to use ApiClientHelper
Replaced the private ReadErrorAsync method in LayoutApiClient with calls to ApiClientHelper.ReadErrorAsync, centralizing error handling logic for improved consistency and reuse.
2026-04-20 10:19:40 +02:00
OlgunR
b3f7df6801 Initialize SignalR hub in OnAfterRenderAsync after first render
Moved SignalR hub connection setup from OnInitializedAsync to OnAfterRenderAsync, ensuring initialization occurs only after the component's first render. This prevents premature connection attempts and aligns with best practices for component lifecycle management.
2026-04-20 10:08:24 +02:00
OlgunR
3a1cb68cf0 Change OnCustomizeEditModel to synchronous void method
Converted OnCustomizeEditModel in MassDataGrid.razor from async Task to synchronous void, removing asynchronous support from this method.
2026-04-17 14:28:50 +02:00
OlgunR
c93518202b Add custom toolbar actions with icons to grids
Introduce Add, Edit, and Delete buttons with Bootstrap Icons in the toolbars of CatalogsGrid and MassDataGrid. Hide the default command column by overriding ShowCommandColumn. Update BandGridBase to conditionally render the command column. Track focused row index for toolbar actions, enabling row operations via toolbar instead of the grid's built-in command column. Add Bootstrap Icons stylesheet to App.razor.
2026-04-17 12:08:39 +02:00
OlgunR
6792b426ff Enhance grid UI: column chooser button & default widths
- Set default width and hide new button for DxGridBandColumn in BandGridBase.cs
- Always show column chooser button in CatalogsGrid and MassDataGrid
- Add "Spalten" toolbar button to open column chooser dialog
- Improves accessibility and consistency of grid column customization
2026-04-16 16:02:31 +02:00
OlgunR
6ac48a472d Simplify Fluent theme registration in App.razor
Replaced custom Fluent theme registration (with ApplyToPageElements set to true) with the default Fluent theme registration, removing unnecessary property customization for a cleaner setup.
2026-04-15 14:16:35 +02:00
OlgunR
96dfd5b3c6 Set default values for CarouselData string properties
Initialized Source and AlternateText with empty strings in the
CarouselData class to prevent potential null reference issues.
2026-04-15 14:16:03 +02:00
OlgunR
810771f385 Remove auto-refresh of dashboards in OnParametersSetAsync
Previously, RefreshDashboards() was called automatically if the dashboards list was empty during parameter setting. This logic has been removed, so dashboards will no longer refresh automatically in this scenario.
2026-04-15 14:08:14 +02:00
OlgunR
a0e0d7ed03 Centralize API error handling in ApiClientHelper
Refactored error handling logic for API responses into a new static ApiClientHelper class, consolidating the ReadErrorAsync method and ProblemDetailsDto. Updated CatalogApiClient and MassDataApiClient to use the shared helper, removing redundant local methods and classes. This change improves consistency, reduces duplication, and streamlines error message formatting across the application.
2026-04-15 13:55:57 +02:00
OlgunR
39cb63a78d Refactor UpsertAsync to use ApiResult for error handling
MassDataApiClient.UpsertAsync now returns ApiResult to standardize success and error reporting, including detailed error extraction from API responses. Updated MassDataGrid.razor to handle the new result type and display error messages accordingly. Removed obsolete try-catch logic in favor of the new pattern.
2026-04-15 11:27:48 +02:00
OlgunR
7d08923444 Remove unused bandEditorExpanded field from BandGridBase
The protected bool bandEditorExpanded, which tracked the expansion
state of the band editor, has been removed from BandGridBase<TItem>
as it is no longer used. This helps clean up unused state from
the component.
2026-04-15 11:01:22 +02:00
OlgunR
11374347d3 Refactor band editor into reusable BandEditor component
Extract band editor UI and logic from CatalogsGrid.razor and MassDataGrid.razor into a new BandEditor.razor component. This centralizes band management features (add/remove bands, edit captions, assign columns, save/reset layout) and reduces code duplication, improving maintainability and reusability. Existing UI and event handling remain functionally unchanged.
2026-04-15 10:57:28 +02:00
OlgunR
7552b34ced Refactor MassDataGrid to use BandGridBase for layout logic
Move band and column management to BandGridBase, reducing duplication in MassDataGrid. Column definitions and layout key are now provided via overridden properties. Band editor actions now use feedback methods for user messages. Grid layout application and error display are streamlined. Improves maintainability and enables reuse across grid components.
2026-04-14 16:55:14 +02:00
OlgunR
13d134df0e Refactor CatalogsGrid to use BandGridBase and async layout ops
Refactored CatalogsGrid.razor to inherit from BandGridBase<CatalogReadDto>, moving band layout and grid logic into the base class. Updated UI to use new async methods for saving and resetting the layout with user feedback. Removed redundant local fields and methods, centralizing layout management and improving maintainability and code reuse. Error and info messages are now shown after layout operations.
2026-04-14 16:37:59 +02:00
OlgunR
285f029311 Add BandGridBase<TItem> for reusable banded grid logic
Introduced an abstract base class BandGridBase<TItem> to centralize banded grid functionality in Blazor apps using DevExpress. This class manages band layouts, column definitions, user-specific layout persistence, grid size modes, and rendering logic. It integrates with BandLayoutService for layout storage and retrieval, and is intended for inheritance by specific grid components.
2026-04-14 16:10:14 +02:00
OlgunR
36ade1b26b Carousel - Home 2026-03-30 14:56:51 +02:00
OlgunR
d422d841ff Add zebra-striping to grid rows with theme support
Introduced --grid-stripe-bg CSS variable for both light and dark themes to enable zebra-striping in dxbl-grid components. Applied background color to even-numbered grid rows for improved readability.
2026-03-27 14:13:16 +01:00
OlgunR
ea1b2ea6e4 Update band editor label and move page size selector
Changed band editor toggle label to "Layout" in both CatalogsGrid.razor and MassDataGrid.razor. Relocated the page size selector in MassDataGrid.razor to appear after the band editor section for improved layout consistency.
2026-03-27 09:54:23 +01:00
OlgunR
6101561e72 Add collapsible band editor to grid components
Introduce a toggleable "Band-Layout konfigurieren" section in CatalogsGrid.razor and MassDataGrid.razor, allowing users to expand or collapse the band editor UI. Added bandEditorExpanded state to control visibility. Updated CSS to style the new toggle button and its expanded/collapsed states, improving usability and reducing UI clutter.
2026-03-27 09:46:15 +01:00
OlgunR
64fb76b9e6 Add theme variables for band editor background and border
Introduce CSS variables for band editor colors in light and dark themes. Update .band-editor to use these variables, enabling automatic adaptation to the active theme.
2026-03-27 09:11:56 +01:00
OlgunR
4ac8e94334 Refactor: centralize grid/editor CSS in app.css
Consolidate shared grid and band-editor styles from CatalogsGrid.razor.css and MassDataGrid.razor.css into app.css for improved maintainability and consistency. Only component-specific min-width rules remain in the respective files. Also includes minor formatting cleanups in app.css.
2026-03-25 17:15:55 +01:00
OlgunR
dc74d21426 Refactor: centralize grid band layout logic in service
Introduce BandLayoutService and shared models to manage grid band layouts across components. Refactor CatalogsGrid and MassDataGrid to use the new service, removing duplicated layout logic. Update _Imports.razor and register the service in Program.cs for improved maintainability and code reuse.
2026-03-25 17:04:19 +01:00
OlgunR
566c3b3276 Move dashboard styles to Dashboard.razor.css file
Separated CSS from Dashboard.razor by moving all dashboard-related styles into a new Dashboard.razor.css file. This improves maintainability and keeps styling concerns separate from markup and logic.
2026-03-25 13:34:52 +01:00
OlgunR
ac84866abe Extract inline styles to .razor.css files for grids
Moved CSS from inline <style> blocks in CatalogsGrid.razor and MassDataGrid.razor to dedicated CatalogsGrid.razor.css and MassDataGrid.razor.css files. This improves maintainability and keeps styling concerns separate from component logic. No changes to the actual styles were made.
2026-03-25 12:02:30 +01:00
OlgunR
d9ce4a5dca Move common usings to _Imports.razor for global access
Removed redundant using directives from CatalogsGrid.razor and MassDataGrid.razor. Added them to _Imports.razor to ensure global availability across components. Also added @using DbFirst.BlazorWebApp to _Imports.razor for consistency.
2026-03-25 10:49:51 +01:00
OlgunR
13617dde87 Remove duplicate DevExpress.Blazor package reference
Cleaned up the project file by removing a redundant <ItemGroup>
that contained a duplicate DevExpress.Blazor package reference.
Ensured that each package is referenced only once and that
Microsoft.AspNetCore.SignalR.Client remains in its own group.
2026-03-25 10:45:57 +01:00
OlgunR
789066a214 Replace HTML entities with Latin-1 bytes in UI strings
Replaced HTML-encoded German special characters with their Windows-1252 (Latin-1) encoded byte equivalents in user-facing strings in CatalogsGrid.razor and MassDataGrid.razor. Renamed and expanded the reset layout method for improved layout reset behavior. Updated button labels and info messages for consistency. These changes address encoding and rendering issues by shifting from HTML entities to direct byte encoding.
2026-02-23 09:13:12 +01:00
OlgunR
964d508630 Persist grid SizeMode in BandLayout for layout restore
Added SizeMode property to BandLayout in both CatalogsGrid.razor and MassDataGrid.razor. The grid's current SizeMode is now saved and restored with the layout, ensuring user preferences for grid sizing persist across sessions. This improves the consistency of the user experience when reloading or switching layouts.
2026-02-23 08:55:53 +01:00
OlgunR
c5ca9f0048 Add grid font size selector and fix German character display
Introduced font size adjustment for grids via dropdown toolbar and CSS variable. Added JavaScript for dynamic font size changes. Replaced German umlauts with HTML entities for proper rendering. Refactored grid code and improved error/info message display. Enhances accessibility and user experience.
2026-02-19 17:01:33 +01:00
OlgunR
e7aa41aa4d Add dark mode toggle with ThemeState service
Implement dark mode support using a new ThemeState service that manages theme switching and integrates with DevExpress Blazor theming. Update App.razor to apply the theme globally, enhance MainLayout with a toggle button and dynamic CSS classes, and add dark mode styles to CSS files. Register ThemeState as a scoped service in Program.cs.
2026-02-18 10:07:14 +01:00
OlgunR
9a4f189e4e Add row focusing support to CatalogsGrid and MassDataGrid
Enable row focusing in both grid components by introducing the focusedRowKey property and binding it to the grid. After create or update operations, set focusedRowKey to the affected item's key, ensuring the grid automatically focuses the relevant row. Improves user experience by highlighting newly created or updated items.
2026-02-17 12:40:37 +01:00
OlgunR
0e313b2e07 Remove custom grid sort/filter CSS from MassDataGrid
Deleted styles for custom sort icons, filter row layout, and search input in MassDataGrid. Retained only general layout and popup/editor styles, reverting to default grid visuals.
2026-02-10 13:36:08 +01:00
OlgunR
db232914a9 Switch grids to built-in filter menu, remove custom filters
Removed custom filter row templates and operator logic for date and number columns in CatalogsGrid.razor and MassDataGrid.razor. Grids now use DevExpress's built-in filter menu (FilterMenuButtonDisplayMode.Always), simplifying code and UI. All related filter fields and methods were deleted.
2026-02-10 13:32:21 +01:00
OlgunR
f49db97147 Remove DevExpress theme CSS links from App.razor
Removed references to fluent-light.bs5.min.css and bootstrap-external.bs5.min.css from App.razor. These DevExpress Blazor theme stylesheets are no longer included in the application. All other stylesheets remain unchanged.
2026-02-10 13:17:29 +01:00
OlgunR
0876ebe999 Update DevExpress Blazor to use Bootstrap 5 theme
Replaced Fluent theme CSS with Bootstrap 5 Fluent Light theme. Updated DevExpress Blazor service registration to explicitly use BootstrapVersion.v5 for consistent styling. Cleaned up and reordered CSS includes.
2026-02-10 09:54:39 +01:00
OlgunR
74504c583e Improve loading UX with spinner and wider filter fields
Replaced plain loading text with a centered Bootstrap spinner in CatalogsGrid and MassDataGrid. Introduced hasLoaded flag for more accurate loading state handling. Increased min-width of filter input fields for better usability. Added .loading-container CSS for consistent spinner placement.
2026-02-09 16:40:09 +01:00
OlgunR
8387b71676 Add operator selection to grid filter rows for dates/numbers
Introduce custom filter row cell templates for date and numeric columns in CatalogsGrid and MassDataGrid. Users can now select a filter operator (e.g., =, <, >, <=, >=) alongside the filter value for columns like AddedWhen, ChangedWhen, and Amount. Updated filter criteria logic to support these operators using DevExpress expressions. Added new CSS for filter row alignment and appearance. Removed obsolete methods and improved layout logic. This enhances filtering flexibility and user experience in both grids.
2026-02-09 16:10:16 +01:00
OlgunR
8824492057 Enable grouping features in DxGrid components
Added ShowGroupPanel, ShowGroupedColumns, and AllowGroup to DxGrid in CatalogsGrid.razor and MassDataGrid.razor for enhanced data grouping. Also set PagerVisible="false" in MassDataGrid.razor to hide pager controls.
2026-02-09 14:03:47 +01:00
OlgunR
59f22be405 Update nav menu with new custom SVG icons
Replaced icons for "Catalogs", "Dashboards", and "MassData" in NavMenu.razor with new custom Bootstrap-style SVG icons. Added corresponding CSS classes using data URIs to embed the new white icons, ensuring consistent appearance in the navigation menu.
2026-02-09 13:41:11 +01:00
OlgunR
23865aefb6 Remove Counter and Weather pages and nav links
Removed the Counter and Weather pages by deleting their component files. Also updated the navigation menu to remove links to these pages, leaving only Home and Catalogs. This simplifies the app's navigation and available features.
2026-02-09 13:22:04 +01:00
OlgunR
2a730ddfcc Refactor grid and band layout persistence logic
Unify band and grid layout saving into a single "Layout speichern" action and method. Store the full grid layout in BandLayout, and simplify column/band rendering logic. Apply saved layouts after render for consistency. Remove obsolete ordering logic and update messages for clarity. These changes improve robustness and maintainability of layout persistence in CatalogsGrid and MassDataGrid.
2026-02-09 11:36:56 +01:00
OlgunR
d78fd5e3d1 Add user-specific persistent grid/band layouts support
Implemented user-customizable, persistent grid and band layouts for CatalogsGrid and MassDataGrid. Added backend API, database entity, and repository for storing layouts per user. Refactored grids to support dynamic band/column rendering, layout management UI, and per-user storage via localStorage and the new API. Registered all necessary services and updated data context. Enables flexible, user-specific grid experiences with saved layouts.
2026-02-06 14:07:52 +01:00
OlgunR
52b2cf9a5b Add user-selectable page size to MassData grid
Users can now choose how many records to display per page in the MassData grid (100, 1,000, 10,000, 100,000, or all). The backend and API client are updated to support nullable skip/take parameters, allowing "all" records to be fetched when desired. The pager and page count calculations are updated to reflect the selected page size, and the pager is hidden if only one page exists. Additional UI and CSS changes provide a combo box for page size selection. The API controller now treats take <= 0 as "no limit."
2026-02-05 15:45:36 +01:00
OlgunR
006ee78422 Refactor MassDataGrid editing and validation logic
- Switch to custom edit model (MassDataEditModel) for popup editing, enabling granular field validation and UI control
- Replace default editors with explicit DxTextBox/DxCheckBox bindings
- Add AmountText field for string input and validation; validate and convert in OnEditModelSaving
- Implement duplicate customer check via new GetByCustomerNameAsync API method
- Show ValidationSummary in popup; manage validation state with ValidationMessageStore and EditContext
- Make popup header and width dynamic; show procedure ComboBox only for existing records
- Restore "New" button in grid command column
- Refactor CatalogsGrid to handle validation clearing in OnEditFieldChanged instead of OnTitleChanged
- General improvements to real-time validation feedback
2026-02-05 14:11:27 +01:00
OlgunR
a52d615750 Update grid popup headers and edit form logic
CatalogsGrid now sets popup edit form header dynamically ("Neu" for new, "Edit" for existing) and only shows the "Update-Prozedur" field when editing. Added IsNew property to CatalogEditModel. MassDataGrid sets popup header to "Bearbeiten". Also standardized DateChanged event handler style in both components.
2026-02-05 12:52:44 +01:00