Skip to content

Commit

Permalink
Start working on vacant study/assay display ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Nov 23, 2023
1 parent 0fd3c79 commit bca126d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ARCitect",
"version": "v0.0.20",
"version": "v0.0.21",
"private": true,
"engines": {
"node": ">=v16.13",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/Property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/src/components/InvestigationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface Props {
};
const props = defineProps<Props>();
const iProps = reactive({
const iProps : {form: any [] []} = reactive({
form: [[]]
});
Expand Down
18 changes: 13 additions & 5 deletions packages/renderer/src/views/ArcTreeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -187,7 +187,6 @@ const readDir_ = async (path: string) => {
return n.isDirectory && [Studies, Assays].includes(p);
};
function createAddNode (label: string, handler: ((n:any) => Promise<void>) ) {
const node = {
type: formatNodeAddString(label),
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit bca126d

Please sign in to comment.