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:
@@ -18,6 +18,10 @@ class CatalogQueries(Protocol):
|
||||
"""Active service units in order, the shared unit included (``is_shared``)."""
|
||||
...
|
||||
|
||||
def service_units(self, ids: Iterable[int]) -> Sequence[ServiceUnitSummary]:
|
||||
"""The given service units in order, also inactive ones (for showing stored rows)."""
|
||||
...
|
||||
|
||||
def work_type_options(self, service_unit_ids: Iterable[int]) -> Sequence[WorkTypeOption]:
|
||||
"""Selectable work types of the given units plus those of the shared unit."""
|
||||
...
|
||||
|
||||
@@ -85,6 +85,12 @@ class DjangoCatalogQueries:
|
||||
for u in ServiceUnitModel.objects.filter(is_active=True)
|
||||
]
|
||||
|
||||
def service_units(self, ids: Iterable[int]) -> Sequence[ServiceUnitSummary]:
|
||||
return [
|
||||
ServiceUnitSummary(id=u.pk, name=u.name, is_shared=u.is_shared)
|
||||
for u in ServiceUnitModel.objects.filter(pk__in=list(ids))
|
||||
]
|
||||
|
||||
def work_type_options(self, service_unit_ids: Iterable[int]) -> Sequence[WorkTypeOption]:
|
||||
qs = (
|
||||
WorkTypeModel.objects.filter(_SELECTABLE)
|
||||
|
||||
Reference in New Issue
Block a user