Covivo/mobicoop

View on GitHub
api/templates/communication/en/push/notification/carpool_ask_accepted.html.twig

Summary

Maintainability
Test Coverage
{% set ad = context.ad %}
{% set recipient = context.user %}
{% set sender = context.sender %}
{% set result = context.result %}
{% set outwardOrigin = context.outwardOrigin %}
{% set outwardDestination = context.outwardDestination %}
{% set returnOrigin = context.returnOrigin %}
{% set returnDestination = context.returnDestination %}

Hello {{context.user.givenName|capitalize}} {{context.user.shortFamilyName|capitalize}}
{% if ad.results[0].frequency == 1 %}
Carpool confirmed with {{sender.givenName|capitalize}} {{sender.shortFamilyName|capitalize}} on {{ ad.results[0].date|date("d/m/Y") }} at {{outwardOrigin.time|date('H:i')}} from {{ outwardOrigin.address.displayLabel[0] }} to {{ outwardDestination.address.displayLabel[0] }}. See the ad on {{api_env('PUSH_PLATFORM_NAME')}}.
You can contact him by phone : {{sender.telephone}}
{% else %}
Recurrent carpool confirmed with {{sender.givenName|capitalize}} {{sender.shortFamilyName|capitalize}} from {{ outwardOrigin.address.displayLabel[0] }} to {{ outwardDestination.address.displayLabel[0] }}. See the ad on {{api_env('PUSH_PLATFORM_NAME')}}.
You can contact him by phone : {{sender.telephone}}
{% endif %}
See you soon on {{api_env('PUSH_PLATFORM_NAME')}}