Conversation
* Add Brand domain model with events and exception handling Introduced the `Brand` class in the `FSH.Starter.WebApi.Catalog.Domain` namespace, inheriting from `AuditableEntity` and implementing `IAggregateRoot`. Added properties for `Name` and `Description`, and methods for creating and updating brand instances. Queued domain events `BrandCreated` and `BrandUpdated` during these operations. Added `BrandCreated` and `BrandUpdated` classes in the `FSH.Starter.WebApi.Catalog.Domain.Events` namespace, both inheriting from `DomainEvent` and including a property for the `Brand` instance. Added `BrandNotFoundException` class in the `FSH.Starter.WebApi.Catalog.Domain.Exceptions` namespace, inheriting from `NotFoundException` to handle cases where a brand with a specified ID is not found. * Add brand management commands and handlers Added commands and handlers for brand management: - CreateBrandCommand, CreateBrandCommandValidator, CreateBrandHandler, and CreateBrandResponse for creating brands. - DeleteBrandCommand and DeleteBrandHandler for deleting brands. - BrandCreatedEventHandler for handling brand creation events. - BrandResponse and GetBrandHandler for retrieving brand details. - GetBrandRequest for brand retrieval requests. - SearchBrandSpecs, SearchBrandsCommand, and SearchBrandsHandler for searching brands with pagination. - UpdateBrandCommand, UpdateBrandCommandValidator, UpdateBrandHandler, and UpdateBrandResponse for updating brand details. * Add brand-related endpoints in API version 1 Introduce new endpoints for brand operations in the FSH.Starter.WebApi.Catalog.Infrastructure.Endpoints.v1 namespace. Endpoints include CreateBrand, DeleteBrand, GetBrand, SearchBrands, and UpdateBrand, each secured with specific permissions and mapped to appropriate routes. Handlers use MediatR for request handling and response production. * Add BrandConfiguration for EF Core in Catalog project Introduce BrandConfiguration class to configure the Brand entity for Entity Framework Core. This includes enabling multi-tenancy, setting the primary key, and specifying maximum lengths for the Name (100 characters) and Description (1000 characters) properties. * Add permissions for managing Brands in FshPermissions The changes introduce new permissions related to the "Brands" resource in the `FshPermissions` class. Specifically, the following permissions are added: - View Brands (with `IsBasic` set to true) - Search Brands (with `IsBasic` set to true) - Create Brands - Update Brands - Delete Brands - Export Brands The "View Brands" and "Search Brands" permissions are marked as basic, indicating they might be available to users with basic access rights. * Refactor product handling to include brand details - Modified GetProductHandler to use specification pattern - Added GetProductSpecs for flexible product querying - Updated ProductResponse to include BrandResponse - Enhanced SearchProductSpecs to include brand details - Updated Product class to establish brand relationship - Modified Create and Update methods to accept brandId * Add brand management endpoints and services Introduce new endpoints in CatalogModule for brand creation, retrieval, listing, updating, and deletion. Register scoped services for Brand in RegisterCatalogServices method. Add DbSet<Brand> property in CatalogDbContext for managing Brand entities. * Add BrandId property to product commands and handlers - Updated CreateProductCommand and UpdateProductCommand to include BrandId with a default value of null. - Modified CreateProductHandler and UpdateProductHandler to pass BrandId when creating or updating a product. - Added BrandId filter condition in SearchProductSpecs. - Updated CatalogDbInitializer to include BrandId when seeding the database. * Add Brands table and update Catalog schema Removed old migration and added new migration to create Brands table alongside Products table. Updated Designer and DbContext snapshot to reflect new schema. Updated project file to include new Catalog folder. * Add cancellation tokens, brand methods, and update runtime Enhanced ApiClient with cancellation tokens and new brand methods. Updated serialization to use JsonSerializerSettings. Upgraded NJsonSchema and NSwag to 14.1.0.0. Changed runtime in nswag.json from WinX64 to Net80. * Add Brands management feature with navigation and CRUD Introduced a new "Brands" section in the application: - Added a navigation link for "Brands" in `NavMenu.razor`. - Implemented permission checks for viewing Brands in `NavMenu.razor.cs`. - Created `Brands.razor` page with route `/catalog/brands`. - Set up `EntityTable` component for managing brands. - Added `Brands` class and dependency injection in `Brands.razor.cs`. - Defined `BrandViewModel` for CRUD operations in `Brands.razor.cs`. * Add brand selection to Products component Added a `MudSelect` component in `Products.razor` for brand selection, bound to `context.BrandId` and populated with a list of brands. Introduced a private `_brands` field in `Products.razor.cs` to store the list of brands. Modified `OnInitialized` to `OnInitializedAsync` and added `LoadBrandsAsync` to fetch brands from the server. Updated `EntityServerTableContext` initialization to include the brand name field. * Add brand filter dropdown to advanced search Added a dropdown (`MudSelect`) for selecting a brand in the advanced search section of the `Products.razor` file, allowing users to filter products by brand with an "All Brands" option. Updated the search function in `Products.razor.cs` to include the selected brand ID (`SearchBrandId`). Changed the type of `SearchBrandId` from `Guid` to `Guid?` to support the nullable brand ID for the "All Brands" option. * Remove Catalog folder reference from PostgreSQL.csproj The `ItemGroup` containing the `<Folder Include="Catalog\" />` line was removed from the `PostgreSQL.csproj` file. This change eliminates the folder reference to `Catalog` from the project file.
Replaced JwtRegisteredClaimNames with ClaimTypes for NameIdentifier, Email, and Name in the GetClaims method. Added a new claim for ClaimTypes.MobilePhone to include the user's phone number.
Updated `AuditableEntity` and `ISoftDeletable` to include `Deleted` and `DeletedBy` properties for soft deletion tracking. Modified `FshDbContext` to apply a global query filter for `ISoftDeletable` entities, ensuring deleted entities are excluded from queries. Enhanced `AuditInterceptor` to handle soft deletions, including setting `Deleted` and `DeletedBy` properties and updating entity states. Added `AppendGlobalQueryFilter` extension method to facilitate the application of global query filters to entities implementing specific interfaces. Co-authored-by: Mukesh Murugan <31455818+iammukeshm@users.noreply.github.com>
* update nuget and deps to 9.0 * update infra * update to .net 9 * update docs * fix issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.