Clean up BarcodeItems
resource in main area (non-admin)
#593
Labels
CRITICAL
This issue rolled a natural 20 and needs to be addressed with high priority
In Progress
refactor
Milestone
After discussing this extensively at the conference, here's the current Barcoding paradigm that I think we're going to use going forward:
Global Barcode Items
BarcodeItem
for whichbarcode_item.global? == true
CanonicalItem
records (via the:barcodeable
polymorphic association)CanonicalItem
may have multiple globalBarcodeItem
s pointing to it ("Huggies 4T, 30ct", "Pampers 4T 30ct" and "Luvs 4T 30ct" would all point to the "4T" `)"Local" Barcode items
BarcodeItem
for whichbarcode_item.global? == false
Item
records (via the:barcodeable
polymorphic association)Item
can also have multipleBarcodeItem
s pointing to it, but the composite of:barcode_value
+:organization_id
must be unique (ie. a single organization cannot use the same barcode to point to multiple types)Querying Barcodes
CanonicalItem
), it will need to do a followup query to locate the oldestItem
that the organization has that matches thatCanonicalItem
type (older results are more likely to be generic).RecordNotFound
and the controller should return a:404
status.User Interface for Organizations (opining a bit here)
Item
/CanonicalItem
association to use thepartner_key
trait instead of the integer key #588 first)Have "Add Another Barcode" display the barcode modal, if possible, and then refresh the tableBarcodeItems#index
view -- boop a barcode and it filters to only show that result (Create a:by_value
scope and then add it to the filters section)User Interface for Admins
these are being moved over to #326 since they don't yet exist
Admin::BarcodeItems#index
is global only (we will likely need to addwill_paginate
)For "Clean up" we just need to audit these files to ensure they are in-line with the above behaviors:
Some of them may already be OK but we'll need to assess all of them to be sure.
The text was updated successfully, but these errors were encountered: