-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: Reset failed events button to be hidden if no failed messages …
…exists
- Loading branch information
1 parent
512b1d7
commit 8850bfe
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
17 changes: 11 additions & 6 deletions
17
src/Resources/views/Admin/Grid/Action/setono_facebook_reset_failed_events.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
{# @var \Setono\SyliusFacebookPlugin\Model\PixelInterface data #} | ||
|
||
{% import '@SetonoSyliusFacebookPlugin/Admin/Macro/buttons.html.twig' as buttons %} | ||
|
||
{% set path = options.link.url|default(path( | ||
options.link.route|default('setono_sylius_facebook_admin_pixel_reset_failed_events'), | ||
options.link.parameters|default({'id': data.id}) | ||
)) %} | ||
|
||
{{ buttons.resetFailedEvents( | ||
path, | ||
action.label|default('setono_sylius_facebook.ui.reset_failed_events'), | ||
true, | ||
data.id | ||
) }} | ||
{% set failedCount = setono_facebook_events_count_by_state(data, constant('Setono\\SyliusFacebookPlugin\\Model\\PixelEventInterface::STATE_FAILED')) %} | ||
{% if options.visible|default(failedCount > 0) %} | ||
{{ buttons.resetFailedEvents( | ||
path, | ||
action.label|default('setono_sylius_facebook.ui.reset_failed_events'), | ||
true, | ||
data.id | ||
) }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters