tango-app-api-infra 3.1.34-beta.34 → 3.1.34-beta.35

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-infra",
3
- "version": "3.1.34-beta.34",
3
+ "version": "3.1.34-beta.35",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -13,7 +13,7 @@ export async function infraCard( req, res ) {
13
13
  try {
14
14
  let date = await getUTC( new Date( req.body.fromDate ), new Date( req.body.toDate ) );
15
15
  let storecountQuery ={ 'clientId': { $in: req.body.clientId }, 'createdAt': { $lte: date.end }, 'status': 'active' };
16
- console.log( req.user.role );
16
+
17
17
  if ( req.user&&req.user.userType ==='client'&&req.user.role!='superadmin' ) {
18
18
  storecountQuery = { ...storecountQuery, ...{ storeId: { $in: req.body.assignedStores } } };
19
19
  }
@@ -231,16 +231,12 @@ export async function installationCard( req, res ) {
231
231
 
232
232
 
233
233
  if ( req.user&&req.user.userType ==='client'&&req.user.role!='superadmin' ) {
234
- if ( req.body.assignedStores&&req.body.assignedStores.length>0 ) {
235
- console.log( '=====>', req.body.assignedStores );
236
- baseQuery = { ...baseQuery, ...{ storeId: { $in: req.body.assignedStores } } };
237
- }
234
+ baseQuery = { ...baseQuery, ...{ storeId: { $in: req.body.assignedStores } } };
238
235
  }
239
236
  let onboardQuery = { ...baseQuery };
240
237
  let installedQuery = { ...baseQuery, status: 'active' };
241
238
  let deactiveQuery = { ...baseQuery, status: 'deactive' };
242
239
  let onboardedCount = await countDocumentsStore( onboardQuery );
243
- console.log( onboardedCount );
244
240
  let installedCount = await countDocumentsStore( installedQuery );
245
241
  let deactiveCount = await countDocumentsStore( deactiveQuery );
246
242
 
@@ -2017,7 +2017,7 @@ export async function storeFilter( req, res ) {
2017
2017
  if ( req.user&&req.user.userType ==='client'&&req.user.role!='superadmin' ) {
2018
2018
  query = { ...query, 'basicDetails.storeId': { $in: req.body.assignedStores } };
2019
2019
  }
2020
- console.log( query );
2020
+
2021
2021
  let stores = await findTangoTicket( query, { 'basicDetails.storeId': 1 } );
2022
2022
  const uniqueStoreIds = [ ...new Set( stores.map( ( store ) => store.basicDetails.storeId ) ) ];
2023
2023
  const uniqueStoreObjects = uniqueStoreIds.map( ( storeId ) => ( { 'storeId': storeId } ) );