Actualizacion de Diseño Logins y Parte de Registro Negocios
This commit is contained in:
71
desarrollo/resources/views/seller/coupons/create.blade.php
Normal file
71
desarrollo/resources/views/seller/coupons/create.blade.php
Normal file
@@ -0,0 +1,71 @@
|
||||
@extends('seller.layouts.app')
|
||||
@section('panel_content')
|
||||
|
||||
<div class="aiz-titlebar mt-2 mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{ translate('Add Your Coupon') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0 h6">{{translate('Coupon Information Adding')}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" action="{{ route('seller.coupon.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mt-3">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label" for="name">{{translate('Coupon Type')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="type" id="coupon_type" class="form-control aiz-selectpicker" onchange="coupon_form()" required>
|
||||
<option value="">{{translate('Select One') }}</option>
|
||||
<option value="product_base" @if (old('type') == 'product_base') selected @endif>{{translate('For Products')}}</option>
|
||||
<option value="cart_base" @if (old('type') == 'cart_base') selected @endif>{{translate('For Total Orders')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="coupon_form">
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
function coupon_form(){
|
||||
var coupon_type = $('#coupon_type').val();
|
||||
$.post('{{ route('seller.coupon.get_coupon_form') }}',{_token:'{{ csrf_token() }}', coupon_type:coupon_type}, function(data){
|
||||
$('#coupon_form').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
@if($errors->any())
|
||||
coupon_form();
|
||||
@endif
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
79
desarrollo/resources/views/seller/coupons/edit.blade.php
Normal file
79
desarrollo/resources/views/seller/coupons/edit.blade.php
Normal file
@@ -0,0 +1,79 @@
|
||||
@extends('seller.layouts.app')
|
||||
@section('panel_content')
|
||||
|
||||
<div class="aiz-titlebar mt-2 mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{ translate('Edit Your Coupon') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-5">
|
||||
<div class="col-lg-10 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="mb-0 h6">{{translate('Coupon Information Update')}}</h3>
|
||||
</div>
|
||||
<form action="{{ route('seller.coupon.update', $coupon->id) }}" method="POST">
|
||||
<input name="_method" type="hidden" value="PATCH">
|
||||
@csrf
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul class="mt-3">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id" value="{{ $coupon->id }}" id="id">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 col-from-label" for="name">{{translate('Coupon Type')}}</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="type" id="coupon_type" class="form-control aiz-selectpicker" onchange="coupon_form()" required>
|
||||
@if ($coupon->type == "product_base"))
|
||||
<option value="product_base" selected>{{translate('For Products')}}</option>
|
||||
@elseif ($coupon->type == "cart_base")
|
||||
<option value="cart_base">{{translate('For Total Orders')}}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="coupon_form">
|
||||
|
||||
</div>
|
||||
<div class="form-group mb-0 text-right">
|
||||
<button type="submit" class="btn btn-primary">{{translate('Save')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function coupon_form(){
|
||||
var coupon_type = $('#coupon_type').val();
|
||||
var id = $('#id').val();
|
||||
$.post('{{ route('seller.coupon.get_coupon_form_edit') }}',{_token:'{{ csrf_token() }}', coupon_type:coupon_type, id:id}, function(data){
|
||||
$('#coupon_form').html(data);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
coupon_form();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
73
desarrollo/resources/views/seller/coupons/index.blade.php
Normal file
73
desarrollo/resources/views/seller/coupons/index.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('seller.layouts.app')
|
||||
@section('panel_content')
|
||||
|
||||
<div class="aiz-titlebar mt-2 mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="h3">{{ translate('Coupons') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-10 justify-content-center">
|
||||
<div class="col-md-4 mx-auto mb-3" >
|
||||
<a href="{{ route('seller.coupon.create')}}">
|
||||
<div class="p-3 rounded mb-3 c-pointer text-center bg-white shadow-sm hov-shadow-lg has-transition">
|
||||
<span class="size-60px rounded-circle mx-auto bg-secondary d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-18 text-primary">{{ translate('Add New Coupon') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-md-0 h6">{{ translate('All Coupons') }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table aiz-table p-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-breakpoints="lg">#</th>
|
||||
<th>{{translate('Code')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Type')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('Start Date')}}</th>
|
||||
<th data-breakpoints="lg">{{translate('End Date')}}</th>
|
||||
<th width="10%">{{translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($coupons as $key => $coupon)
|
||||
<tr>
|
||||
<td>{{$key+1}}</td>
|
||||
<td>{{$coupon->code}}</td>
|
||||
<td>@if ($coupon->type == 'cart_base')
|
||||
{{ translate('Cart Base') }}
|
||||
@elseif ($coupon->type == 'product_base')
|
||||
{{ translate('Product Base') }}
|
||||
@endif</td>
|
||||
<td>{{ date('d-m-Y', $coupon->start_date) }}</td>
|
||||
<td>{{ date('d-m-Y', $coupon->end_date) }}</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('seller.coupon.edit', encrypt($coupon->id) )}}" title="{{ translate('Edit') }}">
|
||||
<i class="las la-edit"></i>
|
||||
</a>
|
||||
<a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('seller.coupon.destroy', $coupon->id)}}" title="{{ translate('Delete') }}">
|
||||
<i class="las la-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
Reference in New Issue
Block a user