tango-app-api-trax 3.3.1-beta-34 → 3.3.1-beta-35
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
|
@@ -3512,7 +3512,7 @@ export const selectAssign = async ( req, res ) => {
|
|
|
3512
3512
|
// console.log( 'getUsers =>', getUsers );
|
|
3513
3513
|
let teamQuery = [
|
|
3514
3514
|
{ $match: { clientId: requestData.clientId } },
|
|
3515
|
-
{ $project: { 'teamName': 1, 'type': '
|
|
3515
|
+
{ $project: { 'teamName': 1, 'type': 'teams' } },
|
|
3516
3516
|
];
|
|
3517
3517
|
// let getTeams = await teamsServices.aggregateTeams( teamQuery );
|
|
3518
3518
|
// console.log( 'getTeams =>', getTeams );
|
|
@@ -3706,13 +3706,15 @@ async function assignUsers( data ) {
|
|
|
3706
3706
|
},
|
|
3707
3707
|
},
|
|
3708
3708
|
];
|
|
3709
|
+
// console.log( 'data?.userEmail=>', data.userEmail );
|
|
3709
3710
|
let userDetails = await userService.aggregate( query );
|
|
3710
3711
|
if ( !userDetails.length ) {
|
|
3711
3712
|
let userData = {
|
|
3712
|
-
userName: data
|
|
3713
|
+
userName: data?.userEmail?.split( '@' )[0],
|
|
3713
3714
|
email: data.userEmail,
|
|
3714
3715
|
clientId: data.clientId,
|
|
3715
3716
|
};
|
|
3717
|
+
// console.log( userData, 'userData', data );
|
|
3716
3718
|
let details = await createUser( userData );
|
|
3717
3719
|
userDetails = [ details ];
|
|
3718
3720
|
}
|
|
@@ -3733,7 +3735,7 @@ async function assignUsers( data ) {
|
|
|
3733
3735
|
}
|
|
3734
3736
|
}
|
|
3735
3737
|
|
|
3736
|
-
console.log( assignedData, 'test', data );
|
|
3738
|
+
// console.log( assignedData, 'test', data );
|
|
3737
3739
|
if ( assignedData && !data.upload && data.insert ) {
|
|
3738
3740
|
await assignedService.updateOne( { checkListId: assignedData.checkListId, assignId: assignedData.assignId }, assignedData );
|
|
3739
3741
|
} else {
|
|
@@ -3769,7 +3771,7 @@ export async function checklistAssign( req, res ) {
|
|
|
3769
3771
|
coverage: req.body.coverage,
|
|
3770
3772
|
insert: false,
|
|
3771
3773
|
};
|
|
3772
|
-
console.log( assignedData, 'daterthj' );
|
|
3774
|
+
// console.log( assignedData, 'daterthj' );
|
|
3773
3775
|
let uploadData = await assignUsers( assignedData );
|
|
3774
3776
|
if ( uploadData ) {
|
|
3775
3777
|
if ( Array.isArray( uploadData ) ) {
|