- 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]>
54 lines
1.2 KiB
Python
54 lines
1.2 KiB
Python
from enum import StrEnum
|
|
|
|
|
|
class JobKind(StrEnum):
|
|
"""Duration / kind of a customer job (specification 5.2)."""
|
|
|
|
SERVICE = "service"
|
|
ONE_OFF = "one_off"
|
|
FIXED_TERM = "fixed_term"
|
|
ONGOING = "ongoing"
|
|
|
|
|
|
class JobStatus(StrEnum):
|
|
"""Status of a customer job; the order is the Kanban column order (specification 5.3)."""
|
|
|
|
PROSPECT = "prospect"
|
|
TENTATIVE = "tentative"
|
|
QUOTE_REQUEST = "quote_request"
|
|
ORDER = "order"
|
|
IN_PRODUCTION = "in_production"
|
|
ON_HOLD = "on_hold"
|
|
DONE = "done"
|
|
INVOICED = "invoiced"
|
|
BILLED = "billed"
|
|
ARCHIVED = "archived"
|
|
|
|
@property
|
|
def is_finished(self) -> bool:
|
|
"""Done or later: such a job is no longer late."""
|
|
return self in _FINISHED
|
|
|
|
|
|
_FINISHED = frozenset({JobStatus.DONE, JobStatus.INVOICED, JobStatus.BILLED, JobStatus.ARCHIVED})
|
|
|
|
|
|
class Priority(StrEnum):
|
|
"""Specification 5.4. Always shown as text too, never by colour alone."""
|
|
|
|
WAITING = "waiting"
|
|
NORMAL = "normal"
|
|
FIRST = "first"
|
|
URGENT = "urgent"
|
|
IMMEDIATE = "immediate"
|
|
|
|
|
|
class PaymentBasis(StrEnum):
|
|
"""Specification 5.5."""
|
|
|
|
PRICE_LIST = "price_list"
|
|
FIXED_QUOTE = "fixed_quote"
|
|
MONTHLY_FEE = "monthly_fee"
|
|
HOURLY = "hourly"
|
|
NOT_BILLABLE = "not_billable"
|