tango-app-api-store-builder 1.0.0-beta-138 → 1.0.0-beta-139
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
|
@@ -648,7 +648,7 @@ export async function updateFixtureStatus( req, res ) {
|
|
|
648
648
|
{
|
|
649
649
|
_id: new mongoose.Types.ObjectId( req.body.planoId ),
|
|
650
650
|
},
|
|
651
|
-
{ planoProgress: 100 },
|
|
651
|
+
{ $set: { planoProgress: 100 } },
|
|
652
652
|
);
|
|
653
653
|
}
|
|
654
654
|
res.sendSuccess( 'updated successfully' );
|
|
@@ -77,7 +77,7 @@ export async function fixtureBulkUpload( req, res ) {
|
|
|
77
77
|
let FixLibCode = await getMaxFixtureLibCode();
|
|
78
78
|
groupedData[ele].fixtureLibCode = FixLibCode;
|
|
79
79
|
// fixtureData.push( groupedData[ele] );
|
|
80
|
-
await planoLibraryService.
|
|
80
|
+
await planoLibraryService.upsertOne( { 'fixtureCategory': groupedData[ele].fixtureCategory, 'fixtureWidth.value': groupedData[ele].fixtureWidth.value, 'fixtureWidth.unit': groupedData[ele].fixtureWidth.unit }, groupedData[ele] );
|
|
81
81
|
// }
|
|
82
82
|
}
|
|
83
83
|
// let deleteList = inputData.deleteFixtureList.map( ( ele ) => new ObjectId( ele ) );
|
|
@@ -3053,9 +3053,9 @@ export async function storeFixturesTaskv2( req, res ) {
|
|
|
3053
3053
|
redoCount++;
|
|
3054
3054
|
disabled = false;
|
|
3055
3055
|
}
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3056
|
+
}
|
|
3057
|
+
if ( compliance?.taskType == 'redo' ) {
|
|
3058
|
+
disabled = false;
|
|
3059
3059
|
}
|
|
3060
3060
|
|
|
3061
3061
|
return {
|
|
@@ -3153,9 +3153,9 @@ export async function storeFixturesTaskv2( req, res ) {
|
|
|
3153
3153
|
redoCount++;
|
|
3154
3154
|
disabled = false;
|
|
3155
3155
|
}
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3156
|
+
}
|
|
3157
|
+
if ( compliance?.taskType == 'redo' ) {
|
|
3158
|
+
disabled = false;
|
|
3159
3159
|
}
|
|
3160
3160
|
|
|
3161
3161
|
return {
|
|
@@ -4183,3 +4183,16 @@ export async function getTaskDetails( req, res ) {
|
|
|
4183
4183
|
return res.sendError( e, 500 );
|
|
4184
4184
|
}
|
|
4185
4185
|
}
|
|
4186
|
+
|
|
4187
|
+
export async function getPlanoUser( req, res ) {
|
|
4188
|
+
try {
|
|
4189
|
+
let userList = await planoStaticData.findOne( { type: 'user' }, { data: 1 } );
|
|
4190
|
+
if ( !userList?.data?.includes( req.user.email ) ) {
|
|
4191
|
+
return res.sendSuccess( 'Unauthorized' );
|
|
4192
|
+
}
|
|
4193
|
+
return res.sendSuccess( 'Authorized' );
|
|
4194
|
+
} catch ( e ) {
|
|
4195
|
+
logger.error( { functionName: 'getPlanoUser', error: e } );
|
|
4196
|
+
return res.sendError( e, 500 );
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
@@ -293,11 +293,9 @@ export async function createTask( req, res ) {
|
|
|
293
293
|
for ( let j=0; j<req.body.days; j++ ) {
|
|
294
294
|
let planoProgress = req.body.checkListName == 'Fixture Verification' ? 50 : req.body.checkListName == 'VM Verification' ? 75 : 25;
|
|
295
295
|
if ( req.body?.checkListName && req.body.checkListName == 'Layout Verification' ) {
|
|
296
|
-
|
|
297
|
-
taskIdList = taskIdList.map( ( ele ) => ele.taskId );
|
|
298
|
-
await planoTaskService.deleteMany( { planoId: planoDetails?._id, floorId: taskData.floorId } );
|
|
296
|
+
await planoTaskService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId } );
|
|
299
297
|
planoProgress = 25;
|
|
300
|
-
await processedService.deleteMany( { _id:
|
|
298
|
+
await processedService.deleteMany( { planoId: planoDetails?._id, floorId: taskData?.floorId, isPlano: true } );
|
|
301
299
|
}
|
|
302
300
|
await planoService.updateOne( { _id: planoDetails?._id }, { $set: { planoProgress } } );
|
|
303
301
|
let currDate = dayjs().add( j, 'day' );
|
|
@@ -50,4 +50,5 @@ storeBuilderRouter
|
|
|
50
50
|
|
|
51
51
|
storeBuilderRouter
|
|
52
52
|
.post( '/planoList', isAllowedSessionHandler, storeBuilderController.planoList )
|
|
53
|
-
.get( '/taskDetails', isAllowedSessionHandler, storeBuilderController.getTaskDetails )
|
|
53
|
+
.get( '/taskDetails', isAllowedSessionHandler, storeBuilderController.getTaskDetails )
|
|
54
|
+
.get( '/getPlanoUser', isAllowedSessionHandler, storeBuilderController.getPlanoUser );
|