tango-app-api-infra 3.0.19-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
|
@@ -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' } );
|