tango-app-api-trax 3.7.37 → 3.7.39
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
|
@@ -24,6 +24,8 @@ import * as clusterServices from '../services/cluster.service.js';
|
|
|
24
24
|
import * as teamsServices from '../services/teams.service.js';
|
|
25
25
|
import * as notificationModel from '../services/notification.service.js';
|
|
26
26
|
import * as runAIRequestServices from '../services/runAIRequest.services.js';
|
|
27
|
+
import * as traxApprover from '../services/approver.service.js';
|
|
28
|
+
import { insertSingleProcessData } from '../controllers/trax.controller.js';
|
|
27
29
|
|
|
28
30
|
const ObjectId = mongoose.Types.ObjectId;
|
|
29
31
|
dayjs.extend( customParseFormat );
|
|
@@ -2740,3 +2742,449 @@ export async function submittedInfo( req, res ) {
|
|
|
2740
2742
|
return res.sendError( e, 500 );
|
|
2741
2743
|
}
|
|
2742
2744
|
}
|
|
2745
|
+
|
|
2746
|
+
export async function checklistCreation( req, res ) {
|
|
2747
|
+
try {
|
|
2748
|
+
let inputBody = req.body;
|
|
2749
|
+
|
|
2750
|
+
inputBody.clientId = 458;
|
|
2751
|
+
inputBody.checklistDescription = '';
|
|
2752
|
+
let userId;
|
|
2753
|
+
let storeDetails;
|
|
2754
|
+
if ( inputBody?.coverage == 'store' ) {
|
|
2755
|
+
storeDetails = await storeService.findOne( { storeName: inputBody.storeName, clientId: inputBody.clientId, status: 'active' }, { storeId: 1, storeName: 1, storeProfile: 1 } );
|
|
2756
|
+
if ( !storeDetails ) {
|
|
2757
|
+
return res.sendError( 'Store Not Found', 500 );
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
let finduser = await userService.findOne( { clientId: inputBody.clientId, email: req.body.user, userType: 'client', isActive: true }, { userName: '$userName', email: 1, userId: '$_id' } );
|
|
2763
|
+
// console.log( finduser );
|
|
2764
|
+
|
|
2765
|
+
if ( !finduser ) {
|
|
2766
|
+
return res.sendError( 'No user Found', 500 );
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
userId = finduser._id;
|
|
2770
|
+
inputBody.userName = finduser.userName;
|
|
2771
|
+
inputBody.userEmail = finduser.email;
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
let title = `New Checklist Alert ${inputBody.checklistName}-`+storeDetails?.storeName ? storeDetails?.storeName : ``+`-${dayjs().format( 'YYYY-MM-DD' )}`;
|
|
2775
|
+
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
2776
|
+
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
2777
|
+
let description = `A new Checklist has been assigned to`+storeDetails?.storeName ? storeDetails?.storeName : `you` +`. Please complete it before the due date of ${date}.`;
|
|
2778
|
+
if ( finduser && finduser.fcmToken ) {
|
|
2779
|
+
const fcmToken = finduser.fcmToken;
|
|
2780
|
+
await sendPushNotification( title, description, fcmToken );
|
|
2781
|
+
}
|
|
2782
|
+
const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
|
|
2783
|
+
const currentTime = dayjs.utc();
|
|
2784
|
+
if ( inputDateTime.isBefore( currentTime ) ) {
|
|
2785
|
+
return res.sendError( 'The input date-time is before the current time.', 500 );
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
let userAdmin = await userService.find( { clientId: inputBody.clientId, email: inputBody?.approver, userType: 'client', isActive: true }, { name: '$userName', email: 1 } );
|
|
2790
|
+
|
|
2791
|
+
|
|
2792
|
+
if ( userAdmin && userAdmin.length === 0 ) {
|
|
2793
|
+
return res.sendError( 'Invalid Creator Details', 500 );
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
let creator = await userService.find( { clientId: inputBody.clientId, email: inputBody.creator, userType: 'client', isActive: true } );
|
|
2797
|
+
if ( creator && creator.length === 0 ) {
|
|
2798
|
+
return res.sendError( 'Invalid Creator Details', 500 );
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
if ( req.body && req.body.referenceImage && req.body.referenceImage.length > 3 ) {
|
|
2802
|
+
return res.sendError( 'Maximum 3 referenceImage only allowed', 500 );
|
|
2803
|
+
}
|
|
2804
|
+
let checklistName;
|
|
2805
|
+
if ( inputBody.coverage == 'store' ) {
|
|
2806
|
+
checklistName = `${inputBody.checklistName}(${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
2807
|
+
} else {
|
|
2808
|
+
checklistName = `${inputBody.checklistName}(-${dayjs().format( 'YYYY-MM-DD' )})`;
|
|
2809
|
+
}
|
|
2810
|
+
let result = await CLconfig.aggregate( [
|
|
2811
|
+
{ $match: { client_id: req.body.clientId, type: 'checklist' } },
|
|
2812
|
+
{ $group: { _id: null, maxCheckListNumber: { $max: '$checkListNumber' } } },
|
|
2813
|
+
] );
|
|
2814
|
+
let checkNumber = result.length > 0 ? result[0].maxCheckListNumber+1 : 0;
|
|
2815
|
+
let questionCount = 0;
|
|
2816
|
+
inputBody.sections.forEach( ( ele ) => questionCount = questionCount + ele.questions.length );
|
|
2817
|
+
let data = {
|
|
2818
|
+
checkListName: checklistName,
|
|
2819
|
+
checkListDescription: inputBody.checklistDescription,
|
|
2820
|
+
createdBy: creator[0]._id,
|
|
2821
|
+
createdByName: creator[0].userName,
|
|
2822
|
+
publish: true,
|
|
2823
|
+
questionCount: questionCount,
|
|
2824
|
+
storeCount: 1,
|
|
2825
|
+
scheduleDate: date,
|
|
2826
|
+
scheduleEndTime: time,
|
|
2827
|
+
scheduleEndTimeISO: dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' ).format(),
|
|
2828
|
+
client_id: inputBody.clientId,
|
|
2829
|
+
checkListType: 'custom',
|
|
2830
|
+
publishDate: new Date(),
|
|
2831
|
+
locationCount: 1,
|
|
2832
|
+
coverage: inputBody.coverage,
|
|
2833
|
+
allowedMultiSubmit: inputBody.allowedMultiSubmit,
|
|
2834
|
+
scheduleStartTime: dayjs().format( 'hh:mm A' ),
|
|
2835
|
+
scheduleStartTimeISO: dayjs().format(),
|
|
2836
|
+
allowedOverTime: inputBody.allowedOverTime,
|
|
2837
|
+
allowedStoreLocation: inputBody.allowedStoreLocation,
|
|
2838
|
+
checkListNumber: checkNumber,
|
|
2839
|
+
type: 'checklist',
|
|
2840
|
+
};
|
|
2841
|
+
let clientDetails = await clientService.findOne( { clientId: inputBody?.clientId }, { traxVideoUploadTimeLimit: 1 } );
|
|
2842
|
+
data['videoUploadTimeLimit'] = clientDetails?.traxVideoUploadTimeLimit || 0;
|
|
2843
|
+
data['approver'] = userAdmin;
|
|
2844
|
+
data['rawImageUpload'] = inputBody.rawImageUpload;
|
|
2845
|
+
data['rawVideoUpload'] = inputBody.rawVideoUpload;
|
|
2846
|
+
|
|
2847
|
+
let response = await CLconfig.create( data );
|
|
2848
|
+
if ( response?.approver.length ) {
|
|
2849
|
+
let inputData = [];
|
|
2850
|
+
response?.approver.forEach( ( ele ) => {
|
|
2851
|
+
inputData.push( {
|
|
2852
|
+
userEmail: ele.email,
|
|
2853
|
+
checkListId: response._id,
|
|
2854
|
+
type: 'checklist',
|
|
2855
|
+
client_id: inputBody.clientId,
|
|
2856
|
+
checkListName: data?.checkListName || '',
|
|
2857
|
+
} );
|
|
2858
|
+
} );
|
|
2859
|
+
await traxApprover.insertMany( inputData );
|
|
2860
|
+
}
|
|
2861
|
+
if ( response?._id ) {
|
|
2862
|
+
let sectionList = [];
|
|
2863
|
+
for ( let [ index, section ] of inputBody.sections.entries() ) {
|
|
2864
|
+
let sectionDetails = {
|
|
2865
|
+
section: section.name,
|
|
2866
|
+
createdBy: creator[0]._id,
|
|
2867
|
+
createdByName: creator[0].userName,
|
|
2868
|
+
client_id: inputBody.clientId,
|
|
2869
|
+
checkListId: response._id,
|
|
2870
|
+
question: [],
|
|
2871
|
+
checkList: response?.checkListName,
|
|
2872
|
+
sectionNumber: index + 1,
|
|
2873
|
+
maxQuestionNumber: 0,
|
|
2874
|
+
};
|
|
2875
|
+
for ( let [ qnIdx, ques ] of section.questions.entries() ) {
|
|
2876
|
+
let uniqueqno = 0;
|
|
2877
|
+
let uniqueqid = 0;
|
|
2878
|
+
if ( !ques.uniqueqno ) {
|
|
2879
|
+
sectionDetails.maxQuestionNumber++;
|
|
2880
|
+
uniqueqno = sectionDetails.maxQuestionNumber;
|
|
2881
|
+
}
|
|
2882
|
+
if ( !ques.uniqueqid ) {
|
|
2883
|
+
uniqueqid = req.body.clientId + '-' + data.checkListNumber + '-' + sectionDetails.sectionNumber + '-' + sectionDetails.maxQuestionNumber;
|
|
2884
|
+
}
|
|
2885
|
+
let answer = await findAnswer( ques?.answerType );
|
|
2886
|
+
if ( answer.length == 0 ) {
|
|
2887
|
+
return res.sendError( 'please enter Valid AnswerType', 500 );
|
|
2888
|
+
}
|
|
2889
|
+
if ( ques?.answerType === 'multiplechoicesingle' || ques?.answerType === 'multiplechoicemultiple' ) {
|
|
2890
|
+
if ( ques?.options && ques?.options.length > 1 ) {
|
|
2891
|
+
let optionsResult = [];
|
|
2892
|
+
for ( let option of ques?.options ) {
|
|
2893
|
+
let optiondata = {
|
|
2894
|
+
'answer': '',
|
|
2895
|
+
'sopFlag': false,
|
|
2896
|
+
'validation': false,
|
|
2897
|
+
'validationType': '',
|
|
2898
|
+
'referenceImage': [],
|
|
2899
|
+
'runAI': false,
|
|
2900
|
+
'allowUploadfromGallery': false,
|
|
2901
|
+
'descriptivetype': '',
|
|
2902
|
+
'showLinked': false,
|
|
2903
|
+
'linkedQuestion': 0,
|
|
2904
|
+
'nestedQuestion': [],
|
|
2905
|
+
};
|
|
2906
|
+
optiondata.answer = String( option );
|
|
2907
|
+
optionsResult.push( optiondata );
|
|
2908
|
+
}
|
|
2909
|
+
answer = optionsResult;
|
|
2910
|
+
} else {
|
|
2911
|
+
return res.sendError( 'please enter Valid Options', 500 );
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
sectionDetails.question.push( {
|
|
2915
|
+
'qno': qnIdx + 1,
|
|
2916
|
+
'qname': ques.question,
|
|
2917
|
+
'answerType': ques?.answerType || 'yes/no',
|
|
2918
|
+
'runAI': false,
|
|
2919
|
+
'runAIDescription': '',
|
|
2920
|
+
'allowUploadfromGallery': ques?.allowUploadfromGallery ?? false,
|
|
2921
|
+
'linkType': false,
|
|
2922
|
+
'questionReferenceImage': [],
|
|
2923
|
+
'answers': answer,
|
|
2924
|
+
'descriptivetype': 'text',
|
|
2925
|
+
'uniqueqno': uniqueqno,
|
|
2926
|
+
'uniqueqid': uniqueqid,
|
|
2927
|
+
} );
|
|
2928
|
+
}
|
|
2929
|
+
console.log( sectionDetails );
|
|
2930
|
+
sectionList.push( sectionDetails );
|
|
2931
|
+
}
|
|
2932
|
+
await CLquestions.create( sectionList );
|
|
2933
|
+
let userDetails = {
|
|
2934
|
+
userName: inputBody.userName,
|
|
2935
|
+
userEmail: inputBody.userEmail,
|
|
2936
|
+
store_id: storeDetails?.storeId,
|
|
2937
|
+
storeName: storeDetails?.storeName,
|
|
2938
|
+
city: storeDetails?.storeProfile?.city,
|
|
2939
|
+
checkFlag: true,
|
|
2940
|
+
checkListId: response?._id,
|
|
2941
|
+
checkListName: data.checkListName,
|
|
2942
|
+
client_id: inputBody.clientId,
|
|
2943
|
+
userId: userId,
|
|
2944
|
+
assignId: storeDetails?._id,
|
|
2945
|
+
country: storeDetails?.storeProfile?.country,
|
|
2946
|
+
state: storeDetails?.storeProfile?.state,
|
|
2947
|
+
coverage: inputBody.coverage,
|
|
2948
|
+
};
|
|
2949
|
+
await CLassign.create( userDetails );
|
|
2950
|
+
await insertSingleProcessData( response?._id );
|
|
2951
|
+
return res.sendSuccess( { sourceCheckList_id: response?._id } );
|
|
2952
|
+
}
|
|
2953
|
+
} catch ( e ) {
|
|
2954
|
+
logger.error( { function: 'checklistCreation ventota', error: e } );
|
|
2955
|
+
return res.sendError( e, 500 );
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
async function findAnswer( type ) {
|
|
2960
|
+
let answer = [];
|
|
2961
|
+
|
|
2962
|
+
switch ( type ) {
|
|
2963
|
+
case 'yes/no':
|
|
2964
|
+
answer = [
|
|
2965
|
+
{
|
|
2966
|
+
'answer': 'Yes',
|
|
2967
|
+
'answeroptionNumber': 1,
|
|
2968
|
+
'sopFlag': false,
|
|
2969
|
+
'validation': false,
|
|
2970
|
+
'validationType': '',
|
|
2971
|
+
'linkedQuestion': 0,
|
|
2972
|
+
'showLinked': false,
|
|
2973
|
+
'referenceImage': '',
|
|
2974
|
+
'runAI': false,
|
|
2975
|
+
'allowUploadfromGallery': false,
|
|
2976
|
+
'descriptivetype': '',
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
'answer': 'No',
|
|
2980
|
+
'answeroptionNumber': 2,
|
|
2981
|
+
'sopFlag': false,
|
|
2982
|
+
'validation': false,
|
|
2983
|
+
'validationType': '',
|
|
2984
|
+
'linkedQuestion': 0,
|
|
2985
|
+
'showLinked': false,
|
|
2986
|
+
'referenceImage': '',
|
|
2987
|
+
'runAI': false,
|
|
2988
|
+
'allowUploadfromGallery': false,
|
|
2989
|
+
'descriptivetype': '',
|
|
2990
|
+
},
|
|
2991
|
+
];
|
|
2992
|
+
return answer;
|
|
2993
|
+
break;
|
|
2994
|
+
case 'descriptive':
|
|
2995
|
+
answer = [
|
|
2996
|
+
{
|
|
2997
|
+
'answer': '',
|
|
2998
|
+
'sopFlag': false,
|
|
2999
|
+
'validation': false,
|
|
3000
|
+
'validationType': '',
|
|
3001
|
+
'validationAnswer': '',
|
|
3002
|
+
'referenceImage': [],
|
|
3003
|
+
'showLinked': false,
|
|
3004
|
+
'linkedQuestion': 0,
|
|
3005
|
+
'nestedQuestion': [],
|
|
3006
|
+
},
|
|
3007
|
+
];
|
|
3008
|
+
return answer;
|
|
3009
|
+
break;
|
|
3010
|
+
case 'multiplechoicesingle':
|
|
3011
|
+
answer = [
|
|
3012
|
+
{
|
|
3013
|
+
'answer': '',
|
|
3014
|
+
'sopFlag': false,
|
|
3015
|
+
'validation': false,
|
|
3016
|
+
'validationType': '',
|
|
3017
|
+
'linkedQuestion': 0,
|
|
3018
|
+
'showLinked': false,
|
|
3019
|
+
'referenceImage': [],
|
|
3020
|
+
'runAI': false,
|
|
3021
|
+
'allowUploadfromGallery': false,
|
|
3022
|
+
'descriptivetype': '',
|
|
3023
|
+
'nestedQuestion': [],
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
'answer': '',
|
|
3027
|
+
'sopFlag': false,
|
|
3028
|
+
'validation': false,
|
|
3029
|
+
'validationType': '',
|
|
3030
|
+
'linkedQuestion': 0,
|
|
3031
|
+
'showLinked': false,
|
|
3032
|
+
'referenceImage': [],
|
|
3033
|
+
'runAI': false,
|
|
3034
|
+
'allowUploadfromGallery': false,
|
|
3035
|
+
'descriptivetype': '',
|
|
3036
|
+
'nestedQuestion': [],
|
|
3037
|
+
},
|
|
3038
|
+
];
|
|
3039
|
+
return answer;
|
|
3040
|
+
break;
|
|
3041
|
+
case 'multiplechoicemultiple':
|
|
3042
|
+
answer = [
|
|
3043
|
+
{
|
|
3044
|
+
'answer': '',
|
|
3045
|
+
'sopFlag': false,
|
|
3046
|
+
'validation': false,
|
|
3047
|
+
'validationType': '',
|
|
3048
|
+
'referenceImage': [],
|
|
3049
|
+
'runAI': false,
|
|
3050
|
+
'allowUploadfromGallery': false,
|
|
3051
|
+
'descriptivetype': '',
|
|
3052
|
+
'showLinked': false,
|
|
3053
|
+
'linkedQuestion': 0,
|
|
3054
|
+
'nestedQuestion': [],
|
|
3055
|
+
},
|
|
3056
|
+
{
|
|
3057
|
+
'answer': '',
|
|
3058
|
+
'sopFlag': false,
|
|
3059
|
+
'validation': false,
|
|
3060
|
+
'validationType': '',
|
|
3061
|
+
'referenceImage': [],
|
|
3062
|
+
'runAI': false,
|
|
3063
|
+
'allowUploadfromGallery': false,
|
|
3064
|
+
'descriptivetype': '',
|
|
3065
|
+
'showLinked': false,
|
|
3066
|
+
'linkedQuestion': 0,
|
|
3067
|
+
'nestedQuestion': [],
|
|
3068
|
+
},
|
|
3069
|
+
];
|
|
3070
|
+
return answer;
|
|
3071
|
+
break;
|
|
3072
|
+
case 'descriptiveImage':
|
|
3073
|
+
answer = [
|
|
3074
|
+
{
|
|
3075
|
+
'answer': '',
|
|
3076
|
+
'sopFlag': false,
|
|
3077
|
+
'validation': false,
|
|
3078
|
+
'validationType': '',
|
|
3079
|
+
'validationAnswer': '',
|
|
3080
|
+
'referenceImage': [],
|
|
3081
|
+
'showLinked': false,
|
|
3082
|
+
'linkedQuestion': 0,
|
|
3083
|
+
'nestedQuestion': [],
|
|
3084
|
+
},
|
|
3085
|
+
];
|
|
3086
|
+
return answer;
|
|
3087
|
+
break;
|
|
3088
|
+
case 'image':
|
|
3089
|
+
answer = [
|
|
3090
|
+
{
|
|
3091
|
+
'answer': '',
|
|
3092
|
+
'sopFlag': false,
|
|
3093
|
+
'validation': false,
|
|
3094
|
+
'validationType': '',
|
|
3095
|
+
'validationAnswer': '',
|
|
3096
|
+
'referenceImage': [],
|
|
3097
|
+
'showLinked': false,
|
|
3098
|
+
'linkedQuestion': 0,
|
|
3099
|
+
'nestedQuestion': [],
|
|
3100
|
+
},
|
|
3101
|
+
];
|
|
3102
|
+
return answer;
|
|
3103
|
+
break;
|
|
3104
|
+
case 'video':
|
|
3105
|
+
answer = [
|
|
3106
|
+
{
|
|
3107
|
+
'answer': '',
|
|
3108
|
+
'sopFlag': false,
|
|
3109
|
+
'validation': false,
|
|
3110
|
+
'validationType': '',
|
|
3111
|
+
'validationAnswer': '',
|
|
3112
|
+
'referenceImage': [],
|
|
3113
|
+
'showLinked': false,
|
|
3114
|
+
'linkedQuestion': 0,
|
|
3115
|
+
'nestedQuestion': [],
|
|
3116
|
+
},
|
|
3117
|
+
];
|
|
3118
|
+
return answer;
|
|
3119
|
+
break;
|
|
3120
|
+
case 'multipleImage':
|
|
3121
|
+
answer = [
|
|
3122
|
+
{
|
|
3123
|
+
'answer': '',
|
|
3124
|
+
'sopFlag': false,
|
|
3125
|
+
'validation': false,
|
|
3126
|
+
'validationType': '',
|
|
3127
|
+
'validationAnswer': '',
|
|
3128
|
+
'referenceImage': [],
|
|
3129
|
+
'showLinked': false,
|
|
3130
|
+
'linkedQuestion': 0,
|
|
3131
|
+
'descriptivetype': '',
|
|
3132
|
+
'nestedQuestion': [],
|
|
3133
|
+
},
|
|
3134
|
+
];
|
|
3135
|
+
return answer;
|
|
3136
|
+
break;
|
|
3137
|
+
case 'date':
|
|
3138
|
+
answer = [
|
|
3139
|
+
{
|
|
3140
|
+
'answer': '',
|
|
3141
|
+
'sopFlag': false,
|
|
3142
|
+
'validation': false,
|
|
3143
|
+
'validationType': '',
|
|
3144
|
+
'validationAnswer': '',
|
|
3145
|
+
'referenceImage': [],
|
|
3146
|
+
'showLinked': false,
|
|
3147
|
+
'linkedQuestion': 0,
|
|
3148
|
+
'nestedQuestion': [],
|
|
3149
|
+
},
|
|
3150
|
+
];
|
|
3151
|
+
return answer;
|
|
3152
|
+
break;
|
|
3153
|
+
case 'linearscale':
|
|
3154
|
+
answer = [
|
|
3155
|
+
{
|
|
3156
|
+
'answer': '',
|
|
3157
|
+
'sopFlag': false,
|
|
3158
|
+
'validation': false,
|
|
3159
|
+
'validationType': '',
|
|
3160
|
+
'validationAnswer': '',
|
|
3161
|
+
'referenceImage': [],
|
|
3162
|
+
'showLinked': false,
|
|
3163
|
+
'linkedQuestion': 0,
|
|
3164
|
+
'rangeStart': 0,
|
|
3165
|
+
'rangeEnd': 100,
|
|
3166
|
+
'nestedQuestion': [],
|
|
3167
|
+
},
|
|
3168
|
+
];
|
|
3169
|
+
return answer;
|
|
3170
|
+
break;
|
|
3171
|
+
case 'time':
|
|
3172
|
+
answer = [
|
|
3173
|
+
{
|
|
3174
|
+
'answer': '',
|
|
3175
|
+
'sopFlag': false,
|
|
3176
|
+
'validation': false,
|
|
3177
|
+
'validationType': '',
|
|
3178
|
+
'validationAnswer': '',
|
|
3179
|
+
'referenceImage': [],
|
|
3180
|
+
'showLinked': false,
|
|
3181
|
+
'linkedQuestion': 0,
|
|
3182
|
+
'nestedQuestion': [],
|
|
3183
|
+
},
|
|
3184
|
+
];
|
|
3185
|
+
return answer;
|
|
3186
|
+
break;
|
|
3187
|
+
default:
|
|
3188
|
+
return [];
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
@@ -709,7 +709,7 @@ async function createUser( data ) {
|
|
|
709
709
|
],
|
|
710
710
|
},
|
|
711
711
|
{
|
|
712
|
-
|
|
712
|
+
featureName: 'TangoEye',
|
|
713
713
|
modules: [
|
|
714
714
|
{
|
|
715
715
|
name: 'ZoneTag',
|
|
@@ -720,7 +720,7 @@ async function createUser( data ) {
|
|
|
720
720
|
],
|
|
721
721
|
},
|
|
722
722
|
{
|
|
723
|
-
|
|
723
|
+
featureName: 'TangoTrax',
|
|
724
724
|
modules: [
|
|
725
725
|
{
|
|
726
726
|
name: 'checklist',
|
|
@@ -736,6 +736,29 @@ async function createUser( data ) {
|
|
|
736
736
|
},
|
|
737
737
|
],
|
|
738
738
|
},
|
|
739
|
+
{
|
|
740
|
+
featureName: 'FootfallDirectory',
|
|
741
|
+
modules: [
|
|
742
|
+
{
|
|
743
|
+
name: 'creator',
|
|
744
|
+
isAdd: true,
|
|
745
|
+
isEdit: true,
|
|
746
|
+
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'reviewer',
|
|
750
|
+
isAdd: false,
|
|
751
|
+
isEdit: false,
|
|
752
|
+
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
name: 'approver',
|
|
756
|
+
isAdd: false,
|
|
757
|
+
isEdit: false,
|
|
758
|
+
|
|
759
|
+
},
|
|
760
|
+
],
|
|
761
|
+
},
|
|
739
762
|
],
|
|
740
763
|
};
|
|
741
764
|
let response = await userService.create( params );
|