4077-login_recover-password & account_verifyEmail #1063
|
@ -8,7 +8,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/notifyIssues`,
|
path: `/notifyIssues`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/sendQueued`,
|
path: `/sendQueued`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/deleteTrashFiles`,
|
path: `/deleteTrashFiles`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/updateData`,
|
path: `/updateData`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FROM mariadb:10.7.3
|
FROM mariadb:10.7.5
|
||||||
|
|
||||||
ENV MYSQL_ROOT_PASSWORD root
|
ENV MARIADB_ROOT_PASSWORD root
|
||||||
ENV TZ Europe/Madrid
|
ENV TZ Europe/Madrid
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -22,6 +22,7 @@ COPY \
|
||||||
docker/docker-start.sh \
|
docker/docker-start.sh \
|
||||||
/usr/local/bin/
|
/usr/local/bin/
|
||||||
|
|
||||||
|
RUN chmod 775 /etc/mysql/conf.d/docker.cnf
|
||||||
RUN mkdir /mysql-data \
|
RUN mkdir /mysql-data \
|
||||||
&& chown -R mysql:mysql /mysql-data
|
&& chown -R mysql:mysql /mysql-data
|
||||||
|
|
||||||
|
@ -35,6 +36,8 @@ COPY \
|
||||||
dump/structure.sql \
|
dump/structure.sql \
|
||||||
dump/dumpedFixtures.sql \
|
dump/dumpedFixtures.sql \
|
||||||
./
|
./
|
||||||
|
|
||||||
|
RUN chmod 775 config.ini
|
||||||
RUN gosu mysql docker-init.sh \
|
RUN gosu mysql docker-init.sh \
|
||||||
&& docker-dump.sh mysqlPlugins \
|
&& docker-dump.sh mysqlPlugins \
|
||||||
&& docker-dump.sh mockDate \
|
&& docker-dump.sh mockDate \
|
||||||
|
|
|
@ -12,7 +12,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/downloadImages`,
|
path: `/downloadImages`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/checkInbox`,
|
path: `/checkInbox`,
|
||||||
verb: 'GET'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -58,8 +58,8 @@ module.exports = Self => {
|
||||||
emailBody = bufferCopy.toUpperCase().trim();
|
emailBody = bufferCopy.toUpperCase().trim();
|
||||||
|
|
||||||
const bodyPositionOK = emailBody.match(/\bOK\b/i);
|
const bodyPositionOK = emailBody.match(/\bOK\b/i);
|
||||||
|
const bodyPositionIndex = (bodyPositionOK.index == 0 || bodyPositionOK.index == 122);
|
||||||
if (bodyPositionOK != null && (bodyPositionOK.index == 0 || bodyPositionOK.index == 122))
|
if (bodyPositionOK != null && bodyPositionIndex)
|
||||||
isEmailOk = true;
|
isEmailOk = true;
|
||||||
else
|
else
|
||||||
isEmailOk = false;
|
isEmailOk = false;
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
</vn-data-viewer>
|
</vn-data-viewer>
|
||||||
</vn-side-menu>
|
</vn-side-menu>
|
||||||
<vn-float-button
|
<vn-float-button
|
||||||
ng-click="$ctrl.create('weekday')"
|
ng-click="$ctrl.createInclusion('weekday')"
|
||||||
icon="add"
|
icon="add"
|
||||||
vn-tooltip="Add event"
|
vn-tooltip="Add event"
|
||||||
vn-bind="+"
|
vn-bind="+"
|
||||||
|
|
|
@ -3,13 +3,22 @@ const closure = require('./closure');
|
||||||
|
|
||||||
module.exports = async function(request, response, next) {
|
module.exports = async function(request, response, next) {
|
||||||
try {
|
try {
|
||||||
const reqArgs = request.query;
|
const reqArgs = request.body;
|
||||||
if (!reqArgs.to)
|
|
||||||
throw new Error('The argument to is required');
|
|
||||||
|
|
||||||
response.status(200).json({
|
let toDate = new Date();
|
||||||
message: 'Success'
|
toDate.setDate(toDate.getDate() - 1);
|
||||||
});
|
|
||||||
|
if (reqArgs.to) toDate = reqArgs.to;
|
||||||
|
|
||||||
|
const todayMinDate = new Date();
|
||||||
|
minDate.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const todayMaxDate = new Date();
|
||||||
|
maxDate.setHours(23, 59, 59, 59);
|
||||||
|
|
||||||
|
// Prevent closure for current day
|
||||||
|
if (toDate >= todayMinDate && toDate <= todayMaxDate)
|
||||||
|
throw new Error('You cannot close tickets for today');
|
||||||
|
|
||||||
const tickets = await db.rawSql(`
|
const tickets = await db.rawSql(`
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -36,7 +45,7 @@ module.exports = async function(request, response, next) {
|
||||||
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY)
|
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY)
|
||||||
AND util.dayEnd(?)
|
AND util.dayEnd(?)
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY t.id`, [reqArgs.to, reqArgs.to]);
|
GROUP BY t.id`, [toDate, toDate]);
|
||||||
|
|
||||||
await closure.start(tickets, response.locals);
|
await closure.start(tickets, response.locals);
|
||||||
|
|
||||||
|
@ -52,7 +61,11 @@ module.exports = async function(request, response, next) {
|
||||||
AND util.dayEnd(?)
|
AND util.dayEnd(?)
|
||||||
AND al.code NOT IN('DELIVERED','PACKED')
|
AND al.code NOT IN('DELIVERED','PACKED')
|
||||||
AND t.routeFk
|
AND t.routeFk
|
||||||
AND z.name LIKE '%MADRID%'`, [reqArgs.to, reqArgs.to]);
|
AND z.name LIKE '%MADRID%'`, [toDate, toDate]);
|
||||||
|
|
||||||
|
response.status(200).json({
|
||||||
|
message: 'Success'
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ const closure = require('./closure');
|
||||||
|
|
||||||
module.exports = async function(request, response, next) {
|
module.exports = async function(request, response, next) {
|
||||||
try {
|
try {
|
||||||
const reqArgs = request.query;
|
const reqArgs = request.body;
|
||||||
|
|
||||||
if (!reqArgs.agencyModeId)
|
if (!reqArgs.agencyModeId)
|
||||||
throw new Error('The argument agencyModeId is required');
|
throw new Error('The argument agencyModeId is required');
|
||||||
|
@ -14,10 +14,6 @@ module.exports = async function(request, response, next) {
|
||||||
if (!reqArgs.to)
|
if (!reqArgs.to)
|
||||||
throw new Error('The argument to is required');
|
throw new Error('The argument to is required');
|
||||||
|
|
||||||
response.status(200).json({
|
|
||||||
message: 'Success'
|
|
||||||
});
|
|
||||||
|
|
||||||
const agencyIds = reqArgs.agencyModeId.split(',');
|
const agencyIds = reqArgs.agencyModeId.split(',');
|
||||||
const tickets = await db.rawSql(`
|
const tickets = await db.rawSql(`
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -53,6 +49,10 @@ module.exports = async function(request, response, next) {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await closure.start(tickets, response.locals);
|
await closure.start(tickets, response.locals);
|
||||||
|
|
||||||
|
response.status(200).json({
|
||||||
|
message: 'Success'
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,11 @@ const closure = require('./closure');
|
||||||
|
|
||||||
module.exports = async function(request, response, next) {
|
module.exports = async function(request, response, next) {
|
||||||
try {
|
try {
|
||||||
const reqArgs = request.query;
|
const reqArgs = request.body;
|
||||||
|
|
||||||
if (!reqArgs.routeId)
|
if (!reqArgs.routeId)
|
||||||
throw new Error('The argument routeId is required');
|
throw new Error('The argument routeId is required');
|
||||||
|
|
||||||
response.status(200).json({
|
|
||||||
message: 'Success'
|
|
||||||
});
|
|
||||||
|
|
||||||
const tickets = await db.rawSql(`
|
const tickets = await db.rawSql(`
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
|
@ -56,6 +52,10 @@ module.exports = async function(request, response, next) {
|
||||||
const email = new Email('driver-route', args);
|
const email = new Email('driver-route', args);
|
||||||
await email.send();
|
await email.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
response.status(200).json({
|
||||||
|
message: 'Success'
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,11 @@ const closure = require('./closure');
|
||||||
|
|
||||||
module.exports = async function(request, response, next) {
|
module.exports = async function(request, response, next) {
|
||||||
try {
|
try {
|
||||||
const reqArgs = request.query;
|
const reqArgs = request.body;
|
||||||
|
|
||||||
if (!reqArgs.ticketId)
|
if (!reqArgs.ticketId)
|
||||||
throw new Error('The argument ticketId is required');
|
throw new Error('The argument ticketId is required');
|
||||||
|
|
||||||
response.status(200).json({
|
|
||||||
message: 'Success'
|
|
||||||
});
|
|
||||||
|
|
||||||
const tickets = await db.rawSql(`
|
const tickets = await db.rawSql(`
|
||||||
SELECT
|
SELECT
|
||||||
t.id,
|
t.id,
|
||||||
|
@ -38,6 +34,10 @@ module.exports = async function(request, response, next) {
|
||||||
GROUP BY e.ticketFk`, [reqArgs.ticketId]);
|
GROUP BY e.ticketFk`, [reqArgs.ticketId]);
|
||||||
|
|
||||||
await closure.start(tickets, response.locals);
|
await closure.start(tickets, response.locals);
|
||||||
|
|
||||||
|
response.status(200).json({
|
||||||
|
message: 'Success'
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const router = new express.Router();
|
const router = new express.Router();
|
||||||
|
|
||||||
router.get('/all', require('./closeAll'));
|
router.post('/all', require('./closeAll'));
|
||||||
router.get('/by-ticket', require('./closeByTicket'));
|
router.post('/by-ticket', require('./closeByTicket'));
|
||||||
router.get('/by-agency', require('./closeByAgency'));
|
router.post('/by-agency', require('./closeByAgency'));
|
||||||
router.get('/by-route', require('./closeByRoute'));
|
router.post('/by-route', require('./closeByRoute'));
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|
Loading…
Reference in New Issue