Lanna Desk's larger work is contracts, general ones and artists', for clients who are Thai or foreign, people or organizations, with several lawyers in the team. The back office gets a Legal section (phase 9 in docs/PLAN.md): - Lawyers: license number, contact, the login of one who uses the app (then "My contracts"), in the team or left. - Clients, as record cards: person or organization, names in English and Thai, stage name or brand, a Thai ID number (checked), a passport or a registration number, the lawyer in charge. - Contracts: code LD-<year>-<n>, the general kinds and the artist kinds (recording, management, publishing, performance, license, merchandise), other party, status, lawyer, dates and value; a contract in force shows its notice day and its end ahead. Filters: general or artists, a lawyer, mine, those over. - Versions: a text kept here, a file (PDF or scan, encrypted as the client's document) or both. They never change: the database refuses UPDATE and DELETE, a version's file cannot be deleted and no document's checksum can change. Any version reads against the one before as a line diff. - Paper copies: the id <code>-P<n> to write on the paper or print as a 90 x 50 mm label with a QR code; where it lies, its state and holder, each move journaled; found again by its id. - The journal: every change in words, in the change's transaction, each entry chained to the one before by SHA-256. The database refuses to change, delete or truncate it; /journal checks the chain and every version's text and fingerprints against its entry, shows the last hash and exports CSV. The sidebar groups its sections: Legal, Visas and stays, Office. Demo data (seed-demo) adds three lawyers, six clients and seven contracts with versions, papers and moves. Documents take a third owner, the client (migration 0009). Checks: fmt, clippy, 115 unit and 62 integration tests (new: versions and the journal, the database refusing changes, a change around the app breaking the chain, paper ids and moves, the demo checking whole); screenshots of the new pages in light, dark and on a phone.
58 lines
2.9 KiB
HTML
58 lines
2.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="robots" content="noindex,nofollow">
|
|
<title>{{ title }} · Lanna Desk</title>
|
|
<script src="/static/theme-init.js?v={{ v }}"></script>
|
|
<link rel="icon" href="/static/favicon.svg?v={{ v }}" type="image/svg+xml">
|
|
<link rel="stylesheet" href="/static/fonts.css?v={{ v }}">
|
|
<link rel="stylesheet" href="/static/app.css?v={{ v }}">
|
|
<script src="/static/app.js?v={{ v }}" defer></script>
|
|
</head>
|
|
<body>
|
|
<header class="top">
|
|
<a class="brand" href="/desk" aria-label="Lanna Desk, the deadlines">
|
|
{% include "_mark.html" %}
|
|
<span class="nm">Lanna Desk</span><span class="sub">Back office</span>
|
|
</a>
|
|
<button type="button" class="ib" id="themeBtn" aria-label="Switch between light and dark" title="Switch between light and dark">◐</button>
|
|
</header>
|
|
<div class="app">
|
|
<aside class="side">
|
|
<nav class="nav" aria-label="Sections">
|
|
<span class="navh">Legal</span>
|
|
<a href="/clients"{% if nav == "clients" %} class="on" aria-current="page"{% endif %}>Clients</a>
|
|
<a href="/contracts"{% if nav == "contracts" %} class="on" aria-current="page"{% endif %}>Contracts</a>
|
|
<a href="/lawyers"{% if nav == "lawyers" %} class="on" aria-current="page"{% endif %}>Lawyers</a>
|
|
<a href="/journal"{% if nav == "journal" %} class="on" aria-current="page"{% endif %}>Journal</a>
|
|
<span class="navh">Visas and stays</span>
|
|
<a href="/desk"{% if nav == "deadlines" %} class="on" aria-current="page"{% endif %}>Deadlines</a>
|
|
<a href="/people"{% if nav == "people" %} class="on" aria-current="page"{% endif %}>People</a>
|
|
<a href="/companies"{% if nav == "companies" %} class="on" aria-current="page"{% endif %}>Companies</a>
|
|
<a href="/agreements"{% if nav == "agreements" %} class="on" aria-current="page"{% endif %}>Agreements</a>
|
|
<span class="navh">Office</span>
|
|
<a href="/activity"{% if nav == "activity" %} class="on" aria-current="page"{% endif %}>Activity</a>
|
|
</nav>
|
|
<div class="who">
|
|
{% if user.local %}
|
|
<span class="k">Local development</span>
|
|
<b>No login</b>
|
|
<p>VISA_INSECURE_NO_LOGIN is set; this only runs on a loopback address.</p>
|
|
{% else %}
|
|
<span class="k">Signed in as</span>
|
|
<b>{{ user.name }}</b>
|
|
<p>{{ user.login }} at id.cnx.network</p>
|
|
<form method="post" action="/logout" class="inline-form"><input type="hidden" name="csrf" value="{{ csrf }}"><button type="submit" class="btn sm ghost">Sign out</button></form>
|
|
{% endif %}
|
|
</div>
|
|
</aside>
|
|
<main id="main">
|
|
{% block main %}{% endblock %}
|
|
<footer class="ft">Lanna Desk {{ version }}{% if commit %}, commit {% if commit_url %}<a href="{{ commit_url }}">{{ commit }}</a>{% else %}{{ commit }}{% endif %}{% endif %}. Every view and change of a person's record is written to the Activity log. Dates are in Chiang Mai time.</footer>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|