tango-app-api-store-builder 1.0.0-beta-93 → 1.0.0-beta-95
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.
|
@@ -11,6 +11,8 @@ import * as checklistService from '../service/checklist.service.js';
|
|
|
11
11
|
import timeZone from 'dayjs/plugin/timezone.js';
|
|
12
12
|
import * as planoProductService from '../service/planoProduct.service.js';
|
|
13
13
|
import * as floorService from '../service/storeBuilder.service.js';
|
|
14
|
+
import mongoose from 'mongoose';
|
|
15
|
+
|
|
14
16
|
dayjs.extend( timeZone );
|
|
15
17
|
|
|
16
18
|
async function createUser( data ) {
|
|
@@ -491,7 +493,8 @@ export async function updateAnswers( req, res ) {
|
|
|
491
493
|
}
|
|
492
494
|
} );
|
|
493
495
|
|
|
494
|
-
let taskDetails = await processedService.findOne( { date_string: dayjs().format( 'YYYY-MM-DD' ), userId: req.user._id, isPlano: true,
|
|
496
|
+
let taskDetails = await processedService.findOne( { date_string: dayjs().format( 'YYYY-MM-DD' ), userId: req.user._id, isPlano: true,
|
|
497
|
+
planoType: req.body.type, planoId: new mongoose.Types.ObjectId( req.body.planoId ), floorId: new mongoose.Types.ObjectId( req.body.floorId ) } );
|
|
495
498
|
|
|
496
499
|
|
|
497
500
|
let data = {
|
|
@@ -507,6 +510,9 @@ export async function updateAnswers( req, res ) {
|
|
|
507
510
|
};
|
|
508
511
|
|
|
509
512
|
await planoTaskService.updateOne( { planoId: req.body.planoId, floorId: req.body.floorId, fixtureId: req.body.fixtureId, type: req.body.type, date_string: dayjs().format( 'YYYY-MM-DD' ), ...( taskDetails?._id ) ? { taskId: taskDetails?._id } :{} }, data );
|
|
513
|
+
// req.body.taskId = taskDetails?._id;
|
|
514
|
+
// req.body.status = 'submit';
|
|
515
|
+
// await updateStatus( req, res );
|
|
510
516
|
return res.sendSuccess( 'Fixture details updated successfully' );
|
|
511
517
|
} catch ( e ) {
|
|
512
518
|
logger.error( { functionName: 'updateAnswers', error: e } );
|
|
@@ -28,4 +28,5 @@ scriptRouter
|
|
|
28
28
|
.post( '/updateCrestVms', scriptController.updateCrestVms )
|
|
29
29
|
.post( '/downloadPlanoImages', scriptController.downloadPlanoImage )
|
|
30
30
|
.post( '/getVideoUrls', scriptController.getVideoLinks )
|
|
31
|
-
.post( '/updateExcelPlanogram', scriptController.updateExcelPlanogram )
|
|
31
|
+
.post( '/updateExcelPlanogram', scriptController.updateExcelPlanogram )
|
|
32
|
+
.post( '/recorrectTaskData', scriptController.recorrectTaskData );
|