mobioffice-cli 0.2.1 → 1.0.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/{src/index.ts → lib/index.d.ts} +1 -45
- package/lib/models/Feed-Details-Screen.model.d.ts +6 -0
- package/lib/models/Feed-Details-Screen.model.js +27 -0
- package/lib/models/action.model.d.ts +58 -0
- package/lib/models/action.model.js +315 -0
- package/lib/models/actions/doffing.d.ts +6 -0
- package/lib/models/actions/doffing.js +64 -0
- package/lib/models/actions/folding.d.ts +7 -0
- package/lib/models/actions/folding.js +37 -0
- package/lib/models/attendance.model.d.ts +44 -0
- package/lib/models/attendance.model.js +446 -0
- package/lib/models/cicoPost.model.d.ts +9 -0
- package/lib/models/cicoPost.model.js +19 -0
- package/lib/models/company.model.d.ts +67 -0
- package/lib/models/company.model.js +725 -0
- package/lib/models/contact-us/resquest.model.d.ts +30 -0
- package/lib/models/contact-us/resquest.model.js +73 -0
- package/lib/models/crud/crud.d.ts +7 -0
- package/lib/models/crud/crud.js +27 -0
- package/lib/models/customCollection.model.d.ts +9 -0
- package/lib/models/customCollection.model.js +40 -0
- package/lib/models/customer/customer.model.d.ts +32 -0
- package/lib/models/customer/customer.model.js +62 -0
- package/lib/models/deviceChangeReq.d.ts +10 -0
- package/lib/models/deviceChangeReq.js +138 -0
- package/lib/models/dispatch.model.d.ts +14 -0
- package/lib/models/dispatch.model.js +93 -0
- package/lib/models/feed.models.d.ts +8 -0
- package/lib/models/feed.models.js +97 -0
- package/lib/models/geofence.model.d.ts +7 -0
- package/lib/models/geofence.model.js +61 -0
- package/lib/models/leaveApplicationPost.model.d.ts +12 -0
- package/lib/models/leaveApplicationPost.model.js +72 -0
- package/lib/models/license.model.d.ts +25 -0
- package/lib/models/license.model.js +198 -0
- package/lib/models/log.model.d.ts +6 -0
- package/{src/models/log.model.ts → lib/models/log.model.js} +11 -11
- package/lib/models/meeting.model.d.ts +11 -0
- package/lib/models/meeting.model.js +79 -0
- package/lib/models/meter.model.d.ts +18 -0
- package/lib/models/meter.model.js +54 -0
- package/lib/models/missingPunchPost.model.d.ts +15 -0
- package/lib/models/missingPunchPost.model.js +69 -0
- package/lib/models/offline.model.d.ts +70 -0
- package/lib/models/offline.model.js +831 -0
- package/lib/models/post.model.d.ts +38 -0
- package/lib/models/post.model.js +94 -0
- package/lib/models/printDetailsScreen.model.d.ts +6 -0
- package/lib/models/printDetailsScreen.model.js +27 -0
- package/lib/models/pushNotifications/pushNotification.model.d.ts +4 -0
- package/lib/models/pushNotifications/pushNotification.model.js +17 -0
- package/lib/models/report-actions.model.d.ts +26 -0
- package/lib/models/report-actions.model.js +56 -0
- package/lib/models/report-definition-details.model.d.ts +13 -0
- package/lib/models/report-definition-details.model.js +85 -0
- package/lib/models/report-definition.model.d.ts +23 -0
- package/lib/models/report-definition.model.js +26 -0
- package/lib/models/report-definitions-summary.model.d.ts +8 -0
- package/lib/models/report-definitions-summary.model.js +59 -0
- package/lib/models/report-detail-data.model.d.ts +46 -0
- package/lib/models/report-detail-data.model.js +49 -0
- package/lib/models/report-visibility.model.d.ts +7 -0
- package/lib/models/report-visibility.model.js +42 -0
- package/lib/models/report.model.d.ts +19 -0
- package/lib/models/report.model.js +138 -0
- package/lib/models/reportGenerator.model.d.ts +164 -0
- package/lib/models/reportGenerator.model.js +642 -0
- package/lib/models/response.model.d.ts +18 -0
- package/lib/models/response.model.js +30 -0
- package/lib/models/steps.factory.model.d.ts +172 -0
- package/lib/models/steps.factory.model.js +187 -0
- package/lib/models/storeGupShupLog.model.d.ts +6 -0
- package/lib/models/storeGupShupLog.model.js +51 -0
- package/lib/models/summary.model.d.ts +10 -0
- package/{src/models/summary.model.ts → lib/models/summary.model.js} +28 -27
- package/lib/models/tasks/sub-task-group.model.d.ts +42 -0
- package/lib/models/tasks/sub-task-group.model.js +154 -0
- package/lib/models/tasks/tags.model.d.ts +29 -0
- package/lib/models/tasks/tags.model.js +70 -0
- package/lib/models/tasks/task-group.model.d.ts +53 -0
- package/lib/models/tasks/task-group.model.js +156 -0
- package/lib/models/tasks/task.model.d.ts +163 -0
- package/lib/models/tasks/task.model.js +603 -0
- package/lib/models/tempCollection.model.d.ts +40 -0
- package/{src/models/tempCollection.model.ts → lib/models/tempCollection.model.js} +114 -130
- package/lib/models/user.model.d.ts +42 -0
- package/lib/models/user.model.js +272 -0
- package/lib/models/utility.model.d.ts +13 -0
- package/lib/models/utility.model.js +93 -0
- package/lib/models/visitorManagement/acknowledgement.model.d.ts +9 -0
- package/lib/models/visitorManagement/acknowledgement.model.js +55 -0
- package/lib/models/visitorManagement/invite.model.d.ts +32 -0
- package/lib/models/visitorManagement/invite.model.js +326 -0
- package/lib/models/visitorManagement/newIn.model.d.ts +19 -0
- package/lib/models/visitorManagement/newIn.model.js +67 -0
- package/lib/models/visitorManagement/selfServe.model.d.ts +13 -0
- package/lib/models/visitorManagement/selfServe.model.js +46 -0
- package/lib/models/worklogPost.model.d.ts +6 -0
- package/lib/models/worklogPost.model.js +9 -0
- package/lib/services/customer.d.ts +30 -0
- package/lib/services/customer.js +354 -0
- package/lib/services/meeting.d.ts +19 -0
- package/lib/services/meeting.js +109 -0
- package/package.json +4 -1
- package/.prettierrc +0 -4
- package/a.js +0 -3
- package/scripts/1.ts +0 -1300
- package/scripts/GCloudPubSub/pub-sub-config.json +0 -12
- package/scripts/GCloudPubSub/visitorAutoRejection.ts +0 -86
- package/scripts/actions/assignUsersFromOneActionToOther.ts +0 -64
- package/scripts/actions/assignUsersListToAction.ts +0 -81
- package/scripts/actions/getActionsListOfUser.ts +0 -42
- package/scripts/actions/getCompanyUserDetails.ts +0 -49
- package/scripts/actions/giveActionToUser.ts +0 -41
- package/scripts/actions/giveUsersToActivitySelector.ts +0 -56
- package/scripts/actions/groupActionsInActivitySelector.ts +0 -101
- package/scripts/actions/modifySummaryReportDB.ts +0 -42
- package/scripts/actions/setUrlToActionStep.ts +0 -18
- package/scripts/actions/syncMySqlAttendanceDBWithFirebase.ts +0 -93
- package/scripts/actions/syncMySqlMeetingsDBWithFirebase.ts +0 -103
- package/scripts/actions/test.ts +0 -29
- package/scripts/actions/transferFeedsOldIdToNew.ts +0 -40
- package/scripts/actions/transformUserIntoManager.ts +0 -89
- package/scripts/argvConfig.js +0 -9
- package/scripts/backUpData/testCode.ts +0 -131
- package/scripts/benaraScripts/addWorkAreaMap.ts +0 -46
- package/scripts/benaraScripts/add_customers.ts +0 -26
- package/scripts/benaraScripts/add_customers_contact.ts +0 -27
- package/scripts/benaraScripts/add_empty_work_area.ts +0 -17
- package/scripts/benaraScripts/assignManagers.ts +0 -35
- package/scripts/benaraScripts/changeCheckInFlag.ts +0 -45
- package/scripts/benaraScripts/createCustomerContactsList.ts +0 -170
- package/scripts/benaraScripts/createUserByDeletingOldUser.ts +0 -70
- package/scripts/benaraScripts/createUsersAreaMapCollection.ts +0 -23
- package/scripts/benaraScripts/createWorkAreaMap.ts +0 -24
- package/scripts/benaraScripts/mapWorkAreasToUsers.ts +0 -112
- package/scripts/companies_data.json +0 -2496
- package/scripts/create_or_update_users.ts +0 -31
- package/scripts/csvToJson/csvToJson.ts +0 -90
- package/scripts/csvToJson/users.json +0 -3896
- package/scripts/db.js +0 -27
- package/scripts/db.json +0 -13
- package/scripts/dbMySql.ts +0 -63
- package/scripts/delete_action_steps.ts +0 -11
- package/scripts/delete_user.ts +0 -71
- package/scripts/dev_companies_data.json +0 -613
- package/scripts/enroll.xlsx +0 -0
- package/scripts/export_users.ts +0 -72
- package/scripts/files/visitorManagementFiles/displayScreen.json +0 -70
- package/scripts/files/visitorManagementFiles/init_report_visibility.ts +0 -79
- package/scripts/firebaseConfig.js +0 -12
- package/scripts/firebaseDocs/deleteIncommingCollection.ts +0 -47
- package/scripts/firebaseDocs/updateDoc.ts +0 -43
- package/scripts/getActionDataIntoJSON/getActionData.ts +0 -68
- package/scripts/get_attendance_by_any_date.ts +0 -14
- package/scripts/get_attendance_by_month.ts +0 -12
- package/scripts/get_attendance_monthly_by_team.ts +0 -11
- package/scripts/get_daily_report.ts +0 -10
- package/scripts/get_mangers.ts +0 -13
- package/scripts/grant_user_license.ts +0 -18
- package/scripts/init_CustomCollection.ts +0 -16
- package/scripts/init_action_steps.ts +0 -28
- package/scripts/init_actions.ts +0 -31
- package/scripts/init_company.ts +0 -18
- package/scripts/init_customer_mysql.ts +0 -12
- package/scripts/init_feed.ts +0 -4
- package/scripts/init_feed_details_screen.ts +0 -14
- package/scripts/init_geofence.ts +0 -26
- package/scripts/init_print_details_screen.ts +0 -14
- package/scripts/init_report_actions.ts +0 -24
- package/scripts/init_report_definition_detail.ts +0 -26
- package/scripts/init_report_definition_summary.ts +0 -16
- package/scripts/init_report_visibility.ts +0 -46
- package/scripts/init_user_customcollection.ts +0 -16
- package/scripts/json/action.json +0 -21
- package/scripts/json/company.json +0 -24
- package/scripts/json/report-action.json +0 -13
- package/scripts/json/report-def-deet.json +0 -43
- package/scripts/json/resp.json +0 -784
- package/scripts/json/steps.json +0 -24
- package/scripts/json/test.ts +0 -49
- package/scripts/mysqlConfig.ts +0 -9
- package/scripts/revoke_or_extend_license.ts +0 -14
- package/scripts/stream.js +0 -4
- package/scripts/testing1.ts +0 -35
- package/scripts/update/doc.json +0 -20
- package/scripts/update/getDocByPath.ts +0 -34
- package/scripts/update/updateDocByPath.ts +0 -47
- package/scripts/update/updateUsersOfCompanies.ts +0 -58
- package/scripts/update_actions.ts +0 -19
- package/scripts/update_actions_steps.ts +0 -19
- package/scripts/update_company.ts +0 -19
- package/scripts/update_geofence.ts +0 -20
- package/scripts/update_managers.ts +0 -16
- package/scripts/visitorMgmt/createArea.ts +0 -68
- package/scripts/visitorMgmt/createArea.txt +0 -3
- package/scripts/visitorMgmt/createVisitorPathInstructionDocs.ts +0 -130
- package/scripts/visitorMgmt/createVisitorPathInstructionDocs.txt +0 -18
- package/scripts/visitorMgmt/encryptDateString.ts +0 -71
- package/scripts/visitorMgmt/makeHostsManagersOfEachOther.ts +0 -117
- package/scripts/whatsapp_gupshup/sendMessage.ts +0 -97
- package/src/models/Feed-Details-Screen.model.ts +0 -29
- package/src/models/action.model.ts +0 -355
- package/src/models/actions/doffing.ts +0 -71
- package/src/models/actions/folding.ts +0 -39
- package/src/models/attendance.model.ts +0 -615
- package/src/models/cicoPost.model.ts +0 -20
- package/src/models/company.model.ts +0 -975
- package/src/models/contact-us/resquest.model.ts +0 -87
- package/src/models/crud/crud.ts +0 -30
- package/src/models/customCollection.model.ts +0 -47
- package/src/models/customer/customer.model.ts +0 -85
- package/src/models/deviceChangeReq.ts +0 -150
- package/src/models/dispatch.model.ts +0 -99
- package/src/models/feed.models.ts +0 -104
- package/src/models/geofence.model.ts +0 -61
- package/src/models/leaveApplicationPost.model.ts +0 -79
- package/src/models/license.model.ts +0 -215
- package/src/models/meeting.model.ts +0 -80
- package/src/models/meter.model.ts +0 -62
- package/src/models/missingPunchPost.model.ts +0 -84
- package/src/models/offline.model.ts +0 -1133
- package/src/models/post.model.ts +0 -105
- package/src/models/printDetailsScreen.model.ts +0 -30
- package/src/models/pushNotifications/pushNotification.model.ts +0 -17
- package/src/models/report-actions.model.ts +0 -57
- package/src/models/report-definition-details.model.ts +0 -89
- package/src/models/report-definition.model.ts +0 -26
- package/src/models/report-definitions-summary.model.ts +0 -59
- package/src/models/report-detail-data.model.ts +0 -49
- package/src/models/report-visibility.model.ts +0 -44
- package/src/models/report.model.ts +0 -179
- package/src/models/reportGenerator.model.ts +0 -883
- package/src/models/response.model.ts +0 -31
- package/src/models/steps.factory.model.ts +0 -195
- package/src/models/storeGupShupLog.model.ts +0 -49
- package/src/models/tasks/sub-task-group.model.ts +0 -173
- package/src/models/tasks/tags.model.ts +0 -113
- package/src/models/tasks/task-group.model.ts +0 -172
- package/src/models/tasks/task.model.ts +0 -681
- package/src/models/user.model.ts +0 -319
- package/src/models/utility.model.ts +0 -100
- package/src/models/visitorManagement/acknowledgement.model.ts +0 -71
- package/src/models/visitorManagement/invite.model.ts +0 -406
- package/src/models/visitorManagement/newIn.model.ts +0 -82
- package/src/models/visitorManagement/selfServe.model.ts +0 -58
- package/src/models/worklogPost.model.ts +0 -8
- package/src/services/customer.ts +0 -382
- package/src/services/meeting.ts +0 -123
- package/test/1.ts +0 -13
- package/test/db.js +0 -19
- package/test/firebaseConfig.js +0 -1
- package/tsconfig.json +0 -16
@@ -0,0 +1,172 @@
|
|
1
|
+
declare class StepsFactory {
|
2
|
+
buttonActionText: string;
|
3
|
+
field: any;
|
4
|
+
fieldType: string;
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
nextCollection: string;
|
8
|
+
nextRole: string;
|
9
|
+
order: number;
|
10
|
+
submitUrl: string;
|
11
|
+
type: string;
|
12
|
+
value: string;
|
13
|
+
initViaSnapshotDoc(doc: any): void;
|
14
|
+
static inputFieldTemplate: {
|
15
|
+
buttonActionText: string;
|
16
|
+
field: {
|
17
|
+
hint: string;
|
18
|
+
icon: string;
|
19
|
+
id: string;
|
20
|
+
url: string;
|
21
|
+
keys: never[];
|
22
|
+
typeAheadRequired: boolean;
|
23
|
+
keyboardType: string;
|
24
|
+
keyForAPI: string;
|
25
|
+
isMultiline: boolean;
|
26
|
+
isRequired: boolean;
|
27
|
+
label: string;
|
28
|
+
value: string;
|
29
|
+
};
|
30
|
+
fieldType: string;
|
31
|
+
label: string;
|
32
|
+
id: string;
|
33
|
+
nextCollection: string;
|
34
|
+
nextRole: string;
|
35
|
+
order: number;
|
36
|
+
submitUrl: string;
|
37
|
+
type: string;
|
38
|
+
value: string;
|
39
|
+
};
|
40
|
+
static datePickerTemplate: {
|
41
|
+
buttonActionText: string;
|
42
|
+
field: {
|
43
|
+
hint: string;
|
44
|
+
icon: string;
|
45
|
+
id: string;
|
46
|
+
keyForAPI: string;
|
47
|
+
isRequired: boolean;
|
48
|
+
label: string;
|
49
|
+
value: string;
|
50
|
+
};
|
51
|
+
fieldType: string;
|
52
|
+
id: string;
|
53
|
+
label: string;
|
54
|
+
nextCollection: string;
|
55
|
+
nextRole: string;
|
56
|
+
order: number;
|
57
|
+
submitUrl: string;
|
58
|
+
type: string;
|
59
|
+
value: string;
|
60
|
+
};
|
61
|
+
static summaryStepTemplate: {
|
62
|
+
buttonActionText: string;
|
63
|
+
field: {
|
64
|
+
hint: string;
|
65
|
+
icon: string;
|
66
|
+
id: string;
|
67
|
+
keyForAPI: string;
|
68
|
+
label: string;
|
69
|
+
value: string;
|
70
|
+
};
|
71
|
+
fieldType: string;
|
72
|
+
id: string;
|
73
|
+
label: string;
|
74
|
+
nextCollection: string;
|
75
|
+
nextRole: string;
|
76
|
+
order: number;
|
77
|
+
sumbitUrl: string;
|
78
|
+
type: string;
|
79
|
+
value: string;
|
80
|
+
};
|
81
|
+
static radioListItemsTemplate: {
|
82
|
+
id: string;
|
83
|
+
label: string;
|
84
|
+
hint: string;
|
85
|
+
icon: string;
|
86
|
+
};
|
87
|
+
static radioListTemplate: {
|
88
|
+
id: string;
|
89
|
+
buttonActionText: string;
|
90
|
+
field: {
|
91
|
+
autoChangePage: boolean;
|
92
|
+
hint: string;
|
93
|
+
icon: string;
|
94
|
+
id: string;
|
95
|
+
isAPICalled: boolean;
|
96
|
+
keyForAPI: string;
|
97
|
+
isRequired: boolean;
|
98
|
+
itemList: never[];
|
99
|
+
};
|
100
|
+
fieldType: string;
|
101
|
+
label: string;
|
102
|
+
nextCollection: string;
|
103
|
+
nextRole: string;
|
104
|
+
order: number;
|
105
|
+
submitUrl: string;
|
106
|
+
type: string;
|
107
|
+
value: string;
|
108
|
+
};
|
109
|
+
static qrCodeTemplate: {
|
110
|
+
id: string;
|
111
|
+
buttonActionText: string;
|
112
|
+
field: {
|
113
|
+
autoChangePage: boolean;
|
114
|
+
hint: string;
|
115
|
+
icon: string;
|
116
|
+
keyForAPI: string;
|
117
|
+
id: string;
|
118
|
+
isAPICalled: boolean;
|
119
|
+
isRequired: boolean;
|
120
|
+
};
|
121
|
+
fieldType: string;
|
122
|
+
label: string;
|
123
|
+
nextCollection: string;
|
124
|
+
nextRole: string;
|
125
|
+
order: number;
|
126
|
+
submitUrl: string;
|
127
|
+
type: string;
|
128
|
+
value: string;
|
129
|
+
};
|
130
|
+
static timePickerTemplate: {
|
131
|
+
buttonActionText: string;
|
132
|
+
field: {
|
133
|
+
hint: string;
|
134
|
+
icon: string;
|
135
|
+
id: string;
|
136
|
+
keyForAPI: string;
|
137
|
+
isRequired: boolean;
|
138
|
+
label: string;
|
139
|
+
value: string;
|
140
|
+
};
|
141
|
+
fieldType: string;
|
142
|
+
type: string;
|
143
|
+
id: string;
|
144
|
+
label: string;
|
145
|
+
nextCollection: string;
|
146
|
+
nextRole: string;
|
147
|
+
order: number;
|
148
|
+
submitUrl: string;
|
149
|
+
value: string;
|
150
|
+
};
|
151
|
+
static selfieTemplate: {
|
152
|
+
buttonActionText: string;
|
153
|
+
field: {
|
154
|
+
id: string;
|
155
|
+
label: string;
|
156
|
+
hint: string;
|
157
|
+
keyForAPI: string;
|
158
|
+
value: string;
|
159
|
+
isRequired: boolean;
|
160
|
+
};
|
161
|
+
fieldType: string;
|
162
|
+
type: string;
|
163
|
+
id: string;
|
164
|
+
label: string;
|
165
|
+
nextCollection: string;
|
166
|
+
nextRole: string;
|
167
|
+
order: number;
|
168
|
+
submitUrl: string;
|
169
|
+
value: string;
|
170
|
+
};
|
171
|
+
}
|
172
|
+
export { StepsFactory };
|
@@ -0,0 +1,187 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.StepsFactory = void 0;
|
4
|
+
class StepsFactory {
|
5
|
+
buttonActionText = "";
|
6
|
+
field = new Map();
|
7
|
+
fieldType = "";
|
8
|
+
id = "";
|
9
|
+
label = "";
|
10
|
+
nextCollection = "";
|
11
|
+
nextRole = "";
|
12
|
+
order = 0;
|
13
|
+
submitUrl = "";
|
14
|
+
type = "";
|
15
|
+
value = "";
|
16
|
+
initViaSnapshotDoc(doc) {
|
17
|
+
var _data = doc.data();
|
18
|
+
this.buttonActionText = _data.butttonActionText;
|
19
|
+
this.field = _data.field;
|
20
|
+
this.id = _data.id;
|
21
|
+
this.label = _data.label;
|
22
|
+
this.nextCollection = _data.nextCollection;
|
23
|
+
this.nextRole = _data.nextRole;
|
24
|
+
this.order = _data.order;
|
25
|
+
this.submitUrl = _data.submitUrl;
|
26
|
+
this.type = _data.type;
|
27
|
+
this.value = _data.value;
|
28
|
+
}
|
29
|
+
static inputFieldTemplate = {
|
30
|
+
buttonActionText: "Next",
|
31
|
+
field: {
|
32
|
+
hint: "",
|
33
|
+
icon: "",
|
34
|
+
id: "1",
|
35
|
+
url: "",
|
36
|
+
keys: [],
|
37
|
+
typeAheadRequired: false,
|
38
|
+
keyboardType: "",
|
39
|
+
keyForAPI: "",
|
40
|
+
isMultiline: false,
|
41
|
+
isRequired: true,
|
42
|
+
label: "Input",
|
43
|
+
value: "",
|
44
|
+
},
|
45
|
+
fieldType: "InputField",
|
46
|
+
label: "Input",
|
47
|
+
id: "",
|
48
|
+
nextCollection: "",
|
49
|
+
nextRole: "",
|
50
|
+
order: 0,
|
51
|
+
submitUrl: "",
|
52
|
+
type: "normal",
|
53
|
+
value: "",
|
54
|
+
};
|
55
|
+
static datePickerTemplate = {
|
56
|
+
buttonActionText: "Next",
|
57
|
+
field: {
|
58
|
+
hint: "",
|
59
|
+
icon: "",
|
60
|
+
id: "1",
|
61
|
+
keyForAPI: "",
|
62
|
+
isRequired: true,
|
63
|
+
label: "Date",
|
64
|
+
value: "",
|
65
|
+
},
|
66
|
+
fieldType: "datePicker",
|
67
|
+
id: "",
|
68
|
+
label: "Date",
|
69
|
+
nextCollection: "",
|
70
|
+
nextRole: "",
|
71
|
+
order: 0,
|
72
|
+
submitUrl: "",
|
73
|
+
type: "normal",
|
74
|
+
value: "",
|
75
|
+
};
|
76
|
+
static summaryStepTemplate = {
|
77
|
+
buttonActionText: "Done",
|
78
|
+
field: {
|
79
|
+
hint: "",
|
80
|
+
icon: "",
|
81
|
+
id: "1",
|
82
|
+
keyForAPI: "",
|
83
|
+
label: "Summary",
|
84
|
+
value: "",
|
85
|
+
},
|
86
|
+
fieldType: "Summary",
|
87
|
+
id: "",
|
88
|
+
label: "Summary",
|
89
|
+
nextCollection: "",
|
90
|
+
nextRole: "",
|
91
|
+
order: 4,
|
92
|
+
sumbitUrl: "",
|
93
|
+
type: "summary",
|
94
|
+
value: "",
|
95
|
+
};
|
96
|
+
static radioListItemsTemplate = {
|
97
|
+
id: "",
|
98
|
+
label: "",
|
99
|
+
hint: "",
|
100
|
+
icon: "",
|
101
|
+
};
|
102
|
+
static radioListTemplate = {
|
103
|
+
id: "",
|
104
|
+
buttonActionText: "Next",
|
105
|
+
field: {
|
106
|
+
autoChangePage: false,
|
107
|
+
hint: "",
|
108
|
+
icon: "",
|
109
|
+
id: "RLMP101",
|
110
|
+
isAPICalled: false,
|
111
|
+
keyForAPI: "",
|
112
|
+
isRequired: true,
|
113
|
+
itemList: [],
|
114
|
+
},
|
115
|
+
fieldType: "RadioList",
|
116
|
+
label: "label",
|
117
|
+
nextCollection: "",
|
118
|
+
nextRole: "",
|
119
|
+
order: 1,
|
120
|
+
submitUrl: "",
|
121
|
+
type: "normal",
|
122
|
+
value: "",
|
123
|
+
};
|
124
|
+
static qrCodeTemplate = {
|
125
|
+
id: "",
|
126
|
+
buttonActionText: "Next",
|
127
|
+
field: {
|
128
|
+
autoChangePage: false,
|
129
|
+
hint: "",
|
130
|
+
icon: "",
|
131
|
+
keyForAPI: "",
|
132
|
+
id: "RLMP101",
|
133
|
+
isAPICalled: false,
|
134
|
+
isRequired: true,
|
135
|
+
},
|
136
|
+
fieldType: "RadioList",
|
137
|
+
label: "label",
|
138
|
+
nextCollection: "",
|
139
|
+
nextRole: "",
|
140
|
+
order: 1,
|
141
|
+
submitUrl: "",
|
142
|
+
type: "normal",
|
143
|
+
value: "",
|
144
|
+
};
|
145
|
+
static timePickerTemplate = {
|
146
|
+
buttonActionText: "Next",
|
147
|
+
field: {
|
148
|
+
hint: "",
|
149
|
+
icon: "",
|
150
|
+
id: "1",
|
151
|
+
keyForAPI: "",
|
152
|
+
isRequired: true,
|
153
|
+
label: "Time",
|
154
|
+
value: "",
|
155
|
+
},
|
156
|
+
fieldType: "timePicker",
|
157
|
+
type: "normal",
|
158
|
+
id: "",
|
159
|
+
label: "Time",
|
160
|
+
nextCollection: "",
|
161
|
+
nextRole: "",
|
162
|
+
order: 2,
|
163
|
+
submitUrl: "",
|
164
|
+
value: "",
|
165
|
+
};
|
166
|
+
static selfieTemplate = {
|
167
|
+
buttonActionText: "Next",
|
168
|
+
field: {
|
169
|
+
id: "1",
|
170
|
+
label: "",
|
171
|
+
hint: "",
|
172
|
+
keyForAPI: "",
|
173
|
+
value: "",
|
174
|
+
isRequired: true,
|
175
|
+
},
|
176
|
+
fieldType: "Selfie",
|
177
|
+
type: "normal",
|
178
|
+
id: "",
|
179
|
+
label: "Time",
|
180
|
+
nextCollection: "",
|
181
|
+
nextRole: "",
|
182
|
+
order: 2,
|
183
|
+
submitUrl: "",
|
184
|
+
value: "",
|
185
|
+
};
|
186
|
+
}
|
187
|
+
exports.StepsFactory = StepsFactory;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Pool } from "mysql2";
|
2
|
+
export declare class GupShupLogs {
|
3
|
+
static insertLog(connection: Pool, companyId: string, phoneNumber: string, msgId: string): Promise<any>;
|
4
|
+
static getLogs(connection: Pool, phoneNumber: string, msgId: string): Promise<any>;
|
5
|
+
static updateLogs(connection: Pool, phoneNumber: string, msgId: string, action: string, data: string): Promise<any>;
|
6
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.GupShupLogs = void 0;
|
7
|
+
const crud_1 = __importDefault(require("./crud/crud"));
|
8
|
+
class GupShupLogs {
|
9
|
+
static async insertLog(connection, companyId, phoneNumber, msgId) {
|
10
|
+
const crudServicce = new crud_1.default(connection);
|
11
|
+
try {
|
12
|
+
const qryString = `INSERT INTO GupShup_Logs (companyId, phone_number, gupshup_msg_id, sent, delivered, \`read\`, deleted)
|
13
|
+
VALUES ('${companyId}', '${phoneNumber}', '${msgId}', NULL, NULL, NULL, NULL);`;
|
14
|
+
console.log("query", qryString);
|
15
|
+
const result = await crudServicce.query(qryString);
|
16
|
+
return result;
|
17
|
+
}
|
18
|
+
catch (error) {
|
19
|
+
console.log(error.message);
|
20
|
+
return error;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
static async getLogs(connection, phoneNumber, msgId) {
|
24
|
+
const crudServicce = new crud_1.default(connection);
|
25
|
+
try {
|
26
|
+
const qryString = `SELECT * FROM GupShup_Logs
|
27
|
+
WHERE phone_number='${phoneNumber}' AND gupshup_msg_id = '${msgId}';`;
|
28
|
+
console.log("query", qryString);
|
29
|
+
const result = await crudServicce.query(qryString);
|
30
|
+
return result;
|
31
|
+
}
|
32
|
+
catch (error) {
|
33
|
+
console.log(error.message);
|
34
|
+
return error;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
static async updateLogs(connection, phoneNumber, msgId, action, data) {
|
38
|
+
const crudServicce = new crud_1.default(connection);
|
39
|
+
try {
|
40
|
+
const qryString = `UPDATE GupShup_Logs SET ${action} = '${data}' WHERE phone_number='${phoneNumber}' AND gupshup_msg_id = '${msgId}';`;
|
41
|
+
console.log("qryString", qryString);
|
42
|
+
const result = await crudServicce.query(qryString);
|
43
|
+
return result;
|
44
|
+
}
|
45
|
+
catch (error) {
|
46
|
+
console.log(error.message);
|
47
|
+
return error;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
exports.GupShupLogs = GupShupLogs;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Post } from "./post.model";
|
2
|
+
import { Pool } from "mysql2";
|
3
|
+
declare class Summary extends Post {
|
4
|
+
actionName: string;
|
5
|
+
actionType: string;
|
6
|
+
constructor();
|
7
|
+
uploadSummaryToReportDB(info: any, connection: Pool, userPhone: string, eventId: string): Promise<void>;
|
8
|
+
getEpochTimeFromTimeObj(timeObj: any): number;
|
9
|
+
}
|
10
|
+
export { Summary };
|
@@ -1,23 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Summary = void 0;
|
7
|
+
const post_model_1 = require("./post.model");
|
8
|
+
const utility_model_1 = require("./utility.model");
|
9
|
+
const crud_1 = __importDefault(require("./crud/crud"));
|
10
|
+
class Summary extends post_model_1.Post {
|
11
|
+
actionName;
|
12
|
+
actionType;
|
10
13
|
constructor() {
|
11
14
|
super();
|
12
15
|
this.actionName = "summary";
|
13
16
|
this.actionType = "worklog";
|
14
17
|
}
|
15
|
-
|
16
|
-
|
17
|
-
const crudServicce = new CurdService(connection)
|
18
|
+
async uploadSummaryToReportDB(info, connection, userPhone, eventId) {
|
19
|
+
const crudServicce = new crud_1.default(connection);
|
18
20
|
try {
|
19
21
|
const extraData = info.extraData;
|
20
|
-
const createdAt = await Utilities.epochToMySqlDateTime(info.createdAt);
|
22
|
+
const createdAt = await utility_model_1.Utilities.epochToMySqlDateTime(info.createdAt);
|
21
23
|
let startTime = extraData.startTime;
|
22
24
|
if (typeof startTime !== "number") {
|
23
25
|
startTime = this.getEpochTimeFromTimeObj(startTime);
|
@@ -36,28 +38,27 @@ class Summary extends Post {
|
|
36
38
|
eventId: eventId,
|
37
39
|
level: extraData.level,
|
38
40
|
planImage: extraData.planImage,
|
39
|
-
startTime: await Utilities.epochToMySqlDateTime(startTime),
|
40
|
-
endTime: await Utilities.epochToMySqlDateTime(endTime)
|
41
|
-
}
|
42
|
-
let eventDate
|
43
|
-
eventDate = await Utilities.epochToMySqlDateTime(eventDate);
|
41
|
+
startTime: await utility_model_1.Utilities.epochToMySqlDateTime(startTime),
|
42
|
+
endTime: await utility_model_1.Utilities.epochToMySqlDateTime(endTime)
|
43
|
+
};
|
44
|
+
let eventDate = new Date(eventDetails.date.split("/").reverse().join("-")).getTime();
|
45
|
+
eventDate = await utility_model_1.Utilities.epochToMySqlDateTime(eventDate);
|
44
46
|
const qryString = `INSERT INTO summaryReports (companyId, userPhone,
|
45
47
|
createdAt, eventDetails,
|
46
48
|
eventDate)
|
47
49
|
VALUES ('${info.companyId}', '${userPhone}',
|
48
50
|
'${createdAt}', '${JSON.stringify(eventDetails)}',
|
49
|
-
'${eventDate}')
|
51
|
+
'${eventDate}');`;
|
50
52
|
console.log(qryString);
|
51
|
-
console.log("adding summary report entry to DB")
|
52
|
-
await crudServicce.query(qryString)
|
53
|
-
}
|
54
|
-
|
53
|
+
console.log("adding summary report entry to DB");
|
54
|
+
await crudServicce.query(qryString);
|
55
|
+
}
|
56
|
+
catch (error) {
|
57
|
+
throw new Error(error.message);
|
55
58
|
}
|
56
59
|
}
|
57
|
-
|
58
|
-
getEpochTimeFromTimeObj(timeObj: any) {
|
60
|
+
getEpochTimeFromTimeObj(timeObj) {
|
59
61
|
return timeObj._seconds * 1000 + Math.floor(timeObj._nanoseconds / 1000000);
|
60
62
|
}
|
61
63
|
}
|
62
|
-
|
63
|
-
export { Summary }
|
64
|
+
exports.Summary = Summary;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import * as admin from "firebase-admin";
|
2
|
+
declare class SubTaskGroup {
|
3
|
+
private _id;
|
4
|
+
get id(): string | "";
|
5
|
+
set id(value: string | "");
|
6
|
+
private _groupId;
|
7
|
+
get groupId(): string | "";
|
8
|
+
set groupId(value: string | "");
|
9
|
+
private _title;
|
10
|
+
get title(): string | "";
|
11
|
+
set title(value: string | "");
|
12
|
+
private _userId;
|
13
|
+
get userId(): string;
|
14
|
+
set userId(value: string);
|
15
|
+
private _companyId;
|
16
|
+
get companyId(): string;
|
17
|
+
set companyId(value: string);
|
18
|
+
constructor();
|
19
|
+
argConstructor(id: string, groupId: string, title: string, userId: string, companyId: string): void;
|
20
|
+
fromJSON(subTaskGroup: string): void;
|
21
|
+
toJSON(): {
|
22
|
+
id: string;
|
23
|
+
title: string;
|
24
|
+
groupId: string;
|
25
|
+
userId: string;
|
26
|
+
companyId: string;
|
27
|
+
};
|
28
|
+
getValue(key: string): string | undefined;
|
29
|
+
save(firestore: admin.firestore.Firestore): Promise<{
|
30
|
+
status: string;
|
31
|
+
message: string;
|
32
|
+
}>;
|
33
|
+
static updateSubGroup(firestore: admin.firestore.Firestore, body: any): Promise<{
|
34
|
+
status: string;
|
35
|
+
message: string;
|
36
|
+
error?: undefined;
|
37
|
+
} | {
|
38
|
+
error: any;
|
39
|
+
status: any;
|
40
|
+
}>;
|
41
|
+
}
|
42
|
+
export { SubTaskGroup };
|