diff --git a/backend/app/routers/dewar.py b/backend/app/routers/dewar.py index 73b22c7..fde8521 100644 --- a/backend/app/routers/dewar.py +++ b/backend/app/routers/dewar.py @@ -330,35 +330,12 @@ async def get_dewar_samples(dewar_id: int, db: Session = Depends(get_db)): { "id": sample.id, "position": sample.position, - "dewar_name": dewar.dewar_name, # Add Dewar name here + "dewar_name": dewar.dewar_name, "sample_name": sample.sample_name, "priority": sample.priority, "comments": sample.comments, - # "directory":sample.directory, "proteinname": sample.proteinname, - # "oscillation": datacollection.oscillation, - # "aperture": 10, - # "exposure": 11, - # "totalrange": 12, - # "transmission": 13, - # "dose": 14, - # "targetresolution": 15, - # "datacollectiontype": 16, - # "processingpipeline": 17, - # "spacegroupnumber": 18, - # "cellparameters": 19, - # "rescutkey": 20, - # "rescutvalue": 21, - # "userresolution": 22, - # "pdbid": 23, - # "autoprocfull": 24, - # "procfull": 25, - # "adpenabled": 26, - # "noano": 27, - # "ffcscampaign": 28, - # "trustedhigh": 29, - # "autoprocextraparams": 30, - # "chiphiangles": 31, + **(sample.data_collection_parameters or {}), } for sample in samples ], diff --git a/frontend/src/components/SampleSpreadsheetGrid.tsx b/frontend/src/components/SampleSpreadsheetGrid.tsx index 38fa138..1b20277 100644 --- a/frontend/src/components/SampleSpreadsheetGrid.tsx +++ b/frontend/src/components/SampleSpreadsheetGrid.tsx @@ -37,21 +37,59 @@ const SampleSpreadsheet: React.FC = ({ dewarId }) => { proteinName: sample.proteinname, priority: sample.priority, comments: sample.comments, + directory: sample.directory, + oscillation: sample.oscillation, + aperture: sample.aperture, + exposure: sample.exposure, + totalRange: sample.totalrange, + transmission: sample.transmission, + dose: sample.dose, + targetResolution: sample.targetresolution, + datacollectiontype: sample.datacollectiontype, + processingpipeline: sample.processingpipeline, + spacegroupnumber: sample.spacegroupnumber, + cellparameters: sample.cellparameters, + rescutkey: sample.rescutkey, + //rescutvalues: sample.rescutvalues, + pdbid: sample.pdbid, + autoprocfull: sample.autoprocfull, + procfull: sample.procfull, + adpenabled: sample.adpenabled, + noano: sample.noano, + ffcscampaign: sample.ffcscampaign, }); }); }); setRows(allRows); - // Define table columns if not already set setColumns([ - { field: "dewarName", headerName: "Dewar Name", width: 150, editable: false }, // Display Dewar Name + { field: "dewarName", headerName: "Dewar Name", width: 150, editable: false }, { field: "puckName", headerName: "Puck Name", width: 150 }, { field: "puckType", headerName: "Puck Type", width: 150 }, { field: "crystalName", headerName: "Crystal Name", width: 200, editable: true }, { field: "proteinName", headerName: "Protein Name", width: 200, editable: true }, - { field: "position", headerName: "Position", width: 100, editable: true , type: "number"}, + { field: "position", headerName: "Position", width: 100, editable: true, type: "number" }, { field: "priority", headerName: "Priority", width: 100, editable: true, type: "number" }, { field: "comments", headerName: "Comments", width: 300, editable: true }, + { field: "directory", headerName: "Directory", width: 200 }, + { field: "oscillation", headerName: "Oscillation", width: 150, editable: true, type: "number" }, + { field: "aperture", headerName: "Aperture", width: 150, editable: true, type: "number" }, + { field: "exposure", headerName: "Exposure", width: 150, editable: true, type: "number" }, + { field: "totalRange", headerName: "Total Range", width: 150, editable: true, type: "number" }, + { field: "transmission", headerName: "Transmission", width: 150, editable: true, type: "number" }, + { field: "dose", headerName: "Dose", width: 150, editable: true, type: "number" }, + { field: "targetResolution", headerName: "Target Resolution", width: 200, editable: true, type: "number" }, + { field: "datacollectiontype", headerName: "Data Collection Type", width: 200 }, + { field: "processingpipeline", headerName: "Processing Pipeline", width: 200 }, + { field: "spacegroupnumber", headerName: "Space Group Number", width: 150, type: "number" }, + { field: "cellparameters", headerName: "Cell Parameters", width: 200 }, + { field: "rescutkey", headerName: "Rescut Key", width: 150 }, + { field: "pdbid", headerName: "PDB ID", width: 150 }, + { field: "autoprocfull", headerName: "Auto Proc Full", width: 150 }, + { field: "procfull", headerName: "Proc Full", width: 150 }, + { field: "adpenabled", headerName: "ADP Enabled", width: 150, editable: true, type: "boolean" }, + { field: "noano", headerName: "No Ano", width: 150, editable: true, type: "boolean" }, + { field: "ffcscampaign", headerName: "FFCS Campaign", width: 200 }, ]); } catch (error) { console.error("Error fetching dewar samples:", error); diff --git a/pyproject.toml b/pyproject.toml index f300e91..3d11122 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "aareDB" -version = "0.1.0a9" +version = "0.1.0a10" description = "Backend for next gen sample management system" authors = [{name = "Guillaume Gotthard", email = "guillaume.gotthard@psi.ch"}] license = {text = "MIT"}