tango-app-api-infra 3.0.99-dev → 3.0.101-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.
|
|
3
|
+
"version": "3.0.101-dev",
|
|
4
4
|
"description": "infra",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"mongodb": "^6.4.0",
|
|
27
27
|
"nodemon": "^3.1.0",
|
|
28
28
|
"swagger-ui-express": "^5.0.0",
|
|
29
|
-
"tango-api-schema": "^2.0.
|
|
29
|
+
"tango-api-schema": "^2.0.115",
|
|
30
30
|
"tango-app-api-middleware": "^1.0.73-test",
|
|
31
31
|
"winston": "^3.12.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -215,7 +215,6 @@ export async function installationCard( req, res ) {
|
|
|
215
215
|
$and: [
|
|
216
216
|
{ issueType: 'installation' },
|
|
217
217
|
{ 'status': { $ne: 'closed' } },
|
|
218
|
-
{ 'ticketDetails.issueStatus': 'notidentified' },
|
|
219
218
|
{ 'basicDetails.clientId': { $in: req.body.clientId } },
|
|
220
219
|
{ createdAt: { $lte: date.end } },
|
|
221
220
|
],
|
|
@@ -11,19 +11,22 @@ export async function createTicket( req, res ) {
|
|
|
11
11
|
return res.sendError( 'Ticket Already Exists for the store', 400 );
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
14
|
+
let param = {
|
|
15
|
+
Bucket: appConfig.cloud.aws.bucket.auditInput,
|
|
16
|
+
file_path: `${dayjs( new Date( req.body.Date ) ).format( 'DD-MM-YYYY' )}/${req.body.storeId}/`,
|
|
17
|
+
MaxKeys: 1,
|
|
18
|
+
};
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
const auditInputData = await listFileByPath( param );
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
param.Bucket = appConfig.cloud.aws.bucket.auditOutput;
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
param.file_path = `${req.body.storeId}/${dayjs( new Date( req.body.Date ) ).format( 'DD-MM-YYYY' )}/`;
|
|
26
25
|
|
|
26
|
+
const auditOutputData = await listFileByPath( param );
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
if ( req.body.issueType === 'highcount' ) {
|
|
27
30
|
param.Bucket = appConfig.cloud.aws.bucket.edgeAppSource;
|
|
28
31
|
|
|
29
32
|
const edgeAppSource = await listFileByPath( param );
|
|
@@ -45,6 +48,7 @@ export async function createTicket( req, res ) {
|
|
|
45
48
|
expectedCount: req.body.expectedCount,
|
|
46
49
|
contactEmail: req.body.contactEmail,
|
|
47
50
|
showToClient: req.body.showToClient,
|
|
51
|
+
processType: ( auditInputData?.data?.length && auditOutputData?.data?.length ) ? 'audit' : 'reduction',
|
|
48
52
|
};
|
|
49
53
|
req.body.issueDate = new Date( req.body.Date );
|
|
50
54
|
req.body.ticketId = 'TE_DM_' + new Date().valueOf();
|