tango-app-api-store-builder 1.0.0-beta-91 → 1.0.0-beta-92
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
|
@@ -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
|
{
|
|
@@ -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 +
|
|
228
|
+
taskData.checkListName = taskData.checkListName +' - '+ floorDetails[i].floorName;
|
|
237
229
|
taskData.floorId = floorDetails[i]._id;
|
|
238
230
|
}
|
|
239
231
|
taskData.store_id = store.storeId;
|