tango-app-api-store-builder 1.0.0-beta-91 → 1.0.0-beta-93

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-91",
3
+ "version": "1.0.0-beta-93",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -204,16 +204,8 @@ export async function createTask( req, res ) {
204
204
  let getUserEmail = req.body.stores.find( ( ele ) => ele.store.toLowerCase() == store.storeName.toLowerCase() );
205
205
  let planoDetails = await planoService.findOne( { storeName: store.storeName } );
206
206
  if ( planoDetails ) {
207
- let floorDetails = await floorService.find( { planoId: planoDetails._id }, { _id: 1 } );
207
+ let floorDetails = await floorService.find( { planoId: planoDetails._id }, { _id: 1, floorName: 1 } );
208
208
  for ( let i=0; i<floorDetails.length; i++ ) {
209
- let numbers =[
210
- 'Ground',
211
- 'First',
212
- 'Second',
213
- 'Third',
214
- 'Fourth',
215
- 'Fifth',
216
- ];
217
209
  if ( getUserEmail ) {
218
210
  let query = [
219
211
  {
@@ -224,7 +216,7 @@ export async function createTask( req, res ) {
224
216
  {
225
217
  $match: {
226
218
  clientId: req.body.clientId,
227
- email: getUserEmail.email.toLowerCase(),
219
+ emailLower: getUserEmail.email.toLowerCase(),
228
220
  },
229
221
  },
230
222
  ];
@@ -233,7 +225,7 @@ export async function createTask( req, res ) {
233
225
  }
234
226
  let taskData = { ...data };
235
227
  if ( floorDetails.length > 1 ) {
236
- taskData.checkListName = taskData.checkListName + `- ${numbers[i]} floor`;
228
+ taskData.checkListName = taskData.checkListName +' - '+ floorDetails[i].floorName;
237
229
  taskData.floorId = floorDetails[i]._id;
238
230
  }
239
231
  taskData.store_id = store.storeId;