This commit is contained in:
Thomas Peterson 2025-12-23 14:03:01 +01:00
parent 91ba43510b
commit e9ca2223e4
20 changed files with 3635 additions and 996 deletions

View File

@ -32,3 +32,4 @@ JWT_PASSPHRASE=f7754c7a99638fe7162a144825ddaea7
LOCK_DSN=flock LOCK_DSN=flock
###< symfony/lock ### ###< symfony/lock ###
MAILER_DSN=smtp://smtp4dev:25

View File

@ -57,10 +57,10 @@
} }
.badge-yes { .badge-yes {
@apply inline-flex rounded-sm bg-lime-500 px-2 py-1 text-sm font-medium text-white hover:bg-opacity-90 justify-center shadow-xl; @apply inline-flex items-center rounded-full bg-lime-500 px-2 py-1 text-xs font-medium text-white hover:bg-opacity-90 justify-center shadow-xl;
} }
.badge-no { .badge-no {
@apply inline-flex rounded-sm bg-orange-500 px-2 py-1 text-sm font-medium text-white hover:bg-opacity-90 justify-center shadow-xl; @apply inline-flex items-center rounded-full bg-orange-500 px-2 py-1 text-xs font-medium text-white hover:bg-opacity-90 justify-center shadow-xl;
} }
.table-icon, .button-icon { .table-icon, .button-icon {
@ -68,11 +68,11 @@
} }
.psc-button-save { .psc-button-save {
@apply inline-flex items-center justify-center py-1 gap-1 font-medium rounded-sm px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]; @apply inline-flex items-center justify-center py-1 gap-2 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem];
} }
.psc-button-secondary { .psc-button-secondary {
@apply inline-flex items-center justify-center py-1 gap-1 font-medium rounded-sm px-4 text-xs text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[1.8rem]; @apply inline-flex items-center justify-center py-1 gap-2 font-medium rounded-md px-4 text-xs text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[1.8rem];
} }
.form-label { .form-label {

File diff suppressed because it is too large Load Diff

View File

@ -85,16 +85,16 @@
<td class="px-2 py-3">{{ orderObj.getTypeAsString() }}</td> <td class="px-2 py-3">{{ orderObj.getTypeAsString() }}</td>
<td class="px-2 py-3"> <td class="px-2 py-3">
{% if orderObj.isDraft() %} {% if orderObj.isDraft() %}
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">{{'yes'|trans}}</span> <span class="badge-yes">{{'yes'|trans}}</span>
{% else %} {% else %}
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800">{{'no'|trans}}</span> <span class="badge-no">{{'no'|trans}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="px-2 py-3"> <td class="px-2 py-3">
{% if order.contact.virtual %} {% if order.contact.virtual %}
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">{{'yes'|trans}}</span> <span class="badge-yes">{{'yes'|trans}}</span>
{% else %} {% else %}
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800">{{'no'|trans}}</span> <span class="badge-no">{{'no'|trans}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="px-2 py-3">{{ order.alias }}</td> <td class="px-2 py-3">{{ order.alias }}</td>

View File

@ -1,182 +1,165 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'tailwind_formtheme.html.twig' %}
{% trans_default_domain 'core_payment_edit' %} {% trans_default_domain 'core_payment_edit' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z" />
</svg>
{{'paymentmethod'|trans}} <span class="text-gray-500">{{'create'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_payment_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="w-full flex flex-col gap-6">
{{ form_start(form, {attr: {class: ''}}) }}
<div class="header"> <div class="tab-group flex-none md:flex w-full" data-dui-orientation="vertical">
<div class="row"> {# Vertical Tab Navigation #}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div role="tablist" class="relative mr-5 rounded-md flex flex-col p-1 w-full md:w-2/12">
<h3> <div class="tab-indicator absolute left-0 w-1 bg-psc-500 transition-transform duration-300"></div>
<i class="fa-fw fa fa-credit-card"></i>
{{'paymentmethod'|trans}} <span>> <a href="#" class="tab-link flex items-center text-sm active px-4 py-2 relative" data-dui-tab-target="general">
{{'create'|trans}} </span> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</h3> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
</div> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 text-end"> </svg>
<a href="{{ path("psc_shop_payment_backend_list") }}" class="btn btn-default btn-sm"><i class="fa fa-lg fa-fw fa-arrow-left"></i> {{'back'|trans}}</a> {{'General'|trans}}
</div> </a>
</div>
</div> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="filter">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z" />
</svg>
{{'Filter'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="gateway">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z" />
</svg>
{{'Gateway'|trans}}
</a>
<div class="body">
{{ form_start(form, { 'attr': {'class': ''}}) }}
<div class="panel">
<div class="header">
<h4>{{ payment.title }}</h4>
</div>
<div class="body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-pills flex-column" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#all" role="tab">{{'General'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#filter" role="tab">{{'Filter'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#gateway" role="tab">{{'Gateway'|trans}}</a>
</li>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<li class="nav-item"> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="{{ customGroup.id }}">
<a class="nav-link" data-bs-toggle="tab" href="#{{ customGroup.id }}" role="tab">{{ customGroup.title }}</a> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</li> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
{{ customGroup.title }}
</a>
{% endfor %} {% endfor %}
</ul>
</div> </div>
<div class="col-md-10">
<div class="tab-content"> {# Tab Content Area #}
<div class="tab-pane active" id="all" role="tabpanel"> <div class="rounded-md w-full border bg-white p-5 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="row">
<div class="col-md-4"> {# General Tab #}
<div class="row mb-3"> <div id="general" class="tab-content w-full text-stone-500 text-sm block">
<label class="col-md-3 form-control-label">{{ form_label(form.title) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'General'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.title) }} <div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.title) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pos) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.enable) }}
</div> </div>
</div> </div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.private) }}
</div> </div>
<div class="col-md-4"> <div class="w-full lg:w-4/12 px-4">
<div class="row mb-3"> {{ form_row(form.price) }}
<label class="col-md-3 form-control-label">{{ form_label(form.pos) }}</label> </div>
<div class="col-md-9"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.pos) }} {{ form_row(form.taxClass) }}
</div> </div>
</div> </div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.percent) }}
</div> </div>
<div class="col-md-2"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.enable) }} {{ form_row(form.priceFrom) }}
</div> </div>
<div class="col-md-2"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.private) }} {{ form_row(form.priceTo) }}
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4"> <div class="flex flex-wrap">
<div class="row mb-3"> <div class="w-full lg:w-4/12 px-4">
<label class="col-md-3 form-control-label">{{ form_label(form.price) }}</label> {{ form_row(form.trustedShopName) }}
<div class="col-md-9">
{{ form_widget(form.price) }}
</div> </div>
</div> </div>
</div>
<div class="col-md-4"> <div class="flex flex-wrap">
<div class="row mb-3"> <div class="w-full px-4">
<label class="col-md-3 form-control-label">{{ form_label(form.taxClass) }}</label> {{ form_row(form.description) }}
<div class="col-md-9"> <p class="mt-1 text-xs text-gray-500">
{{ form_widget(form.taxClass) }}
</div>
</div>
</div>
<div class="col-md-4">
{{ form_widget(form.percent) }}
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceTo) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.trustedShopName) }}</label>
<div class="col-md-9">
{{ form_widget(form.trustedShopName) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.description) }}</label>
<div class="col-md-11">
{{ form_widget(form.description) }}
<p class="text-muted">
{{ "paymentTermsExample"|trans}} {{ "paymentTermsExample"|trans}}
</p> </p>
</div> </div>
</div> </div>
</div>
</div> <div class="flex flex-wrap">
<div class="row"> <div class="w-full px-4">
<div class="col-md-12"> {{ form_row(form.paymentTerms) }}
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.paymentTerms) }}</label>
<div class="col-md-11">
{{ form_widget(form.paymentTerms) }}
</div> </div>
</div> </div>
</div> </div>
{# Filter Tab #}
<div id="filter" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Filter'|trans}}</h6>
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.shippings) }}
</div> </div>
</div> </div>
<div class="tab-pane" id="filter" role="tabpanel">
<div class="row"> <div class="flex flex-wrap">
<div class="col-md-12"> <div class="w-full px-4">
<div class="row mb-3"> {{ form_row(form.countrys) }}
<label class="col-md-3 form-control-label">{{ form_label(form.shippings) }}</label>
<div class="col-md-9">
{{ form_widget(form.shippings) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-12">
<div class="row mb-3"> {# Gateway Tab #}
<label class="col-md-3 form-control-label">{{ form_label(form.countrys) }}</label> <div id="gateway" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-9"> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Gateway'|trans}}</h6>
{{ form_widget(form.countrys) }}
</div> <div class="flex flex-wrap">
</div> <div class="w-full px-4">
</div> {{ form_row(form.paymentGateway) }}
</div>
</div>
<div class="tab-pane" id="gateway" role="tabpanel">
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.paymentGateway) }}</label>
<div class="col-md-9">
{{ form_widget(form.paymentGateway) }}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
{# Custom Tabs #}
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<div class="tab-pane" id="{{ customGroup.id }}" role="tabpanel"> <div id="{{ customGroup.id }}" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{ customGroup.title }}</h6>
{% for customField in customFields %} {% for customField in customFields %}
{% if customField.group == customGroup.id and customField.getTemplate %} {% if customField.group == customGroup.id and customField.getTemplate %}
{{ include(customField.getTemplate, { 'form': form }) }} {{ include(customField.getTemplate, { 'form': form }) }}
@ -186,19 +169,16 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div>
</div> {# Save Button outside Card #}
<div class="text-end my-2">
{{ form_widget(form.save, {
attr: {
class: 'inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]'
}
}) }}
</div> </div>
<div class="panel">
<div class="body">
<div class="row mb-3">
<div class="col-md-offset-1 col-md-11">
{{ form_widget(form.save, {attr: {class: 'btn btn-primary btn-sm'}}) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,39 +1,91 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'form_div_layout_tailwind.html.twig' %}
{% trans_default_domain 'core_payment_delete' %} {% trans_default_domain 'core_payment_delete' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z" />
</svg>
{{'paymentmethods'|trans}} <span class="text-gray-500">{{'del'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_payment_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="header"> <div class="flex flex-col gap-6">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> {# Delete Confirmation Card #}
<h3> <div class="rounded-md border border-red-200 bg-white shadow-lg dark:border-strokedark dark:bg-boxdark">
<i class="fa-fw fa fa-newspaper-o"></i>
{{'paymentmethods'|trans}} <span>> {# Card Header #}
{{'del'|trans}}</span> <div class="border-b border-red-200 bg-red-50 px-7.5 py-4 dark:border-strokedark dark:bg-red-900/20">
<div class="flex items-center gap-3">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-red-600">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
</svg>
<h3 class="text-xl font-medium text-red-900 dark:text-red-200">
{{'Delpaymentmethod'|trans}}?
</h3> </h3>
</div> </div>
</div> </div>
{# Card Body #}
<div class="px-7.5 py-6">
<div class="space-y-4">
<p class="text-gray-700 dark:text-bodydark">
{{'Are you sure you want to delete this payment method'|trans}}?
</p>
<div class="p-4 bg-gray-50 rounded-md border border-gray-200 dark:bg-boxdark-2 dark:border-strokedark">
<h5 class="text-lg font-medium text-gray-900 dark:text-bodydark">
{{ payment.title }}
</h5>
</div> </div>
<div class="body"> <div class="p-4 bg-yellow-50 rounded-md border border-yellow-200">
<div class="panel"> <div class="flex gap-3">
<div class="header"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-yellow-600 flex-shrink-0 mt-0.5">
<h4>{{'Delpaymentmethod'|trans}}?</h4> <path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
</svg>
<p class="text-sm text-yellow-800">
{{'This action cannot be undone'|trans}}.
</p>
</div>
</div>
</div>
</div> </div>
<div class="body">
<h5>{{ payment.title }}</h5> {# Card Footer with Actions #}
<div class="border-t border-gray-200 px-7.5 py-4 bg-gray-50 dark:border-strokedark dark:bg-boxdark-2">
{{ form_start(form, { 'attr': {'class': ''}}) }} {{ form_start(form) }}
<div class="row mb-3"> <div class="flex flex-wrap items-center gap-3 justify-end">
<label class="col-md-1 form-control-label"></label> {{ form_widget(form.no, {
<div class="col-md-1"> attr: {
{{ form_widget(form.yes, {attr: {class: 'btn btn-lg btn-warning btn-sm'}}) }} class: 'inline-flex items-center justify-center py-2 gap-2 font-medium rounded-md px-4 text-sm text-psc-600 border border-psc-500 bg-white hover:bg-gray-50 hover:ring-2 hover:ring-psc-500 hover:ring-offset-1 shadow-sm'
</div> },
<div class="col-md-1"> label: 'no'|trans
{{ form_widget(form.no, {attr: {class: 'btn btn-lg btn-primary btn-sm'}}) }} }) }}
</div> {{ form_widget(form.yes, {
attr: {
class: 'inline-flex items-center justify-center py-2 gap-2 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-red-500 hover:bg-red-600 hover:ring-2 hover:ring-red-500 hover:ring-offset-1'
},
label: 'yes'|trans
}) }}
</div> </div>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
</div> </div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,182 +1,165 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'tailwind_formtheme.html.twig' %}
{% trans_default_domain 'core_payment_edit' %} {% trans_default_domain 'core_payment_edit' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z" />
</svg>
{{'paymentmethod'|trans}} <span class="text-gray-500">{{'settings'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_payment_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="w-full flex flex-col gap-6">
{{ form_start(form, {attr: {class: ''}}) }}
<div class="header"> <div class="tab-group flex-none md:flex w-full" data-dui-orientation="vertical">
<div class="row"> {# Vertical Tab Navigation #}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div role="tablist" class="relative mr-5 rounded-md flex flex-col p-1 w-full md:w-2/12">
<h3> <div class="tab-indicator absolute left-0 w-1 bg-psc-500 transition-transform duration-300"></div>
<i class="fa-fw fa fa-credit-card"></i>
{{'paymentmethod'|trans}} <span>> <a href="#" class="tab-link flex items-center text-sm active px-4 py-2 relative" data-dui-tab-target="general">
{{'settings'|trans}} </span> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</h3> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
</div> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 text-end"> </svg>
<a href="{{ path("psc_shop_payment_backend_list") }}" class="btn btn-default btn-sm"><i class="fa fa-lg fa-fw fa-arrow-left"></i> {{'back'|trans}}</a> {{'General'|trans}}
</div> </a>
</div>
</div> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="filter">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z" />
</svg>
{{'Filter'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="gateway">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z" />
</svg>
{{'Gateway'|trans}}
</a>
<div class="body">
{{ form_start(form, { 'attr': {'class': ''}}) }}
<div class="panel">
<div class="header">
<h4>{{ payment.title }}</h4>
</div>
<div class="body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-pills flex-column" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#all" role="tab">{{'General'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#filter" role="tab">{{'Filter'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#gateway" role="tab">{{'Gateway'|trans}}</a>
</li>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<li class="nav-item"> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="{{ customGroup.id }}">
<a class="nav-link" data-bs-toggle="tab" href="#{{ customGroup.id }}" role="tab">{{ customGroup.title }}</a> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</li> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
{{ customGroup.title }}
</a>
{% endfor %} {% endfor %}
</ul>
</div> </div>
<div class="col-md-10">
<div class="tab-content"> {# Tab Content Area #}
<div class="tab-pane active" id="all" role="tabpanel"> <div class="rounded-md w-full border bg-white p-5 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="row">
<div class="col-md-4"> {# General Tab #}
<div class="row mb-3"> <div id="general" class="tab-content w-full text-stone-500 text-sm block">
<label class="col-md-3 form-control-label">{{ form_label(form.title) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'General'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.title) }} <div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.title) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pos) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.enable) }}
</div> </div>
</div> </div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.private) }}
</div> </div>
<div class="col-md-4"> <div class="w-full lg:w-4/12 px-4">
<div class="row mb-3"> {{ form_row(form.price) }}
<label class="col-md-3 form-control-label">{{ form_label(form.pos) }}</label> </div>
<div class="col-md-9"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.pos) }} {{ form_row(form.taxClass) }}
</div> </div>
</div> </div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.percent) }}
</div> </div>
<div class="col-md-2"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.enable) }} {{ form_row(form.priceFrom) }}
</div> </div>
<div class="col-md-2"> <div class="w-full lg:w-4/12 px-4">
{{ form_widget(form.private) }} {{ form_row(form.priceTo) }}
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4"> <div class="flex flex-wrap">
<div class="row mb-3"> <div class="w-full lg:w-4/12 px-4">
<label class="col-md-3 form-control-label">{{ form_label(form.price) }}</label> {{ form_row(form.trustedShopName) }}
<div class="col-md-9">
{{ form_widget(form.price) }}
</div> </div>
</div> </div>
</div>
<div class="col-md-4"> <div class="flex flex-wrap">
<div class="row mb-3"> <div class="w-full px-4">
<label class="col-md-3 form-control-label">{{ form_label(form.taxClass) }}</label> {{ form_row(form.description) }}
<div class="col-md-9">
{{ form_widget(form.taxClass) }}
</div> </div>
</div> </div>
</div>
<div class="col-md-4"> <div class="flex flex-wrap">
{{ form_widget(form.percent) }} <div class="w-full px-4">
</div> {{ form_row(form.paymentTerms) }}
</div> <p class="mt-1 text-xs text-gray-500">
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceTo) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.trustedShopName) }}</label>
<div class="col-md-9">
{{ form_widget(form.trustedShopName) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.description) }}</label>
<div class="col-md-11">
{{ form_widget(form.description) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.paymentTerms) }}</label>
<div class="col-md-11">
{{ form_widget(form.paymentTerms) }}
<p class="text-muted">
{{ "paymentTermsExample"|trans}} {{ "paymentTermsExample"|trans}}
</p> </p>
</div> </div>
</div> </div>
</div> </div>
{# Filter Tab #}
<div id="filter" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Filter'|trans}}</h6>
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.shippings) }}
</div> </div>
</div> </div>
<div class="tab-pane" id="filter" role="tabpanel">
<div class="row"> <div class="flex flex-wrap">
<div class="col-md-12"> <div class="w-full px-4">
<div class="row mb-3"> {{ form_row(form.countrys) }}
<label class="col-md-3 form-control-label">{{ form_label(form.shippings) }}</label>
<div class="col-md-9">
{{ form_widget(form.shippings) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-12">
<div class="row mb-3"> {# Gateway Tab #}
<label class="col-md-3 form-control-label">{{ form_label(form.countrys) }}</label> <div id="gateway" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-9"> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Gateway'|trans}}</h6>
{{ form_widget(form.countrys) }}
</div> <div class="flex flex-wrap">
</div> <div class="w-full px-4">
</div> {{ form_row(form.paymentGateway) }}
</div>
</div>
<div class="tab-pane" id="gateway" role="tabpanel">
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.paymentGateway) }}</label>
<div class="col-md-9">
{{ form_widget(form.paymentGateway) }}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
{# Custom Tabs #}
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<div class="tab-pane" id="{{ customGroup.id }}" role="tabpanel"> <div id="{{ customGroup.id }}" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{ customGroup.title }}</h6>
{% for customField in customFields %} {% for customField in customFields %}
{% if customField.group == customGroup.id and customField.getTemplate %} {% if customField.group == customGroup.id and customField.getTemplate %}
{{ include(customField.getTemplate, { 'form': form }) }} {{ include(customField.getTemplate, { 'form': form }) }}
@ -186,43 +169,47 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div>
</div> {# Save Button outside Card #}
<div class="text-end my-2">
{{ form_widget(form.save, {
attr: {
class: 'inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]'
}
}) }}
</div> </div>
<div class="panel">
<div class="body">
<div class="row mb-3">
<div class="col-md-offset-1 col-md-11">
{{ form_widget(form.save, {attr: {class: 'btn btn-primary btn-sm'}}) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }} {{ form_end(form) }}
<div class="panel"> {# Changes History Card #}
<div class="header"> <div class="rounded-md border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark">
<h4>{{ 'Changes'|trans }}</h4> <h2 class="ml-4 text-psc text-xl font-medium mb-4">{{ 'Changes'|trans }}</h2>
<div class="">
<div class="w-full grid grid-cols-10 border-t border-stroke px-4 bg-slate-100 py-4.5 dark:border-strokedark md:px-6 2xl:px-7.5">
<div class="col-span-2 px-2 py-3">
<p class="font-medium">{{ 'Date'|trans }}</p>
</div>
<div class="col-span-2 px-2 py-3">
<p class="font-medium">{{ 'Username'|trans }}</p>
</div>
<div class="col-span-6 px-2 py-3">
<p class="font-medium">{{ 'Changes'|trans }}</p>
</div>
</div> </div>
<div class="body">
<table class="table">
<thead>
<tr><th>{{ 'Date'|trans }}</th><th>{{ 'Username'|trans }}</th><th>{{'Changes'|trans}}</th></tr>
</thead>
<tbody>
{% for change in changes %} {% for change in changes %}
<tr><td>{{ change.created|date('H:i:s d.m.Y') }}</td><td>{{ change.username }}</td><td> <div class="w-full grid grid-cols-10 border-t border-stroke px-4 py-4.5 dark:border-strokedark md:px-6 2xl:px-7.5">
{% for key,set in change.changeset %} <div class="col-span-2 px-2 py-3">{{ change.created|date('H:i:s d.m.Y') }}</div>
{% if set[1] is not iterable %} <div class="col-span-2 px-2 py-3">{{ change.username }}</div>
<strong>{{key}}</strong> <span class="badge bg-danger"><del>{{ set[0]}}</del></span><span class="badge bg-success">{% if set[1] is null %}0{% else %}{{ set[1] }}{% endif %}</span></br> <div class="col-span-6 px-2 py-3">
{% for key, set in change.changeset %}
{% if set|length > 1 and set[1] is not iterable %}
<strong>{{ key }}</strong> <span class="badge-no"><del>{{ set[0] }}</del></span> <span class="badge-yes">{% if set[1] is null %}0{% else %}{{ set[1] }}{% endif %}</span><br>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<td></tr> </div>
</div>
{% endfor %} {% endfor %}
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -12,8 +12,8 @@
</h1> </h1>
</div> </div>
<div class="flex flex-wrap items-center gap-4 justify-end shrink-0 ml-auto"> <div class="flex flex-wrap items-center gap-4 justify-end shrink-0 ml-auto">
<a href="{{ path("psc_shop_payment_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-sm px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]"> <a href="{{ path("psc_shop_payment_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-2 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
</svg> </svg>
{{'Addpaymentmethod'|trans}} {{'Addpaymentmethod'|trans}}
@ -24,42 +24,64 @@
{% block body %} {% block body %}
<div class="flex flex-col gap-6"> <div class="flex flex-col gap-6">
<div class="rounded-sm border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark"> <div class="rounded-md border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="min-w-full text-sm"> <table class="min-w-full text-sm">
<thead class="bg-slate-100 border-t border-stroke"> <thead class="bg-slate-50 dark:bg-gray-800">
<tr> <tr class="border-b-2 border-gray-200 dark:border-gray-700">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'payment.uid') }}</th> <th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'active'|trans, 'payment.enable') }}</th> {{ knp_pagination_sortable(pagination, 'Uid'|trans, 'payment.uid') }}
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Pos'|trans, 'payment.pos') }}</th> </th>
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Name'|trans, 'payment.title') }}</th> <th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'cost'|trans, 'payment.price') }}</th> {{ knp_pagination_sortable(pagination, 'active'|trans, 'payment.enable') }}
<th class="px-2 py-3 text-right font-medium text-gray-700">Aktionen</th> </th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'Pos'|trans, 'payment.pos') }}
</th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'Name'|trans, 'payment.title') }}
</th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'cost'|trans, 'payment.price') }}
</th>
<th class="px-4 py-4 text-right text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
Aktionen
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for payment in pagination %} {% for payment in pagination %}
<tr class="border-t border-stroke hover:bg-gray-50"> <tr class="border-t border-gray-100 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800/50 transition-colors">
<td class="px-2 py-3 font-medium">{{ payment.uid }}</td> <td class="px-4 py-3">
<td class="px-2 py-3"> <a href="{{ path("psc_shop_payment_backend_edit", {uid: payment.uid}) }}"
class="inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono font-medium bg-gray-100 text-gray-800 border border-gray-200 hover:bg-psc-50 hover:text-psc-700 hover:border-psc-300 transition-colors dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-psc-900 dark:hover:text-psc-300">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3.5 h-3.5 mr-1.5 text-gray-500 dark:text-gray-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5l-3.9 19.5m-2.1-19.5l-3.9 19.5" />
</svg>
{{ payment.uid }}
</a>
</td>
<td class="px-4 py-3">
{% if payment.enable %} {% if payment.enable %}
<div class="badge-yes">{{'yes'|trans}}</div> <span class="badge-yes">{{'yes'|trans}}</span>
{% else %} {% else %}
<div class="badge-no">{{'no'|trans}}</div> <span class="badge-no">{{'no'|trans}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="px-2 py-3">{{ payment.pos }}</td> <td class="px-4 py-3 text-gray-900 dark:text-gray-100">{{ payment.pos }}</td>
<td class="px-2 py-3">{{ payment.title }}</td> <td class="px-4 py-3 font-medium text-gray-900 dark:text-gray-100">{{ payment.title }}</td>
<td class="px-2 py-3">{{ payment.price|number_format(2, ',', '.') }}€</td> <td class="px-4 py-3 text-gray-900 dark:text-gray-100">{{ payment.price|number_format(2, ',', '.') }}€</td>
<td class="px-2 py-3 text-right"> <td class="px-4 py-3 text-right">
<div class="flex flex-row gap-2 justify-end"> <div class="flex flex-row gap-2 justify-end">
<a href="{{ path("psc_shop_payment_backend_edit", {uid: payment.uid}) }}" class=""> <!-- Bearbeiten - GRÜN -->
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon"> <a href="{{ path("psc_shop_payment_backend_edit", {uid: payment.uid}) }}" title="{{'edit'|trans}}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon text-green-600 hover:text-green-700">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" />
</svg> </svg>
</a> </a>
<a href="{{ path("psc_shop_payment_backend_delete", {uid: payment.uid}) }}" class=""> <!-- Löschen - ROT -->
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon"> <a href="{{ path("psc_shop_payment_backend_delete", {uid: payment.uid}) }}" title="{{'delete'|trans}}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon text-red-600 hover:text-red-700">
<path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" />
</svg> </svg>
</a> </a>

View File

@ -1,189 +1,175 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'tailwind_formtheme.html.twig' %}
{% trans_default_domain 'core_shipping_edit' %} {% trans_default_domain 'core_shipping_edit' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.056 2.056 0 00-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 00-10.026 0 1.106 1.106 0 00-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12" />
</svg>
{{'shippingmethods'|trans}} <span class="text-gray-500">{{'create'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_shipping_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="w-full flex flex-col gap-6">
{{ form_start(form, {attr: {class: ''}}) }}
<div class="header"> <div class="tab-group flex-none md:flex w-full" data-dui-orientation="vertical">
<div class="row"> {# Vertical Tab Navigation #}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div role="tablist" class="relative mr-5 rounded-md flex flex-col p-1 w-full md:w-2/12">
<h3> <div class="tab-indicator absolute left-0 w-1 bg-psc-500 transition-transform duration-300"></div>
<i class="fa-fw fa fa-envelope"></i>
{{'shippingmethods'|trans}} <span>> <a href="#" class="tab-link flex items-center text-sm active px-4 py-2 relative" data-dui-tab-target="general">
{{'create'|trans}} </span> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</h3> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
</div> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 text-end"> </svg>
<a href="{{ path("psc_shop_shipping_backend_list") }}" class="btn btn-default btn-sm"><i class="fa fa-lg fa-fw fa-arrow-left"></i> {{'back'|trans}}</a> {{'General'|trans}}
</div> </a>
</div>
</div> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="params">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75" />
</svg>
{{'parameter'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="matrix">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h1.5m-1.5 0C6.504 4.5 6 5.004 6 5.625v1.5m0 0v1.5m0-1.5h1.5M18 18.375v-1.5c0-.621-.504-1.125-1.125-1.125h-1.5m3.75 2.625c0 .621-.504 1.125-1.125 1.125h-1.5m1.5-1.125c.621 0 1.125-.504 1.125-1.125v-1.5m0 3.75h-1.5c-.621 0-1.125-.504-1.125-1.125v-1.5m0 0h1.5m-1.5 0c-.621 0-1.125-.504-1.125-1.125v-1.5m0 3.75v-1.5m0 0h-1.5m1.5 0c.621 0 1.125-.504 1.125-1.125v-1.5m-3.75 0v1.5m0-1.5h-1.5" />
</svg>
{{'Matrix'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="filter">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z" />
</svg>
{{'Filter'|trans}}
</a>
<div class="body">
{{ form_start(form, { 'attr': {'class': ''}}) }}
<div class="panel">
<div class="header">
<h4>{{ shipping.title }}</h4>
</div>
<div class="body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-pills flex-column" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#all" role="tab">{{'General'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#params" role="tab">{{'parameter'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#matrix" role="tab">{{'Matrix'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#filter" role="tab">{{'Filter'|trans}}</a>
</li>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<li class="nav-item"> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="{{ customGroup.id }}">
<a class="nav-link" data-bs-toggle="tab" href="#{{ customGroup.id }}" role="tab">{{ customGroup.title }}</a> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</li> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
{{ customGroup.title }}
</a>
{% endfor %} {% endfor %}
</ul>
</div> </div>
<div class="col-md-10">
<div class="tab-content"> {# Tab Content Area #}
<div class="tab-pane active" id="all" role="tabpanel"> <div class="rounded-md w-full border bg-white p-5 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="row">
<div class="col-md-4"> {# General Tab #}
<div class="row mb-3"> <div id="general" class="tab-content w-full text-stone-500 text-sm block">
<label class="col-md-3 form-control-label">{{ form_label(form.title) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'General'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.title) }} <div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.title) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pos) }}
</div>
<div class="w-full lg:w-4/12 px-4">
<div class="flex flex-wrap gap-4">
<div>{{ form_row(form.enable) }}</div>
<div>{{ form_row(form.private) }}</div>
<div>{{ form_row(form.noPayment) }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> <div class="flex flex-wrap">
<label class="col-md-3 form-control-label">{{ form_label(form.pos) }}</label> <div class="w-full lg:w-4/12 px-4">
<div class="col-md-9"> {{ form_row(form.taxClass) }}
{{ form_widget(form.pos) }} </div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.price) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pricePercent) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.weightFrom) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.weightTo) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.mode) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.priceFrom) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.priceTo) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.description) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row"> {# Parameter Tab #}
<div class="col-md-3">{{ form_widget(form.enable) }}</div> <div id="params" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-3">{{ form_widget(form.private) }}</div> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'parameter'|trans}}</h6>
<div class="col-md-6">{{ form_widget(form.noPayment) }}</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.parameter1) }}
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4"> {# Matrix Tab #}
<div class="row mb-3"> <div id="matrix" class="tab-content w-full text-stone-500 text-sm hidden">
<label class="col-md-3 form-control-label">{{ form_label(form.taxClass) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Matrix'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.taxClass) }} <div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.matrix) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> {# Filter Tab #}
<label class="col-md-3 form-control-label">{{ form_label(form.price) }}</label> <div id="filter" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-9"> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Filter'|trans}}</h6>
{{ form_widget(form.price) }}
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.countrys) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> {# Custom Tabs #}
<label class="col-md-3 form-control-label">{{ form_label(form.pricePercent) }}</label>
<div class="col-md-9">
{{ form_widget(form.pricePercent) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.weightFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.weightFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.weightTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.weightTo) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.mode) }}</label>
<div class="col-md-9">
{{ form_widget(form.mode) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceTo) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.description) }}</label>
<div class="col-md-11">
{{ form_widget(form.description) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="params" role="tabpanel">
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.parameter1) }}</label>
<div class="col-md-9">
{{ form_widget(form.parameter1) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="filter" role="tabpanel">
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.countrys) }}</label>
<div class="col-md-9">
{{ form_widget(form.countrys) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="matrix" role="tabpanel">
{{ form_widget(form.matrix) }}
</div>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<div class="tab-pane" id="{{ customGroup.id }}" role="tabpanel"> <div id="{{ customGroup.id }}" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{ customGroup.title }}</h6>
{% for customField in customFields %} {% for customField in customFields %}
{% if customField.group == customGroup.id and customField.getTemplate %} {% if customField.group == customGroup.id and customField.getTemplate %}
{{ include(customField.getTemplate, { 'form': form }) }} {{ include(customField.getTemplate, { 'form': form }) }}
@ -193,19 +179,16 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div>
</div> {# Save Button outside Card #}
<div class="text-end my-2">
{{ form_widget(form.save, {
attr: {
class: 'inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]'
}
}) }}
</div> </div>
<div class="panel">
<div class="body">
<div class="row mb-3">
<div class="col-md-offset-1 col-md-11">
{{ form_widget(form.save, {attr: {class: 'btn btn-primary btn-sm'}}) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,40 +1,91 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'form_div_layout_tailwind.html.twig' %}
{% trans_default_domain 'core_shipping_delete' %} {% trans_default_domain 'core_shipping_delete' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.056 2.056 0 00-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 00-10.026 0 1.106 1.106 0 00-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12" />
</svg>
{{'shippingmethods'|trans}} <span class="text-gray-500">{{'del'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_shipping_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="header"> <div class="flex flex-col gap-6">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> {# Delete Confirmation Card #}
<h3> <div class="rounded-md border border-red-200 bg-white shadow-lg dark:border-strokedark dark:bg-boxdark">
<i class="fa-fw fa fa-envelope"></i>
{{'shippingmethods'|trans}} <span>> {# Card Header #}
{{'del'|trans}}</span> <div class="border-b border-red-200 bg-red-50 px-7.5 py-4 dark:border-strokedark dark:bg-red-900/20">
<div class="flex items-center gap-3">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 text-red-600">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
</svg>
<h3 class="text-xl font-medium text-red-900 dark:text-red-200">
{{'Delshippingmethod'|trans}}?
</h3> </h3>
</div> </div>
</div> </div>
{# Card Body #}
<div class="px-7.5 py-6">
<div class="space-y-4">
<p class="text-gray-700 dark:text-bodydark">
{{'Are you sure you want to delete this shipping method'|trans}}?
</p>
<div class="p-4 bg-gray-50 rounded-md border border-gray-200 dark:bg-boxdark-2 dark:border-strokedark">
<h5 class="text-lg font-medium text-gray-900 dark:text-bodydark">
{{ shipping.title }}
</h5>
</div> </div>
<div class="body"> <div class="p-4 bg-yellow-50 rounded-md border border-yellow-200">
<div class="panel"> <div class="flex gap-3">
<div class="header"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-yellow-600 flex-shrink-0 mt-0.5">
<h4>{{'Delshippingmethod'|trans}}</h4> <path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" />
</svg>
<p class="text-sm text-yellow-800">
{{'This action cannot be undone'|trans}}.
</p>
</div> </div>
<div class="body">
<h5>{{ shipping.title }}</h5>
{{ form_start(form, { 'attr': {'class': ''}}) }}
<div class="row mb-3">
<label class="col-md-1 form-control-label"></label>
<div class="col-md-1">
{{ form_widget(form.yes, {attr: {class: 'btn btn-lg btn-warning btn-sm'}}) }}
</div> </div>
<div class="col-md-1">
{{ form_widget(form.no, {attr: {class: 'btn btn-lg btn-primary btn-sm'}}) }}
</div> </div>
</div> </div>
{# Card Footer with Actions #}
<div class="border-t border-gray-200 px-7.5 py-4 bg-gray-50 dark:border-strokedark dark:bg-boxdark-2">
{{ form_start(form) }}
<div class="flex flex-wrap items-center gap-3 justify-end">
{{ form_widget(form.no, {
attr: {
class: 'inline-flex items-center justify-center py-2 gap-2 font-medium rounded-md px-4 text-sm text-psc-600 border border-psc-500 bg-white hover:bg-gray-50 hover:ring-2 hover:ring-psc-500 hover:ring-offset-1 shadow-sm'
},
label: 'no'|trans
}) }}
{{ form_widget(form.yes, {
attr: {
class: 'inline-flex items-center justify-center py-2 gap-2 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-red-500 hover:bg-red-600 hover:ring-2 hover:ring-red-500 hover:ring-offset-1'
},
label: 'yes'|trans
}) }}
</div>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
</div> </div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,189 +1,175 @@
{% extends 'backend_base.html.twig' %} {% extends 'backend_tailwind_base.html.twig' %}
{% form_theme form 'tailwind_formtheme.html.twig' %}
{% trans_default_domain 'core_shipping_edit' %} {% trans_default_domain 'core_shipping_edit' %}
{% block header %}
<div>
<h1 class="text-psc text-2xl font-medium flex flex-row gap-1">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-8">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.056 2.056 0 00-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 00-10.026 0 1.106 1.106 0 00-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12" />
</svg>
{{'shippingmethods'|trans}} <span class="text-gray-500">{{'toedit'|trans}}</span>
</h1>
</div>
<div class="flex flex-wrap items-center gap-4 justify-start shrink-0">
<a href="{{ path("psc_shop_shipping_backend_list") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-gray-500 hover:bg-gray-600 hover:ring-2 hover:ring-gray-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
</svg>
{{'back'|trans}}
</a>
</div>
{% endblock %}
{% block body %} {% block body %}
<div class="w-full flex flex-col gap-6">
{{ form_start(form, {attr: {class: ''}}) }}
<div class="header"> <div class="tab-group flex-none md:flex w-full" data-dui-orientation="vertical">
<div class="row"> {# Vertical Tab Navigation #}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <div role="tablist" class="relative mr-5 rounded-md flex flex-col p-1 w-full md:w-2/12">
<h3> <div class="tab-indicator absolute left-0 w-1 bg-psc-500 transition-transform duration-300"></div>
<i class="fa-fw fa fa-envelope"></i>
{{'shippingmethods'|trans}} <span>> <a href="#" class="tab-link flex items-center text-sm active px-4 py-2 relative" data-dui-tab-target="general">
{{'toedit'|trans}} </span> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</h3> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
</div> <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 text-end"> </svg>
<a href="{{ path("psc_shop_shipping_backend_list") }}" class="btn btn-default btn-sm"><i class="fa fa-lg fa-fw fa-arrow-left"></i> {{'back'|trans}}</a> {{'General'|trans}}
</div> </a>
</div>
</div> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="params">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75" />
</svg>
{{'parameter'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="matrix">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h1.5m-1.5 0C6.504 4.5 6 5.004 6 5.625v1.5m0 0v1.5m0-1.5h1.5M18 18.375v-1.5c0-.621-.504-1.125-1.125-1.125h-1.5m3.75 2.625c0 .621-.504 1.125-1.125 1.125h-1.5m1.5-1.125c.621 0 1.125-.504 1.125-1.125v-1.5m0 3.75h-1.5c-.621 0-1.125-.504-1.125-1.125v-1.5m0 0h1.5m-1.5 0c-.621 0-1.125-.504-1.125-1.125v-1.5m0 3.75v-1.5m0 0h-1.5m1.5 0c.621 0 1.125-.504 1.125-1.125v-1.5m-3.75 0v1.5m0-1.5h-1.5" />
</svg>
{{'Matrix'|trans}}
</a>
<a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="filter">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z" />
</svg>
{{'Filter'|trans}}
</a>
<div class="body">
{{ form_start(form, { 'attr': {'class': ''}}) }}
<div class="panel">
<div class="header">
<h4>{{ shipping.title }}</h4>
</div>
<div class="body">
<div class="row">
<div class="col-md-2">
<ul class="nav nav-pills flex-column" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#all" role="tab">{{'General'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#params" role="tab">{{'parameter'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#matrix" role="tab">{{'Matrix'|trans}}</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#filter" role="tab">{{'Filter'|trans}}</a>
</li>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<li class="nav-item"> <a href="#" class="tab-link flex items-center text-sm px-4 py-2 relative" data-dui-tab-target="{{ customGroup.id }}">
<a class="nav-link" data-bs-toggle="tab" href="#{{ customGroup.id }}" role="tab">{{ customGroup.title }}</a> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
</li> <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
{{ customGroup.title }}
</a>
{% endfor %} {% endfor %}
</ul>
</div> </div>
<div class="col-md-10">
<div class="tab-content"> {# Tab Content Area #}
<div class="tab-pane active" id="all" role="tabpanel"> <div class="rounded-md w-full border bg-white p-5 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="row">
<div class="col-md-4"> {# General Tab #}
<div class="row mb-3"> <div id="general" class="tab-content w-full text-stone-500 text-sm block">
<label class="col-md-3 form-control-label">{{ form_label(form.title) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'General'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.title) }} <div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.title) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pos) }}
</div>
<div class="w-full lg:w-4/12 px-4">
<div class="flex flex-wrap gap-4">
<div>{{ form_row(form.enable) }}</div>
<div>{{ form_row(form.private) }}</div>
<div>{{ form_row(form.noPayment) }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> <div class="flex flex-wrap">
<label class="col-md-3 form-control-label">{{ form_label(form.pos) }}</label> <div class="w-full lg:w-4/12 px-4">
<div class="col-md-9"> {{ form_row(form.taxClass) }}
{{ form_widget(form.pos) }} </div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.price) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.pricePercent) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.weightFrom) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.weightTo) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.mode) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.priceFrom) }}
</div>
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.priceTo) }}
</div>
</div>
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.description) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row"> {# Parameter Tab #}
<div class="col-md-3">{{ form_widget(form.enable) }}</div> <div id="params" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-3">{{ form_widget(form.private) }}</div> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'parameter'|trans}}</h6>
<div class="col-md-6">{{ form_widget(form.noPayment) }}</div>
<div class="flex flex-wrap">
<div class="w-full lg:w-4/12 px-4">
{{ form_row(form.parameter1) }}
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-4"> {# Matrix Tab #}
<div class="row mb-3"> <div id="matrix" class="tab-content w-full text-stone-500 text-sm hidden">
<label class="col-md-3 form-control-label">{{ form_label(form.taxClass) }}</label> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Matrix'|trans}}</h6>
<div class="col-md-9">
{{ form_widget(form.taxClass) }} <div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.matrix) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> {# Filter Tab #}
<label class="col-md-3 form-control-label">{{ form_label(form.price) }}</label> <div id="filter" class="tab-content w-full text-stone-500 text-sm hidden">
<div class="col-md-9"> <h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{'Filter'|trans}}</h6>
{{ form_widget(form.price) }}
<div class="flex flex-wrap">
<div class="w-full px-4">
{{ form_row(form.countrys) }}
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4">
<div class="row mb-3"> {# Custom Tabs #}
<label class="col-md-3 form-control-label">{{ form_label(form.pricePercent) }}</label>
<div class="col-md-9">
{{ form_widget(form.pricePercent) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.weightFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.weightFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.weightTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.weightTo) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.mode) }}</label>
<div class="col-md-9">
{{ form_widget(form.mode) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceFrom) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceFrom) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.priceTo) }}</label>
<div class="col-md-9">
{{ form_widget(form.priceTo) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.description) }}</label>
<div class="col-md-11">
{{ form_widget(form.description) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="params" role="tabpanel">
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.parameter1) }}</label>
<div class="col-md-9">
{{ form_widget(form.parameter1) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="filter" role="tabpanel">
<div class="row">
<div class="col-md-4">
<div class="row mb-3">
<label class="col-md-3 form-control-label">{{ form_label(form.countrys) }}</label>
<div class="col-md-9">
{{ form_widget(form.countrys) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="matrix" role="tabpanel">
{{ form_widget(form.matrix) }}
</div>
{% for customGroup in customGroups %} {% for customGroup in customGroups %}
<div class="tab-pane" id="{{ customGroup.id }}" role="tabpanel"> <div id="{{ customGroup.id }}" class="tab-content w-full text-stone-500 text-sm hidden">
<h6 class="text-sm mt-3 mb-6 font-bold uppercase">{{ customGroup.title }}</h6>
{% for customField in customFields %} {% for customField in customFields %}
{% if customField.group == customGroup.id and customField.getTemplate %} {% if customField.group == customGroup.id and customField.getTemplate %}
{{ include(customField.getTemplate, { 'form': form }) }} {{ include(customField.getTemplate, { 'form': form }) }}
@ -193,42 +179,47 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</div>
</div> {# Save Button outside Card #}
<div class="text-end my-2">
{{ form_widget(form.save, {
attr: {
class: 'inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]'
}
}) }}
</div> </div>
<div class="panel">
<div class="body">
<div class="row mb-3">
<div class="col-md-offset-1 col-md-11">
{{ form_widget(form.save, {attr: {class: 'btn btn-primary btn-sm'}}) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }} {{ form_end(form) }}
<div class="panel">
<div class="header"> {# Changes History Card #}
<h4>{{ 'Changes'|trans }}</h4> <div class="rounded-md border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark">
<h2 class="ml-4 text-psc text-xl font-medium mb-4">{{ 'Changes'|trans }}</h2>
<div class="">
<div class="w-full grid grid-cols-10 border-t border-stroke px-4 bg-slate-100 py-4.5 dark:border-strokedark md:px-6 2xl:px-7.5">
<div class="col-span-2 px-2 py-3">
<p class="font-medium">{{ 'Date'|trans }}</p>
</div>
<div class="col-span-2 px-2 py-3">
<p class="font-medium">{{ 'Username'|trans }}</p>
</div>
<div class="col-span-6 px-2 py-3">
<p class="font-medium">{{ 'Changes'|trans }}</p>
</div>
</div> </div>
<div class="body">
<table class="table">
<thead>
<tr><th>{{ 'Date'|trans }}</th><th>{{ 'Username'|trans }}</th><th>{{'Changes'|trans}}</th></tr>
</thead>
<tbody>
{% for change in changes %} {% for change in changes %}
<tr><td>{{ change.created|date('H:i:s d.m.Y') }}</td><td>{{ change.username }}</td><td> <div class="w-full grid grid-cols-10 border-t border-stroke px-4 py-4.5 dark:border-strokedark md:px-6 2xl:px-7.5">
{% for key,set in change.changeset %} <div class="col-span-2 px-2 py-3">{{ change.created|date('H:i:s d.m.Y') }}</div>
{% if set[1] is not iterable %} <div class="col-span-2 px-2 py-3">{{ change.username }}</div>
<strong>{{key}}</strong> <span class="badge bg-danger"><del>{{ set[0]}}</del></span><span class="badge bg-success">{% if set[1] is null %}0{% else %}{{ set[1] }}{% endif %}</span></br> <div class="col-span-6 px-2 py-3">
{% for key, set in change.changeset %}
{% if set|length > 1 and set[1] is not iterable %}
<strong>{{ key }}</strong> <span class="badge-no"><del>{{ set[0] }}</del></span> <span class="badge-yes">{% if set[1] is null %}0{% else %}{{ set[1] }}{% endif %}</span><br>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<td></tr> </div>
</div>
{% endfor %} {% endfor %}
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -12,7 +12,7 @@
</h1> </h1>
</div> </div>
<div class="flex flex-wrap items-center gap-4 justify-end shrink-0 ml-auto"> <div class="flex flex-wrap items-center gap-4 justify-end shrink-0 ml-auto">
<a href="{{ path("psc_shop_shipping_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-sm px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]"> <a href="{{ path("psc_shop_shipping_backend_create") }}" class="inline-flex items-center justify-center py-1 gap-1 font-medium rounded-md px-4 text-sm text-white shadow-lg bg-psc-500 hover:bg-psc-600 hover:ring-2 hover:ring-psc-500 hover:ring-offset-2 min-h-[2.25rem]">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="button-icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
</svg> </svg>
@ -24,50 +24,74 @@
{% block body %} {% block body %}
<div class="flex flex-col gap-6"> <div class="flex flex-col gap-6">
<div class="rounded-sm border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark"> <div class="rounded-md border bg-white px-7.5 py-6 shadow-lg dark:border-strokedark dark:bg-boxdark">
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="min-w-full text-sm"> <table class="min-w-full text-sm">
<thead class="bg-slate-100 border-t border-stroke"> <thead class="bg-slate-50 dark:bg-gray-800">
<tr> <tr class="border-b-2 border-gray-200 dark:border-gray-700">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Uid'|trans, 'shipping.uid') }}</th> <th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'active'|trans, 'shipping.enable') }}</th> {{ knp_pagination_sortable(pagination, 'Uid'|trans, 'shipping.uid') }}
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Pos'|trans, 'shipping.pos') }}</th> </th>
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'Name'|trans, 'shipping.title') }}</th> <th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
<th class="px-2 py-3 text-left font-medium text-gray-700">{{ knp_pagination_sortable(pagination, 'price'|trans, 'shipping.price') }}</th> {{ knp_pagination_sortable(pagination, 'active'|trans, 'shipping.enable') }}
<th class="px-2 py-3 text-left font-medium text-gray-700">{{'Matrix'|trans}}</th> </th>
<th class="px-2 py-3 text-right font-medium text-gray-700">Aktionen</th> <th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'Pos'|trans, 'shipping.pos') }}
</th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'Name'|trans, 'shipping.title') }}
</th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{ knp_pagination_sortable(pagination, 'price'|trans, 'shipping.price') }}
</th>
<th class="px-4 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
{{'Matrix'|trans}}
</th>
<th class="px-4 py-4 text-right text-xs font-semibold text-gray-600 uppercase tracking-wider dark:text-gray-300">
Aktionen
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class="bg-white dark:bg-boxdark">
{% for shipping in pagination %} {% for shipping in pagination %}
<tr class="border-t border-stroke hover:bg-gray-50"> <tr class="border-t border-gray-100 hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800/50 transition-colors">
<td class="px-2 py-3 font-medium">{{ shipping.uid }}</td> <td class="px-4 py-3">
<td class="px-2 py-3"> <a href="{{ path("psc_shop_shipping_backend_edit", {uid: shipping.uid}) }}"
class="inline-flex items-center px-2.5 py-1 rounded-md text-xs font-mono font-medium bg-gray-100 text-gray-800 border border-gray-200 hover:bg-psc-50 hover:text-psc-700 hover:border-psc-300 transition-colors dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-psc-900 dark:hover:text-psc-300">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3.5 h-3.5 mr-1.5 text-gray-500 dark:text-gray-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5l-3.9 19.5m-2.1-19.5l-3.9 19.5" />
</svg>
{{ shipping.uid }}
</a>
</td>
<td class="px-4 py-3">
{% if shipping.enable %} {% if shipping.enable %}
<div class="badge-yes">{{'yes'|trans}}</div> <span class="badge-yes">{{'yes'|trans}}</span>
{% else %} {% else %}
<div class="badge-no">{{'no'|trans}}</div> <span class="badge-no">{{'no'|trans}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="px-2 py-3">{{ shipping.pos }}</td> <td class="px-4 py-3 text-gray-900 dark:text-gray-100">{{ shipping.pos }}</td>
<td class="px-2 py-3">{{ shipping.title }}</td> <td class="px-4 py-3 font-medium text-gray-900 dark:text-gray-100">{{ shipping.title }}</td>
<td class="px-2 py-3">{{ shipping.price|number_format(2, ',', '.') }}€</td> <td class="px-4 py-3 text-gray-900 dark:text-gray-100">{{ shipping.price|number_format(2, ',', '.') }}€</td>
<td class="px-2 py-3"> <td class="px-4 py-3">
{% if shipping.matrix != "" %} {% if shipping.matrix != "" %}
<div class="badge-yes">{{'yes'|trans}}</div> <span class="badge-yes">{{'yes'|trans}}</span>
{% else %} {% else %}
<div class="badge-no">{{'no'|trans}}</div> <span class="badge-no">{{'no'|trans}}</span>
{% endif %} {% endif %}
</td> </td>
<td class="px-2 py-3 text-right"> <td class="px-4 py-3 text-right">
<div class="flex flex-row gap-2 justify-end"> <div class="flex flex-row gap-2 justify-end">
<a href="{{ path("psc_shop_shipping_backend_edit", {uid: shipping.uid}) }}" class=""> {# Bearbeiten - GRÜN #}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon"> <a href="{{ path("psc_shop_shipping_backend_edit", {uid: shipping.uid}) }}" title="{{'edit'|trans}}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon text-green-600 hover:text-green-700 dark:text-green-500 dark:hover:text-green-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> <path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" />
</svg> </svg>
</a> </a>
<a href="{{ path("psc_shop_shipping_backend_delete", {uid: shipping.uid}) }}" class=""> {# Löschen - ROT #}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon"> <a href="{{ path("psc_shop_shipping_backend_delete", {uid: shipping.uid}) }}" title="{{'delete'|trans}}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="table-icon text-red-600 hover:text-red-700 dark:text-red-500 dark:hover:text-red-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" />
</svg> </svg>
</a> </a>

View File

@ -15,7 +15,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerInterface;
#[Route('/index')] #[Route('/index')]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_SHOP')]
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
#[Template('@PluginCustomPSCLaufkartenLayouter/backend/index/index.html.twig')] #[Template('@PluginCustomPSCLaufkartenLayouter/backend/index/index.html.twig')]

View File

@ -6,7 +6,7 @@ psc_shop_plugin_custom_laufkartenlayouter_api:
psc_shop_plugin_custom_laufkartenlayouter_backend: psc_shop_plugin_custom_laufkartenlayouter_backend:
resource: "@PluginCustomPSCLaufkartenLayouter/Controller/Backend" resource: "@PluginCustomPSCLaufkartenLayouter/Controller/Backend"
type: attribute type: attribute
prefix: /plugin/custom/psc/laufkartenlayouter/backend prefix: /backend/plugin/custom/psc/laufkartenlayouter
psc_shop_plugin_custom_laufkartenlayouter_frontend: psc_shop_plugin_custom_laufkartenlayouter_frontend:
resource: "@PluginCustomPSCLaufkartenLayouter/Controller/Frontend" resource: "@PluginCustomPSCLaufkartenLayouter/Controller/Frontend"

View File

@ -1,60 +1,24 @@
<?php <?php
namespace Plugin\System\PSC\XmlCalc\Controller\Backend; namespace Plugin\System\PSC\XmlCalc\Controller\Backend;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTManager;
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTManagerInterface;
use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface; use Lexik\Bundle\JWTAuthenticationBundle\Services\JWTTokenManagerInterface;
use Plugin\System\PSC\XmlCalc\Form\Calc;
use Plugin\System\PSC\XmlCalc\Form\Edit\ShopPFType;
use Plugin\System\PSC\XmlCalc\Form\Edit\XmlType;
use PSC\Library\Calc\Option\Type\Select\Opt;
use PSC\Shop\EntityBundle\Entity\Install;
use PSC\Shop\EntityBundle\Entity\Product;
use PSC\Shop\OrderBundle\Form\Backend\OrderStatusType;
use Plugin\System\PSC\Production\Form\Backend\StatusType;
use PSC\Libraries\AutoRegistryBundle\Service\ConfigurableElementInterface;
use PSC\Library\Calc\Engine;
use PSC\Library\Calc\PaperContainer;
use PSC\Shop\EntityBundle\Document\Position;
use PSC\Shop\EntityBundle\Document\Tracking;
use PSC\Shop\EntityBundle\Entity\ContactAddress;
use PSC\Shop\EntityBundle\Entity\Domain;
use PSC\Shop\EntityBundle\Entity\Order;
use PSC\Shop\EntityBundle\Entity\Orderpos;
use PSC\Shop\EntityBundle\Entity\Shop;
use PSC\Shop\EntityBundle\Entity\Upload;
use Plugin\System\PSC\Production\Form\Backend\UploadType;
use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactDeliveryType;
use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactInvoiceType;
use PSC\Shop\OrderBundle\Form\Backend\Detail\ContactSenderType;
use PSC\Shop\QueueBundle\Event\Position\Status\Change;
use PSC\System\SettingsBundle\Service\PaperDB;
use Ramsey\Uuid\Uuid;
use Sauladam\ShipmentTracker\ShipmentTracker;
use Symfony\Bridge\Twig\Attribute\Template; use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
#[Route('/live')] #[Route('/live')]
class LiveController extends AbstractController class LiveController extends AbstractController
{ {
#[Template] #[Template("@PluginSystemPSCXmlCalc/backend/live/index.html.twig")]
#[IsGranted('ROLE_ADMIN')] #[IsGranted('ROLE_ADMIN')]
#[Route('/calc/{uuid}/{test}', defaults: ['uuid' => '', 'test' => false], name: 'psc_plugin_system_xmlcalc_backend_live_index')] #[Route('/calc/{uuid}/{test}', defaults: ['uuid' => '', 'test' => false], name: 'psc_plugin_system_xmlcalc_backend_live_index')]
public function indexAction( public function indexAction(
Request $request, Request $request,
JWTTokenManagerInterface $jwtManager, JWTTokenManagerInterface $jwtManager,
$uuid, $test = false sring $uuid, $test = false
) { ) {
return array( return array(

View File

@ -1032,6 +1032,10 @@ html {
margin-right: 0.25rem; margin-right: 0.25rem;
} }
.mr-1\.5{
margin-right: 0.375rem;
}
.mr-2{ .mr-2{
margin-right: 0.5rem; margin-right: 0.5rem;
} }
@ -1049,6 +1053,14 @@ html {
margin-inline-start: 0.25rem; margin-inline-start: 0.25rem;
} }
.mt-0{
margin-top: 0px;
}
.mt-0\.5{
margin-top: 0.125rem;
}
.mt-1{ .mt-1{
margin-top: 0.25rem; margin-top: 0.25rem;
} }
@ -1702,6 +1714,10 @@ html {
border-bottom-width: 1px; border-bottom-width: 1px;
} }
.border-b-2{
border-bottom-width: 2px;
}
.border-l-0{ .border-l-0{
border-left-width: 0px; border-left-width: 0px;
} }
@ -1748,6 +1764,11 @@ html {
border-color: rgb(234 100 27 / var(--tw-border-opacity)); border-color: rgb(234 100 27 / var(--tw-border-opacity));
} }
.border-red-200{
--tw-border-opacity: 1;
border-color: rgb(254 202 202 / var(--tw-border-opacity));
}
.border-red-500{ .border-red-500{
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(239 68 68 / var(--tw-border-opacity)); border-color: rgb(239 68 68 / var(--tw-border-opacity));
@ -1758,6 +1779,11 @@ html {
border-color: rgb(231 229 228 / var(--tw-border-opacity)); border-color: rgb(231 229 228 / var(--tw-border-opacity));
} }
.border-yellow-200{
--tw-border-opacity: 1;
border-color: rgb(254 240 138 / var(--tw-border-opacity));
}
.border-yellow-400{ .border-yellow-400{
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(250 204 21 / var(--tw-border-opacity)); border-color: rgb(250 204 21 / var(--tw-border-opacity));
@ -1788,6 +1814,11 @@ html {
background-color: rgb(249 250 251 / var(--tw-bg-opacity)); background-color: rgb(249 250 251 / var(--tw-bg-opacity));
} }
.bg-gray-500{
--tw-bg-opacity: 1;
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
}
.bg-gray-800{ .bg-gray-800{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(31 41 55 / var(--tw-bg-opacity)); background-color: rgb(31 41 55 / var(--tw-bg-opacity));
@ -2182,6 +2213,11 @@ html {
color: rgb(234 100 27 / var(--tw-text-opacity)); color: rgb(234 100 27 / var(--tw-text-opacity));
} }
.text-psc-600{
--tw-text-opacity: 1;
color: rgb(172 48 37 / var(--tw-text-opacity));
}
.text-red-600{ .text-red-600{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(220 38 38 / var(--tw-text-opacity)); color: rgb(220 38 38 / var(--tw-text-opacity));
@ -2466,16 +2502,17 @@ html {
.badge-yes{ .badge-yes{
display: inline-flex; display: inline-flex;
align-items: center;
justify-content: center; justify-content: center;
border-radius: 0.125rem; border-radius: 9999px;
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(132 204 22 / var(--tw-bg-opacity)); background-color: rgb(132 204 22 / var(--tw-bg-opacity));
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
padding-top: 0.25rem; padding-top: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
font-size: 0.875rem; font-size: 0.75rem;
line-height: 1.25rem; line-height: 1rem;
font-weight: 500; font-weight: 500;
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)); color: rgb(255 255 255 / var(--tw-text-opacity));
@ -2490,16 +2527,17 @@ html {
.badge-no{ .badge-no{
display: inline-flex; display: inline-flex;
align-items: center;
justify-content: center; justify-content: center;
border-radius: 0.125rem; border-radius: 9999px;
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(249 115 22 / var(--tw-bg-opacity)); background-color: rgb(249 115 22 / var(--tw-bg-opacity));
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
padding-top: 0.25rem; padding-top: 0.25rem;
padding-bottom: 0.25rem; padding-bottom: 0.25rem;
font-size: 0.875rem; font-size: 0.75rem;
line-height: 1.25rem; line-height: 1rem;
font-weight: 500; font-weight: 500;
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)); color: rgb(255 255 255 / var(--tw-text-opacity));
@ -2521,8 +2559,8 @@ html {
min-height: 2.25rem; min-height: 2.25rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.25rem; gap: 0.5rem;
border-radius: 0.125rem; border-radius: 0.375rem;
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(234 100 27 / var(--tw-bg-opacity)); background-color: rgb(234 100 27 / var(--tw-bg-opacity));
padding-top: 0.25rem; padding-top: 0.25rem;
@ -2555,8 +2593,8 @@ html {
min-height: 1.8rem; min-height: 1.8rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.25rem; gap: 0.5rem;
border-radius: 0.125rem; border-radius: 0.375rem;
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(234 100 27 / var(--tw-bg-opacity)); background-color: rgb(234 100 27 / var(--tw-bg-opacity));
padding-top: 0.25rem; padding-top: 0.25rem;
@ -2670,6 +2708,11 @@ html {
border-color: rgb(209 213 219 / var(--tw-border-opacity)); border-color: rgb(209 213 219 / var(--tw-border-opacity));
} }
.hover\:border-psc-300:hover{
--tw-border-opacity: 1;
border-color: rgb(220 102 91 / var(--tw-border-opacity));
}
.hover\:border-psc-500:hover{ .hover\:border-psc-500:hover{
--tw-border-opacity: 1; --tw-border-opacity: 1;
border-color: rgb(234 100 27 / var(--tw-border-opacity)); border-color: rgb(234 100 27 / var(--tw-border-opacity));
@ -2704,6 +2747,11 @@ html {
background-color: rgb(107 114 128 / 0.05); background-color: rgb(107 114 128 / 0.05);
} }
.hover\:bg-gray-600:hover{
--tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity));
}
.hover\:bg-indigo-600:hover{ .hover\:bg-indigo-600:hover{
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgb(79 70 229 / var(--tw-bg-opacity)); background-color: rgb(79 70 229 / var(--tw-bg-opacity));
@ -2758,6 +2806,11 @@ html {
color: rgb(17 24 39 / var(--tw-text-opacity)); color: rgb(17 24 39 / var(--tw-text-opacity));
} }
.hover\:text-green-700:hover{
--tw-text-opacity: 1;
color: rgb(21 128 61 / var(--tw-text-opacity));
}
.hover\:text-psc-500:hover{ .hover\:text-psc-500:hover{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(234 100 27 / var(--tw-text-opacity)); color: rgb(234 100 27 / var(--tw-text-opacity));
@ -2768,6 +2821,11 @@ html {
color: rgb(144 40 31 / var(--tw-text-opacity)); color: rgb(144 40 31 / var(--tw-text-opacity));
} }
.hover\:text-red-700:hover{
--tw-text-opacity: 1;
color: rgb(185 28 28 / var(--tw-text-opacity));
}
.hover\:text-white:hover{ .hover\:text-white:hover{
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)); color: rgb(255 255 255 / var(--tw-text-opacity));
@ -2794,6 +2852,11 @@ html {
--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
} }
.hover\:ring-gray-500:hover{
--tw-ring-opacity: 1;
--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity));
}
.hover\:ring-indigo-500:hover{ .hover\:ring-indigo-500:hover{
--tw-ring-opacity: 1; --tw-ring-opacity: 1;
--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
@ -2809,6 +2872,10 @@ html {
--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity));
} }
.hover\:ring-offset-1:hover{
--tw-ring-offset-width: 1px;
}
.hover\:ring-offset-2:hover{ .hover\:ring-offset-2:hover{
--tw-ring-offset-width: 2px; --tw-ring-offset-width: 2px;
} }
@ -3074,6 +3141,10 @@ html {
background-color: rgb(254 226 226 / var(--tw-bg-opacity)); background-color: rgb(254 226 226 / var(--tw-bg-opacity));
} }
:is(.dark .dark\:bg-red-900\/20){
background-color: rgb(127 29 29 / 0.2);
}
:is(.dark .dark\:text-blue-500){ :is(.dark .dark\:text-blue-500){
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity)); color: rgb(59 130 246 / var(--tw-text-opacity));
@ -3099,6 +3170,16 @@ html {
color: rgb(107 114 128 / var(--tw-text-opacity)); color: rgb(107 114 128 / var(--tw-text-opacity));
} }
:is(.dark .dark\:text-green-500){
--tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity));
}
:is(.dark .dark\:text-red-200){
--tw-text-opacity: 1;
color: rgb(254 202 202 / var(--tw-text-opacity));
}
:is(.dark .dark\:text-red-500){ :is(.dark .dark\:text-red-500){
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(239 68 68 / var(--tw-text-opacity)); color: rgb(239 68 68 / var(--tw-text-opacity));
@ -3157,6 +3238,15 @@ html {
background-color: rgb(31 41 55 / var(--tw-bg-opacity)); background-color: rgb(31 41 55 / var(--tw-bg-opacity));
} }
:is(.dark .dark\:hover\:bg-gray-800\/50:hover){
background-color: rgb(31 41 55 / 0.5);
}
:is(.dark .dark\:hover\:bg-psc-900:hover){
--tw-bg-opacity: 1;
background-color: rgb(88 25 19 / var(--tw-bg-opacity));
}
:is(.dark .dark\:hover\:text-blue-500:hover){ :is(.dark .dark\:hover\:text-blue-500:hover){
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity)); color: rgb(59 130 246 / var(--tw-text-opacity));
@ -3167,6 +3257,21 @@ html {
color: rgb(209 213 219 / var(--tw-text-opacity)); color: rgb(209 213 219 / var(--tw-text-opacity));
} }
:is(.dark .dark\:hover\:text-green-400:hover){
--tw-text-opacity: 1;
color: rgb(74 222 128 / var(--tw-text-opacity));
}
:is(.dark .dark\:hover\:text-psc-300:hover){
--tw-text-opacity: 1;
color: rgb(220 102 91 / var(--tw-text-opacity));
}
:is(.dark .dark\:hover\:text-red-400:hover){
--tw-text-opacity: 1;
color: rgb(248 113 113 / var(--tw-text-opacity));
}
:is(.dark .dark\:hover\:text-white:hover){ :is(.dark .dark\:hover\:text-white:hover){
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity)); color: rgb(255 255 255 / var(--tw-text-opacity));

View File

@ -624,7 +624,6 @@ class market_article
} }
if ($layouterPreviewId) { if ($layouterPreviewId) {
$layouterPreviewId = strtoupper($layouterPreviewId);
$article = Doctrine_Query::create() $article = Doctrine_Query::create()
->from('Article c') ->from('Article c')
->where('c.id = ?', [intval($articleId)]) ->where('c.id = ?', [intval($articleId)])

View File

@ -2713,7 +2713,6 @@ class ArticleController extends TP_Controller_Action
} }
$articleSession = new TP_Layoutersession(); $articleSession = new TP_Layoutersession();
$basket = new TP_Basket(); $basket = new TP_Basket();
/*if($this->getRequest()->getParam('layouter')) { /*if($this->getRequest()->getParam('layouter')) {
* if($basket->checkIsLayouterIdInUse($this->getRequest()->getParam('layouter')) && !$this->_getParam('load')) { * if($basket->checkIsLayouterIdInUse($this->getRequest()->getParam('layouter')) && !$this->_getParam('load')) {

View File

@ -2777,7 +2777,6 @@ class BasketController extends TP_Controller_Action
$this->view->paymenttype = 0; $this->view->paymenttype = 0;
$this->view->shippingtype = 0; $this->view->shippingtype = 0;
$basket->setPreisNetto($netto); $basket->setPreisNetto($netto);
if ($this->shop->shipping_mode == 1) { if ($this->shop->shipping_mode == 1) {
if ( if (
$this->getRequest()->isPost() && $this->_request->getParam('shippingtype') != '' || $this->getRequest()->isPost() && $this->_request->getParam('shippingtype') != '' ||

View File

@ -54,6 +54,10 @@ class TP_Layoutersession
} }
} }
public function getDebugSessionData()
{
return $this->_Items->data;
}
/** /**
* Gibt das Item aus der Session zurück * Gibt das Item aus der Session zurück
* *