tango-app-api-store-builder 1.0.0-beta-112 → 1.0.0-beta-114

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.
@@ -208,259 +208,258 @@
208
208
  ]
209
209
  },
210
210
  {
211
- "taskId" : "6841260651d4dcf69692e5ac",
212
- "type" : "fixture",
213
- "date_string" : "2025-06-06",
214
- "planoId" : "682b18eb53b873e2bef85f48",
215
- "fixtureId" : "684681d3a637439f61da0200",
216
- "floorId" : "6819df849741a6b2e0d70904",
217
- "answers" : [
218
- {
219
- "userId" : "6819df859741a6b2e0d7090e",
220
- "userName" : "LKST98",
221
- "role" : "admin",
222
- "issues" : [
223
- {
224
- "userId" : "6819df859741a6b2e0d7090e",
225
- "userName" : "LKST98",
226
- "role" : "admin",
227
- "qno" : 1,
228
- "question" : "Fixture type is wrong",
229
- "Details" : [
230
- {
231
- "comments" : [
232
- {
233
- "userId" : "681d967e72e969324794af2a",
234
- "userName" : "hastinapuram.chennai",
235
- "role" : "user",
236
- "comment" : "the above one fixture is missing from the store",
237
- "responsetype" : "comment"
238
- }
239
- ],
240
- "fixtureId" : "6837eace2692f29eff7f8f69",
241
- "templateId" : "6837eed55caa00ec973be4c8",
242
- "fixtureName" : "Template04-Second Floor Fixture",
243
- "fixturetype" : "Hybrid_4ft",
244
- "fixturetemplate" : "Temp_hybd_5ft_Vincent Chase+Lenskart",
245
- "associatedElementFixtureNumber" : 1,
246
- "associatedElementNumber" : 1,
247
- "associatedElementType" : "wall",
248
- "shelfConfig" : [
249
- {
250
- "shelfNumber" : 1,
251
- "shelfType" : "",
252
- "productPerShelf" : 6,
253
- "trayRows" : 5,
254
- "fixtureBrandCategory" : [],
255
- "fixtureBrandSubCategory" : []
256
- },
257
- {
258
- "shelfNumber" : 2,
259
- "shelfType" : "",
260
- "productPerShelf" : 6,
261
- "trayRows" : 5,
262
- "fixtureBrandCategory" : [],
263
- "fixtureBrandSubCategory" : []
264
- }
265
- ]
266
- }
267
- ]
268
- },
269
- {
270
- "userId" : "6819df859741a6b2e0d7090e",
271
- "userName" : "LKST98",
272
- "role" : "admin",
273
- "qno" : 2,
274
- "question" : "Fixture size is wrong",
275
- "video" : "",
276
- "image" : "",
277
- "Details" : [
278
- {
279
- "comments" : [
280
- {
281
- "userId" : "681d967e72e969324794af2a",
282
- "userName" : "hastinapuram.chennai",
283
- "role" : "user",
284
- "comment" : "the above one fixture is missing from the plano",
285
- "responsetype" : "comment"
286
- }
287
- ],
288
- "fixturetype" : "Hybrid_4ft",
289
- "shelfConfig" : [
290
- {
291
- "shelfNumber" : 1,
292
- "shelfType" : "",
293
- "productPerShelf" : 6,
294
- "trayRows" : 5,
295
- "fixtureBrandCategory" : [],
296
- "fixtureBrandSubCategory" : []
297
- },
298
- {
299
- "shelfNumber" : 2,
300
- "shelfType" : "",
301
- "productPerShelf" : 6,
302
- "trayRows" : 5,
303
- "fixtureBrandCategory" : [],
304
- "fixtureBrandSubCategory" : []
305
- }
306
- ]
307
- }
308
- ]
309
- },
310
- {
311
- "userId" : "6819df859741a6b2e0d7090e",
312
- "userName" : "LKST98",
313
- "role" : "admin",
314
- "qno" : 2,
315
- "question" : "Product category is wrong",
316
- "video" : "",
317
- "image" : "",
318
- "Details" : [
319
- {
320
- "comments" : [
321
- {
322
- "userId" : "681d967e72e969324794af2a",
323
- "userName" : "hastinapuram.chennai",
324
- "role" : "user",
325
- "comment" : "the above one fixture is missing from the plano",
326
- "responsetype" : "comment"
327
- }
328
- ],
329
- "fixturetype" : "Hybrid_4ft",
330
- "shelfConfig" : [
331
- {
332
- "shelfNumber" : 1,
333
- "shelfType" : "",
334
- "productPerShelf" : 6,
335
- "trayRows" : 5,
336
- "zone":"middle",
337
- "fixtureBrandCategory" : [],
338
- "fixtureBrandSubCategory" : []
339
- },
340
- {
341
- "shelfNumber" : 2,
342
- "shelfType" : "",
343
- "productPerShelf" : 6,
344
- "trayRows" : 5,
345
- "zone":"bottom",
346
- "fixtureBrandCategory" : [],
347
- "fixtureBrandSubCategory" : []
348
- }
349
- ]
350
- }
351
- ]
352
- },
353
- {
354
- "userId" : "6819df859741a6b2e0d7090e",
355
- "userName" : "LKST98",
356
- "role" : "admin",
357
- "qno" : 2,
358
- "question" : "Product category is wrong",
359
- "video" : "",
360
- "image" : "",
361
- "Details" : [
362
- {
363
- "comments" : [
364
- {
365
- "userId" : "681d967e72e969324794af2a",
366
- "userName" : "hastinapuram.chennai",
367
- "role" : "user",
368
- "comment" : "the above one fixture is missing from the plano",
369
- "responsetype" : "comment"
370
- }
371
- ],
372
- "fixturetype" : "Hybrid_4ft",
373
- "shelfConfig" : [
374
- {
375
- "shelfNumber" : 1,
376
- "shelfType" : "",
377
- "productPerShelf" : 6,
378
- "trayRows" : 5,
379
- "zone":"middle",
380
- "fixtureBrandCategory" : [],
381
- "fixtureBrandSubCategory" : []
382
- },
383
- {
384
- "shelfNumber" : 2,
385
- "shelfType" : "",
386
- "productPerShelf" : 6,
387
- "trayRows" : 5,
388
- "zone":"middle",
389
- "fixtureBrandCategory" : [],
390
- "fixtureBrandSubCategory" : []
391
- },
392
- {
393
- "shelfNumber" : 2,
394
- "shelfType" : "",
395
- "productPerShelf" : 6,
396
- "trayRows" : 5,
397
- "zone":"bottom",
398
- "fixtureBrandCategory" : [],
399
- "fixtureBrandSubCategory" : []
400
- }
401
- ]
402
- }
403
- ]
404
- },
405
- {
406
- "userId" : "6819df859741a6b2e0d7090e",
407
- "userName" : "LKST98",
408
- "role" : "admin",
409
- "qno" : 2,
410
- "question" : "Brand is wrong",
411
- "video" : "",
412
- "image" : "",
413
- "Details" : [
414
- {
415
- "comments" : [
416
- {
417
- "userId" : "681d967e72e969324794af2a",
418
- "userName" : "hastinapuram.chennai",
419
- "role" : "user",
420
- "comment" : "the above one fixture is missing from the plano",
421
- "responsetype" : "comment"
422
- }
423
- ],
424
- "fixturetype" : "Hybrid_4ft",
425
- "shelfConfig" : [
426
- {
427
- "shelfNumber" : 1,
428
- "shelfType" : "",
429
- "productPerShelf" : 6,
430
- "trayRows" : 5,
431
- "zone":"middle",
432
- "fixtureBrandCategory" : [],
433
- "fixtureBrandSubCategory" : []
434
- },
435
- {
436
- "shelfNumber" : 2,
437
- "shelfType" : "",
438
- "productPerShelf" : 6,
439
- "trayRows" : 5,
440
- "zone":"middle",
441
- "fixtureBrandCategory" : [],
442
- "fixtureBrandSubCategory" : []
443
- },
444
- {
445
- "shelfNumber" : 2,
446
- "shelfType" : "",
447
- "productPerShelf" : 6,
448
- "trayRows" : 5,
449
- "zone":"bottom",
450
- "fixtureBrandCategory" : [],
451
- "fixtureBrandSubCategory" : []
452
- }
453
- ]
454
- }
455
- ]
456
- }
457
- ]
458
- }
459
- ],
460
-
461
- "date_iso" : "2025-06-06T00:00:00.000Z",
462
- "storeId" : "11-4",
463
- "storeName" : "LKST98",
464
- "status":"incomplete"
465
- }
211
+ "taskId": "6841260651d4dcf69692e5ac",
212
+ "type": "fixture",
213
+ "date_string": "2025-06-06",
214
+ "planoId": "682b18eb53b873e2bef85f48",
215
+ "fixtureId": "684681d3a637439f61da0200",
216
+ "floorId": "6819df849741a6b2e0d70904",
217
+ "answers": [
218
+ {
219
+ "userId": "6819df859741a6b2e0d7090e",
220
+ "userName": "LKST98",
221
+ "role": "admin",
222
+ "issues": [
223
+ {
224
+ "userId": "6819df859741a6b2e0d7090e",
225
+ "userName": "LKST98",
226
+ "role": "admin",
227
+ "qno": 1,
228
+ "question": "Fixture type is wrong",
229
+ "Details": [
230
+ {
231
+ "comments": [
232
+ {
233
+ "userId": "681d967e72e969324794af2a",
234
+ "userName": "hastinapuram.chennai",
235
+ "role": "user",
236
+ "comment": "the above one fixture is missing from the store",
237
+ "responsetype": "comment"
238
+ }
239
+ ],
240
+ "fixtureId": "6837eace2692f29eff7f8f69",
241
+ "templateId": "6837eed55caa00ec973be4c8",
242
+ "fixtureName": "Template04-Second Floor Fixture",
243
+ "fixturetype": "Hybrid_4ft",
244
+ "fixturetemplate": "Temp_hybd_5ft_Vincent Chase+Lenskart",
245
+ "associatedElementFixtureNumber": 1,
246
+ "associatedElementNumber": 1,
247
+ "associatedElementType": "wall",
248
+ "shelfConfig": [
249
+ {
250
+ "shelfNumber": 1,
251
+ "shelfType": "",
252
+ "productPerShelf": 6,
253
+ "trayRows": 5,
254
+ "fixtureBrandCategory": [],
255
+ "fixtureBrandSubCategory": []
256
+ },
257
+ {
258
+ "shelfNumber": 2,
259
+ "shelfType": "",
260
+ "productPerShelf": 6,
261
+ "trayRows": 5,
262
+ "fixtureBrandCategory": [],
263
+ "fixtureBrandSubCategory": []
264
+ }
265
+ ]
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "userId": "6819df859741a6b2e0d7090e",
271
+ "userName": "LKST98",
272
+ "role": "admin",
273
+ "qno": 2,
274
+ "question": "Fixture size is wrong",
275
+ "video": "",
276
+ "image": "",
277
+ "Details": [
278
+ {
279
+ "comments": [
280
+ {
281
+ "userId": "681d967e72e969324794af2a",
282
+ "userName": "hastinapuram.chennai",
283
+ "role": "user",
284
+ "comment": "the above one fixture is missing from the plano",
285
+ "responsetype": "comment"
286
+ }
287
+ ],
288
+ "fixturetype": "Hybrid_4ft",
289
+ "shelfConfig": [
290
+ {
291
+ "shelfNumber": 1,
292
+ "shelfType": "",
293
+ "productPerShelf": 6,
294
+ "trayRows": 5,
295
+ "fixtureBrandCategory": [],
296
+ "fixtureBrandSubCategory": []
297
+ },
298
+ {
299
+ "shelfNumber": 2,
300
+ "shelfType": "",
301
+ "productPerShelf": 6,
302
+ "trayRows": 5,
303
+ "fixtureBrandCategory": [],
304
+ "fixtureBrandSubCategory": []
305
+ }
306
+ ]
307
+ }
308
+ ]
309
+ },
310
+ {
311
+ "userId": "6819df859741a6b2e0d7090e",
312
+ "userName": "LKST98",
313
+ "role": "admin",
314
+ "qno": 2,
315
+ "question": "Product category is wrong",
316
+ "video": "",
317
+ "image": "",
318
+ "Details": [
319
+ {
320
+ "comments": [
321
+ {
322
+ "userId": "681d967e72e969324794af2a",
323
+ "userName": "hastinapuram.chennai",
324
+ "role": "user",
325
+ "comment": "the above one fixture is missing from the plano",
326
+ "responsetype": "comment"
327
+ }
328
+ ],
329
+ "fixturetype": "Hybrid_4ft",
330
+ "shelfConfig": [
331
+ {
332
+ "shelfNumber": 1,
333
+ "shelfType": "",
334
+ "productPerShelf": 6,
335
+ "trayRows": 5,
336
+ "zone": "middle",
337
+ "fixtureBrandCategory": [],
338
+ "fixtureBrandSubCategory": []
339
+ },
340
+ {
341
+ "shelfNumber": 2,
342
+ "shelfType": "",
343
+ "productPerShelf": 6,
344
+ "trayRows": 5,
345
+ "zone": "bottom",
346
+ "fixtureBrandCategory": [],
347
+ "fixtureBrandSubCategory": []
348
+ }
349
+ ]
350
+ }
351
+ ]
352
+ },
353
+ {
354
+ "userId": "6819df859741a6b2e0d7090e",
355
+ "userName": "LKST98",
356
+ "role": "admin",
357
+ "qno": 2,
358
+ "question": "Product category is wrong",
359
+ "video": "",
360
+ "image": "",
361
+ "Details": [
362
+ {
363
+ "comments": [
364
+ {
365
+ "userId": "681d967e72e969324794af2a",
366
+ "userName": "hastinapuram.chennai",
367
+ "role": "user",
368
+ "comment": "the above one fixture is missing from the plano",
369
+ "responsetype": "comment"
370
+ }
371
+ ],
372
+ "fixturetype": "Hybrid_4ft",
373
+ "shelfConfig": [
374
+ {
375
+ "shelfNumber": 1,
376
+ "shelfType": "",
377
+ "productPerShelf": 6,
378
+ "trayRows": 5,
379
+ "zone": "middle",
380
+ "fixtureBrandCategory": [],
381
+ "fixtureBrandSubCategory": []
382
+ },
383
+ {
384
+ "shelfNumber": 2,
385
+ "shelfType": "",
386
+ "productPerShelf": 6,
387
+ "trayRows": 5,
388
+ "zone": "middle",
389
+ "fixtureBrandCategory": [],
390
+ "fixtureBrandSubCategory": []
391
+ },
392
+ {
393
+ "shelfNumber": 2,
394
+ "shelfType": "",
395
+ "productPerShelf": 6,
396
+ "trayRows": 5,
397
+ "zone": "bottom",
398
+ "fixtureBrandCategory": [],
399
+ "fixtureBrandSubCategory": []
400
+ }
401
+ ]
402
+ }
403
+ ]
404
+ },
405
+ {
406
+ "userId": "6819df859741a6b2e0d7090e",
407
+ "userName": "LKST98",
408
+ "role": "admin",
409
+ "qno": 2,
410
+ "question": "Brand is wrong",
411
+ "video": "",
412
+ "image": "",
413
+ "Details": [
414
+ {
415
+ "comments": [
416
+ {
417
+ "userId": "681d967e72e969324794af2a",
418
+ "userName": "hastinapuram.chennai",
419
+ "role": "user",
420
+ "comment": "the above one fixture is missing from the plano",
421
+ "responsetype": "comment"
422
+ }
423
+ ],
424
+ "fixturetype": "Hybrid_4ft",
425
+ "shelfConfig": [
426
+ {
427
+ "shelfNumber": 1,
428
+ "shelfType": "",
429
+ "productPerShelf": 6,
430
+ "trayRows": 5,
431
+ "zone": "middle",
432
+ "fixtureBrandCategory": [],
433
+ "fixtureBrandSubCategory": []
434
+ },
435
+ {
436
+ "shelfNumber": 2,
437
+ "shelfType": "",
438
+ "productPerShelf": 6,
439
+ "trayRows": 5,
440
+ "zone": "middle",
441
+ "fixtureBrandCategory": [],
442
+ "fixtureBrandSubCategory": []
443
+ },
444
+ {
445
+ "shelfNumber": 2,
446
+ "shelfType": "",
447
+ "productPerShelf": 6,
448
+ "trayRows": 5,
449
+ "zone": "bottom",
450
+ "fixtureBrandCategory": [],
451
+ "fixtureBrandSubCategory": []
452
+ }
453
+ ]
454
+ }
455
+ ]
456
+ }
457
+ ]
458
+ }
459
+ ],
460
+ "date_iso": "2025-06-06T00:00:00.000Z",
461
+ "storeId": "11-4",
462
+ "storeName": "LKST98",
463
+ "status": "incomplete"
464
+ }
466
465
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-store-builder",
3
- "version": "1.0.0-beta-112",
3
+ "version": "1.0.0-beta-114",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "path": "^0.12.7",
33
33
  "selenium-webdriver": "^4.31.0",
34
34
  "sharp": "^0.34.1",
35
- "tango-api-schema": "2.2.151",
35
+ "tango-api-schema": "2.2.153",
36
36
  "tango-app-api-middleware": "^3.1.48",
37
37
  "url": "^0.11.4",
38
38
  "winston": "^3.17.0",
package/response.json CHANGED
@@ -643,5 +643,12 @@
643
643
  }
