tango-app-api-infra 3.9.26 → 3.9.27
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.
|
@@ -606,3 +606,35 @@ export const updateAccuracyIssuesSchema = Joi.object().keys( {
|
|
|
606
606
|
export const updateAccuracyIssuesValid = {
|
|
607
607
|
query: updateAccuracyIssuesSchema,
|
|
608
608
|
};
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
export const getBadTicketSchema = Joi.object().keys( {
|
|
612
|
+
|
|
613
|
+
dateString: Joi.string().required().custom( ( value, helpers ) => {
|
|
614
|
+
const inputDate = dayjs( value, 'YYYY-MM-DD', true );
|
|
615
|
+
|
|
616
|
+
if ( !inputDate.isValid() ) {
|
|
617
|
+
return helpers.error( 'any.invalid' );
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return value;
|
|
621
|
+
} ),
|
|
622
|
+
storeId: Joi.string().required(),
|
|
623
|
+
ticketName: Joi.string().required(),
|
|
624
|
+
comments: Joi.string().optional(),
|
|
625
|
+
type: Joi.string()
|
|
626
|
+
.required()
|
|
627
|
+
.valid( 'create', 'review', 'approve', 'tangRreview' )
|
|
628
|
+
.messages( {
|
|
629
|
+
'any.only': 'type must be one of [create, review, approve, tangRreview]',
|
|
630
|
+
} ),
|
|
631
|
+
|
|
632
|
+
mode: Joi.string().valid( 'mobile', 'web' ).required().messages( {
|
|
633
|
+
'any.only': 'type must be one of [mobile,web]',
|
|
634
|
+
} ),
|
|
635
|
+
|
|
636
|
+
} );
|
|
637
|
+
|
|
638
|
+
export const getBadTicketValid = {
|
|
639
|
+
body: getBadTicketSchema,
|
|
640
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { getClusters, getConfig, isGrantedUsers, isTicketExists, ticketApprove, ticketCreation, ticketReview } from '../validations/footfallDirectory.validation.js';
|
|
3
|
-
import { assignTicket, createTicket, downloadTickets, getTaggedStores, getTickets, multiCloseTicket, openTicketList, reviewerList, tangoReviewTicket, ticketList, ticketSummary, updateStatus, updateTempStatus, updateUserTicketStatus, createinternalTicket, checkTicketExists, tangoReviewAccuracyClosedTicket, getAccuracyIssues, updateAccuracyIssues } from '../controllers/footfallDirectory.controllers.js';
|
|
4
|
-
import { createTicketValid, downloadTicketsValid, getTaggedStoresValid, getTicketsValid, openTicketListValid, reviewerListValid, ticketListValid, ticketSummaryValid, updateStatusValid, assignTicketValid, updateTempStatusValid, updateTicketStatusValid, tangoReviewTicketValid, multiCloseTicketValid, tangoReviewAccuracyClosedTicketValid, getAccuracyIssuesValid, updateAccuracyIssuesValid } from '../dtos/footfallDirectory.dtos.js';
|
|
3
|
+
import { assignTicket, createTicket, downloadTickets, getTaggedStores, getTickets, multiCloseTicket, openTicketList, reviewerList, tangoReviewTicket, ticketList, ticketSummary, updateStatus, updateTempStatus, updateUserTicketStatus, createinternalTicket, checkTicketExists, tangoReviewAccuracyClosedTicket, getAccuracyIssues, updateAccuracyIssues, getBadTicket } from '../controllers/footfallDirectory.controllers.js';
|
|
4
|
+
import { createTicketValid, downloadTicketsValid, getTaggedStoresValid, getTicketsValid, openTicketListValid, reviewerListValid, ticketListValid, ticketSummaryValid, updateStatusValid, assignTicketValid, updateTempStatusValid, updateTicketStatusValid, tangoReviewTicketValid, multiCloseTicketValid, tangoReviewAccuracyClosedTicketValid, getAccuracyIssuesValid, updateAccuracyIssuesValid, getBadTicketValid } from '../dtos/footfallDirectory.dtos.js';
|
|
5
5
|
import { bulkValidate, getAssinedStore, isAllowedSessionHandler, validate } from 'tango-app-api-middleware';
|
|
6
6
|
|
|
7
7
|
export const footfallDirectoryRouter = express.Router();
|
|
@@ -30,4 +30,8 @@ footfallDirectoryRouter.post( '/multi-close-tickets', isAllowedSessionHandler, b
|
|
|
30
30
|
footfallDirectoryRouter.get( '/get-accuarcy-issues', isAllowedSessionHandler, bulkValidate( getAccuracyIssuesValid ), getAccuracyIssues );
|
|
31
31
|
footfallDirectoryRouter.put( '/update-accuarcy-issues', isAllowedSessionHandler, bulkValidate( updateAccuracyIssuesValid ), updateAccuracyIssues );
|
|
32
32
|
|
|
33
|
+
footfallDirectoryRouter.get( '/get-bad-ticket', isAllowedSessionHandler, bulkValidate( getBadTicketValid ), getBadTicket );
|
|
34
|
+
|
|
35
|
+
// footfallDirectoryRouter.get( '/unmatched-audit-folders', getUnmatchedAuditFolders );
|
|
36
|
+
|
|
33
37
|
|