184 Commits

Author SHA1 Message Date
7e82f688ad Remove ToList() method from PObjectState class
The `ToList()` method in the `PObjectState` class has been removed. This method previously returned a list of strings, including the `IntlState` property of `State1` and other state properties (`State2`, `State3`, `State4`). Its removal indicates that this functionality is no longer needed or has been refactored.
2025-08-01 13:47:50 +02:00
c325b2122b Add PObjectStateHist class for state history tracking
Introduces the `PObjectStateHist` class in the `WorkFlow.Domain.Entities` namespace, mapped to the `TBMWF_PROFILE_OBJ_STATE_HISTORY` table. The class includes properties with data annotations for validation and schema mapping, addressing nullable fields treated as required in application logic. A `ToList()` method is added to return state-related strings, enhancing functionality.
2025-08-01 13:47:22 +02:00
63adb51263 Refactor ButtonDto and ReadButtonRequest
Removed unused MediatR directive, added required ProfileId
property, and removed DialogNo from ButtonDto. Updated
ReadButtonRequest to inherit from IRequest<ButtonDto>
for MediatR integration.
2025-08-01 13:27:06 +02:00
363606dc61 Refactor DTOs and mappings for improved structure
- Removed `Id`, `Headlines`, and `States` from `ObjectDto`; added `State` property of type `ObjectStateDto?`.
- Completely removed `ProfileControlsTFDto` and `StateDto` classes.
- Removed `Id` from `ProfileDto`, keeping `TypeId` unchanged.
- Updated `MappingProfile` to remove mappings for `ProfileControlsTFDto` and `StateDto`, and changed mapping for `PControlsTF` to `PControlsTFDto`.
- Introduced new `ObjectStateDto` class with properties for `Intl`, `Others`, and a collection of `TFControls`.
- Added new `PControlsTFDto` class with various control attributes.
2025-08-01 13:19:10 +02:00
bc192e99a7 Refactor ObjectDto and update PObjectState relationships
Removed ObjStateId and Id from ObjectDto for simplification.
Updated foreign key in PObjectState from ObjStateId to StateId,
and modified TFControls to support nullable collections.
Adjusted WFDBContext configuration for clearer foreign key
relationships and improved maintainability of the database schema.
2025-08-01 12:53:56 +02:00
69d417616d Refactor repository structure in WorkFlow.Infrastructure
Removed ProfileObjRepository and migrated its functionality to PObjectRepository. Updated DependencyInjection.cs to register the new repository for dependency injection, improving clarity and organization while maintaining existing functionality.
2025-08-01 12:04:06 +02:00
a3cbe69fd6 Refactor data model: rename entities and update mappings
This commit includes a significant refactoring of the data model, renaming `ProfileObject` to `PObject` and `ProfileControlsTF` to `PControlsTF`.

Key changes:
- Updated `IProfileObjRepository` to reflect new entity names.
- Added `TFControls` property to `ObjectDto`.
- Adjusted `MappingProfile` for new entity mappings.
- Replaced `ProfileControlsTF` and `ProfileObjState` with `PControlsTF` and `PObjectState`.
- Updated `WFDBContext` with new DbSet properties for the renamed entities.
- Modified `ProfileObjRepository` to align with the new data structure.

These changes enhance clarity and maintainability across the application.
2025-08-01 12:02:34 +02:00
c2e8b335e0 Refactor ProfileControlsTFDto and update ProfileControlsTF
The `ProfileControlsTFDto` class has been changed from a record type to a class with auto-implemented properties, enhancing its structure and usability. Several properties have been renamed or removed, and new properties like `DialogNo`, `Text`, and `Icon` have been added.

