Vaihe 1/4: asiakastyöt (numerointi, tagit, linkit, jäsenet, muutoshistoria)
- Uusi jobs-moduuli: asiakastyön kentät ilman rahakenttiä, juokseva vuosinumero VVVV-NNNN (laskuririvi lukitaan), tagit, linkit dialogissa, jäsenet ja muutoshistoria nimiarvoineen. - Tilojen oikeudet: lasku luotu / laskutettu johto tai työn laskuttaja, arkistointi vain johto; alihankkija näkee vain jäsenyystyönsä eikä muokkaa. - Lista ja haku (numero, nimi, asiakas), suodattimet, omat työt oletuksena, arkistoidut piilossa, myöhässä tekstinä ja kuvakkeena. - Asiakasvalitsin hakuineen ja pikalisäyksineen (myös pikavastaanottoa varten). - Asiakkaan sivulle asiakastyöt-osio; valikkoon Asiakastyöt. - Lukurajapinnat muihin moduuleihin: UserQueries.choices, CustomerQueries.summaries, CatalogQueries.service_units; jobs.*-oikeudet. - Import-linter-sopimukset, käännökset, testit (domain, application, integraatio, selain) sekä määrittelyn ja CLAUDE.md:n päivitys. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -9,12 +9,14 @@ Toiminnanohjaus is an ERP for a small (5–10 people) Finnish media and marketin
|
||||
- Stack: Django 5.2 LTS, Python 3.14, MariaDB 10.11 (XAMPP in development), HTMX, Alpine.js, Tailwind CSS 4 and daisyUI 5.
|
||||
- Language: code (identifiers, tables, columns, enum keys) is in English. Specs, UI texts, docs and commit messages are in Finnish.
|
||||
|
||||
**Current state:** phase 1 items 1–3 are done.
|
||||
**Current state:** phase 1 items 1–4 are done.
|
||||
- `shared` and `users`: custom user model, login, password links, user management.
|
||||
- `customers`: customers, contacts, billing units, the internal customer, and the encrypted personal identity code.
|
||||
- `catalog`: service units, services and work types (base data page `/catalog/`, permission `catalog.manage`), seeded by `catalog/migrations/0002_seed.py`. Rows are never deleted, only taken out of use; `CatalogQueries.work_type_options()` is the read API for tasks and time tracking.
|
||||
- `jobs`: customer jobs without money fields (`/jobs/`, permissions `jobs.view`/`jobs.edit`/`jobs.archive`/`jobs.invoice_status`): yearly numbering `VVVV-NNNN` (`job_number_sequences`, locked with `select_for_update`), tags, links (dialog on the job page), members, change history and the list ("my jobs" by default). Who may set which status is `jobs.domain.status_rules`. `CustomerJobQueries` is the read API for later modules. The customer picker (`jobs/partials/customer_picker.html`, search and quick add by name) is meant for the quick intake too.
|
||||
- **Cross-module wiring:** `jobs` reads customers, users and catalog through their application query protocols; only `apps/jobs/container.py` calls the other modules' containers (import-linter enforces it). Names shown in lists come from those queries in batches (`CustomerQueries.summaries`, `UserQueries.choices`, `CatalogQueries.service_units`), never from joins across modules. The customer page's job list is a jobs view loaded with `hx-get`, so customers does not depend on jobs.
|
||||
|
||||
`users` and `customers` are the reference implementations; copy their patterns for new modules. The other modules in `docs/architecture.md` are not built yet. Next in the spec is phase 1 item 4: customer jobs.
|
||||
`users` and `customers` are the reference implementations; copy their patterns for new modules. The other modules in `docs/architecture.md` are not built yet. Next in the spec is phase 1 item 5: quick intake (`/jobs/quick`).
|
||||
|
||||
## Source of truth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user