Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic

Snapshot of the working tree on srv1071960 (branch main), taken during
server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
Shubhankar45
2026-11-07 05:43:12 +00:00
parent b001e2d03c
commit 0d30c58bf0
98 changed files with 1878 additions and 573 deletions
+24 -4
View File
@@ -52,6 +52,13 @@ class ChemistCallCreate(BaseModel):
remarks: str | None = Field(default=None, max_length=2000)
class StockistCallCreate(BaseModel):
stockist_id: uuid.UUID
visit_time: time
pob: str | None = Field(default=None, max_length=100)
remarks: str | None = Field(default=None, max_length=2000)
class DoctorCallRead(BaseModel):
model_config = ConfigDict(from_attributes=True)
@@ -80,10 +87,21 @@ class ChemistCallRead(BaseModel):
remarks: str | None
class StockistCallRead(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: uuid.UUID
stockist_id: uuid.UUID
stockist_name: str
visit_time: time
pob: str | None
remarks: str | None
class DCRCreate(BaseModel):
report_date: date
report_type: ReportType = ReportType.ACTUAL
#: SELF reports only: which of the Area Manager's headquarters the visits were in.
#: SELF reports only: which of the Area Business Manager's headquarters the visits were in.
headquarters_id: uuid.UUID | None = None
mr_remarks: str | None = Field(default=None, max_length=2000)
doctor_calls: list[DoctorCallCreate] = Field(default_factory=list)
@@ -97,10 +115,11 @@ class DCRUpdate(BaseModel):
class MissedVisitSet(BaseModel):
"""Why one planned doctor OR chemist was not visited (end-of-day report only)."""
"""Why one planned doctor, chemist OR stockist was not visited (end-of-day report only)."""
doctor_id: uuid.UUID | None = None
chemist_id: uuid.UUID | None = None
stockist_id: uuid.UUID | None = None
reason: str = Field(min_length=3, max_length=500)
@@ -111,7 +130,7 @@ class PlannedVisitRead(BaseModel):
PENDING — neither yet (the report cannot be submitted while any remain).
"""
kind: Literal["DOCTOR", "CHEMIST"]
kind: Literal["DOCTOR", "CHEMIST", "STOCKIST"]
target_id: uuid.UUID
name: str
is_core_doctor: bool
@@ -176,6 +195,7 @@ class DCRRead(BaseModel):
approved_at: datetime | None
doctor_calls: list[DoctorCallRead]
chemist_calls: list[ChemistCallRead]
stockist_calls: list[StockistCallRead]
#: End-of-day report only: the approved plan, line by line, with what became of it.
planned_visits: list[PlannedVisitRead]
@@ -184,6 +204,6 @@ class StatusCounts(BaseModel):
"""Header counts on the list screens — the cheap replacement for dashboards."""
DRAFT: int = 0
PENDING_AM: int = 0
PENDING_ABM: int = 0
RETURNED: int = 0
APPROVED: int = 0