tango-app-api-client 3.6.5-vms.7 → 3.6.5-vms.9
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-client",
|
|
3
|
-
"version": "3.6.5-vms.
|
|
3
|
+
"version": "3.6.5-vms.9",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
6
|
+
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\"",
|
|
9
9
|
"build:patch": "node build.js patch && npm publish",
|
|
10
10
|
"build:minor": "node build.js minor && npm publish",
|
|
11
11
|
"build:major": "node build.js major && npm publish"
|
|
@@ -47,6 +47,7 @@ export async function getAuditFile( req, res ) {
|
|
|
47
47
|
];
|
|
48
48
|
|
|
49
49
|
const userDetails = await aggregatevmsUserAudit( userQuery );
|
|
50
|
+
console.log( '🚀 ~ getAuditFile ~ userDetails:', userDetails );
|
|
50
51
|
const auditStatus = userDetails && userDetails.length > 0 ? userDetails[0].auditStatus : null;
|
|
51
52
|
if ( auditStatus === 'drafted' ) {
|
|
52
53
|
const log = await findOnevmsAuditLog(
|
|
@@ -59,6 +60,7 @@ export async function getAuditFile( req, res ) {
|
|
|
59
60
|
{},
|
|
60
61
|
{ createdAt: -1 },
|
|
61
62
|
);
|
|
63
|
+
console.log( '🚀 ~ getAuditFile ~ log:', log );
|
|
62
64
|
if ( !log ) {
|
|
63
65
|
await updateOnevmsUserAudit(
|
|
64
66
|
{ _id: userDetails[0]._id },
|
|
@@ -184,6 +186,19 @@ export async function getAuditFile( req, res ) {
|
|
|
184
186
|
mappedid: [ mapimg ],
|
|
185
187
|
} );
|
|
186
188
|
}
|
|
189
|
+
} else if ( inputData.nextId !== '' && inputData.nextId !== null && inputData.nextId !== undefined ) {
|
|
190
|
+
if ( !list ) {
|
|
191
|
+
return res.sendError( 'token expired', 404 );
|
|
192
|
+
}
|
|
193
|
+
list.body._scroll_id = '';
|
|
194
|
+
// insertData = userDetails[0];
|
|
195
|
+
} else {
|
|
196
|
+
logger.error( {
|
|
197
|
+
error: { folderPath: folderPath, nextQuery: inputData.nextId },
|
|
198
|
+
function: 'getAuditFile',
|
|
199
|
+
message: 'Bucket image data not availale',
|
|
200
|
+
} );
|
|
201
|
+
return res.sendError( 'Bucket is Empty', 204 );
|
|
187
202
|
}
|
|
188
203
|
const [ year, month, day ] = inputData.Date.split( '-' );
|
|
189
204
|
const temp = `${year}-${month}-${day}`;
|
|
@@ -198,7 +213,7 @@ export async function getAuditFile( req, res ) {
|
|
|
198
213
|
storeId: inputData.storeId,
|
|
199
214
|
clientId: storeInfo?.clientId,
|
|
200
215
|
fileDate: inputData.Date,
|
|
201
|
-
beforeCount:
|
|
216
|
+
beforeCount: inputData.count,
|
|
202
217
|
auditStatus: 'inprogress',
|
|
203
218
|
fileDateISO: start,
|
|
204
219
|
timeSpent: 0,
|
|
@@ -291,6 +306,7 @@ export async function saveDraft( req, res ) {
|
|
|
291
306
|
}
|
|
292
307
|
await createvmsAuditLog( inputData );
|
|
293
308
|
await updateOnevmsUserAudit( userQuery, userRecord );
|
|
309
|
+
console.log( '🚀 ~ saveDraft ~ userRecord:', userRecord );
|
|
294
310
|
return res.sendSuccess( {
|
|
295
311
|
result: 'The file has been drafted successfully',
|
|
296
312
|
} );
|
package/src/dtos/client.dtos.js
CHANGED
|
@@ -360,14 +360,15 @@ export const updateFDConfigBodySchema = joi.object( {
|
|
|
360
360
|
tangoReview: joi.string().optional(),
|
|
361
361
|
revision: joi.array().items( joi.object( {
|
|
362
362
|
actionType: joi.string().required(),
|
|
363
|
-
isChecked: joi.boolean().optional().default(false),
|
|
363
|
+
isChecked: joi.boolean().optional().default( false ),
|
|
364
364
|
} ) ).optional(),
|
|
365
365
|
taggingLimitation: joi.array().items( joi.object( {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
iconName: joi.string().optional(),
|
|
367
|
+
name: joi.string().optional(),
|
|
368
|
+
type: joi.string().required(),
|
|
369
369
|
value: joi.number().required(),
|
|
370
370
|
unit: joi.string().required(),
|
|
371
|
+
key: joi.string().required(),
|
|
371
372
|
} ) ).optional(),
|
|
372
373
|
|
|
373
374
|
} );
|