Refactor dewar and sample handling; improve grid data binding
Updated Dewar and Sample schemas, added nested relationships, and adjusted API responses for better data handling. Simplified puck normalization, enhanced data grid logic in the frontend, and implemented a PUT endpoint for updating samples. Incremented backend version to 0.1.0a15 and added new HTTP request example.
This commit is contained in:
@ -423,7 +423,10 @@ class Sample(BaseModel):
|
||||
priority: Optional[int] = None
|
||||
comments: Optional[str] = None
|
||||
data_collection_parameters: Optional[DataCollectionParameters]
|
||||
events: List[SampleEventCreate] = []
|
||||
events: List[SampleEventResponse] = []
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class SampleCreate(BaseModel):
|
||||
@ -501,6 +504,9 @@ class DewarBase(BaseModel):
|
||||
return_address_id: Optional[int]
|
||||
pucks: List[PuckCreate] = []
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class DewarCreate(DewarBase):
|
||||
pass
|
||||
@ -612,6 +618,18 @@ class SlotSchema(BaseModel):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class SampleUpdate(BaseModel):
|
||||
sample_name: Optional[str]
|
||||
proteinname: Optional[str]
|
||||
priority: Optional[int]
|
||||
position: Optional[int]
|
||||
comments: Optional[str]
|
||||
data_collection_parameters: Optional[DataCollectionParameters]
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class SetTellPosition(BaseModel):
|
||||
puck_name: str
|
||||
segment: Optional[str] = Field(
|
||||
|
Reference in New Issue
Block a user