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.
50 lines
2.6 KiB
HTML
50 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block main %}
|
|
<div class="pagehead">
|
|
<h1>{% if former %}Former clients{% else %}Clients{% endif %}</h1>
|
|
<div class="actions"><a class="btn pri" href="/clients/new" id="new-client">+ New client</a></div>
|
|
</div>
|
|
<p class="meta">People and organizations, Thai or foreign, whom Lanna Desk advises or acts for: artists, labels, festivals, companies and private clients. Each has a lawyer in charge and their contracts.</p>
|
|
{% if cards or n_former %}
|
|
<div class="toolbar">
|
|
{% if cards %}<input type="search" id="q" class="filter" placeholder="Filter by name, stage name or email ( / )" aria-label="Filter the list" autocomplete="off">{% endif %}
|
|
{% if former %}<a href="/clients">Back to the current clients</a>{% elif n_former %}<a href="/clients?former=1">Former clients ({{ n_former }})</a>{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if cards %}
|
|
<ul class="rcards" id="client-cards">
|
|
{% for c in cards %}
|
|
<li class="rcard" data-q="{{ c.q }}">
|
|
<a class="rc-head" href="/clients/{{ c.id }}">
|
|
<span class="rc-mono{% if c.kind == "organization" %} org{% endif %}" aria-hidden="true">{{ c.initials }}</span>
|
|
<span class="rc-who">
|
|
<span class="rc-name">{{ c.name }}</span>
|
|
<span class="rc-sub">{% if c.known_as %}<span>“{{ c.known_as }}”</span> · {% endif %}<span>{% if c.kind == "organization" %}Organization{% else %}{{ c.nationality or "Person" }}{% endif %}</span></span>
|
|
</span>
|
|
{% if c.open %}<span class="chip ok">{{ c.open }} open</span>{% endif %}
|
|
</a>
|
|
{% if c.name_th %}<p class="rc-th">{{ c.name_th }}</p>{% endif %}
|
|
<div class="rc-label">Contracts</div>
|
|
<dl class="rc-dates">
|
|
<div><dt>In all</dt><dd>{{ c.contracts }}</dd></div>
|
|
{% if c.artist %}<div><dt>Artist contracts</dt><dd>{{ c.artist }}</dd></div>{% endif %}
|
|
<div><dt>Last entry in the journal</dt><dd>{% if c.last %}{{ c.last }}{% else %}<span class="muted">none</span>{% endif %}</dd></div>
|
|
</dl>
|
|
<div class="rc-foot">
|
|
<span>{% if c.lawyer %}Lawyer: {{ c.lawyer }}{% else %}<span class="muted">No lawyer in charge</span>{% endif %}</span>
|
|
{% if c.email %}<a href="mailto:{{ c.email }}">{{ c.email }}</a>{% elif c.phone %}<span>{{ c.phone }}</span>{% endif %}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<p class="filter-empty card" data-filter-empty hidden>No client matches the filter.</p>
|
|
{% elif former %}
|
|
<div class="card"><p class="empty-inline">No former clients.</p></div>
|
|
{% else %}
|
|
<div class="card">
|
|
<h2>No clients yet</h2>
|
|
<p>Add a person or an organization with <b>+ New client</b>, then their contracts on the client's page.</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|