diff --git a/package.json b/package.json index 7d2f580..e56065b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ARCitect", - "version": "v0.0.20", + "version": "v0.0.21", "private": true, "engines": { "node": ">=v16.13", @@ -26,7 +26,7 @@ "dependencies": { "@fslab/fsspreadsheet": "latest", "@imengyu/vue3-context-menu": "latest", - "@nfdi4plants/arctrl": "1.0.0-beta.7", + "@nfdi4plants/arctrl": "1.0.0-beta.8", "@nfdi4plants/exceljs": "0.2.0", "@quasar/extras": "1.15.3", "chokidar": "3.5.1", diff --git a/packages/renderer/src/Property.ts b/packages/renderer/src/Property.ts index 515d45f..8ab713c 100644 --- a/packages/renderer/src/Property.ts +++ b/packages/renderer/src/Property.ts @@ -22,7 +22,7 @@ const autoType = property => { :'text'; }; -const Property = (model,property,config)=>{ +const Property = (model: any,property: string, config?: any)=>{ // console.log(property, model[property]); config = config || {}; if(config.type==='ontology' && !model[property]) diff --git a/packages/renderer/src/components/InvestigationForm.vue b/packages/renderer/src/components/InvestigationForm.vue index 8de15d8..9f8cd55 100644 --- a/packages/renderer/src/components/InvestigationForm.vue +++ b/packages/renderer/src/components/InvestigationForm.vue @@ -13,7 +13,7 @@ export interface Props { }; const props = defineProps(); -const iProps = reactive({ +const iProps : {form: any [] []} = reactive({ form: [[]] }); diff --git a/packages/renderer/src/views/ArcTreeView.vue b/packages/renderer/src/views/ArcTreeView.vue index 9495346..909bc83 100644 --- a/packages/renderer/src/views/ArcTreeView.vue +++ b/packages/renderer/src/views/ArcTreeView.vue @@ -9,7 +9,7 @@ import AddProtocolDialog from '../dialogs/AddProtocolDialog.vue'; import NewAssayDialog from '../dialogs/NewAssayDialog.vue'; import { NewAssayInformation } from '../dialogs/NewAssayDialog.vue'; import { useQuasar } from 'quasar' -import {ArcStudy, ArcAssay} from '@nfdi4plants/arctrl/ISA/ISA/ArcTypes/ArcTypes.js'; +import {ARC, ArcStudy, ArcAssay} from '@nfdi4plants/arctrl'; import NewStudyDialog from '../dialogs/NewStudyDialog.vue'; const Markdown = 'markdown'; @@ -187,7 +187,6 @@ const readDir_ = async (path: string) => { return n.isDirectory && [Studies, Assays].includes(p); }; - function createAddNode (label: string, handler: ((n:any) => Promise) ) { const node = { type: formatNodeAddString(label), @@ -220,10 +219,19 @@ const readDir_ = async (path: string) => { } }; + // Here check loose assays/studies ~ WIP, Kevin + // function checkVacantStudies() { + // const arc : ARC = ArcControlService.props.arc + // console.log("HIT") + // if (!arc) return; + // console.log(arc.ISA.RegisteredStudyIdentifiers) + // } + if(needsAddElement(parent)) { switch (parent) { case Studies: let addStudyNode = createAddNode("Add Study", addStudy); + // checkVacantStudies() nodes.push(addStudyNode); break; case Assays: @@ -333,13 +341,13 @@ const updatePath = async path => { debounceReadARC(); if (!arcTree.value) return; - const n = arcTree._value.getNodeByKey(path); + const n = arcTree.value.getNodeByKey(path); if(!n) return; - const isExpanded = arcTree._value.isExpanded(path); + const isExpanded = arcTree.value.isExpanded(path); delete n.children; if(isExpanded) - arcTree._value.setExpanded(path,true); + arcTree.value.setExpanded(path,true); }; const formatSize = size => {