Skip to content

fix!: fix workflow (EN-368)

Elias Hawa requested to merge fix/fix-workflow into dev

Summary

This PR introduces many new changes to the overall workflow. Specifically when an application's status is updated to "Active Client", a client is made in response. In addition to this, some changes were made to some models to reduce code duplication and to reflect a more realistic system of information.

All information stored in the client model now relates only to the client; the date they were signed, associated application, officer, and current contract.

All information stored in the contract model only pertains to the contract, separate from the client, i.e: payment information. (Perhaps guarantor info should be moved to the client as well(?)).

Changes

  • Remove application and officer references from the contract model (Initially, these fields were included for the creation of PDF contracts. Now the required information is obtained from the contracts associated client)
  • Add client reference to the contract model
  • Remove loan amount from client model (Again, this change was made in an effort to make things more realistic)
  • Add application, officer, and client querying for contracts
  • Update application patch route to create a client when the status is changed to "Active Client"
  • Adjust tests and routes accordingly

Merge request reports