This commit is contained in:
@@ -174,6 +174,9 @@ CURRENTLY DOING: PurchaseOrder
|
|||||||
|
|
||||||
|
|
||||||
PO todo
|
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: receive all / receive item not setting received date?
|
||||||
todo: button to set part price from received cost
|
todo: button to set part price from received cost
|
||||||
todo: restock required feature
|
todo: restock required feature
|
||||||
|
|||||||
@@ -184,9 +184,9 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//add to list, may be in various formats so handle that
|
//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];
|
splitted = [...splitted, ...this.obj];
|
||||||
let uniqueItems = [...new Set(splitted)];
|
let uniqueItems = [...new Set(splitted)]; //remove any dupes with Set
|
||||||
uniqueItems.sort();
|
uniqueItems.sort();
|
||||||
this.obj = uniqueItems;
|
this.obj = uniqueItems;
|
||||||
this.formState.dirty = true;
|
this.formState.dirty = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user