FoxUSA/StoreDown

Allow input of ID for new item

AshenColors opened this issue · 3 comments

once I got couchdb working, I've been having a real good time trying to get myself set up with the basics. Thank you for making the promise of random storage and PWAs finally come true.

Something I noticed with my workflow is that it's easier to pregenerate QR code labels with UUIDs and apply them to items, since my access to a label printer can be intermittent. I can set disabled: false, of course, but this runs the risk of accidentally duplicating an item with an unintentional ID edit. I'd like to allow manual input of IDs for new items only, but I don't think this is currently possible to do with the config (although I could be wrong about this, my webdev skills are nonexistent).

edit: bonus shot of the label design I'm using
PXL_20220516_141142123 MP~2

I do apparently kinda let you do this out of the box. If you open your config you can set the disabled: false as you mention. CouchDB will not let you specify the same id but it doesn't tell you. If you try it in the demo you will see it does nothing on the second save with the same id. It displays an error in the console(Silently otherwise). I may or may not fix this depending on how hard it is.

The other suggestion I have is to just put it in the code field. That is where I put barcodes, serial numbers, and QR codes. It doesn't need to be unique.

I'm not a web dev or Vue person, but I've been putting it off long enough, so I dived into the docs and gave my own implementation a shot. I'm planning to add special barcode handling to the ID field later to show the short form of the UUID and make the barcode's contents more compact/efficient than the string representation, so the special type serves that purpose as well. It's not tested yet as I'm still getting to terms with the tooling, but I'm working on it.

It would help if I actually linked the branch: https://github.com/AshenColors/StoreDown/tree/mostlyDisabled