tango-app-api-store-zone 3.3.1-beta.2 → 3.3.1-beta.4
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-store-zone",
|
|
3
|
-
"version": "3.3.1-beta.
|
|
3
|
+
"version": "3.3.1-beta.4",
|
|
4
4
|
"description": "zone",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"mongodb": "^6.5.0",
|
|
22
22
|
"nodemon": "^3.1.0",
|
|
23
23
|
"swagger-ui-express": "^5.0.0",
|
|
24
|
-
"tango-api-schema": "^2.1.
|
|
25
|
-
"tango-app-api-middleware": "^3.1.
|
|
24
|
+
"tango-api-schema": "^2.1.58",
|
|
25
|
+
"tango-app-api-middleware": "^3.1.43-alpha.6",
|
|
26
26
|
"winston": "^3.13.0",
|
|
27
27
|
"winston-daily-rotate-file": "^5.0.0"
|
|
28
28
|
},
|
|
@@ -44,7 +44,7 @@ export const addCustomTag = async ( req, res ) => {
|
|
|
44
44
|
|
|
45
45
|
export const customTagList = async ( req, res ) => {
|
|
46
46
|
try {
|
|
47
|
-
let customTagList = [ 'Front', 'Back' ];
|
|
47
|
+
let customTagList = [ 'Front', 'Back', 'Tracker-in', 'Tracker-out' ];
|
|
48
48
|
let storeDetails = await storeService.findOne( { storeId: req.query.storeId }, { product: 1 } );
|
|
49
49
|
let clientDetails = await clientService.findOne( { clientId: req.query.clientId }, { featureConfigs: 1 } );
|
|
50
50
|
if ( clientDetails && clientDetails?.featureConfigs?.isExcludedArea ) {
|
|
@@ -149,6 +149,14 @@ export const customTagList = async ( req, res ) => {
|
|
|
149
149
|
i.rgbColor = 'rgba(193, 214, 114, 0.5)';
|
|
150
150
|
i.rgbBorderColor = 'rgb(203, 224, 124)';
|
|
151
151
|
}
|
|
152
|
+
if ( i.tagName === 'Tracker-in' ) {
|
|
153
|
+
i.rgbColor = 'rgba(123, 95, 105, 0.5)';
|
|
154
|
+
i.rgbBorderColor = 'rgb(133, 105, 115)';
|
|
155
|
+
}
|
|
156
|
+
if ( i.tagName === 'Tracker-out' ) {
|
|
157
|
+
i.rgbColor = 'rgba(12, 195, 111, 0.5)';
|
|
158
|
+
i.rgbBorderColor = 'rgb(22, 205, 125)';
|
|
159
|
+
}
|
|
152
160
|
} );
|
|
153
161
|
|
|
154
162
|
return res.sendSuccess( customTagList );
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import express from 'express';
|
|
4
|
-
import { isAllowedSessionHandler, validate,
|
|
4
|
+
import { isAllowedSessionHandler, validate, accessVerification } from 'tango-app-api-middleware';
|
|
5
5
|
import * as validation from '../dtos/validation.dtos.js';
|
|
6
6
|
import * as tagController from '../controllers/zoneTagging.controller.js';
|
|
7
7
|
|
|
8
8
|
export const zoneTaggingRouter = express.Router();
|
|
9
9
|
|
|
10
|
-
zoneTaggingRouter.post( '/addCustomTag', isAllowedSessionHandler,
|
|
11
|
-
zoneTaggingRouter.get( '/customTagList', isAllowedSessionHandler,
|
|
12
|
-
zoneTaggingRouter.post( '/tagging', isAllowedSessionHandler,
|
|
13
|
-
zoneTaggingRouter.get( '/cameraList', isAllowedSessionHandler,
|
|
14
|
-
zoneTaggingRouter.post( '/updateCustomTag', isAllowedSessionHandler,
|
|
15
|
-
zoneTaggingRouter.post( '/deleteCustomTag', isAllowedSessionHandler,
|
|
16
|
-
zoneTaggingRouter.get( '/getCameraTagging', isAllowedSessionHandler,
|
|
17
|
-
zoneTaggingRouter.get( '/getZoneTagging', isAllowedSessionHandler,
|
|
18
|
-
zoneTaggingRouter.post( '/updatezoneTagging', isAllowedSessionHandler,
|
|
19
|
-
zoneTaggingRouter.post( '/deleteZoneTag', isAllowedSessionHandler,
|
|
10
|
+
zoneTaggingRouter.post( '/addCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isAdd' ] } ] } ), validate( validation.validateAddTagParams ), tagController.addCustomTag );
|
|
11
|
+
zoneTaggingRouter.get( '/customTagList', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateTagParams ), tagController.customTagList );
|
|
12
|
+
zoneTaggingRouter.post( '/tagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateTaggingParams ), tagController.tagging );
|
|
13
|
+
zoneTaggingRouter.get( '/cameraList', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateTagParams ), tagController.getCameraList );
|
|
14
|
+
zoneTaggingRouter.post( '/updateCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateUpdateTagParams ), tagController.updateTag );
|
|
15
|
+
zoneTaggingRouter.post( '/deleteCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateDeleteTagParams ), tagController.deleteTag );
|
|
16
|
+
zoneTaggingRouter.get( '/getCameraTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateCameraTagParams ), tagController.getCameraTagging );
|
|
17
|
+
zoneTaggingRouter.get( '/getZoneTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateZonetagParams ), tagController.getZoneList );
|
|
18
|
+
zoneTaggingRouter.post( '/updatezoneTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateCamZonetagParams ), tagController.updatezoneTagging );
|
|
19
|
+
zoneTaggingRouter.post( '/deleteZoneTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.updateCoordinatesParams ), tagController.deletezoneTagging );
|
|
20
20
|
|
|
21
21
|
zoneTaggingRouter.get( '/updateOldZone', tagController.updateOldData );
|
|
22
22
|
|