In the `ProfileControlsTF` class, the `Sequ` property has been updated to remove its default value assignment, maintaining its nullable byte type.
2025-08-01 11:10:24 +02:00
7ed86f18d7 Refactor ProfileControlsTF and ProfileObjState relationships
Updated property names and foreign key references in
ProfileControlsTF and ProfileObjState classes to improve
database relationship integrity. Added TFControls collection
to ProfileObjState and modified queries in ProfileObjRepository
to include related entities. Established relationships in
WFDBContext with cascade delete behavior.
2025-08-01 10:54:08 +02:00
2fd64cb616 Fix null reference issue in ReadAsync method
Updated the inclusion of the `States` property in the
`ReadAsync` method of `ProfileObjRepository` to check
for null values before accessing `State1`. This change
prevents potential null reference exceptions.
2025-08-01 10:07:30 +02:00
b89a69b0f3 Remove ProfileObjStateDto and update mappings
- Deleted the `ProfileObjStateDto` class and its `States` property.
- Removed mapping for `ProfileObjState` to `ProfileObjStateDto` in `MappingProfile`.
- Updated `States` mapping to handle null values by converting to a list or returning an empty array.
- Replaced `States` property in `ProfileObjState` with a `ToList()` method that aggregates state values.
2025-08-01 09:41:16 +02:00
bb29b1563a Refactor DTOs and MappingProfile for consistency
Standardized namespaces for DTO classes and redefined several records to include necessary properties. Removed mapping configurations from MappingProfile, indicating a potential refactor. Introduced ProfileObjStateDto with a States property and ensured ProfileControlsTFDto and StateDto are properly encapsulated.
2025-08-01 02:53:52 +02:00
ad023b01d3 Enhance state management in DTOs and entities
- Added `States` property to `ProfileObjStateDto` and `ObjectDto`.
- Updated `MappingProfile` to include new `States` mapping.
- Made `StateId` in `ProfileObjState` required and added `State1` navigation property.
- Changed `ProfileObject` to use `States` instead of `State`.
- Cleaned up `State` class structure and removed redundant namespaces.
- Updated `ProfileObjRepository` to fetch related state data.
2025-08-01 02:50:19 +02:00
7309b968fe Refactor ProfileObjState and ProfileObject relationships
Removed the State property from ProfileObjState and added
ChangedWho and ChangedWhen properties. Updated ProfileObject
to reference ProfileObjState instead of State. Modified
ProfileObjRepository to include the new State property
when querying ProfileObject instances.
2025-08-01 02:21:48 +02:00
1159f3f575 Update ProfileObjState class and DI registration 2025-08-01 02:13:44 +02:00
8f2261f0fa Refactor ProfileObjState properties and add documentation
- Changed properties from `init` to `set` for mutability.
- Updated `ProfileId`, `UserId`, `ObjId`, and `StateId` to nullable types.
- Added XML documentation for clarity on property usage.
- Reduced maximum length of `State2`, `State3`, and `State4` to 100 characters.
- Modified `AddedWho` to nullable with default value "SYS".
- Changed `AddedWhen` to nullable with default value of `DateTime.Now`.
- Introduced `ChangedWho` and `ChangedWhen` properties for tracking changes.
- Updated navigation properties to reflect new accessors.
2025-08-01 02:11:49 +02:00
c779dd4a47 Refactor ReadProfileHandler and add Buttons property
Updated `ReadProfileHandler` to assign buttons directly to the `profile` object before mapping to `ProfileDto`. This ensures the `Buttons` property is populated correctly. Added a new `[NotMapped]` property `Buttons` of type `IEnumerable<Button>?` to the `Profile` class to hold associated buttons.
2025-08-01 01:58:15 +02:00
709ebea097 Refactor profile handling and error management
- Updated `ProfileController` to always return `Ok(profile)` instead of `NotFound()`.
- Changed `ReadProfileQuery` to return a non-nullable `ProfileDto`, throwing `NotFoundException` if not found.
- Modified `ReadProfileHandler` to handle the new return type and throw exceptions appropriately.
- Adjusted `ReadProfileAsync` to align with the new non-nullable return type.
- Added dependency on `DigitalData.Core.Exceptions` for improved error handling.
2025-08-01 01:41:21 +02:00
63df235943 feat(ExceptionHandlingMiddleware): Add to handle exceptions by middleware 2025-07-30 17:16:10 +02:00
78f2788388 feat(API): add global exception handler 2025-07-30 15:55:19 +02:00
13acf6de08 refactor: remove legacy services and controllers 2025-07-30 15:39:30 +02:00
5466b35b95 feat(Repositories.DependencyInjection): add config, controlTf, state and button repositories with auto-mapper configurations. 2025-07-30 15:00:05 +02:00
d0e306b7e4 chore: update core libs 2025-07-30 14:31:30 +02:00
4fcc0a08b8 refactor(ObjectDto): Verschieben in das Verzeichnis Dto.
- Profil-Dienst entfernen
2025-07-30 13:32:56 +02:00
904536bd09 refactor(Profil): dto in den Ordner DTO verschieben.
- Ordner DTO in Dto umbenennen
2025-07-30 13:21:18 +02:00
6c0f39e3ed refactor(domain): Aktualisieren Sie die Entität „ProfileControlsTF“, damit sie dem neuen Schema entspricht
- Die Implementierung von IUnique<int> und zugehörige Navigationseigenschaften wurden entfernt
- Der Primärschlüsseltyp wurde von int zu long geändert
- Die Spaltentypen und -namen wurden aktualisiert, um sie an das Datenbankschema anzupassen
- Erforderliche Eigenschaften wurden in nullbare Typen mit Validierung auf Anwendungsebene konvertiert
- XML-Kommentare wurden hinzugefügt, um Designentscheidungen hinsichtlich der Nullbarkeit zu verdeutlichen
2025-07-30 11:01:29 +02:00
8ceaa9cb21 feat(ReadObject): created to handle objects.
- Add ObjectDto and mapping profile
2025-07-29 22:19:48 +02:00
27e4b4b2ef feat(ReadProfile): add logic to read buttons 2025-07-29 22:09:11 +02:00
82eb03b420 refactor(ReadProfile): update to read buttons 2025-07-29 21:49:21 +02:00
559127a931 feat(ReadButton): add dto and handler 2025-07-29 21:41:54 +02:00
Developer 02
87857862e4 feat(Button): create repositry 2025-07-29 19:55:20 +02:00
8655f78c8c feat(Button): add entity for TBMWF_PROF_BUTTONS table 2025-07-29 18:23:21 +02:00
168a4b0791 feat: add ReadProfileAsync extension method for IMediator 2025-07-25 17:50:38 +02:00
dd4cd1b39e feat(ReadProfile): Unterstützung für das bedingte Laden von Profilobjekten hinzugefügt
- Flag „IncludeObject” in ReadProfile-Anfrage eingeführt
- IProfileObjRepository in ReadProfileHandler eingefügt
- Handler aktualisiert, um Profilobjekte zu laden, wenn IncludeObject wahr ist
2025-07-25 17:42:58 +02:00
8eb8801c41 feat(DI): add method to inject IProfileObjRepository 2025-07-25 17:07:40 +02:00
eb7ed81cac feat(IProfileObjRepository): Schnittstelle von ProfileObjRepository erstellen und in ProfileObjRepository implementieren 2025-07-25 17:04:58 +02:00
b7c6477ec2 feat(repo): Hinzufügen von ProfileObjRepository zum Abrufen von Profilobjekten über eine SQL-Funktion 2025-07-25 17:01:11 +02:00
b7f9efa9b6 feat: füge Spaltenattribute zur Klasse ProfileObject hinzu 2025-07-25 16:48:29 +02:00
bf5566cefc Laden Sie umgebungsspezifische App-Einstellungsdateien mit Ausnahme von „Development“
- Listet die Dateien „appsettings.*.json“ im Stammverzeichnis des Inhalts auf
- Schließt „appsettings.Development.json“ vom Laden aus
- Fügt die verbleibenden JSON-Dateien zur Konfiguration hinzu
2025-07-25 16:26:05 +02:00
f8e51e02a0 refactor: disable api key 2025-07-25 15:30:37 +02:00
ad1fd3163e Refactoring (Controller): Aktualisierung zur Verwendung der aktuellen Version von TryGetUserId 2025-07-25 10:44:12 +02:00
bed5fae01c Refactoring: Vereinfachung der TryGetUserId-Methode und Umstellung des Erweiterungsziels auf ClaimsPrincipal
- TryGetUserId wurde so geändert, dass es direkt die Methode expression-bodied mit int.TryParse verwendet.
- Die Erweiterungsmethoden wurden aktualisiert, sodass sie nun statt auf ControllerBase auf ClaimsPrincipal abzielen, um eine bessere Abstraktion und Wiederverwendbarkeit zu erreichen.
- Andere Methoden wurden aus Gründen der Konsistenz unverändert gelassen.
2025-07-24 18:09:59 +02:00
a378862791 refactor(ProfileController): Aktualisierung, um JWT zum Abrufen der Benutzer-ID anstelle der Abfragezeichenfolge zu verwenden 2025-07-24 17:53:31 +02:00
dd2dbee037 update Auth.Client 2025-07-24 17:35:13 +02:00
b24f518bba fix(Profil): Typ von TypeId byte festgelegt 2025-07-24 16:46:16 +02:00
dd5babfdbe inject MediatRLicense 2025-07-24 15:41:29 +02:00
dc7da91872 feat(di): register MediatR with service collection 2025-07-24 14:09:20 +02:00
fe358623da feat(ProfileController): Hinzufügen von ProfileController mit GET-Endpunkt unter Verwendung von MediatR
- Implementiert die Aktion `GetAsync` zum Abrufen von Profildaten über MediatR
- Fügt die Attribute `[Authorize]` und `[APIKeyAuth]` für den gesicherten Zugriff hinzu
- Protokolliert Ausnahmen und gibt entsprechende HTTP-Statuscodes zurück
2025-07-24 13:41:44 +02:00
c08c5aacf3 feat: Lesevorgang für Benutzerprofil mittels MediatR und Repository implementiert
- ReadProfile-Request eingeführt, um Benutzerprofil anhand der UserId abzurufen
- ReadProfileHandler hinzugefügt, der das Profil aus dem IProfileRepository liest
- Asynchrone Verarbeitung mit Unterstützung für CancellationToken integriert
2025-07-24 13:22:12 +02:00
14f5c73d43 feat(profile): implement ReadProfile query with MediatR
Added ReadProfile query and its handler using MediatR pattern to retrieve user profile by user ID via IProfileRepository.
2025-07-24 11:40:20 +02:00