From c1a64649362eaf1184250ca0b899246a2360ab8d Mon Sep 17 00:00:00 2001 From: Florian Spreckelsen <f.spreckelsen@indiscale.com> Date: Fri, 7 Feb 2025 11:19:39 +0100 Subject: [PATCH] ENH: Use correct datamodel in sample registration --- .../src/ext/js/ext_samplemanagement.js | 59 +++++-------------- .../bin/sample_helpers/default_constants.yml | 8 ++- 2 files changed, 21 insertions(+), 46 deletions(-) diff --git a/sample-management-custom/caosdb-server/caosdb-webui/src/ext/js/ext_samplemanagement.js b/sample-management-custom/caosdb-server/caosdb-webui/src/ext/js/ext_samplemanagement.js index e55c823..92a854e 100644 --- a/sample-management-custom/caosdb-server/caosdb-webui/src/ext/js/ext_samplemanagement.js +++ b/sample-management-custom/caosdb-server/caosdb-webui/src/ext/js/ext_samplemanagement.js @@ -41,69 +41,40 @@ const ext_samplemanagement = function($, navbar, log, form_elements, form_panel, "Main User", "Latitude start", "Longitude start", - "Elevation start", - "Collection", - "PI", + "Elevation start", "Storage ID", - "Nagoya case number", - "Sample container", - "Fixation", - "StorageTemperature", - "SampleType", - "SampleTypeSpecific", - "Sphere", - "Sample Context", + "Device" ]; const requiredColumnNamesChildren = [ "LinkAhead ID", - "Date sampled start", - "Fixation", "Main User", "Parent LinkAhead ID", - "Sample Context", - "Sample container", "SampleType", - "SampleTypeSpecific", - "Sphere", "Storage ID", - "StorageTemperature", ]; const non_sample_rt_column_names = [ - "Platform", + "Biome", "Campaign", - "Station ID", - "Station number", - "Subevent", - "Hol", - "Sampling depth start", - "Sampling depth stop", - "Water depth start", - "Water depth stop", + "Start date", + "End date", + "IGSN DOI", + "Level", + "Locality description", + "Locality name", + "Sphere", + "Event responsible", "Latitude stop", "Longitude stop", - "Elevation stop", - "Taxonomic group/Species", - "AphiaID", - "On-board sampleID", - "Extraction ID", - "Duplicate number", - "Other fixations", - "Notes / remarks", - "Forlmaldehyde_box", - "OSIS URL", - "Ecotaxa URL", + "Elevation stop", "PDFReport", - "Parent LinkAhead ID" - ] + "Parent LinkAhead ID", + ]; const allColumnNames = non_sample_rt_column_names.concat(requiredColumnNamesChildren).concat(required_column_names); const unused_property_names = [ - 'Container', - 'Event', "Main User", 'NagoyaCase', - "Parent Sample", - "Person", + "Parent_Sample", ] const upload_sample_template_form_config = { diff --git a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml index 303c414..033a05e 100644 --- a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml +++ b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml @@ -18,6 +18,9 @@ csv_column_names: entity_id: "LinkAhead ID" custom_label_prop: "Custom Label" + start_date_prop: "Date start" + end_date_prop: "Date stop" + igsn_doi_prop: "IGSN DOI" csv_column_descriptions: LinkAhead ID: "An ID generated by LinkAhead (either integer or URL to this entity). Do not change this column!" @@ -27,8 +30,8 @@ csv_column_descriptions: Container size: "The size of the container (e.g 81 spaces)" Container type: "The type of container. Do not change this column." Custom label: "Any additional custom label you put on the container" - Date collected start: "The start date in format YYYY-MM-DD" - Date collected stop: "The end date in format YYYY-MM-DD" + Date start: "The start date or datetime in ISO format" + Date stop: "The end date or datetime in ISO format" Gear configuration: "How gear is configured, meshsize of the net, filter pore size, what kind of trawl" Latitude start: "Latitude where sampling started; in decimal degrees,use \".\" as decimal sign, use - for S" Latitude stop: "Latitude where sampling ended; in decimal degrees,use \".\" as decimal sign, use - for S" @@ -61,6 +64,7 @@ entity_names: last_name_prop: last_name start_date_prop: start_date end_date_prop: end_date + igsn_doi_prop: igsn_doi error_prefix: "Something went wrong:" error_suffix: "Please contact your administrator(s)." -- GitLab