tango-app-api-store-builder 1.0.0-beta-63 → 1.0.0-beta-64

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-store-builder",
3
- "version": "1.0.0-beta-63",
3
+ "version": "1.0.0-beta-64",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "joi": "^17.13.3",
24
24
  "mongodb": "^6.12.0",
25
25
  "nodemon": "^3.1.9",
26
- "tango-api-schema": "^2.2.73",
26
+ "tango-api-schema": "^2.2.75",
27
27
  "tango-app-api-middleware": "^3.1.48",
28
28
  "winston": "^3.17.0",
29
29
  "winston-daily-rotate-file": "^5.0.0",
@@ -14,6 +14,8 @@ import * as planoComplianceService from '../service/planoCompliance.service.js';
14
14
  import * as planoTaskComplianceService from '../service/planoTask.service.js';
15
15
  import * as planoQrConversionRequestService from '../service/planoQrConversionRequest.service.js';
16
16
  import * as fixtureConfigService from '../service/fixtureConfig.service.js';
17
+ import * as planoStaticBrandCategoriesService from '../service/planoStaticBrandCategories.service.js';
18
+
17
19
 
18
20
  import path from 'path';
19
21
 
@@ -2543,7 +2545,12 @@ export const getShelfSections = async ( req, res ) => {
2543
2545
 
2544
2546
  const [ data ] = sections;
2545
2547
 
2546
- return res.sendSuccess( data?.sectionNames );
2548
+ const resData = [
2549
+ ...data?.sectionNames,
2550
+ 'NA',
2551
+ ];
2552
+
2553
+ return res.sendSuccess( resData );
2547
2554
  } catch ( error ) {
2548
2555
  logger.error( 'getShelfSections =>', error );
2549
2556
  return res.sendError( 'Internal Server Error', 500 );
@@ -2712,132 +2719,9 @@ export const getFixtureBrands = async ( req, res ) => {
2712
2719
 
2713
2720
  // const [ data ] = sections;
2714
2721
 
2715
- const data = [
2716
- 'Acuvue',
2717
- 'Acuvue Moist',
2718
- 'Acuvue Oasys',
2719
- 'Acuvue Vita',
2720
- 'Air Optix',
2721
- 'Alcon',
2722
- 'Alcon Air Optix',
2723
- 'Alcon Aquacomfort',
2724
- 'Alcon Focus',
2725
- 'Alcon Freshlook',
2726
- 'Alcon O2 Optix',
2727
- 'Alcon Precision',
2728
- 'Alcon Total',
2729
- 'All Clean',
2730
- 'Amara',
2731
- 'Amara Color',
2732
- 'Aqua Clear',
2733
- 'Aqua Lens 10H Dailies',
2734
- 'Aqua Soft',
2735
- 'Aquacolor',
2736
- 'Aquacolor Candypack',
2737
- 'Aquacolor Premium',
2738
- 'Aquacolor_Dailies 10LP',
2739
- 'Aquacolor_Monthly 2LP',
2740
- 'Aquacolor_Premium 2LP',
2741
- 'Aqualens',
2742
- 'Aqualens Nxt',
2743
- 'Aqualens_24H 30LP',
2744
- 'Aqualens_24H 6LP',
2745
- 'Aqualens_24H Nxt 3LP',
2746
- 'Aqualens_CandyPack 2LP',
2747
- 'Aqualens_Dailies 10LP',
2748
- 'Aqualens_Dailies 30LP',
2749
- 'Aqualens_Dailies 5LP',
2750
- 'Bausch & Lomb',
2751
- 'Bausch & Lomb Lacelle',
2752
- 'Bausch & Lomb PureVision',
2753
- 'Bausch & Lomb Soflens',
2754
- 'Bausch & Lomb Soflens 59',
2755
- 'Bausch & Lomb iConnect',
2756
- 'Bella',
2757
- 'Biomedic',
2758
- 'Biotrue',
2759
- 'Boss Orange',
2760
- 'British Optics',
2761
- 'Calvin Klein',
2762
- 'Carrera',
2763
- 'Celebration Toric',
2764
- 'Chamelo',
2765
- 'Chhota Bheem',
2766
- 'Ciba Vision',
2767
- 'Clalen Iris',
2768
- 'Colour Perfection',
2769
- 'Cooper Vision',
2770
- 'Cooper Vision Avaira',
2771
- 'Cooper Vision Biofinity',
2772
- 'Diva',
2773
- 'FORM',
2774
- 'Fallon Colby',
2775
- 'Fastrack',
2776
- 'Fossil',
2777
- 'French Connection',
2778
- 'Freshlook',
2779
- 'Hooper',
2780
- 'Hooper Online',
2781
- 'Hooper Screen Glasses',
2782
- 'ICE CUBE',
2783
- 'IDEE',
2784
- 'J&J Define',
2785
- 'John Jacobs',
2786
- 'John Jacobs Computer Glasses',
2787
- 'John Jacobs Online',
2788
- 'John Jacobs Screen Glasses',
2789
- 'John Jacobs TI',
2790
- 'Johnson & Johnson',
2791
- 'LENSKART BLU READERS',
2792
- 'LENSKART PREMIUM READERS',
2793
- 'Le Petit Lunetier',
2794
- 'Lee Cooper',
2795
- 'Lenses Only',
2796
- 'Lenskart',
2797
- 'Lenskart Air',
2798
- 'Lenskart Air LA',
2799
- 'Lenskart Air Online',
2800
- 'Lenskart Air Screen Glasses',
2801
- 'Lenskart BLU Screen Glasses',
2802
- 'Lenskart Boost',
2803
- 'Lenskart Hustlr',
2804
- 'Lenskart Hustlr Screen Glasses',
2805
- 'Lenskart Junior Computer Glasses',
2806
- 'Lenskart PLUS',
2807
- 'Lenskart READERS',
2808
- 'Lenskart STUDIO',
2809
- 'Lenskart Safety Goggles',
2810
- 'Lenskart Studio Online',
2811
- 'Lenskart TOI Special',
2812
- 'Lensme',
2813
- 'Lensspray',
2814
- 'Lewis Hamilton',
2815
- 'Mask',
2816
- 'New Balance',
2817
- 'OJOS',
2818
- 'OWNDAYS',
2819
- 'Oakley',
2820
- 'Opti-Free',
2821
- 'Other Third Party Brands',
2822
- 'Polaroid',
2823
- 'Ray-Ban',
2824
- 'Sunpocket',
2825
- 'Superman',
2826
- 'ThinOptics',
2827
- 'Tom and Jerry',
2828
- 'Tommy Hilfiger',
2829
- 'Velocity',
2830
- 'Vincent Chase',
2831
- 'Vincent Chase Essentials',
2832
- 'Vincent Chase Kids',
2833
- 'Vincent Chase Online',
2834
- 'Vincent Chase Polarized',
2835
- 'Vincent Chase Screen Glasses',
2836
- 'Vintage',
2837
- 'Vogue',
2838
- ];
2722
+ const brandCategories = await planoStaticBrandCategoriesService.findOne( { } );
2839
2723
 
2840
- return res.sendSuccess( data );
2724
+ return res.sendSuccess( brandCategories.toObject().data );
2841
2725
  } catch ( error ) {
2842
2726
  logger.error( 'getFixtureBrands =>', error );
2843
2727
  return res.sendError( 'Internal Server Error', 500 );
@@ -0,0 +1,8 @@
1
+ import model from 'tango-api-schema';
2
+
3
+ export async function find( query={}, field={} ) {
4
+ return model.planoStaticBrandCategories.find( query, field );
5
+ }
6
+ export async function findOne( query={}, field={} ) {
7
+ return model.planoStaticBrandCategories.findOne( query, field );
8
+ }