tango-app-api-trax 3.4.1-beta-1 → 3.5.0-ai-2
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/index.js +2 -1
- package/package.json +3 -3
- package/src/controllers/activityLog.controller.js +294 -0
- package/src/controllers/download.controller.js +11 -9
- package/src/controllers/gallery.controller.js +213 -9
- package/src/controllers/internalTrax.controller.js +606 -13
- package/src/controllers/mobileTrax.controller.js +292 -10
- package/src/controllers/teaxFlag.controller.js +7 -3
- package/src/controllers/trax.controller.js +590 -136
- package/src/controllers/traxDashboard.controllers.js +18 -5
- package/src/dtos/downloadValidation.dtos.js +1 -0
- package/src/hbs/login-otp.hbs +943 -943
- package/src/routes/activityLog.router.js +18 -0
- package/src/routes/gallery.routes.js +2 -1
- package/src/routes/internalTraxApi.router.js +2 -1
- package/src/routes/mobileTrax.routes.js +1 -0
- package/src/services/camera.service.js +14 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { isAllowedInternalAPIHandler, isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
3
|
+
|
|
4
|
+
export const traxActivityLogRouter = express.Router();
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
insertLog,
|
|
8
|
+
updateLog,
|
|
9
|
+
listLog,
|
|
10
|
+
} from '../controllers/activityLog.controller.js';
|
|
11
|
+
|
|
12
|
+
traxActivityLogRouter
|
|
13
|
+
.post( '/insertLog', isAllowedInternalAPIHandler, insertLog )
|
|
14
|
+
.post( '/updateLog', isAllowedInternalAPIHandler, updateLog )
|
|
15
|
+
.post( '/listLog', isAllowedSessionHandler, listLog );
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export default traxActivityLogRouter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { getchecklist, viewchecklist, getMobileUseagelist, storeOpencloselist, getcustomerunattendedlist, storesList, checklistDropdown, redoChecklist, approveChecklist, approvalstatus, getLogs, headerStoresV2, teamsList, userList } from '../controllers/gallery.controller.js';
|
|
3
|
+
import { getchecklist, viewchecklist, getMobileUseagelist, storeOpencloselist, getcustomerunattendedlist, storesList, checklistDropdown, redoChecklist, redomultiChecklist, approveChecklist, approvalstatus, getLogs, headerStoresV2, teamsList, userList } from '../controllers/gallery.controller.js';
|
|
4
4
|
import express from 'express';
|
|
5
5
|
export const galleryRouter = express.Router();
|
|
6
6
|
import { validate, isAllowedSessionHandler, isAllowedClient, getAssinedStore } from 'tango-app-api-middleware';
|
|
@@ -24,6 +24,7 @@ galleryRouter
|
|
|
24
24
|
galleryRouter
|
|
25
25
|
.post( '/updateApprove', isAllowedSessionHandler, approveChecklist )
|
|
26
26
|
.post( '/redo', isAllowedSessionHandler, redoChecklist )
|
|
27
|
+
.post( '/multiredo', isAllowedSessionHandler, redomultiChecklist )
|
|
27
28
|
.post( '/approvalstatus', isAllowedSessionHandler, approvalstatus )
|
|
28
29
|
.post( '/getLogs', isAllowedSessionHandler, getLogs );
|
|
29
30
|
galleryRouter
|
|
@@ -22,6 +22,7 @@ internalTraxRouter
|
|
|
22
22
|
.get( '/getOTP', isAllowedInternalAPIHandler, internalController.getOTP )
|
|
23
23
|
.get( '/getDownloads', isAllowedInternalAPIHandler, internalController.getDownloads )
|
|
24
24
|
.post( '/sendPushNotification', isAllowedInternalAPIHandler, internalController.internalSendPushNotification )
|
|
25
|
-
.post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification )
|
|
25
|
+
.post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification )
|
|
26
|
+
.post( '/getLiveChecklistClients', isAllowedInternalAPIHandler, internalController.getLiveChecklistClients );
|
|
26
27
|
|
|
27
28
|
|
|
@@ -13,6 +13,7 @@ mobileRouter
|
|
|
13
13
|
.post( '/submitCheckList', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobilechecklistQuestionValidator, mobileController.sopMobilechecklistMultiSectionFormatter, mobileController.submitChecklist )
|
|
14
14
|
.post( '/submitCheckListv5', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobilechecklistQuestionValidatorv1, mobileController.sopMobilechecklistMultiSectionFormatterv1, mobileController.submitChecklist )
|
|
15
15
|
.post( '/submitTask', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobileTaskQuestionValidator, mobileController.sopMobileTaskMultiSectionFormatter, mobileController.submitTask )
|
|
16
|
+
.post( '/submiteyeTestTask', isAllowedSessionHandler, mobileController.submiteyeTestTask )
|
|
16
17
|
.get( '/dashboard', isAllowedSessionHandler, validate( dashboardValidation ), mobileController.dashboard )
|
|
17
18
|
.get( '/dashboardv1', isAllowedSessionHandler, validate( dashboardValidation ), mobileController.dashboardv1 )
|
|
18
19
|
.get( '/checklist', isAllowedSessionHandler, validate( mobileChecklistValidation ), mobileController.checklist )
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
|
|
3
|
+
export const aggregate = async ( query ={} ) => {
|
|
4
|
+
return model.cameraModel.aggregate( query );
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const updateOne = async ( query, record ) => {
|
|
8
|
+
return model.cameraModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const findOne = async ( query ={}, field={} ) => {
|
|
12
|
+
return model.cameraModel.findOne( query, field );
|
|
13
|
+
};
|
|
14
|
+
|