This commit is contained in:
Thomas 2025-01-17 20:58:53 +01:00
parent 0e4e9d0a51
commit 5ba102ec56
2 changed files with 69 additions and 52 deletions

View File

@ -1,29 +1,29 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% trans_default_domain 'core_news_list' %} {% trans_default_domain 'core_news_list' %}
{% block header %}
<div>
<h1 class="text-2xl font-bold tracking-tight">{{ 'News'|trans }} {{ 'List'|trans }}</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_news_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-lg border transition-colors outline-none focus:ring-offset-2 focus:ring-2 focus:ring-inset min-h-[2.25rem] px-4 text-sm text-white shadow focus:ring-white border-transparent bg-psc-500 hover:bg-psc-600 focus:bg-psc-600 focus:ring-offset-psc-600"><span class="fa fa-edit"></span> {{ 'Addnews'|trans }}</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="header"> <div class="border border-gray-300 shadow-sm bg-white rounded-xl filament-tables-container dark:bg-gray-800 dark:border-gray-700">
<div class="row"> <div class="flex items-center justify-between p-2 h-14">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div class="flex items-center gap-2"></div>
<h3> <div class="flex items-center justify-end w-full gap-2 md:max-w-md">
<i class="fa-fw fa fa-newspaper"></i> <div class="filament-tables-search-container flex items-center justify-end flex-1">
{{'News'|trans}} <span>>
{{'List'|trans}} </span>
</h3>
</div> </div>
</div> </div>
</div> </div>
<div class="body"> <div class="overflow-x-auto relative dark:border-gray-700 border-t">
<div class="panel"> <table class="filament-tables-table w-full text-start divide-y table-auto dark:divide-gray-700">
<div class="body"> <thead>
<a class="btn btn-info btn-sm" href="{{ path("psc_shop_news_backend_create") }}">{{'Addnews'|trans}}</a> <tr class="bg-gray-500/5">
</div> <th class="p-0"><span class="items-center gap-x-1 w-full px-4 py-2 whitespace-nowrap font-medium text-sm text-gray-600 dark:text-gray-300">{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'news.uid') }}</div></th>
</div>
<div class="panel">
<div class="body">
<table class="table">
<thead class="thead-dark">
<tr>
<th>{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'news.uid') }}</th>
<th>{{ knp_pagination_sortable(pagination, 'active'|trans, 'news.enable') }}</th> <th>{{ knp_pagination_sortable(pagination, 'active'|trans, 'news.enable') }}</th>
<th>{{ knp_pagination_sortable(pagination, 'Name'|trans, 'news.title') }}</th> <th>{{ knp_pagination_sortable(pagination, 'Name'|trans, 'news.title') }}</th>
<th>{{ knp_pagination_sortable(pagination, 'Introduction'|trans, 'news.introduction') }}</th> <th>{{ knp_pagination_sortable(pagination, 'Introduction'|trans, 'news.introduction') }}</th>
@ -55,5 +55,4 @@
</div> </div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -394,9 +394,18 @@ class Mail implements QueueInterface, ConfigurableElementInterface
if ($html) { if ($html) {
$message->html($html->render($params)); $message->html($html->render($params));
} }
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::INFO, PSCShopQueueBundle::class, $queue->getName(), "Mail send", [
'message' => $message->getTextBody(),
'from' => $from->render($params),
'to' => $to->render($params),
'subject' => $subject->render($params)
]);
$this->_mailer->send($message); $this->_mailer->send($message);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::ERROR, PSCShopQueueBundle::class, $queue->getName(), "Request Mail error", [
'error' => $e->getMessage()
]);
$this->_error = $e->getMessage(); $this->_error = $e->getMessage();
return false; return false;
} }
@ -441,8 +450,17 @@ class Mail implements QueueInterface, ConfigurableElementInterface
$message->html($html->render($params)); $message->html($html->render($params));
} }
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::INFO, PSCShopQueueBundle::class, $queue->getName(), "Mail send", [
'message' => "Nicht verfügbar da Passwort enhalten",
'from' => $from->render($params),
'to' => $to->render($params),
'subject' => $subject->render($params)
]);
$this->_mailer->send($message); $this->_mailer->send($message);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->_logService->createLogEntry($shop, new Contact(), LogEntry::ERROR, PSCShopQueueBundle::class, $queue->getName(), "Request Mail error", [
'error' => $e->getMessage()
]);
$this->_error = $e->getMessage(); $this->_error = $e->getMessage();
return false; return false;
} }