Update loan status with validation of status transitions
ADMIN, SUPERVISOR (Branch Manager role)
Note: CREDIT_OFFICER role cannot change loan status.
DRAFT - Loan is being draftedPENDING_APPROVAL - Awaiting approvalAPPROVED - Approved (ready for disbursement, processing fee marked as collected)ACTIVE - Currently active and being repaidCOMPLETED - Fully repaid and closedDEFAULTED - In default statusWRITTEN_OFF - Written offCANCELED - Canceled loanPENDING_APPROVAL - Submit for approvalAPPROVED - Direct approval (typically by ADMIN)CANCELED - Cancel the draftAPPROVED - Approve the loanCANCELED - Reject/cancel the loanACTIVE - Disburse the loan (use the separate /disburse endpoint instead)CANCELED - Cancel before disbursementCOMPLETED - Mark as fully repaidDEFAULTED - Mark as in defaultWRITTEN_OFF - Write off the loanACTIVE - Restore to active statusWRITTEN_OFF - Write off the defaulted loanPENDING_APPROVAL - Resubmit for approvalprocessingFeeCollected is automatically set to trueclosedAt timestamp is automatically set to current date/time