644
644
  ]
645
645
  }
646
+ },
647
+ {
648
+ "storeName": "LKST2973",
649
+ "data": {
650
+ "message": "FAILURE",
651
+ "result": "Config does not exist"
652
+ }
646
653
  }
647
654
  ]
@@ -23,7 +23,7 @@ export async function createTemplate( req, res ) {
23
23
  return res.sendError( 'Fixture library id is wrong', 400 );
24
24
  }
25
25
  let fixtureCapacity = getLibDetails.shelfConfig.reduce(
26
- ( acc, ele ) => acc + ele.productPerShelf,
26
+ ( acc, ele ) => ele.trayRows ? acc + ( ele.trayRows * ele.productPerShelf ) : ( acc + ele.productPerShelf ),
27
27
  0,
28
28
  );
29
29
  let templateId = await getTemplateId();
@@ -41,6 +41,14 @@ export async function createTemplate( req, res ) {
41
41
  footer: getLibDetails.footer,
42
42
  isBodyEnabled: getLibDetails.isBodyEnabled,
43
43
  fixtureCapacity: fixtureCapacity,
44
+ fixtureStaticLength: {
45
+ value: 1524,
46
+ unit: 'mm',
47
+ },
48
+ fixtureStaticWidth: {
49
+ value: 1220,
50
+ unit: 'mm',
51
+ },
44
52
  };
