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.
Files changed (2) hide show
  1. package/GProcessSale.vue +54 -38
  2. 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
- setTimeout( async () => {
389
- if(val !== ''){
390
- let slot_res = await new DB_USER().collection().where("keywords", "array-contains", val.toLowerCase()).get()
391
- let slot_res2 = await new DB_USER().collection().where("keywords", "array-contains", val.toUpperCase()).get()
392
- let new_option = [];
393
- if(slot_res.docs.length>0 || slot_res2.docs.length >0)
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.docs.forEach(element => {
396
- new_option.push({label:element.data().full_name.toLowerCase(),value: element.data().email });
397
- if(new_option.map(function(e) { return e.label; }).indexOf(element.data().email.toLowerCase())<0)
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
- this.stringOptions = new_option;
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
- else
430
+ }
431
+ }, 1500);
432
+ setTimeout(() =>
433
+ {
434
+ update(() =>
435
+ {
436
+
437
+ if (val === '')
414
438
  {
415
- new_option=[];
416
- this.stringOptions=[];
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
- }, 800)
447
+ }, 2000)
432
448
  },
433
449
 
434
450
  abortFilterFn () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.558",
3
+ "version": "1.2.561",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {