tango-app-api-infra 3.0.18-dev → 3.0.20-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
|
@@ -132,13 +132,17 @@ export async function viewTicket( req, res ) {
|
|
|
132
132
|
}
|
|
133
133
|
export async function AlertTicketReply( req, res ) {
|
|
134
134
|
try {
|
|
135
|
-
req.body.ticketActivity = req.body.ticketActivity.filter( ( data ) => data.
|
|
135
|
+
req.body.ticketActivity = req.body.ticketActivity.filter( ( data ) => data.actionType != 'statusCheck' );
|
|
136
136
|
req.body.ticketActivity.push( {
|
|
137
137
|
actionType: 'statusCheckReply',
|
|
138
|
-
actionBy: '
|
|
138
|
+
actionBy: 'User',
|
|
139
139
|
statusCheckReply: req.body.statusCheckReply,
|
|
140
140
|
hibernationDays: req.body.hibernationDays,
|
|
141
141
|
} );
|
|
142
|
+
req.body.ticketActivity.push( {
|
|
143
|
+
actionType: 'statusCheckMonitor',
|
|
144
|
+
actionBy: 'Tango',
|
|
145
|
+
} );
|
|
142
146
|
await updateOneTangoTicket( { ticketId: req.body.ticketId }, { 'ticketActivity': req.body.ticketActivity } );
|
|
143
147
|
if ( req.body.hibernationDays ) {
|
|
144
148
|
req.body.hibernationDays = dayjs().add( req.body.hibernationDays, 'days' ).format( 'YYYY-MM-DD' );
|
|
@@ -142,7 +142,9 @@ export async function assigntoUser( req, res ) {
|
|
|
142
142
|
}
|
|
143
143
|
export async function updateRefreshTicket( req, res ) {
|
|
144
144
|
try {
|
|
145
|
-
|
|
145
|
+
for ( let ticket of req.body.TicketList ) {
|
|
146
|
+
await updateOneTangoTicket( { ticketId: ticket.ticketId }, { 'ticketDetails.ticketType': 'refreshticket' } );
|
|
147
|
+
}
|
|
146
148
|
res.sendSuccess( 'updated Successfully' );
|
|
147
149
|
} catch ( error ) {
|
|
148
150
|
logger.error( { error: error, function: 'updateRefreshTicket' } );
|
|
@@ -154,6 +154,7 @@ export async function activeTicketList( req, res ) {
|
|
|
154
154
|
$project: {
|
|
155
155
|
storeId: '$basicDetails.storeId',
|
|
156
156
|
ticketId: 1,
|
|
157
|
+
clientId: '$basicDetails.clientId',
|
|
157
158
|
storeName: '$basicDetails.storeName',
|
|
158
159
|
address: { $ifNull: [ '$basicDetails.address', '' ] },
|
|
159
160
|
status: 1,
|
|
@@ -18,7 +18,7 @@ export async function validateDetails( req, res, next ) {
|
|
|
18
18
|
req.body.basicDetails = {
|
|
19
19
|
storeId: req.body.storeId,
|
|
20
20
|
storeName: store.storeName,
|
|
21
|
-
address: store.storeProfile&&store.storeProfile.address?store.storeProfile.address:'',
|
|
21
|
+
address: store.storeProfile && store.storeProfile.address ? store.storeProfile.address : '',
|
|
22
22
|
clientId: store.clientId,
|
|
23
23
|
clientName: client.clientName,
|
|
24
24
|
};
|
|
@@ -72,7 +72,7 @@ export async function validateTicket( req, res, next ) {
|
|
|
72
72
|
};
|
|
73
73
|
export async function ticketExists( req, res, next ) {
|
|
74
74
|
try {
|
|
75
|
-
let ticketId = req.body.ticketId?req.body.ticketId:req.params.ticketId;
|
|
75
|
+
let ticketId = req.body.ticketId ? req.body.ticketId : req.params.ticketId;
|
|
76
76
|
let Ticket = await findOneTangoTicket(
|
|
77
77
|
{
|
|
78
78
|
ticketId: ticketId,
|
|
@@ -146,17 +146,18 @@ export async function InfrastepstoResolve( req, res, next ) {
|
|
|
146
146
|
secondaryIsssue: [ ...secondaryReason.stepstoResolve ],
|
|
147
147
|
} );
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
if ( req.body.primary != 'Store Operation Issues' && req.body.primary != 'Application Issues' ) {
|
|
150
|
+
req.body.ticketActivity.push( {
|
|
151
|
+
actionType: 'stepsToResolve',
|
|
152
|
+
actionBy: 'Tango',
|
|
153
|
+
reasons: steptoReslove.map( ( item ) => ( {
|
|
154
|
+
primaryIssue: item.primaryIssue,
|
|
155
|
+
secondaryIssue: item.secondaryIsssue.map( ( issue ) => ( {
|
|
156
|
+
name: issue.name, // Assuming each object has a 'name' property
|
|
157
|
+
} ) ),
|
|
157
158
|
} ) ),
|
|
158
|
-
} )
|
|
159
|
-
}
|
|
159
|
+
} );
|
|
160
|
+
}
|
|
160
161
|
next();
|
|
161
162
|
} catch ( error ) {
|
|
162
163
|
logger.error( { error: error, function: 'InfrastepstoResolve' } );
|