45
53
  let fixtureData = await fixtureConfigService.create( templateData );
46
54
  return res.sendSuccess( { message: 'Fixture template created successfully', fixtureData } );
@@ -136,10 +144,10 @@ export async function deleteTemplate( req, res ) {
136
144
  let getFixtureDetails = await storeFixtureService.find( { fixtureConfigId: req.body.templateId }, { _id: 1, planoId: 1 } );
137
145
  if ( getFixtureDetails.length ) {
138
146
  let planoDetails = await planoService.find( { _id: getFixtureDetails.map( ( ele ) => ele.planoId ) } );
139
- return res.sendError( `Fixture template is mapped with ${planoDetails.length}` );
147
+ return res.sendError( `Fixture template is mapped with ${planoDetails.length}`, 400 );
140
148
  }
141
149
  await fixtureConfigService.deleteOne( { _id: req.body.templateId } );
142
- return res.sendSuccess( 'Fixture template deleted successfully' );
150
+ return res.sendSuccess( 'Fixture template is deleted successfully' );
143
151
  } catch ( e ) {
144
152
  logger.error( { functionName: 'deleteTemplate', error: e } );
145
153
  return res.sendError( e, 500 );
@@ -376,6 +384,10 @@ export async function getTemplateList( req, res ) {
376
384
  },
377
385
  },
378
386
  );
387
+ } else {
388
+ query.push( {
389
+ $sort: { _id: -1 },
390
+ } );
379
391
  }
380
392
  query.push(
381
393
  {