From c945e4993de27c40b0e81131b4a368a87d613940 Mon Sep 17 00:00:00 2001 From: david-i-berry Date: Thu, 14 Sep 2023 17:49:39 +0200 Subject: [PATCH] ingest from OSCAR --- webapp/public/code_lists/territory.json | 3 +- .../src/components/FacilityTypeSelector.vue | 2 +- webapp/src/components/ImportOSCAR.vue | 143 ++++++++ .../components/OperatingStatusSelector.vue | 2 +- webapp/src/components/StationEditor.vue | 325 ++++++++++++------ webapp/src/components/StationTable.vue | 27 +- webapp/src/components/TerritorySelector.vue | 2 +- webapp/src/components/WMORegionSelector.vue | 2 +- webapp/src/layouts/default/AppBar.vue | 5 +- webapp/src/router/index.js | 6 + webapp/src/views/ImportOSCAR.vue | 7 + 11 files changed, 398 insertions(+), 126 deletions(-) create mode 100644 webapp/src/components/ImportOSCAR.vue create mode 100644 webapp/src/views/ImportOSCAR.vue diff --git a/webapp/public/code_lists/territory.json b/webapp/public/code_lists/territory.json index 89f0bef..de9f472 100644 --- a/webapp/public/code_lists/territory.json +++ b/webapp/public/code_lists/territory.json @@ -3,5 +3,6 @@ {"name": "Congo", "id": "Congo", "description": "Congo"}, {"name": "Italy", "id": "Italy", "description": "Italy"}, {"name": "Malawi", "id": "Malawi", "description": "Malawi"}, - {"name": "Romania", "id": "Romania", "description": "Romania"} + {"name": "Romania", "id": "Romania", "description": "Romania"}, + {"name": "Germany", "id": "Germany", "description": "Germany"} ] \ No newline at end of file diff --git a/webapp/src/components/FacilityTypeSelector.vue b/webapp/src/components/FacilityTypeSelector.vue index 30efd47..0ab36b6 100644 --- a/webapp/src/components/FacilityTypeSelector.vue +++ b/webapp/src/components/FacilityTypeSelector.vue @@ -55,7 +55,7 @@ onBeforeMount( async () => { await fetchOptions() ; // update if we have an initial value - if( props.modelValue.length ){ + if( props.modelValue && props.modelValue.length ){ selected.value = options.value.find(option => option.id === props.modelValue) ; } }); diff --git a/webapp/src/components/ImportOSCAR.vue b/webapp/src/components/ImportOSCAR.vue new file mode 100644 index 0000000..e3aae5e --- /dev/null +++ b/webapp/src/components/ImportOSCAR.vue @@ -0,0 +1,143 @@ + + diff --git a/webapp/src/components/OperatingStatusSelector.vue b/webapp/src/components/OperatingStatusSelector.vue index 666a945..1b25b37 100644 --- a/webapp/src/components/OperatingStatusSelector.vue +++ b/webapp/src/components/OperatingStatusSelector.vue @@ -56,7 +56,7 @@ onBeforeMount( async () => { await fetchOptions() ; // update if we have an initial value - if( props.modelValue.length ){ + if( props.modelValue && props.modelValue.length ){ selected.value = options.value.find(option => option.id === props.modelValue) ; } }); diff --git a/webapp/src/components/StationEditor.vue b/webapp/src/components/StationEditor.vue index 5979d73..e9d8dec 100644 --- a/webapp/src/components/StationEditor.vue +++ b/webapp/src/components/StationEditor.vue @@ -11,109 +11,118 @@ {{ route.params.id ? 'Edit' : 'Create new' }} station View station - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - Get elevation + label="Station elevation above sea level (metres)" + v-model="station.geometry.elevation" + :rules="[rules.validElevation]" + :readonly="readonly" + type="number" + hint="Station elevation above sea level (metres)" persistent-hint/> + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - Register/Update - Cancel - - - Edit - + + + + + + + + + + + + + + + + + + + + Register/Update + Cancel + + + Edit + +