Files
visa/templates/legal_client.html
T
grabowski ff716eb9d3
CI / secret scan (push) Successful in 8s
CI / fmt, clippy, tests (push) Successful in 1m23s
CI / release (push) Skipped
Originals in our care (phase 12, step 1)
What clients hand Lanna Desk for a while (a passport for an extension, a
signed contract, a title deed) gets a code and a label (OR-2026-0001), and
a record of where it is: held at a place in the office, out with someone
such as Chiang Mai Immigration until a date, or returned.

- Migration 0013: table originals, owned by a client or a person; the
  database refuses a delete and a change of what it is, whose it is and
  how it came.
- Every intake and move is a journal entry starting with the code; the
  item's page reads its history from there. The audit log has the new
  entity "original", with a view when a person's original is shown.
- Pages: Legal, Originals (in our care, out, held, returned, all; a find
  box for a typed or scanned code), the item's page with the move form,
  intake from a client's or a person's page, and the label with a QR code
  to the item's page. Cards on the client's and the person's pages.
- A field can show only for some choices of a selection
  (data-shown-when), so the move form asks "Where it lies", "With whom"
  or "Returned to" as fits.
- Demo data: a passport out at Immigration, a title deed and a house
  registration held, a company certificate returned.
- PLAN: phase 12, with step 2 (the inbox that files a pile of scans) and
  step 3 planned.
2026-11-23 14:06:50 +07:00

44 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% import "_contract_rows.html" as cr %}
{% import "_journal.html" as jn %}
{% import "_originals.html" as og %}
{% block main %}
<div class="phead">
<div class="crumbs"><a href="/clients">Clients</a></div>
<div class="pagehead">
<div class="titled">
<span class="rc-mono big{% if kind == "organization" %} org{% endif %}" aria-hidden="true">{{ initials }}</span>
<div>
<h1>{{ name }}</h1>
<p class="meta">{% if name_th %}{{ name_th }}{% endif %}{% if known_as %}{% if name_th %}<span class="sep">·</span>{% endif %}known as “{{ known_as }}”{% endif %}{% if former %} <span class="chip plain">former client</span>{% endif %}</p>
</div>
</div>
<div class="actions">
<a class="btn sm" href="/clients/{{ id }}/edit" id="edit-client">Edit</a>
<a class="btn sm pri" href="/contracts/new?client={{ id }}" id="new-contract">+ New contract</a>
</div>
</div>
</div>
<h2 class="sechead first">Contracts</h2>
{% if contracts %}
{{ cr.table(contracts, with_client=false) }}
{% else %}
<div class="card"><p class="empty-inline">No contracts yet. <a href="/contracts/new?client={{ id }}">Add the first</a>.</p></div>
{% endif %}
<div class="cols">
<section class="card" id="details">
<header><h2>Details</h2></header>
<dl class="kv">
{% for it in shown.items %}
<dt>{{ it.label }}</dt><dd class="{% if it.pre %}pre{% endif %}{% if it.mono %} mono{% endif %}">{% if it.href %}<a href="{{ it.href }}">{{ it.value }}</a>{% else %}{{ it.value }}{% endif %}</dd>
{% endfor %}
</dl>
</section>
<section class="card" id="client-journal">
<header><h2>Journal</h2><a class="small" href="/journal?client={{ id }}">All entries</a></header>
{% if entries %}{{ jn.list(entries, links=true) }}{% else %}<p class="empty-inline">Nothing yet.</p>{% endif %}
</section>
</div>
{{ og.card(originals, "/originals/new?client=" ~ id) }}
{% endblock %}