- 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]>
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
from collections.abc import Sequence
|
|
from typing import Protocol
|
|
|
|
from apps.jobs.domain.entities import ChangeRecord, CustomerJob, JobLink
|
|
from apps.jobs.domain.value_objects import JobNumber
|
|
|
|
|
|
class CustomerJobRepository(Protocol):
|
|
def get(self, job_id: int) -> CustomerJob | None: ...
|
|
|
|
def save(self, job: CustomerJob) -> CustomerJob:
|
|
"""Insert or update, service units, members and tags included. New tag names
|
|
are added to the shared tag list."""
|
|
...
|
|
|
|
def next_number(self, year: int) -> JobNumber:
|
|
"""Reserve the next number of the year. Locks the year's counter, so call it
|
|
inside the use case's transaction; concurrent saves never share a number."""
|
|
...
|
|
|
|
def record_changes(
|
|
self, job_id: int, user_id: int, changes: Sequence[ChangeRecord]
|
|
) -> None: ...
|
|
|
|
|
|
class JobLinkRepository(Protocol):
|
|
def get(self, link_id: int) -> JobLink | None: ...
|
|
|
|
def save(self, link: JobLink) -> JobLink: ...
|
|
|
|
def delete(self, link_id: int) -> None: ...
|