Merged
Conversation
…elds not necessary for create
There was a problem hiding this comment.
Pull request overview
This PR addresses several Import Book / Import Clearance Instruction issues, including date filtering accuracy, fixing post-create behaviour, improving supplier display names, and adding support for clearance comments end-to-end.
Changes:
- Add
ClearanceCommentssupport across domain, persistence, facade/resources, UI, and the clearance instruction view. - Adjust Import Book date search filtering to use inclusive date bounds.
- Fix Import Book create flow to reload/navigate correctly after creation, and adjust EF mappings that were impacting reporting/imports.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Domain.LinnApps.Tests/ImportClearanceInstructionTests/WhenAddingRsnImportBookForRepair.cs | Extends coverage to assert NiceSupplierName behaviour. |
| tests/Unit/Domain.LinnApps.Tests/ImportClearanceInstructionTests/WhenAddingComments.cs | Adds unit coverage for splitting/propagating clearance comments into instructions. |
| tests/TestData/TestData/Suppliers/TestSuppliers.cs | Updates supplier test data to support order address-based “nice” names and removes CountryCode usage. |
| src/Service.Host/views/ImportClearanceInstruction.cshtml | Renders supplier “nice” name and displays comments section when present. |
| src/Service.Host/client/src/components/imports/SearchParams.js | Adjusts query serialization for date filtering. |
| src/Service.Host/client/src/components/imports/MainTab.js | Hides calculated fields during creation via new creating prop. |
| src/Service.Host/client/src/components/imports/ImportBookUtility.js | Fixes post-create navigation/reload, adds Comments tab, and avoids setting state during render. |
| src/Service.Host/client/src/components/imports/CreateTab.js | Prevents showing “Add” for import types where it doesn’t apply. |
| src/Service.Host/client/src/components/imports/CommentsTab.js | Adds UI for editing comments and clearanceComments. |
| src/Resources/Imports/ImportBookResource.cs | Adds ClearanceComments to API resource. |
| src/Persistence.LinnApps/ServiceDbContext.cs | Updates EF mappings (Supplier address/country FK, ImportBook clearance comments, relationship cardinalities). |
| src/Persistence.LinnApps/Repositories/ImportBookRepository.cs | Updates includes to load supplier order address/country. |
| src/Facade/Services/ImportBookFacadeService.cs | Persists Comments and ClearanceComments updates from resources. |
| src/Facade/ResourceBuilders/ImportBookResourceBuilder.cs | Builds SupplierCountry using Supplier.Country.CountryCode and exposes clearance comments. |
| src/Facade/Extensions/ImportBookSearchResourceExtensions.cs | Makes date filters inclusive of whole days and simplifies from/to logic. |
| src/Domain.LinnApps/Supplier.cs | Adds OrderAddress and computed NiceSupplierName. |
| src/Domain.LinnApps/Imports/Models/ImportUpdate.cs | Adds Comments and ClearanceComments to update model. |
| src/Domain.LinnApps/Imports/Models/ImportClearanceInstruction.cs | Adds instruction comments support sourced from Import Book clearance comments. |
| src/Domain.LinnApps/Imports/ImportReportService.cs | Switches sender country display to use Supplier.Country.CountryCode. |
| src/Domain.LinnApps/Imports/ImportBook.cs | Adds ClearanceComments and updates Update() to apply both comment fields. |
richardiphillips
approved these changes
Apr 16, 2026
Contributor
richardiphillips
left a comment
There was a problem hiding this comment.
couple of Pipeline / build-and-test warnings
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.
fix some sophie spots