tango-app-api-infra 3.1.24 → 3.1.26

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-infra",
3
- "version": "3.1.24",
3
+ "version": "3.1.26",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,7 +25,7 @@ export async function createTicket( req, res ) {
25
25
  );
26
26
 
27
27
 
28
- if ( clientTickets.length > 10 ) {
28
+ if ( clientTickets.length > 50 ) {
29
29
  return res.sendError( 'Ticket limit exceeded for the day', 400 );
30
30
  }
31
31
 
@@ -1047,11 +1047,15 @@ export async function updateIssue( data ) {
1047
1047
  statusCheckAlertTime: statusCheckAlertTime,
1048
1048
  } );
1049
1049
  }
1050
+ let client = await findOneClient( { clientId: data.basicDetails.clientId } );
1051
+ let refreshdate = dayjs().add( client.ticketConfigs.refreshAlert, 'days' );
1052
+
1050
1053
  let query = {
1051
1054
  'ticketActivity': data.ticketActivity,
1052
1055
  'ticketDetails.issueIdentifiedDate': new Date(),
1053
1056
  'ticketDetails.issueStatus': 'identified',
1054
1057
  'status': 'inprogress',
1058
+ 'ticketDetails.ticketRefreshTime': new Date( dayjs( refreshdate ).format( 'YYYY-MM-DD' ) ),
1055
1059
  };
1056
1060
  await updateOneTangoTicket( { ticketId: data.ticketId }, query );
1057
1061
  } catch ( error ) {
@@ -14,22 +14,22 @@ storeInfraRouter.post( '/storeTicketcard', isAllowedSessionHandler, authorize( {
14
14
  } ), storeTicketcard );
15
15
  storeInfraRouter.post( '/edgeAppLogTable', isAllowedSessionHandler, authorize( {
16
16
  userType: [ 'client', 'tango' ], access: [
17
- { featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
17
+ { featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
18
18
  } ), edgeAppLogTable );
19
19
  storeInfraRouter.post( '/viewedgeAppLog', isAllowedSessionHandler, authorize( {
20
20
  userType: [ 'client', 'tango' ], access: [
21
- { featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
21
+ { featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
22
22
  } ), viewedgeAppLog );
23
23
  storeInfraRouter.post( '/cameraAngleChange', isAllowedSessionHandler, authorize( {
24
24
  userType: [ 'client', 'tango' ], access: [
25
- { featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
25
+ { featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
26
26
  } ), cameraAngleChange );
27
27
 
28
28
  storeInfraRouter.post( '/datewiseDowntime', isAllowedSessionHandler, authorize( {
29
29
  userType: [ 'client', 'tango' ], access: [
30
- { featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
30
+ { featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
31
31
  } ), datewiseDowntime );
32
32
  storeInfraRouter.post( '/streamwiseDowntime', isAllowedSessionHandler, authorize( {
33
33
  userType: [ 'client', 'tango' ], access: [
34
- { featureName: 'manage', name: 'tickets', permissions: [ 'isView' ] } ],
34
+ { featureName: 'manage', name: 'stores', permissions: [ 'isView' ] } ],
35
35
  } ), streamwiseDowntime );