first upload all files

This commit is contained in:
NW
2023-06-11 13:14:03 +01:00
parent f14dbc52b5
commit c08b36d1b6
1705 changed files with 106852 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
@extends('admin::layout')
@component('admin::components.page.header')
@slot('title', trans('admin::resource.create', ['resource' => trans('flashsale::flash_sales.flash_sale')]))
<li><a href="{{ route('admin.flash_sales.index') }}">{{ trans('flashsale::flash_sales.flash_sales') }}</a></li>
<li class="active">{{ trans('admin::resource.create', ['resource' => trans('flashsale::flash_sales.flash_sale')]) }}</li>
@endcomponent
@section('content')
<form method="POST" action="{{ route('admin.flash_sales.store') }}" class="form-horizontal" id="flash-sale-create-form" novalidate>
{{ csrf_field() }}
{!! $tabs->render(compact('flashSale')) !!}
</form>
@endsection
@include('flashsale::admin.flash_sales.partials.shortcuts')

View File

@@ -0,0 +1,20 @@
@extends('admin::layout')
@component('admin::components.page.header')
@slot('title', trans('admin::resource.edit', ['resource' => trans('flashsale::flash_sales.flash_sale')]))
@slot('subtitle', $flashSale->campaign_name)
<li><a href="{{ route('admin.flash_sales.index') }}">{{ trans('flashsale::flash_sales.flash_sales') }}</a></li>
<li class="active">{{ trans('admin::resource.edit', ['resource' => trans('flashsale::flash_sales.flash_sale')]) }}</li>
@endcomponent
@section('content')
<form method="POST" action="{{ route('admin.flash_sales.update', $flashSale) }}" class="form-horizontal" id="flash-sale-edit-form" novalidate>
{{ csrf_field() }}
{{ method_field('put') }}
{!! $tabs->render(compact('flashSale')) !!}
</form>
@endsection
@include('flashsale::admin.flash_sales.partials.shortcuts')

View File

@@ -0,0 +1,38 @@
@extends('admin::layout')
@component('admin::components.page.header')
@slot('title', trans('flashsale::flash_sales.flash_sales'))
<li class="active">{{ trans('flashsale::flash_sales.flash_sales') }}</li>
@endcomponent
@component('admin::components.page.index_table')
@slot('buttons', ['create'])
@slot('resource', 'flash_sales')
@slot('name', trans('flashsale::flash_sales.flash_sale'))
@component('admin::components.table')
@slot('thead')
<tr>
@include('admin::partials.table.select_all')
<th>{{ trans('admin::admin.table.id') }}</th>
<th>{{ trans('flashsale::flash_sales.table.campaign_name') }}</th>
<th data-sort>{{ trans('admin::admin.table.created') }}</th>
</tr>
@endslot
@endcomponent
@endcomponent
@push('scripts')
<script>
new DataTable('#flash_sales-table .table', {
columns: [
{ data: 'checkbox', orderable: false, searchable: false, width: '3%' },
{ data: 'id', width: '5%' },
{ data: 'campaign_name', name: 'translations.campaign_name', orderable: false, defaultContent: '' },
{ data: 'created', name: 'created_at' },
],
});
</script>
@endpush

View File

@@ -0,0 +1,14 @@
@push('shortcuts')
<dl class="dl-horizontal">
<dt><code>b</code></dt>
<dd>{{ trans('admin::admin.shortcuts.back_to_index', ['name' => trans('flashsale::flash_sales.flash_sale')]) }}</dd>
</dl>
@endpush
@push('scripts')
<script>
keypressAction([
{ key: 'b', route: "{{ route('admin.flash_sales.index') }}" }
]);
</script>
@endpush

View File

@@ -0,0 +1,19 @@
<div class="panel-wrap flash-sale" id="products-wrapper">
{{-- Products will be added here dynamically using JS --}}
</div>
<div class="form-group">
<button type="button" class="add-product btn btn-default m-l-15">
{{ trans('flashsale::flash_sales.form.add_product') }}
</button>
</div>
@include('admin::partials.selectize_remote')
@include('flashsale::admin.flash_sales.templates.product')
@push('globals')
<script>
FleetCart.data['flash_sale.products'] = {!! old_json('products', $flashSale->products) !!};
FleetCart.errors['flash_sale.products'] = @json($errors->get('products.*'), JSON_FORCE_OBJECT);
</script>
@endpush

View File

@@ -0,0 +1,5 @@
<div class="row">
<div class="col-md-8">
{{ Form::text('campaign_name', trans('flashsale::attributes.campaign_name'), $errors, $flashSale, ['required' => true]) }}
</div>
</div>

View File

@@ -0,0 +1,93 @@
<script type="text/html" id="flash-sale-product-template">
<div class="panel">
<div class="panel-header clearfix">
<span class="drag-icon pull-left">
<i class="fa">&#xf142;</i>
<i class="fa">&#xf142;</i>
</span>
{{ trans('flashsale::flash_sales.form.flash_sale_product') }}
<button type="button" class="delete-product-panel btn pull-right">
<i class="fa fa-times"></i>
</button>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label for="products-<%- productPanelNumber %>-product-id">
{{ trans('flashsale::attributes.product') }}<span class="m-l-5 text-red">*</span>
</label>
<input type="hidden"
name="products[<%- productPanelNumber %>][name]"
class="form-control"
id="products-<%- productPanelNumber %>-name"
value="<%- product.name %>"
>
<select name="products[<%- productPanelNumber %>][product_id]"
class="form-control selectize prevent-creation"
id="products-<%- productPanelNumber %>-product-id"
data-url="{{ route('admin.products.index') }}"
>
<% if (product.id !== null && product.name !== null) { %>
<option value="<%- product.id %>"><%- product.name %></option>
<% } %>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form-group">
<label for="products-<%- productPanelNumber %>-campaign-end">
{{ trans('flashsale::attributes.end_date') }}<span class="m-l-5 text-red">*</span>
</label>
<input type="text"
name="products[<%- productPanelNumber %>][end_date]"
class="form-control datetime-picker"
id="products-<%- productPanelNumber %>-campaign-end"
value="<%- product.pivot.end_date %>"
>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="form-group">
<label for="products-<%- productPanelNumber %>-price">
{{ trans('flashsale::attributes.price') }}<span class="m-l-5 text-red">*</span>
</label>
<input type="number"
name="products[<%- productPanelNumber %>][price]"
class="form-control"
id="products-<%- productPanelNumber %>-price"
value="<%- product.pivot.price.amount %>"
min="0"
>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="form-group">
<label for="products-<%- productPanelNumber %>-qty">
{{ trans('flashsale::attributes.quantity') }}<span class="m-l-5 text-red">*</span>
</label>
<input type="number"
name="products[<%- productPanelNumber %>][qty]"
class="form-control"
id="products-<%- productPanelNumber %>-qty"
value="<%- product.pivot.qty %>"
>
</div>
</div>
</div>
</div>
</div>
</script>