tango-app-api-trax 3.3.1-beta-51 → 3.3.1-beta-52
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 +1 -1
- package/src/controllers/trax.controller.js +7 -1
- package/src/hbs/login-otp.hbs +943 -943
package/package.json
CHANGED
|
@@ -2068,6 +2068,7 @@ export const validateUserv1 = async ( req, res ) => {
|
|
|
2068
2068
|
'clientId': 1,
|
|
2069
2069
|
'storeProfile.city': 1,
|
|
2070
2070
|
'status': 1,
|
|
2071
|
+
'storeId': 1,
|
|
2071
2072
|
},
|
|
2072
2073
|
},
|
|
2073
2074
|
{
|
|
@@ -2095,6 +2096,7 @@ export const validateUserv1 = async ( req, res ) => {
|
|
|
2095
2096
|
let getStoreId = storeDetails.find( ( store ) => store.storeName.toLowerCase() == item.storeName.toLowerCase() );
|
|
2096
2097
|
if ( getStoreId ) {
|
|
2097
2098
|
item._id = getStoreId._id;
|
|
2099
|
+
item.storeId = getStoreId.storeId;
|
|
2098
2100
|
}
|
|
2099
2101
|
} );
|
|
2100
2102
|
} else {
|
|
@@ -3665,7 +3667,6 @@ export async function checklistAssign( req, res ) {
|
|
|
3665
3667
|
|
|
3666
3668
|
export async function updateAssign( req, res ) {
|
|
3667
3669
|
try {
|
|
3668
|
-
console.log( req.body );
|
|
3669
3670
|
if ( !req.body.assignedList.length && !req.body.assignedGroup.length ) {
|
|
3670
3671
|
return res.sendError( 'No data found', 204 );
|
|
3671
3672
|
}
|
|
@@ -3673,9 +3674,14 @@ export async function updateAssign( req, res ) {
|
|
|
3673
3674
|
if ( !checklistDetails ) {
|
|
3674
3675
|
return res.sendError( 'No data found', 204 );
|
|
3675
3676
|
}
|
|
3677
|
+
req.body.assignedGroup = [ ...new Set( req.body.assignedGroup.map( ( item ) => item.id ) ) ];
|
|
3678
|
+
req.body.assignedGroup = req.body.assignedGroup.map( ( ele ) => {
|
|
3679
|
+
return { id: ele };
|
|
3680
|
+
} );
|
|
3676
3681
|
await assignedService.deleteMany( { checkListId: req.body.checkListId } );
|
|
3677
3682
|
let assignedUserList = [];
|
|
3678
3683
|
await Promise.all( req.body.assignedList.map( async ( assign ) => {
|
|
3684
|
+
delete assign._id;
|
|
3679
3685
|
delete assign.id;
|
|
3680
3686
|
let query = [
|
|
3681
3687
|
{
|