feat(claim_pickup_order): modify email
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2022-07-25 14:49:39 +02:00
parent f13eac40a7
commit 3fd34e0861
12 changed files with 192 additions and 177 deletions

View File

@ -56,7 +56,7 @@
label="Pick up" label="Pick up"
ng-model="$ctrl.claim.hasToPickUp" ng-model="$ctrl.claim.hasToPickUp"
vn-acl="claimManager" vn-acl="claimManager"
info="When checked will notify to the salesPerson"> title="{{'When checked will notify to the salesPerson' | translate}}">
</vn-check> </vn-check>
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>

View File

@ -5,5 +5,5 @@ Responsability: Responsabilidad
Company: Empresa Company: Empresa
Sales/Client: Comercial/Cliente Sales/Client: Comercial/Cliente
Pick up: Recoger Pick up: Recoger
When checked will notify a pickup to the salesPerson: Cuando se marque enviará una notificación de recogida al comercial When checked will notify to the salesPerson: Cuando se marque enviará una notificación de recogida al comercial
Packages received: Bultos recibidos Packages received: Bultos recibidos

View File

@ -19,9 +19,10 @@ class Controller extends Descriptor {
sendPickupOrder() { sendPickupOrder() {
return this.vnEmail.send('claim-pickup-order', { return this.vnEmail.send('claim-pickup-order', {
recipient: this.claim.client.email, recipient: 'alexm@verdnatura.es',
recipientId: this.claim.clientFk, recipientId: this.claim.clientFk,
claimId: this.claim.id claimId: this.claim.id,
ticketId: this.claim.ticketFk
}); });
} }

View File

@ -34,6 +34,15 @@
label="State" label="State"
value="{{$ctrl.summary.claim.claimState.description}}"> value="{{$ctrl.summary.claim.claimState.description}}">
</vn-label-value> </vn-label-value>
<vn-check
class="vn-mr-md"
label="Pick up"
ng-model="$ctrl.summary.claim.hasToPickUp"
title="{{'When checked will notify to the salesPerson' | translate}}"
disabled="true">
</vn-check>
</vn-one>
<vn-one>
<vn-label-value <vn-label-value
label="Salesperson" label="Salesperson"
value="{{$ctrl.summary.claim.client.salesPersonUser.name}}"> value="{{$ctrl.summary.claim.client.salesPersonUser.name}}">

View File

@ -23,9 +23,10 @@
<!-- Block --> <!-- Block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block vn-pa-ml"> <div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1> <h1>{{ $t('title', [claimId]) }}</h1>
<p>{{ $t('description.dear') }},</p> <p>{{ $t('description.dear') }},</p>
<p>{{$t('description.instructions')}}</p> <p v-html="instructions"></p>
<p>{{ $t('description.conclusion') }}</p>
</div> </div>
</div> </div>
<!-- Footer block --> <!-- Footer block -->

View File

@ -8,10 +8,22 @@ module.exports = {
'email-header': emailHeader.build(), 'email-header': emailHeader.build(),
'email-footer': emailFooter.build() 'email-footer': emailFooter.build()
}, },
created() {
this.instructions = this.$t('description.instructions', [this.claimId, this.ticketId]);
},
data() {
return {
instructions: String
};
},
props: { props: {
claimId: { claimId: {
type: [Number, String], type: [Number, String],
required: true required: true
},
ticketId: {
type: [Number, String],
required: true
} }
} }
}; };

View File

@ -1,5 +1,10 @@
subject: Orden de recogida subject: Reclamación Verdnatura
title: Orden de recogida title: Reclamación Verdnatura {0}
description: description:
dear: Estimado cliente dear: Estimado cliente
instructions: Aqui tienes tu orden de recogida. instructions: 'Le informamos que se ha aceptado su solicitud de reclamación <strong>nº {0}</strong> correspondiente al pedido <strong>{1}</strong>.
Para tramitar la recogida, rellene el <a href="https://form.jotform.com/verdnatura/recogida-verdnatura"
title="Formulario Recogida" target="_blank" style="color: #8dba25">SIGUIENTE FORMULARIO</a> en un <strong>plazo máximo de 24h.</strong>
<br/><br/>Cuando recibamos el género en nuestras instalaciones emitiremos el abono correspondiente.
Debe imprimir el archivo adjunto e incluirlo en la caja. En el caso de no poder imprimirlo, <strong>identifique la caja con el número de reclamación CLARAMENTE LEGIBLE.</strong>'
conclusion: Un saludo

View File

@ -78,9 +78,6 @@
<h3>{{client.name}}</h3> <h3>{{client.name}}</h3>
</div> </div>
</div> </div>
<p v-html="$t('sections.agency.description')"></p>
<p>{{claimConfig.pickupContact}}</p>
</div> </div>
</div> </div>
<!-- Footer block --> <!-- Footer block -->

View File

@ -7,7 +7,6 @@ module.exports = {
async serverPrefetch() { async serverPrefetch() {
this.client = await this.fetchClient(this.claimId); this.client = await this.fetchClient(this.claimId);
this.sales = await this.fetchSales(this.claimId); this.sales = await this.fetchSales(this.claimId);
this.claimConfig = await this.fetchClaimConfig();
if (!this.client) if (!this.client)
throw new Error('Something went wrong'); throw new Error('Something went wrong');
@ -26,9 +25,6 @@ module.exports = {
fetchSales(claimId) { fetchSales(claimId) {
return this.rawSqlFromDef('sales', [claimId]); return this.rawSqlFromDef('sales', [claimId]);
}, },
fetchClaimConfig() {
return this.findOneFromDef('claimConfig');
},
}, },
components: { components: {
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),

View File

@ -11,7 +11,3 @@ concept: Concepto
clientSignature: Firma del cliente clientSignature: Firma del cliente
claim: Reclamación {0} claim: Reclamación {0}
phone: Teléfono phone: Teléfono
sections:
agency:
description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina
de Logista Parcel.'

View File

@ -1,2 +0,0 @@
SELECT pickupContact
FROM claimConfig;