geer-builder 1.2.558 → 1.2.561
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GProcessSale.vue +54 -38
- package/package.json +1 -1
package/GProcessSale.vue
CHANGED
|
@@ -385,50 +385,66 @@ export default
|
|
|
385
385
|
},
|
|
386
386
|
async filterFn (val, update, abort) {
|
|
387
387
|
// call abort() at any time if you can't retrieve data somehow
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
if(
|
|
388
|
+
this.last_keyword = val;
|
|
389
|
+
setTimeout( async () =>
|
|
390
|
+
{
|
|
391
|
+
if(val !== '')
|
|
392
|
+
{
|
|
393
|
+
if(this.last_keyword.toLowerCase() == val.toLowerCase())
|
|
394
394
|
{
|
|
395
|
-
slot_res.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
{
|
|
399
|
-
new_option.push({label:element.data().email, value: element.data().email.toLowerCase()});
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
slot_res2.docs.forEach(element => {
|
|
404
|
-
new_option.push({label:element.data().full_name.toLowerCase(),value: element.data().email });
|
|
405
|
-
if(new_option.map(function(e) { return e.label; }).indexOf(element.data().email.toLowerCase())<0)
|
|
406
|
-
{
|
|
407
|
-
new_option.push({label:element.data().email, value: element.data().email.toLowerCase()});
|
|
408
|
-
}
|
|
409
|
-
});
|
|
395
|
+
let slot_res = await new DB_USER().collection().where("keywords", "array-contains", val.toLowerCase()).get()
|
|
396
|
+
let slot_res2 = await new DB_USER().collection().where("keywords", "array-contains", val.toUpperCase()).get()
|
|
397
|
+
let new_option = [];
|
|
410
398
|
|
|
411
|
-
|
|
399
|
+
if(slot_res.docs.length>0 || slot_res2.docs.length >0)
|
|
400
|
+
{
|
|
401
|
+
slot_res.docs.forEach(element => {
|
|
402
|
+
new_option.push({label:element.data().full_name.toLowerCase(),value: element.data().email });
|
|
403
|
+
if(new_option.map(function(e) { return e.label; }).indexOf(element.data().email.toLowerCase())<0)
|
|
404
|
+
{
|
|
405
|
+
new_option.push({label:element.data().email, value: element.data().email.toLowerCase()});
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
slot_res2.docs.forEach(element => {
|
|
410
|
+
new_option.push({label:element.data().full_name.toLowerCase(),value: element.data().email });
|
|
411
|
+
if(new_option.map(function(e) { return e.label; }).indexOf(element.data().email.toLowerCase())<0)
|
|
412
|
+
{
|
|
413
|
+
new_option.push({label:element.data().email, value: element.data().email.toLowerCase()});
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
this.stringOptions = new_option;
|
|
418
|
+
|
|
419
|
+
const needle = val.toLowerCase()
|
|
420
|
+
this.options = this.stringOptions.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
|
421
|
+
// console.log("NOISE")
|
|
422
|
+
}
|
|
423
|
+
else
|
|
424
|
+
{
|
|
425
|
+
new_option=[];
|
|
426
|
+
this.stringOptions=[];
|
|
427
|
+
}
|
|
428
|
+
// this.field.email=val;
|
|
412
429
|
}
|
|
413
|
-
|
|
430
|
+
}
|
|
431
|
+
}, 1500);
|
|
432
|
+
setTimeout(() =>
|
|
433
|
+
{
|
|
434
|
+
update(() =>
|
|
435
|
+
{
|
|
436
|
+
|
|
437
|
+
if (val === '')
|
|
414
438
|
{
|
|
415
|
-
|
|
416
|
-
|
|
439
|
+
this.options = [];
|
|
440
|
+
}
|
|
441
|
+
else
|
|
442
|
+
{
|
|
443
|
+
// const needle = val.toLowerCase()
|
|
444
|
+
// this.options = this.stringOptions.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
|
417
445
|
}
|
|
418
|
-
// this.field.email=val;
|
|
419
|
-
}
|
|
420
|
-
}, 300);
|
|
421
|
-
setTimeout(() => {
|
|
422
|
-
update(() => {
|
|
423
|
-
if (val === '') {
|
|
424
|
-
this.options = [];
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
const needle = val.toLowerCase()
|
|
428
|
-
this.options = this.stringOptions.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
|
|
429
|
-
}
|
|
430
446
|
})
|
|
431
|
-
},
|
|
447
|
+
}, 2000)
|
|
432
448
|
},
|
|
433
449
|
|
|
434
450
|
abortFilterFn () {
|