feat: add status notes to force delete notifications

- Add notes parameter to force delete interactions to provide more context
- Include company registry status in force delete notifications
- Add status mapping constants for better readability
- Move status note assignment before save in force delete process

Technical details:
- Add notes field to Domains::ForceDelete::Base interaction
- Update force delete notifications to include status notes
- Add REGISTRY_STATUSES mapping in CompanyRegisterStatusJob
- Update tests to verify new notification format
This commit is contained in:
oleghasjanov 2025-01-08 14:50:47 +02:00
parent 45c77f7052
commit 2ec545b3aa
7 changed files with 22 additions and 9 deletions

View file

@ -4,6 +4,7 @@ module Domains
def execute
domain.force_delete_type = type
type == :fast_track ? force_delete_fast_track : force_delete_soft
domain.status_notes[DomainStatus::FORCE_DELETE] = "Company no: #{domain.registrant.ident}" if reason == 'invalid_company'
domain.save(validate: false)
end
@ -12,8 +13,6 @@ module Domains
expire_warning_period_days +
redemption_grace_period_days
domain.force_delete_start = Time.zone.today + 1.day
domain.status_notes[DomainStatus::FORCE_DELETE] = "Company no: #{domain.registrant.ident}" if reason == 'invalid_company'
end
def force_delete_soft