{% extends '@ProductsNotifications/base.html.twig' %}
{% do dom_title_section('Messages') %}
{% block wrap %}content__area--uilib reports{% endblock %}
{% block header %}
{% embed '@ui2022/schoolnow/header.html.twig' with {
title: message.title,
back: {
text: 'Back to Messages',
link: path('app.notifications.dashboard.messages.main'),
},
} %}
{% block actions %}
{% include '@ui2022/button--a.html.twig' with {
text: 'Clone message',
link: path('app.notifications.dashboard.messages.create', {
clone: message.id,
}),
styles: 'gray',
} %}
{% endblock %}
{% endembed %}
{% endblock %}
{% block content %}
{% if not message.firstJob %}
<div class="content__data reports__message pt-2">
<div class="blockgroup">
<label class="blockgroup__label">Message</label>
<h2 class="h4">{{- message.title -}}</h2>
</div>
</div>
{% else %}
{% set stats = message.firstJob.summarize %}
<div class="content__data reports__message pt-2">
{% embed '@ui2022/tabs--static.html.twig' with {
items: [
{
text: 'Summary',
link: path('app.notifications.dashboard.messages.report', {
message: message.id,
}),
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.messages.report')),
},
{
text: 'Logs',
link: path('app.notifications.dashboard.messages.logs', {
message: message.id,
}),
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.messages.logs')),
},
{
text: 'Debugging',
link: path('app.notifications.dashboard.messages.debugging', {
message: message.id,
}),
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.messages.debugging')),
},
{
text: 'Details',
link: path('app.notifications.dashboard.messages.details', {
message: message.id,
}),
active: (app.request.attributes.get('_route') is same as('app.notifications.dashboard.messages.details')),
},
],
} %}
{% block tab %}
{% include '@ui2022/subheader.html.twig' with {
title: 'Summary',
classes: 'mt-4 pt-4',
} %}
<div class="three-column-section">
<div class="three-column-inner-section">
{% include '@ui2022/schoolnow/stat.html.twig' with {
title: 'Sent',
subtitle: message.firstJob.firstActivityAt|ui_datetime,
value: (message.sending and stats.all.total > 0) ? ((((stats.all.succeeded + stats.all.failed) / stats.all.total) * 100)|round(0, 'ceil') ~ '%') : stats.all.total|number_format,
label: 'Contacts',
link: ((stats.all.succeeded + stats.all.failed) > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'all',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: ((stats.all.succeeded + stats.all.failed) > 0) ? 'sidepanel' : null,
dataTarget: ((stats.all.succeeded + stats.all.failed) > 0) ? '#sidepanel__filtered_logs' : null,
} %}
{% set interval = message.firstJob.activityInterval|ui_relativeDate(true)|split(' ') %}
{% include '@ui2022/schoolnow/stat.html.twig' with {
title: message.sending ? 'Running' : 'Completed',
subtitle: message.firstJob.lastActivityAt|ui_datetime,
value: interval[1] is defined ? interval[0]|number_format : interval[0],
label: interval[1]|default(''),
} %}
{% include '@ui2022/schoolnow/stat.html.twig' with {
title: 'Errors',
subtitle: 'Message not delivered',
value: stats.all.failed|number_format,
label: 'Contacts',
link: (stats.all.failed > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'all',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (stats.all.failed > 0) ? 'sidepanel' : null,
dataTarget: (stats.all.failed > 0) ? '#sidepanel__filtered_logs' : null,
} %}
</div>
</div>
<div class="section__infostats mb-4">
<div class="card card__charts">
<div class="row row-10">
<div class="col-12 col-md-6">
<h4 class="infostats__title">Delivery methods</h4>
<div class="d-flex justify-content-center justify-content-sm-start flex-wrap mt-1 pt-2">
{% include '@ui2022/chart--donut.html.twig' with {
legend: stats.message_channels|filter((v,k) => v.total > 0)|map((v,k) => {
label: 'app.notifications.stats.reporting.labels.%s'|format(k)|trans,
color: 'app.notifications.stats.reporting.colors.%s'|format(k)|trans([], 'styles', 'app'),
}),
dataset: stats.message_channels|filter((v,k) => v.total > 0)|map((v) => v.total),
label: 'Total contacts',
} %}
</div>
</div>
{% if constant('DISCR', message) is same as(constant('Products\\NotificationsBundle\\Entity\\Notifications\\Message::DISCR')) %}
<div class="col-12 mt-4 mt-lg-0 col-md-6">
<h4 class="infostats__title">Targeted audience</h4>
<div class="targetlist">
{% if message.lists|length %}
{% include '@ui2022/targetlist__item.html.twig' with {
title: 'Contact lists',
icon: 'icon-contact-reachable',
items: message.lists|map((list) => {
text: list.name,
link: path('app.notifications.dashboard.lists.view', {
list: list.id,
}),
}),
} %}
{% endif %}
{% if message.facebookSocialAccounts|length %}
{% include '@ui2022/targetlist__item.html.twig' with {
title: 'Facebook pages',
icon: 'icon-facebook-fill',
items: message.facebookSocialAccounts|map((social) => {
text: social.name,
target: '_blank',
link: 'https://www.facebook.com/%s'|format(
social.facebookPageId,
),
}),
} %}
{% endif %}
{% if message.twitterSocialAccounts|length %}
{% include '@ui2022/targetlist__item.html.twig' with {
title: 'Twitter profiles',
icon: 'icon-twitter-fill',
items: message.twitterSocialAccounts|map((social) => {
text: social.name,
target: '_blank',
link: 'https://www.twitter.com/%s'|format(
social.twitterUserName,
),
}),
} %}
{% endif %}
{% if message.instagramSocialAccounts|length %}
{% include '@ui2022/targetlist__item.html.twig' with {
title: 'Instagram accounts',
icon: 'fab fa-instagram',
items: message.instagramSocialAccounts|map((social) => {
text: social.name,
target: '_blank',
link: 'https://www.instagram.com/%s'|format(
social.name,
),
}),
} %}
{% endif %}
{% if message.websiteDepartments|length %}
{% include '@ui2022/targetlist__item.html.twig' with {
title: 'Website departments',
icon: 'icon-website',
items: message.websiteDepartments|map((department) => {
text: department.name,
target: '_blank',
link: web_url_catchall(department, '/'),
}),
} %}
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% for channel in message.usedChannels(true) %}
{% if channel == constant('CHANNELS__EMAIL', message) and message.firstJob.emailTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-activity-mail',
title: 'Email',
stats: [
{
label: 'Total sent',
value: message.firstJob.emailSucceeded|number_format,
link: (message.firstJob.emailSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'email',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.emailSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.emailSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Delivery verified',
value: message.firstJob.emailDelivered|number_format,
link: (message.firstJob.emailDelivered > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'email',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.emailDelivered > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.emailDelivered > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Bounces',
value: (message.firstJob.emailUndelivered + message.firstJob.emailFailed)|number_format,
link: ((message.firstJob.emailUndelivered + message.firstJob.emailFailed) > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'email',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: ((message.firstJob.emailUndelivered + message.firstJob.emailFailed) > 0) ? 'sidepanel' : null,
dataTarget: ((message.firstJob.emailUndelivered + message.firstJob.emailFailed) > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Open rate',
value: (message.firstJob.emailSucceeded ? (message.firstJob.emailOpened / message.firstJob.emailSucceeded) : 0)|percentage,
progress: message.firstJob.emailSucceeded ? (message.firstJob.emailOpened / message.firstJob.emailSucceeded) : 0,
},
],
} %}
{% block content %}
<table class="table-clear border-0 text-gray-dark">
<tbody>
<tr>
<td class="text-semibold pr-3 pb-2">Subject:</td>
<td class="pb-3 pb-sm-2">
<span>{{ message.emailSubject }}</span>
<a class="text-body text-underline" href="#" title="View email" data-toggle="modal" data-target="#modal__email_preview">View email</a>
</td>
</tr>
<tr>
<td class="text-semibold pr-3">From:</td>
<td>
<span class="emailid">{{ message.emailName }} <{{ message.emailFrom }}></span>
</td>
</tr>
</tbody>
</table>
{% endblock %}
{% endembed %}
{% elseif channel == constant('CHANNELS__SMS', message) and message.firstJob.smsTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-activity-text',
title: 'SMS',
stats: [
{
label: 'Total sent',
value: message.firstJob.smsSucceeded|number_format,
link: (message.firstJob.smsSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'sms',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.smsSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.smsSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Delivery verified',
value: message.firstJob.smsDelivered|number_format,
link: (message.firstJob.smsDelivered > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'sms',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.smsDelivered > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.smsDelivered > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Bounces',
value: (message.firstJob.smsUndelivered + message.firstJob.smsFailed)|number_format,
link: ((message.firstJob.smsUndelivered + message.firstJob.smsFailed) > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'sms',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: ((message.firstJob.smsUndelivered + message.firstJob.smsFailed) > 0) ? 'sidepanel' : null,
dataTarget: ((message.firstJob.smsUndelivered + message.firstJob.smsFailed) > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}
{% block content %}
<table class="table-clear border-0 text-gray-dark">
<tbody>
<tr>
<td class="text-semibold pr-3 pb-2">Message:</td>
<td class="pb-3 pb-sm-2">
<span>{{ message.smsText }}</span>
{% if message.smsUrl %}
<a class="text-body text-underline" href="{{ message.smsUrl }}">{{ message.smsUrl }}</a>
{% endif %}
</td>
</tr>
<tr>
<td class="text-semibold pr-3">From:</td>
<td>
<span class="emailid">{{ configs.twilio.incomingPhoneNumber|phone_number_format }}</span>
</td>
</tr>
</tbody>
</table>
{% endblock %}
{% endembed %}
{% elseif channel == constant('CHANNELS__VOICE', message) and message.firstJob.voiceTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-activity-voice',
title: 'Phone',
stats: [
{
label: 'Total sent',
value: message.firstJob.voiceSucceeded|number_format,
link: (message.firstJob.voiceSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'voice',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.voiceSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.voiceSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Delivery verified',
value: message.firstJob.voiceDelivered|number_format,
link: (message.firstJob.voiceDelivered > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'voice',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.voiceDelivered > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.voiceDelivered > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Bounces',
value: (message.firstJob.voiceUndelivered + message.firstJob.voiceFailed)|number_format,
link: ((message.firstJob.voiceUndelivered + message.firstJob.voiceFailed) > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'voice',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: ((message.firstJob.voiceUndelivered + message.firstJob.voiceFailed) > 0) ? 'sidepanel' : null,
dataTarget: ((message.firstJob.voiceUndelivered + message.firstJob.voiceFailed) > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Answer rate',
value: (message.firstJob.voiceSucceeded ? (message.firstJob.voiceAnswered / message.firstJob.voiceSucceeded) : 0)|percentage,
progress: message.firstJob.voiceSucceeded ? (message.firstJob.voiceAnswered / message.firstJob.voiceSucceeded) : 0,
},
],
} %}
{% block content %}
<table class="table-clear border-0 text-gray-dark">
<tbody>
<tr>
<td class="text-semibold pr-3 pb-2">Message:</td>
<td class="pb-3 pb-sm-2">
<audio controls="" class="d-block ml-md-auto">
<source src="{{ blobs(message.recording).recordingUrl(message.recording)|escape('html_attr') }}" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
</td>
</tr>
<tr>
<td class="text-semibold pr-3">From:</td>
<td>
<span class="emailid">
{{- (message.voiceCallerId ? message.voiceCallerId.phoneNumber : configs.twilio.incomingPhoneNumber)|phone_number_format -}}
</span>
</td>
</tr>
</tbody>
</table>
{% endblock %}
{% endembed %}
{% elseif channel == constant('CHANNELS__APP', message) and message.firstJob.appTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-deviceapp',
title: 'Mobile app',
stats: [
{
label: 'Total sent',
value: message.firstJob.appSucceeded|number_format,
link: (message.firstJob.appSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'app',
state: 'pending',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.appSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.appSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Delivery verified',
value: message.firstJob.appDelivered|number_format,
},
{
label: 'Bounces',
value: (message.firstJob.appUndelivered + message.firstJob.appFailed)|number_format,
link: ((message.firstJob.appUndelivered + message.firstJob.appFailed) > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'app',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: ((message.firstJob.appUndelivered + message.firstJob.appFailed) > 0) ? 'sidepanel' : null,
dataTarget: ((message.firstJob.appUndelivered + message.firstJob.appFailed) > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}
{% block content %}
<table class="table-clear border-0 text-gray-dark">
<tbody>
<tr>
<td class="text-semibold pr-3 pb-2">Message:</td>
<td class="pb-3 pb-sm-2">
<span>{{ message.appTitle }}</span>
</td>
</tr>
</tbody>
</table>
{% endblock %}
{% endembed %}
{% elseif channel == constant('CHANNELS__FACEBOOK', message) and message.firstJob.facebookTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-facebook-fill',
title: 'Facebook',
stats: [
{
label: 'Total posts',
value: message.firstJob.facebookTotal|number_format,
link: (message.firstJob.facebookTotal > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'facebook',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.facebookTotal > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.facebookTotal > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Successful posts',
value: message.firstJob.facebookSucceeded|number_format,
link: (message.firstJob.facebookSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'facebook',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.facebookSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.facebookSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Errors',
value: message.firstJob.facebookFailed|number_format,
link: (message.firstJob.facebookFailed > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'facebook',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.facebookFailed > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.facebookFailed > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}{% endembed %}
{% elseif channel == constant('CHANNELS__TWITTER', message) and message.firstJob.twitterTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-twitter-fill',
title: 'Twitter',
stats: [
{
label: 'Total posts',
value: message.firstJob.twitterTotal|number_format,
link: (message.firstJob.twitterTotal > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'twitter',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.twitterTotal > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.twitterTotal > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Successful posts',
value: message.firstJob.twitterSucceeded|number_format,
link: (message.firstJob.twitterSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'twitter',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.twitterSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.twitterSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Errors',
value: message.firstJob.twitterFailed|number_format,
link: (message.firstJob.twitterFailed > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'twitter',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.twitterFailed > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.twitterFailed > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}{% endembed %}
{% elseif channel == constant('CHANNELS__INSTAGRAM', message) and message.firstJob.instagramTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'fab fa-instagram',
title: 'Instagram',
stats: [
{
label: 'Total posts',
value: message.firstJob.instagramTotal|number_format,
link: (message.firstJob.instagramTotal > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'instagram',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.instagramTotal > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.instagramTotal > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Successful posts',
value: message.firstJob.instagramSucceeded|number_format,
link: (message.firstJob.instagramSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'instagram',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.instagramSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.instagramSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Errors',
value: message.firstJob.instagramFailed|number_format,
link: (message.firstJob.instagramFailed > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'instagram',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.instagramFailed > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.instagramFailed > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}{% endembed %}
{% elseif channel == constant('CHANNELS__WEBSITE', message) and message.firstJob.websiteTotal %}
{% embed '@ui2022/card__deliverymethods.html.twig' with {
icon: 'icon-website',
title: 'Website',
stats: [
{
label: 'Total posts',
value: message.firstJob.websiteTotal|number_format,
link: (message.firstJob.websiteTotal > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'website',
state: 'all',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.websiteTotal > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.websiteTotal > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Successful posts',
value: message.firstJob.websiteSucceeded|number_format,
link: (message.firstJob.websiteSucceeded > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'website',
state: 'completed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.websiteSucceeded > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.websiteSucceeded > 0) ? '#sidepanel__filtered_logs' : null,
},
{
label: 'Errors',
value: message.firstJob.websiteFailed|number_format,
link: (message.firstJob.websiteFailed > 0)
? path('app.notifications.dashboard.messages.filtered_logs', {
message: message.id,
query: {
filter: 'website',
state: 'failed',
sort: 'timestamp',
direction: 'DESC'
}
})
: null,
dataToggle: (message.firstJob.websiteFailed > 0) ? 'sidepanel' : null,
dataTarget: (message.firstJob.websiteFailed > 0) ? '#sidepanel__filtered_logs' : null,
},
],
} %}{% endembed %}
{% endif %}
{% endfor %}
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% endblock %}
{% block modals %}
{{ parent() }}
{% embed '@ui2022/modal.html.twig' with {
attr: {
id: 'modal__email_preview',
},
} %}
{% block content %}
{% embed '@ui2022/modal__content.html.twig' with {
title: 'Email Preview',
} %}
{% block body %}
<iframe
id="preview-email-iframe"
loading="lazy"
src="{{ path('app.notifications.dashboard.messages.email_preview', {message: message.id}) }}"
frameborder="0"
style="width: 100%; height: 500px"
>
</iframe>
{% endblock %}
{% endembed %}
{% endblock %}
{% endembed %}
{% include '@ui2022/schoolnow/modal--sidepanel.html.twig' with {
attr: {
id: 'sidepanel__filtered_logs',
},
} %}
<script type="text/javascript">
(function (window, document, $, undefined) {
$(function () {
$('#sidepanel__filtered_logs').on('updated.cs.modal', function (e) {
const pageHeight = $(window).height();
const headerHeight = $('.sidepanel__head').outerHeight();
$('.sidepanel__content').height((pageHeight - 3 * headerHeight) + 'px');
});
});
})(window, document, jQuery);
</script>
{% endblock %}