Phase 11, step 1: the parties of a contract and the conflict check
A contract's other side was one line of text. Now each other party is a row with its names in English and Thai, an ID, passport or registration number and its role (migration 0010; the old line became the first party). Parties are never deleted or rewritten: taking one off marks it removed, and both are in the journal. The conflict check (src/conflicts.rs) looks for the name or number among the clients, the other parties, the visa people and the employers. Names match regardless of case, word order, punctuation and company words in English and Thai (Co., Ltd., บริษัท ... จำกัด), or when every word of the shorter name, at least two, is in the longer one. A new party that is a client, a visa client or an employer is a conflict; a new or renamed client that was on the other side of a contract is one too; a client's name or number again is perhaps the same client. Those stop the save (409) until a lawyer ticks that they looked, with what they checked; the matches and the note go into the journal entry. /conflicts runs the check alone before a first meeting and saves nothing. Tests: 119 unit, 63 integration.
This commit is contained in:
1 parent
f7fb2c7af4
commit
9ae4d7bd07
16 files changed
+1464
-25
No files matched your search
@@ -431,6 +431,12 @@ pub fn router(st: Arc<AppState>) -> Router {
|
||||
)
|
||||
.route("/contracts/{id}/versions/{n}/file", get(l::version_file))
|
||||
.route("/contracts/{id}/papers", post(l::add_paper))
|
||||
.route("/contracts/{id}/parties", post(l::add_party))
|
||||
.route(
|
||||
"/contracts/{id}/parties/{pid}/remove",
|
||||
post(l::remove_party),
|
||||
)
|
||||
.route("/conflicts", get(l::conflicts_page))
|
||||
.route("/papers", get(l::find_paper))
|
||||
.route("/papers/{code}", get(l::paper_by_code))
|
||||
.route("/papers/{pid}/move", post(l::move_paper))
|
||||
|
||||
Reference in new issue
Block a user