commit 08-2025
This commit is contained in:
parent
9ae662f63e
commit
480fdc65ed
404 changed files with 65310 additions and 2600431 deletions
124
resources/views/components/abo/product-table-styles.blade.php
Normal file
124
resources/views/components/abo/product-table-styles.blade.php
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<style>
|
||||
/* Basis-Styles */
|
||||
.btn-md-extra {
|
||||
padding: 0.3rem 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.5;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.md-btn-extra {
|
||||
width: calc(1.7rem + 2px) !important;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.form-control.input-extra {
|
||||
padding: 0.28rem 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
min-height: calc(1.8rem + 2px);
|
||||
height: calc(1.8rem + 2px);
|
||||
width: 44px;
|
||||
}
|
||||
|
||||
.form-control.input-extra.active {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.input-group-min-w {
|
||||
min-width: 102px;
|
||||
}
|
||||
|
||||
.img-extra {
|
||||
min-width: 55px;
|
||||
max-height: 160px;
|
||||
}
|
||||
|
||||
.product-active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.product-inactive {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* Mobile Optimierungen */
|
||||
@media (max-width: 767px) {
|
||||
.table thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table, .table tbody, .table tr, .table td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table tr {
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.25rem;
|
||||
padding: 1rem;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.table td {
|
||||
border: none;
|
||||
padding: 0.75rem 0;
|
||||
position: relative;
|
||||
padding-left: 50%;
|
||||
}
|
||||
|
||||
.table td:before {
|
||||
content: attr(data-label);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 45%;
|
||||
padding-right: 1rem;
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.table td:first-child {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.table td:last-child {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.media {
|
||||
flex-direction: column;
|
||||
align-items: flex-start !important;
|
||||
}
|
||||
|
||||
.media img {
|
||||
margin-bottom: 1rem;
|
||||
margin-right: 0 !important;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.media-body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-group-min-w {
|
||||
min-width: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
width: 100% !important;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.form-control.input-extra {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.no-line-break {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
117
resources/views/components/abo/product-table.blade.php
Normal file
117
resources/views/components/abo/product-table.blade.php
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
@props([
|
||||
'products' => [],
|
||||
'productType' => 'base', // 'base' oder 'upgrade'
|
||||
'formRoute' => '',
|
||||
'formStep' => 3
|
||||
])
|
||||
|
||||
{!! Form::open(['action' => route($formRoute, $formStep), 'method' => 'POST', 'class' => '']) !!}
|
||||
|
||||
@include('components.abo.product-table-styles')
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.ordering_country') }}</div>
|
||||
{{ App\Services\UserService::getOrderInfo('billing_state') }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.country_of_delivery') }}</div>
|
||||
{{ App\Services\UserService::getOrderInfo('shipping_state') }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.VAT') }}</div>
|
||||
{{ App\Services\UserService::getOrderInfo('tax_free') }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('payment.reverse_charge_procedure') }}</div>
|
||||
{{ App\Services\UserService::getOrderInfo('user_reverse_charge') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($productType === 'base')
|
||||
<div class="alert alert-warning">
|
||||
<strong>{!! __('abo.abo_type_info', ['base'=>get_abo_type_badge('base'), 'upgrade'=>get_abo_type_badge('upgrade')]) !!}</strong>
|
||||
</div>
|
||||
|
||||
@if(isset($error))
|
||||
<div class="alert alert-danger">
|
||||
<strong>{{ $error }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if(count($products) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table- m-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('abo.' . $productType . '_product') }}</th>
|
||||
<th> </th>
|
||||
<th class="text-right">{{ __('order.unit_price') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($products as $product)
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0" data-label="{{ __('abo.' . $productType . '_product') }}">
|
||||
<div class="no-line-break input-group-min-w">
|
||||
<div class="input-group d-inline-flex w-auto">
|
||||
<span class="input-group-prepend">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-product-qty"
|
||||
data-row-id="{{ $product->id }}"
|
||||
data-product-id="{{ $product->id }}">-</button>
|
||||
</span>
|
||||
<input type="text"
|
||||
class="form-control text-center input-extra table-input-event-onchange"
|
||||
name="{{ $productType }}_product_qty[{{ $product->id }}]"
|
||||
data-row-id="{{ $product->id }}"
|
||||
data-product-id="{{ $product->id }}"
|
||||
value="0">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-product-qty"
|
||||
data-row-id="{{ $product->id }}"
|
||||
data-product-id="{{ $product->id }}">+</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="p-4" data-label="">
|
||||
<div class="media align-items-center product-inactive" id="product-{{ $product->id }}">
|
||||
@if(count($product->images))
|
||||
<img src="{{ route('product_image', [$product->images->first()->slug]) }}"
|
||||
class="d-block ui-w-100 ui-bordered mr-4"
|
||||
alt="{{ $product->getLang('name') }}">
|
||||
@endif
|
||||
<div class="media-body">
|
||||
<h5 class="d-block text-dark">
|
||||
{{$product->getLang('name')}}
|
||||
<br>{!! get_abo_type_badge($productType) !!}
|
||||
</h5>
|
||||
{!! $product->getLang('copy') !!}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right font-weight-semibold align-middle p-4" data-label="{{ __('order.unit_price') }}">
|
||||
<span class="no-line-break">
|
||||
{{ $product->getFormattedPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country) }} €
|
||||
</span>
|
||||
@if(\App\Services\UserService::$user_country && \App\Services\UserService::$user_country->currency)
|
||||
<span class="no-line-break">
|
||||
{!! $product->getFormattedPriceCurrencyWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country) !!}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="next">{{ __('abo.confirm_and_next') }}</button>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
Loading…
Add table
Add a link
Reference in a new issue