This commit is contained in:
2021-02-25 16:03:16 +00:00
parent 0eb492a7b4
commit 06c9295ff2
2 changed files with 5 additions and 2 deletions

View File

@@ -174,6 +174,9 @@ CURRENTLY DOING: PurchaseOrder
PO todo
todo: area to enter received serials and have them inserted into serials table
when serials are added needs to save them at server adn also needs to be able to reverse them at server
maybe a db field needs to be added for this to po item? Otherwise how to reverse? Just a long text field maybe?
todo: receive all / receive item not setting received date?
todo: button to set part price from received cost
todo: restock required feature

View File

@@ -184,9 +184,9 @@ export default {
return;
}
//add to list, may be in various formats so handle that
let splitted = this.newSerial.split(/[\s,]+/).filter(Boolean);
let splitted = this.newSerial.split(/[\s,]+/).filter(Boolean); //filter Boolean is equivalent to array.filter(item => Boolean(item)) and it's to filter out nulls concisely from badly formatted strings
splitted = [...splitted, ...this.obj];
let uniqueItems = [...new Set(splitted)];
let uniqueItems = [...new Set(splitted)]; //remove any dupes with Set
uniqueItems.sort();
this.obj = uniqueItems;
this.formState.dirty = true;