MASTER-hotFix(travel_extraCommunity): fix css #1078
|
@ -1,8 +1,9 @@
|
||||||
const {Report, Email, smtp} = require('vn-print');
|
const {Email} = require('vn-print');
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('claimPickupEmail', {
|
Self.remoteMethodCtx('claimPickupEmail', {
|
||||||
description: 'Sends the the claim pickup order email with an attached PDF',
|
description: 'Sends the the claim pickup order email with an attached PDF',
|
||||||
|
accessType: 'WRITE',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'id',
|
arg: 'id',
|
||||||
|
@ -40,7 +41,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.claimPickupEmail = async(ctx, id) => {
|
Self.claimPickupEmail = async ctx => {
|
||||||
const args = Object.assign({}, ctx.args);
|
const args = Object.assign({}, ctx.args);
|
||||||
const params = {
|
const params = {
|
||||||
recipient: args.recipient,
|
recipient: args.recipient,
|
||||||
|
|
|
@ -54,14 +54,14 @@ module.exports = Self => {
|
||||||
|
|
||||||
const email = new Email('campaign-metrics', args);
|
const email = new Email('campaign-metrics', args);
|
||||||
await email.send();
|
await email.send();
|
||||||
|
|
||||||
await Self.rawSql(`
|
|
||||||
UPDATE clientConsumptionQueue
|
|
||||||
SET status = 'printed',
|
|
||||||
printed = ?
|
|
||||||
WHERE id = ?`,
|
|
||||||
[new Date(), queue.id]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await Self.rawSql(`
|
||||||
|
UPDATE clientConsumptionQueue
|
||||||
|
SET status = 'printed',
|
||||||
|
printed = ?
|
||||||
|
WHERE id = ?`,
|
||||||
|
[new Date(), queue.id]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await Self.rawSql(`
|
await Self.rawSql(`
|
||||||
UPDATE clientConsumptionQueue
|
UPDATE clientConsumptionQueue
|
||||||
|
|
|
@ -3,6 +3,7 @@ const {Email} = require('vn-print');
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('driverRouteEmail', {
|
Self.remoteMethodCtx('driverRouteEmail', {
|
||||||
description: 'Sends the driver route email with an attached PDF',
|
description: 'Sends the driver route email with an attached PDF',
|
||||||
|
accessType: 'WRITE',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'id',
|
arg: 'id',
|
||||||
|
|
Loading…
Reference in New Issue