biobricks / bionet-2

The bionet web app
3 stars 2 forks source link

Adding to root of inventory gives error #103

Closed Juul closed 7 years ago

Juul commented 7 years ago

When adding to the root of the inventory system in the local inventory you just get an error.

bionet.js:185311 Uncaught TypeError: $(...).modal is not a function
Juul commented 7 years ago

This error was encountered on endylab.stanford.edu but I just tried it locally and it worked. Lower priority since it can be solved by a complete re-install an database rebuild.

autonomous1 commented 7 years ago

I saw this same error and commented out the code in src/ui/bottom-notify.tag.html that uses .modal to get the app up and running at endylab. This issue seems specific to the deployment at endylab. It is possibly due to a missing file that is not part of a node module or bionet.js

Juul commented 7 years ago

Alright I am now getting a different error: When I add something in inventory view and I don't have anything selected (didn't click anything in the inventory tree) then I get this error:

index.js:115 createStorageItem error: Error: No container specified
autonomous1 commented 7 years ago

I will get to this in a bit. I updated savePhysical in db.js to skip the no container specified check if the physical type is lab. If nothing is selected in the tree and the add menu is clicked everything should be greyed out except for lab. In the meantime, I think it would be better to fix other items first since this issue has been around for a while.

Juul commented 7 years ago

This one is pretty important.

autonomous1 commented 7 years ago

I added the following change to libs/db.js to fix this issue:

/* skipping test for container altogether
if(!m.parent_id&&m.type!=='lab') {
  return cb(new Error("No container specified"));
}
*/