tango-app-api-store-builder 1.0.9 → 1.0.11-dont-user

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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-store-builder",
3
- "version": "1.0.9",
3
+ "version": "1.0.11-dont-user",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -20,7 +20,7 @@ dayjs.extend( customParseFormat );
20
20
  export async function createTemplate( req, res ) {
21
21
  try {
22
22
  let inputData = req.body;
23
- const templateType = inputData?.templateType ?? 'sub';
23
+ const templateType = inputData?.templateType ?? 'sub';
24
24
  let getLibDetails = await fixtureLibService.findOne( { _id: inputData.fixtureLibraryId, clientId: inputData.clientId } );
25
25
  if ( !getLibDetails ) {
26
26
  return res.sendError( 'Fixture library id is wrong', 400 );
@@ -600,6 +600,7 @@ export async function assigedTemplate( req, res ) {
600
600
  let findFixtureList = await fixtureConfigService.aggregate( [
601
601
  {
602
602
  $match: {
603
+ ...( req.body?.clientId && { clientId: req.body?.clientId } ),
603
604
  templateType: 'sub',
604
605
  },
605
606
  },
@@ -1470,10 +1471,12 @@ export async function getTreeList( req, res ) {
1470
1471
  },
1471
1472
  {
1472
1473
  $sort: {
1474
+ 'fixtureName': 1,
1473
1475
  'header.label': 1,
1476
+ 'templateGroupMax': 1,
1477
+ 'templateGroupNumber': 1,
1474
1478
  },
1475
1479
  },
1476
-
1477
1480
  ];
1478
1481
 
1479
1482
  let fixtureDetails = await fixtureConfigService.aggregate( query );
@@ -281,6 +281,18 @@ function buildPipelineByType( type, planoId, floorId, filterByStatus, filterByAp
281
281
  'FixtureData.shelfConfig': '$Fixtureshelves',
282
282
  },
283
283
  },
284
+
285
+ {
286
+ $set: {
287
+ 'FixtureData.shelfConfig': {
288
+ $sortArray: {
289
+ input: '$FixtureData.shelfConfig',
290
+ sortBy: { shelfNumber: 1 },
291
+ },
292
+ },
293
+ },
294
+ }
295
+
284
296
  ];
285
297
 
286
298
  const vmStages = [ 'vm', 'vmRollout' ].includes( type ) ? [