Skip to content

Refactor: centralize merchant UI logic in MerchantUIService#748

Merged
StuartFerguson merged 2 commits intomainfrom
task/#738_contract_ui_service
Feb 6, 2026
Merged

Refactor: centralize merchant UI logic in MerchantUIService#748
StuartFerguson merged 2 commits intomainfrom
task/#738_contract_ui_service

Conversation

@StuartFerguson
Copy link
Copy Markdown
Member

Replaced direct IMediator usage in Blazor merchant components with a new MerchantUIService, encapsulating all merchant operations (CRUD, operator/contract/device management, deposits). Moved all merchant-related models into MerchantModels.cs and updated all usages. Registered MerchantUIService in DI and updated tests to mock it. Added comprehensive unit tests for MerchantUIService. Updated ModelFactory and reporting components to use new models. Added GetContractsForDropDown to IContractUIService. Cleaned up component code and preserved all validation logic. This refactor improves testability and decouples UI from backend model details.

closes #740

Replaced direct IMediator usage in Blazor merchant components with a new MerchantUIService, encapsulating all merchant operations (CRUD, operator/contract/device management, deposits). Moved all merchant-related models into MerchantModels.cs and updated all usages. Registered MerchantUIService in DI and updated tests to mock it. Added comprehensive unit tests for MerchantUIService. Updated ModelFactory and reporting components to use new models. Added GetContractsForDropDown to IContractUIService. Cleaned up component code and preserved all validation logic. This refactor improves testability and decouples UI from backend model details.
@StuartFerguson StuartFerguson merged commit 45a2579 into main Feb 6, 2026
9 of 10 checks passed
@github-actions github-actions Bot deleted the task/#738_contract_ui_service branch April 8, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merchant UI Service

1 participant