Add support to add time for voucher expires_at
This commit is contained in:
parent
07e4537e01
commit
f0a31fd4e2
|
@ -48,7 +48,7 @@ class VoucherController extends Controller
|
||||||
'code' => 'required|string|alpha_dash|max:36|min:4',
|
'code' => 'required|string|alpha_dash|max:36|min:4',
|
||||||
'uses' => 'required|numeric|max:2147483647|min:1',
|
'uses' => 'required|numeric|max:2147483647|min:1',
|
||||||
'credits' => 'required|numeric|between:0,99999999',
|
'credits' => 'required|numeric|between:0,99999999',
|
||||||
'expires_at' => ['nullable','date_format:d-m-Y','after:today',"before:10 years"],
|
'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Voucher::create($request->except('_token'));
|
Voucher::create($request->except('_token'));
|
||||||
|
@ -75,7 +75,7 @@ class VoucherController extends Controller
|
||||||
*/
|
*/
|
||||||
public function edit(Voucher $voucher)
|
public function edit(Voucher $voucher)
|
||||||
{
|
{
|
||||||
return view('admin.vouchers.edit' , [
|
return view('admin.vouchers.edit', [
|
||||||
'voucher' => $voucher
|
'voucher' => $voucher
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ class VoucherController extends Controller
|
||||||
'code' => 'required|string|alpha_dash|max:36|min:4',
|
'code' => 'required|string|alpha_dash|max:36|min:4',
|
||||||
'uses' => 'required|numeric|max:2147483647|min:1',
|
'uses' => 'required|numeric|max:2147483647|min:1',
|
||||||
'credits' => 'required|numeric|between:0,99999999',
|
'credits' => 'required|numeric|between:0,99999999',
|
||||||
'expires_at' => ['nullable','date_format:d-m-Y','after:today',"before:10 years"],
|
'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$voucher->update($request->except('_token'));
|
$voucher->update($request->except('_token'));
|
||||||
|
@ -127,7 +127,7 @@ class VoucherController extends Controller
|
||||||
]);
|
]);
|
||||||
|
|
||||||
#get voucher by code
|
#get voucher by code
|
||||||
$voucher = Voucher::where('code' , '=' , $request->input('code'))->firstOrFail();
|
$voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail();
|
||||||
|
|
||||||
#extra validations
|
#extra validations
|
||||||
if ($voucher->getStatus() == 'USES_LIMIT_REACHED') throw ValidationException::withMessages([
|
if ($voucher->getStatus() == 'USES_LIMIT_REACHED') throw ValidationException::withMessages([
|
||||||
|
@ -138,7 +138,7 @@ class VoucherController extends Controller
|
||||||
'code' => 'This voucher has expired'
|
'code' => 'This voucher has expired'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!$request->user()->vouchers()->where('id' , '=' , $voucher->id)->get()->isEmpty()) throw ValidationException::withMessages([
|
if (!$request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) throw ValidationException::withMessages([
|
||||||
'code' => 'You already redeemed this voucher code'
|
'code' => 'You already redeemed this voucher code'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -191,5 +191,4 @@ class VoucherController extends Controller
|
||||||
->rawColumns(['actions', 'code', 'status'])
|
->rawColumns(['actions', 'code', 'status'])
|
||||||
->make();
|
->make();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class VoucherController extends Controller
|
||||||
'code' => 'required|string|alpha_dash|max:36|min:4',
|
'code' => 'required|string|alpha_dash|max:36|min:4',
|
||||||
'uses' => 'required|numeric|max:2147483647|min:1',
|
'uses' => 'required|numeric|max:2147483647|min:1',
|
||||||
'credits' => 'required|numeric|between:0,99999999',
|
'credits' => 'required|numeric|between:0,99999999',
|
||||||
'expires_at' => 'nullable|date_format:d-m-Y|after:today|before:10 years'
|
'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return Voucher::create($request->all());
|
return Voucher::create($request->all());
|
||||||
|
@ -88,7 +88,7 @@ class VoucherController extends Controller
|
||||||
'code' => 'required|string|alpha_dash|max:36|min:4',
|
'code' => 'required|string|alpha_dash|max:36|min:4',
|
||||||
'uses' => 'required|numeric|max:2147483647|min:1',
|
'uses' => 'required|numeric|max:2147483647|min:1',
|
||||||
'credits' => 'required|numeric|between:0,99999999',
|
'credits' => 'required|numeric|between:0,99999999',
|
||||||
'expires_at' => 'nullable|date_format:d-m-Y|after:today|before:10 years'
|
'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$voucher->update($request->all());
|
$voucher->update($request->all());
|
||||||
|
@ -116,7 +116,8 @@ class VoucherController extends Controller
|
||||||
* @param Voucher $voucher
|
* @param Voucher $voucher
|
||||||
* @return LengthAwarePaginator
|
* @return LengthAwarePaginator
|
||||||
*/
|
*/
|
||||||
public function users(Request $request, Voucher $voucher){
|
public function users(Request $request, Voucher $voucher)
|
||||||
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'include' => [
|
'include' => [
|
||||||
'nullable',
|
'nullable',
|
||||||
|
@ -125,7 +126,7 @@ class VoucherController extends Controller
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if($request->input('include') == 'discorduser'){
|
if ($request->input('include') == 'discorduser') {
|
||||||
return $voucher->users()->with('discordUser')->paginate($request->query('per_page') ?? 50);
|
return $voucher->users()->with('discordUser')->paginate($request->query('per_page') ?? 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Pagination\Paginator;
|
use Illuminate\Pagination\Paginator;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
@ -27,5 +28,27 @@ class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
Paginator::useBootstrap();
|
Paginator::useBootstrap();
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
|
||||||
|
Validator::extend('multiple_date_format', function ($attribute, $value, $parameters, $validator) {
|
||||||
|
|
||||||
|
$ok = true;
|
||||||
|
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
// iterate through all formats
|
||||||
|
foreach ($parameters as $parameter) {
|
||||||
|
|
||||||
|
//validate with laravels standard date format validation
|
||||||
|
$result[] = $validator->validateDateFormat($attribute, $value, [$parameter]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if none of result array is true. it sets ok to false
|
||||||
|
if (!in_array(true, $result)) {
|
||||||
|
$ok = false;
|
||||||
|
$validator->setCustomMessages(['multiple_date_format' => 'The format must be one of ' . join(",", $parameters)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ok;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
@extends('layouts.main')
|
@extends('layouts.main')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<!-- CONTENT HEADER -->
|
<!-- CONTENT HEADER -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
@ -18,11 +18,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT HEADER -->
|
<!-- END CONTENT HEADER -->
|
||||||
|
|
||||||
<!-- MAIN CONTENT -->
|
<!-- MAIN CONTENT -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -39,9 +39,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="memo">Memo <i data-toggle="popover" data-trigger="hover" data-content="Only admins can see this" class="fas fa-info-circle"></i></label>
|
<label for="memo">Memo <i data-toggle="popover" data-trigger="hover" data-content="Only admins can see this" class="fas fa-info-circle"></i></label>
|
||||||
<input value="{{old('memo')}}" placeholder="Summer break voucher" id="memo"
|
<input value="{{old('memo')}}" placeholder="Summer break voucher" id="memo" name="memo" type="text" class="form-control @error('memo') is-invalid @enderror">
|
||||||
name="memo" type="text"
|
|
||||||
class="form-control @error('memo') is-invalid @enderror">
|
|
||||||
@error('memo')
|
@error('memo')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{$message}}
|
||||||
|
@ -51,10 +49,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="credits">* Credits</label>
|
<label for="credits">* Credits</label>
|
||||||
<input value="{{old('credits')}}" placeholder="500" id="credits"
|
<input value="{{old('credits')}}" placeholder="500" id="credits" name="credits" type="number" step="any" min="0" max="99999999" class="form-control @error('credits') is-invalid @enderror">
|
||||||
name="credits" type="number" step="any" min="0"
|
|
||||||
max="99999999"
|
|
||||||
class="form-control @error('credits') is-invalid @enderror">
|
|
||||||
@error('credits')
|
@error('credits')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{$message}}
|
||||||
|
@ -66,10 +61,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="code">* Code</label>
|
<label for="code">* Code</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input value="{{old('code')}}" placeholder="SUMMER" id="code" name="code"
|
<input value="{{old('code')}}" placeholder="SUMMER" id="code" name="code" type="text" class="form-control @error('code') is-invalid @enderror" required="required">
|
||||||
type="text"
|
|
||||||
class="form-control @error('code') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-info" onclick="setRandomCode()" type="button">
|
<button class="btn btn-info" onclick="setRandomCode()" type="button">
|
||||||
Random
|
Random
|
||||||
|
@ -84,12 +76,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="uses">* Uses<i data-toggle="popover" data-trigger="hover" data-content="A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher." class="fas fa-info-circle"></i></label>
|
<label for="uses">* Uses <i data-toggle="popover" data-trigger="hover" data-content="A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher." class="fas fa-info-circle"></i></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input value="{{old('uses') ?? 1}}" id="uses" min="1" max="2147483647"
|
<input value="{{old('uses') ?? 1}}" id="uses" min="1" max="2147483647" name="uses" type="number" class="form-control @error('uses') is-invalid @enderror" required="required">
|
||||||
name="uses" type="number"
|
|
||||||
class="form-control @error('uses') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-info" onclick="setMaxUses()" type="button">Max
|
<button class="btn btn-info" onclick="setMaxUses()" type="button">Max
|
||||||
</button>
|
</button>
|
||||||
|
@ -103,9 +92,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mb-3">
|
<div class="form-group mb-3">
|
||||||
<label for="expires_at">Expires at</label>
|
<label for="expires_at">Expires at <i data-toggle="popover" data-trigger="hover" data-content="Timezone: {{ Config::get('app.timezone') }}" class="fas fa-info-circle"></i></label>
|
||||||
<div class="input-group date" id="expires_at" data-target-input="nearest">
|
<div class="input-group date" id="expires_at" data-target-input="nearest">
|
||||||
<input value="{{old('expires_at')}}" name="expires_at" placeholder="dd-mm-yyyy" type="text" class="form-control @error('expires_at') is-invalid @enderror datetimepicker-input" data-target="#expires_at"/>
|
<input value="{{old('expires_at')}}" name="expires_at" placeholder="dd-mm-yyyy hh:mm:ss" type="text" class="form-control @error('expires_at') is-invalid @enderror datetimepicker-input" data-target="#expires_at" />
|
||||||
<div class="input-group-append" data-target="#expires_at" data-toggle="datetimepicker">
|
<div class="input-group-append" data-target="#expires_at" data-toggle="datetimepicker">
|
||||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,14 +120,14 @@
|
||||||
<i class="fas"></i>
|
<i class="fas"></i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT -->
|
<!-- END CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
$('#expires_at').datetimepicker({
|
$('#expires_at').datetimepicker({
|
||||||
format : 'DD-MM-yyyy',
|
format: 'DD-MM-yyyy HH:mm:ss',
|
||||||
icons: {
|
icons: {
|
||||||
time: 'far fa-clock',
|
time: 'far fa-clock',
|
||||||
date: 'far fa-calendar',
|
date: 'far fa-calendar',
|
||||||
|
@ -175,7 +164,7 @@
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
|
@ -1,8 +1,8 @@
|
||||||
@extends('layouts.main')
|
@extends('layouts.main')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<!-- CONTENT HEADER -->
|
<!-- CONTENT HEADER -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
@ -12,18 +12,17 @@
|
||||||
<ol class="breadcrumb float-sm-right">
|
<ol class="breadcrumb float-sm-right">
|
||||||
<li class="breadcrumb-item"><a href="{{route('home')}}">Dashboard</a></li>
|
<li class="breadcrumb-item"><a href="{{route('home')}}">Dashboard</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{{route('admin.vouchers.index')}}">Vouchers</a></li>
|
<li class="breadcrumb-item"><a href="{{route('admin.vouchers.index')}}">Vouchers</a></li>
|
||||||
<li class="breadcrumb-item"><a class="text-muted"
|
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.products.edit' , $voucher->id)}}">Edit</a>
|
||||||
href="{{route('admin.products.edit' , $voucher->id)}}">Edit</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT HEADER -->
|
<!-- END CONTENT HEADER -->
|
||||||
|
|
||||||
<!-- MAIN CONTENT -->
|
<!-- MAIN CONTENT -->
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -40,12 +39,8 @@
|
||||||
@method('PATCH')
|
@method('PATCH')
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="memo">Memo <i data-toggle="popover" data-trigger="hover"
|
<label for="memo">Memo <i data-toggle="popover" data-trigger="hover" data-content="Only admins can see this" class="fas fa-info-circle"></i></label>
|
||||||
data-content="Only admins can see this"
|
<input value="{{ $voucher->memo }}" placeholder="Summer break voucher" id="memo" name="memo" type="text" class="form-control @error('memo') is-invalid @enderror">
|
||||||
class="fas fa-info-circle"></i></label>
|
|
||||||
<input value="{{ $voucher->memo }}" placeholder="Summer break voucher" id="memo"
|
|
||||||
name="memo" type="text"
|
|
||||||
class="form-control @error('memo') is-invalid @enderror">
|
|
||||||
@error('memo')
|
@error('memo')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{$message}}
|
||||||
|
@ -55,10 +50,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="credits">Credits *</label>
|
<label for="credits">Credits *</label>
|
||||||
<input value="{{$voucher->credits}}" placeholder="500" id="credits"
|
<input value="{{$voucher->credits}}" placeholder="500" id="credits" name="credits" type="number" step="any" min="0" max="99999999" class="form-control @error('credits') is-invalid @enderror">
|
||||||
name="credits" type="number" step="any" min="0"
|
|
||||||
max="99999999"
|
|
||||||
class="form-control @error('credits') is-invalid @enderror">
|
|
||||||
@error('credits')
|
@error('credits')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{$message}}
|
||||||
|
@ -70,10 +62,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="code">Code *</label>
|
<label for="code">Code *</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input value="{{$voucher->code}}" placeholder="SUMMER" id="code" name="code"
|
<input value="{{$voucher->code}}" placeholder="SUMMER" id="code" name="code" type="text" class="form-control @error('code') is-invalid @enderror" required="required">
|
||||||
type="text"
|
|
||||||
class="form-control @error('code') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-info" onclick="setRandomCode()" type="button">
|
<button class="btn btn-info" onclick="setRandomCode()" type="button">
|
||||||
Random
|
Random
|
||||||
|
@ -88,14 +77,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="uses">Uses * <i data-toggle="popover" data-trigger="hover"
|
<label for="uses">Uses * <i data-toggle="popover" data-trigger="hover" data-content="A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher." class="fas fa-info-circle"></i></label>
|
||||||
data-content="A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher."
|
|
||||||
class="fas fa-info-circle"></i></label>
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input value="{{$voucher->uses}}" id="uses" min="1" max="2147483647"
|
<input value="{{$voucher->uses}}" id="uses" min="1" max="2147483647" name="uses" type="number" class="form-control @error('uses') is-invalid @enderror" required="required">
|
||||||
name="uses" type="number"
|
|
||||||
class="form-control @error('uses') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-info" onclick="setMaxUses()" type="button">Max
|
<button class="btn btn-info" onclick="setMaxUses()" type="button">Max
|
||||||
</button>
|
</button>
|
||||||
|
@ -109,9 +93,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mb-3">
|
<div class="form-group mb-3">
|
||||||
<label for="expires_at">Expires at</label>
|
<label for="expires_at">Expires at <i data-toggle="popover" data-trigger="hover" data-content="Timezone: {{ Config::get('app.timezone') }}" class="fas fa-info-circle"></i></label>
|
||||||
<div class="input-group date" id="expires_at" data-target-input="nearest">
|
<div class="input-group date" id="expires_at" data-target-input="nearest">
|
||||||
<input value="{{$voucher->expires_at ? $voucher->expires_at->format('d-m-Y') : ''}}" name="expires_at" placeholder="dd-mm-yyyy" type="text" class="form-control @error('expires_at') is-invalid @enderror datetimepicker-input" data-target="#expires_at"/>
|
<input value="{{$voucher->expires_at ? $voucher->expires_at->format('d-m-Y H:i:s') : ''}}" name="expires_at" placeholder="dd-mm-yyyy hh:mm:ss" type="text" class="form-control @error('expires_at') is-invalid @enderror datetimepicker-input" data-target="#expires_at" />
|
||||||
<div class="input-group-append" data-target="#expires_at" data-toggle="datetimepicker">
|
<div class="input-group-append" data-target="#expires_at" data-toggle="datetimepicker">
|
||||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -136,14 +120,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- END CONTENT -->
|
<!-- END CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
$('#expires_at').datetimepicker({
|
$('#expires_at').datetimepicker({
|
||||||
format : 'DD-MM-yyyy',
|
format: 'DD-MM-yyyy HH:mm:ss',
|
||||||
icons: {
|
icons: {
|
||||||
time: 'far fa-clock',
|
time: 'far fa-clock',
|
||||||
date: 'far fa-calendar',
|
date: 'far fa-calendar',
|
||||||
|
@ -180,7 +164,7 @@
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
Loading…
Reference in a new issue