tango-app-api-task 3.2.0-beta.8 → 3.2.1
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
|
@@ -436,9 +436,9 @@ export async function validateUser( req, res ) {
|
|
|
436
436
|
if ( !storeExists.length ) {
|
|
437
437
|
storeId.push( { store: item.storeName, message: '' } );
|
|
438
438
|
}
|
|
439
|
-
if ( storeExists.length && !storeExists[0]?.storeProfile?.city && !item.city ) {
|
|
440
|
-
|
|
441
|
-
}
|
|
439
|
+
// if ( storeExists.length && !storeExists[0]?.storeProfile?.city && !item.city ) {
|
|
440
|
+
// storeId.push( { store: item.storeName, message: 'city is required' } );
|
|
441
|
+
// }
|
|
442
442
|
if ( storeExists.length && storeExists[0].status != 'active' ) {
|
|
443
443
|
storeId.push( { store: item.storeName, message: 'store is inactive' } );
|
|
444
444
|
}
|
|
@@ -1087,6 +1087,78 @@ async function createUser( data ) {
|
|
|
1087
1087
|
role: 'user',
|
|
1088
1088
|
password: '5dqFKAJj29PsV6P+kL+3Dw==',
|
|
1089
1089
|
isActive: true,
|
|
1090
|
+
userType: 'client',
|
|
1091
|
+
rolespermission: [
|
|
1092
|
+
{
|
|
1093
|
+
featureName: 'Global',
|
|
1094
|
+
modules: [
|
|
1095
|
+
{
|
|
1096
|
+
name: 'Store',
|
|
1097
|
+
isAdd: false,
|
|
1098
|
+
isEdit: false,
|
|
1099
|
+
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
name: 'User',
|
|
1103
|
+
isAdd: false,
|
|
1104
|
+
isEdit: false,
|
|
1105
|
+
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: 'Camera',
|
|
1109
|
+
isAdd: false,
|
|
1110
|
+
isEdit: false,
|
|
1111
|
+
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
name: 'Configuration',
|
|
1115
|
+
isAdd: false,
|
|
1116
|
+
isEdit: false,
|
|
1117
|
+
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
name: 'Subscription',
|
|
1121
|
+
isAdd: false,
|
|
1122
|
+
isEdit: false,
|
|
1123
|
+
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
name: 'Billing',
|
|
1127
|
+
isAdd: false,
|
|
1128
|
+
isEdit: false,
|
|
1129
|
+
|
|
1130
|
+
},
|
|
1131
|
+
],
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
featurName: 'TangoEye',
|
|
1135
|
+
modules: [
|
|
1136
|
+
{
|
|
1137
|
+
name: 'ZoneTag',
|
|
1138
|
+
isAdd: false,
|
|
1139
|
+
isEdit: false,
|
|
1140
|
+
|
|
1141
|
+
},
|
|
1142
|
+
],
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
featurName: 'TangoTrax',
|
|
1146
|
+
modules: [
|
|
1147
|
+
{
|
|
1148
|
+
name: 'checklist',
|
|
1149
|
+
isAdd: false,
|
|
1150
|
+
isEdit: false,
|
|
1151
|
+
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
name: 'Task',
|
|
1155
|
+
isAdd: false,
|
|
1156
|
+
isEdit: false,
|
|
1157
|
+
|
|
1158
|
+
},
|
|
1159
|
+
],
|
|
1160
|
+
},
|
|
1161
|
+
],
|
|
1090
1162
|
};
|
|
1091
1163
|
let response = await userService.create( params );
|
|
1092
1164
|
return response._id;
|
|
@@ -1211,7 +1283,6 @@ export async function createChecklistTask( req, res ) {
|
|
|
1211
1283
|
await sendPushNotification( title, description, fcmToken );
|
|
1212
1284
|
}
|
|
1213
1285
|
|
|
1214
|
-
|
|
1215
1286
|
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
1216
1287
|
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
1217
1288
|
let data = {
|
|
@@ -1314,7 +1385,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
1314
1385
|
return res.sendError( 'No data found', 204 );
|
|
1315
1386
|
}
|
|
1316
1387
|
let question = taskDetails.questionAnswers;
|
|
1317
|
-
let sectionIndex = question.findIndex( ( sec ) => sec
|
|
1388
|
+
let sectionIndex = question.findIndex( ( sec ) => sec?.sectionName == req.body?.sectionName );
|
|
1318
1389
|
if ( sectionIndex == -1 ) {
|
|
1319
1390
|
return res.sendError( 'section is not found', 400 );
|
|
1320
1391
|
}
|
|
@@ -15361,7 +15432,8 @@ export async function teamMigrations( req, res ) {
|
|
|
15361
15432
|
},
|
|
15362
15433
|
],
|
|
15363
15434
|
};
|
|
15364
|
-
|
|
15435
|
+
await createTeamsModel( payload );
|
|
15436
|
+
// const teams = await createTeamsModel( payload );
|
|
15365
15437
|
} else {
|
|
15366
15438
|
let userIn = teamsExist.users.filter( ( data ) => data.email === userexits.userName );
|
|
15367
15439
|
if ( userIn.length==0 ) {
|