tango-app-api-store-builder 1.0.0-beta-213 → 1.0.0-beta-214

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-213",
3
+ "version": "1.0.0-beta-214",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1464,6 +1464,9 @@ export async function updateStoreFixture( req, res ) {
1464
1464
  },
1465
1465
  );
1466
1466
  }
1467
+ if ( req.body?.editMode ) {
1468
+ await floorService.updateOne( { _id: new mongoose.Types.ObjectId( currentFixture.floorId ) }, { isEdited: true } );
1469
+ }
1467
1470
  res.sendSuccess( 'Updated Successfully' );
1468
1471
  } catch ( e ) {
1469
1472
  logger.error( { functionName: 'updateStoreFixture', error: e } );
@@ -4606,7 +4606,7 @@ export async function planoList( req, res ) {
4606
4606
  } );
4607
4607
  }
4608
4608
  if ( inputData.filter.status.includes( 'completed' ) ) {
4609
- let taskType= [ 'layout', 'fixture', 'vm' ];
4609
+ let taskType= [ 'fixture' ];
4610
4610
  let andCondition = [];
4611
4611
  taskType.forEach( ( type ) => {
4612
4612
  andCondition.push(
@@ -4617,7 +4617,7 @@ export async function planoList( req, res ) {
4617
4617
  },
4618
4618
  } },
4619
4619
  {
4620
- [`taskDetails.${type}Status`]: '',
4620
+ [`taskDetails.${type}Status`]: 'complete',
4621
4621
  },
4622
4622
  );
4623
4623
  } );
@@ -4890,6 +4890,7 @@ export async function getTaskDetails( req, res ) {
4890
4890
  floorId: '$_id.floorId',
4891
4891
  redoStatus: '$redoStatus',
4892
4892
  endTime: '$scheduleEndTime_iso',
4893
+ taskId: '$taskId',
4893
4894
  breach: {
4894
4895
  $cond: {
4895
4896
  if: {
@@ -5274,6 +5275,7 @@ export async function getTaskDetails( req, res ) {
5274
5275
  redoStatus: '$$task.redoStatus',
5275
5276
  endTime: '$$task.endTime',
5276
5277
  breach: '$$task.breach',
5278
+ taskId: '$$task.taskId',
5277
5279
  feedbackStatus: {
5278
5280
  $switch: {
5279
5281
  branches: [
@@ -5304,7 +5306,7 @@ export async function getTaskDetails( req, res ) {
5304
5306
  let taskInfo = await planotaskService.aggregate( query );
5305
5307
  let disabledInfo = [];
5306
5308
  let floorDetails = await layoutService.findOne( { _id: req.query.floorId }, { isEdited: 1, planoProgress: 1 } );
5307
- disabledInfo = taskInfo?.[0]?.taskStatus?.filter( ( ele ) => ( ( ele.feedbackStatus && ![ 'complete', 'disagree' ].includes( ele.feedbackStatus ) ) || ele.status != 'submit' ) && !ele?.breach );
5309
+ disabledInfo = taskInfo?.[0]?.taskStatus?.filter( ( ele ) => ( ele.feedbackStatus && ![ 'complete', 'disagree' ].includes( ele.feedbackStatus ) ) || ( ele.status != 'submit' && !ele?.breach ) );
5308
5310
  if ( floorDetails.isEdited ) {
5309
5311
  let findPending = taskInfo?.[0]?.taskStatus?.findIndex( ( ele ) => ele.type == 'fixture' && ele.feedbackStatus == 'pending' );
5310
5312
  if ( findPending != -1 ) {
@@ -1113,7 +1113,7 @@ export async function revokeTask( req, res ) {
1113
1113
  if ( !req.body.floorId ) {
1114
1114
  return res.sendError( 'floor id is required', 400 );
1115
1115
  }
1116
- await processedService.deleteMany( { planoId: req.body.planoId, floorId: req.body.floorId, checklistStatus: { $ne: 'submit' }, ...( req.body?.type && { planoType: req.body?.type } ) } );
1116
+ await processedService.deleteMany( { planoId: req.body.planoId, floorId: req.body.floorId, ...( req.body?.type != 'fixture' && { checklistStatus: { $ne: 'submit' } } ), ...( req.body?.type && { planoType: req.body?.type } ) } );
1117
1117
  return res.sendSuccess( 'Task revoked successfully' );
1118
1118
  } catch ( e ) {
1119
1119
  logger.error( { functionName: 'revokeTask', error: e } );