tango-app-api-store-builder 1.0.0-beta-140 → 1.0.0-beta-141
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
|
@@ -290,14 +290,14 @@ export async function createTask( req, res ) {
|
|
|
290
290
|
taskData.userName = userDetails.userName;
|
|
291
291
|
taskData.userEmail = userDetails.email;
|
|
292
292
|
taskData.planoId = planoDetails?._id;
|
|
293
|
+
let planoProgress = req.body.checkListName == 'Fixture Verification' ? 50 : req.body.checkListName == 'VM Verification' ? 75 : 25;
|
|
294
|
+
if ( req.body?.checkListName && req.body.checkListName == 'Layout Verification' ) {
|
|
295
|
+
await planoTaskService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId } );
|
|
296
|
+
planoProgress = 25;
|
|
297
|
+
await processedService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId, isPlano: true } );
|
|
298
|
+
}
|
|
299
|
+
await planoService.updateOne( { _id: planoDetails?._id }, { $set: { planoProgress } } );
|
|
293
300
|
for ( let j=0; j<req.body.days; j++ ) {
|
|
294
|
-
let planoProgress = req.body.checkListName == 'Fixture Verification' ? 50 : req.body.checkListName == 'VM Verification' ? 75 : 25;
|
|
295
|
-
if ( req.body?.checkListName && req.body.checkListName == 'Layout Verification' ) {
|
|
296
|
-
await planoTaskService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId } );
|
|
297
|
-
planoProgress = 25;
|
|
298
|
-
await processedService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId, isPlano: true } );
|
|
299
|
-
}
|
|
300
|
-
await planoService.updateOne( { _id: planoDetails?._id }, { $set: { planoProgress } } );
|
|
301
301
|
let currDate = dayjs().add( j, 'day' );
|
|
302
302
|
let time = '12:00 AM';
|
|
303
303
|
if ( currDate.format( 'YYYY-MM-DD' ) == dayjs().format( 'YYYY-MM-DD' ) ) {
|