tango-app-api-infra 3.0.91-dev → 3.0.92-dev

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.0.91-dev",
3
+ "version": "3.0.92-dev",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -52,7 +52,18 @@ export async function activityLog( req, res ) {
52
52
 
53
53
  export async function updateMatStatus( req, res ) {
54
54
  try {
55
- let update = await updateOneTangoTicket( { ticketId: req.body.ticketId }, { 'ticketDetails.matStatus': req.body.matStatus } );
55
+ req.body.ticketActivity.push( {
56
+ actionType: req.body.matStatus,
57
+ timeStamp: new Date(),
58
+ actionBy: 'Tango',
59
+ IdentifiedBy: req.user.userName,
60
+ } );
61
+ let updatedata = { 'ticketDetails.matStatus': req.body.matStatus, 'ticketActivity': req.body.ticketActivity };
62
+ if ( req.body.matStatus == 'closed' ) {
63
+ updatedata = { 'ticketDetails.matStatus': req.body.matStatus, 'status': 'closed', 'ticketActivity': req.body.ticketActivity };
64
+ }
65
+ let update = await updateOneTangoTicket( { ticketId: req.body.ticketId }, updatedata );
66
+
56
67
  if ( update ) {
57
68
  res.sendSuccess( 'Updated Successfully' );
58
69
  }