quicksave

This commit is contained in:
1Day 2021-12-13 08:59:27 +01:00
parent 24ee173326
commit 88eafb72c5
5 changed files with 96 additions and 66 deletions

View file

@ -5,6 +5,7 @@ APP_DEBUG=false
APP_URL=http://localhost APP_URL=http://localhost
#list with timezones https://www.php.net/manual/en/timezones.php #list with timezones https://www.php.net/manual/en/timezones.php
APP_TIMEZONE=UTC APP_TIMEZONE=UTC
LOCALE=en
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1

View file

@ -83,7 +83,21 @@
"Settings": "Einstellungen", "Settings": "Einstellungen",
"Dashboard icons": "Dashboard Icons", "Dashboard icons": "Dashboard Icons",
"Select panel icon": "Icon auswählen", "Select panel icon": "Icon auswählen",
"Select panel favicon": "Favicon auswählen" "Select panel favicon": "Favicon auswählen",
"Store": "Laden",
"Currency code": "Währungscode",
"Checkout the paypal docs to select the appropriate code": "Siehe Paypal für die entsprechenden Codes",
"Quantity": "Menge",
"Amount given to the user after purchasing": "Anzahl, die der User nach dem Kauf bekommt",
"Display": "Anzeigename",
"This is what the user sees at store and checkout": "Dies ist die 'Anzahl' welche der User beim Kaufen sieht",
"This is what the user sees at checkout": "Dies ist die Beschreibung auf der Rechnung und was der Kunde beim kauf sieht",
"Adds 1000 credits to your account": "Fügt deinem Account 1000 Credits hinzu",
"Active": "Aktiv",
"Paypal is not configured.": "Paypal ist nicht konfiguriert!",
"To configure PayPal, head to the .env and add your PayPals client id and secret.": "Um Paypal zu konfigurieren, füge deine Paypal client ID und Secretkey in deine .env-Datei hinzu"

View file

@ -6,13 +6,14 @@
<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">
<h1>Store</h1> <h1>{{__('Store')}}</h1>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<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.store.index')}}">Store</a></li> <li class="breadcrumb-item"><a href="{{route('admin.store.index')}}">{{__('Store')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.store.create')}}">Create</a> <li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.store.create')}}">{{__('Create')}}</a>
</li> </li>
</ol> </ol>
</div> </div>
@ -33,19 +34,22 @@
@csrf @csrf
<div class="d-flex flex-row-reverse"> <div class="d-flex flex-row-reverse">
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input type="checkbox" name="disabled" class="custom-control-input custom-control-input-danger" <input type="checkbox" name="disabled"
class="custom-control-input custom-control-input-danger"
id="switch1"> id="switch1">
<label class="custom-control-label" for="switch1">Disabled <i data-toggle="popover" <label class="custom-control-label" for="switch1">{{__('Disabled')}} <i
data-trigger="hover" data-toggle="popover"
data-content="Will hide this option from being selected" data-trigger="hover"
class="fas fa-info-circle"></i></label> data-content="{{__('Will hide this option from being selected')}}"
class="fas fa-info-circle"></i></label>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="type">Type</label> <label for="type">{{__('Type')}}</label>
<select required name="type" id="type" class="custom-select @error('name') is-invalid @enderror"> <select required name="type" id="type"
<option selected value="Credits">Credits</option> class="custom-select @error('name') is-invalid @enderror">
<option selected value="Credits">{{CREDITS_DISPLAY_NAME}}</option>
</select> </select>
@error('name') @error('name')
<div class="text-danger"> <div class="text-danger">
@ -55,10 +59,12 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="currency_code">Currency code</label> <label for="currency_code">{{__('Currency code')}}</label>
<select required name="currency_code" id="currency_code" class="custom-select @error('name') is-invalid @enderror"> <select required name="currency_code" id="currency_code"
class="custom-select @error('name') is-invalid @enderror">
@foreach($currencyCodes as $code) @foreach($currencyCodes as $code)
<option @if($code == 'EUR') selected @endif value="{{$code}}">{{$code}}</option> <option @if($code == 'EUR') selected
@endif value="{{$code}}">{{$code}}</option>
@endforeach @endforeach
</select> </select>
@error('currency_code') @error('currency_code')
@ -67,12 +73,14 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
Checkout the paypal docs to select the appropriate code <a target="_blank" href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a> {{__('Checkout the paypal docs to select the appropriate code')}} <a
target="_blank"
href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="price">Price</label> <label for="price">{{__('Price')}}</label>
<input value="{{old('price')}}" id="price" name="price" <input value="{{old('price')}}" id="price" name="price"
type="number" type="number"
placeholder="10.00" placeholder="10.00"
@ -87,7 +95,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="quantity">Quantity</label> <label for="quantity">{{__('Quantity')}}</label>
<input value="{{old('quantity')}}" id="quantity" name="quantity" <input value="{{old('quantity')}}" id="quantity" name="quantity"
type="number" type="number"
placeholder="1000" placeholder="1000"
@ -99,12 +107,12 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
Amount given to the user after purchasing {{__('Amount given to the user after purchasing')}}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="display">Display</label> <label for="display">{{__('Display')}}</label>
<input value="{{old('display')}}" id="display" name="display" <input value="{{old('display')}}" id="display" name="display"
type="text" type="text"
placeholder="750 + 250" placeholder="750 + 250"
@ -116,15 +124,15 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
This is what the user sees at store and checkout {{__('This is what the user sees at store and checkout')}}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="description">Description</label> <label for="description">{{__('Description')}}</label>
<input value="{{old('description')}}" id="description" name="description" <input value="{{old('description')}}" id="description" name="description"
type="text" type="text"
placeholder="Adds 1000 credits to your account" placeholder="{{__('Adds 1000 credits to your account')}}"
class="form-control @error('description') is-invalid @enderror" class="form-control @error('description') is-invalid @enderror"
required="required"> required="required">
@error('description') @error('description')
@ -133,15 +141,14 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
This is what the user sees at checkout {{__('This is what the user sees at checkout')}}
</div> </div>
</div> </div>
<div class="form-group text-right"> <div class="form-group text-right">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
Submit {{__('Submit')}}
</button> </button>
</div> </div>
</form> </form>

View file

@ -6,13 +6,14 @@
<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">
<h1>Store</h1> <h1>{{__('Store')}}</h1>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<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.store.index')}}">Store</a></li> <li class="breadcrumb-item"><a href="{{route('admin.store.index')}}">{{__('Store')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.store.edit' , $paypalProduct->id)}}">Edit</a> <li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.store.edit' , $paypalProduct->id)}}">{{__('Edit')}}</a>
</li> </li>
</ol> </ol>
</div> </div>
@ -34,19 +35,23 @@
@method('PATCH') @method('PATCH')
<div class="d-flex flex-row-reverse"> <div class="d-flex flex-row-reverse">
<div class="custom-control custom-switch"> <div class="custom-control custom-switch">
<input type="checkbox" @if($paypalProduct->disabled) checked @endif name="disabled" class="custom-control-input custom-control-input-danger" <input type="checkbox" @if($paypalProduct->disabled) checked
@endif name="disabled"
class="custom-control-input custom-control-input-danger"
id="switch1"> id="switch1">
<label class="custom-control-label" for="switch1">Disabled <i data-toggle="popover" <label class="custom-control-label" for="switch1">{{__('Disabled')}} <i
data-trigger="hover" data-toggle="popover"
data-content="Will hide this option from being selected" data-trigger="hover"
class="fas fa-info-circle"></i></label> data-content="{{__('Will hide this option from being selected')}}"
class="fas fa-info-circle"></i></label>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="type">Type</label> <label for="type">{{__('Type')}}</label>
<select required name="type" id="type" class="custom-select @error('name') is-invalid @enderror"> <select required name="type" id="type"
<option selected value="Credits">Credits</option> class="custom-select @error('name') is-invalid @enderror">
<option selected value="Credits">{{CREDITS_DISPLAY_NAME}}</option>
</select> </select>
@error('name') @error('name')
<div class="text-danger"> <div class="text-danger">
@ -56,10 +61,12 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="currency_code">Currency code</label> <label for="currency_code">{{__('Currency code')}}</label>
<select required name="currency_code" id="currency_code" class="custom-select @error('name') is-invalid @enderror"> <select required name="currency_code" id="currency_code"
class="custom-select @error('name') is-invalid @enderror">
@foreach($currencyCodes as $code) @foreach($currencyCodes as $code)
<option @if($paypalProduct->currency_code == $code) selected @endif value="{{$code}}">{{$code}}</option> <option @if($paypalProduct->currency_code == $code) selected
@endif value="{{$code}}">{{$code}}</option>
@endforeach @endforeach
</select> </select>
@error('currency_code') @error('currency_code')
@ -68,12 +75,14 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
Checkout the paypal docs to select the appropriate code <a target="_blank" href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a> {{__('Checkout the paypal docs to select the appropriate code')}} <a
target="_blank"
href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="price">Price</label> <label for="price">{{__('Price')}}</label>
<input value="{{$paypalProduct->price}}" id="price" name="price" <input value="{{$paypalProduct->price}}" id="price" name="price"
type="number" type="number"
placeholder="10.00" placeholder="10.00"
@ -88,7 +97,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="quantity">Quantity</label> <label for="quantity">{{__('Quantity')}}</label>
<input value="{{$paypalProduct->quantity}}" id="quantity" name="quantity" <input value="{{$paypalProduct->quantity}}" id="quantity" name="quantity"
type="number" type="number"
placeholder="1000" placeholder="1000"
@ -100,12 +109,12 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
Amount given to the user after purchasing {{__('Amount given to the user after purchasing')}}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="display">Display</label> <label for="display">{{__('Display')}}</label>
<input value="{{$paypalProduct->display}}" id="display" name="display" <input value="{{$paypalProduct->display}}" id="display" name="display"
type="text" type="text"
placeholder="750 + 250" placeholder="750 + 250"
@ -117,15 +126,15 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
This is what the user sees at store and checkout {{__('This is what the user sees at store and checkout')}}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="description">Description</label> <label for="description">{{__('Description')}}</label>
<input value="{{$paypalProduct->description}}" id="description" name="description" <input value="{{$paypalProduct->description}}" id="description" name="description"
type="text" type="text"
placeholder="Adds 1000 credits to your account" placeholder="{{__('Adds 1000 credits to your account')}}"
class="form-control @error('description') is-invalid @enderror" class="form-control @error('description') is-invalid @enderror"
required="required"> required="required">
@error('description') @error('description')
@ -134,15 +143,14 @@
</div> </div>
@enderror @enderror
<div class="text-muted"> <div class="text-muted">
This is what the user sees at checkout {{__('This is what the user sees at checkout')}}
</div> </div>
</div> </div>
<div class="form-group text-right"> <div class="form-group text-right">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
Submit {{__('Submit')}}
</button> </button>
</div> </div>
</form> </form>

View file

@ -6,13 +6,13 @@
<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">
<h1>Store</h1> <h1>{{__('Store')}}</h1>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<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 class="text-muted" <li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.store.index')}}">Store</a></li> href="{{route('admin.store.index')}}">{{__('Store')}}</a></li>
</ol> </ol>
</div> </div>
</div> </div>
@ -28,8 +28,8 @@
<div class="col-lg-4"> <div class="col-lg-4">
@if($isPaypalSetup == false) @if($isPaypalSetup == false)
<div class="callout callout-danger"> <div class="callout callout-danger">
<h4>Paypal is not configured.</h4> <h4>{{__('Paypal is not configured.')}}</h4>
<p>To configure PayPal, head to the .env and add your PayPals client id and secret.</p> <p>{{__('To configure PayPal, head to the .env and add your PayPals client id and secret.')}}</p>
</div> </div>
@endif @endif
</div> </div>
@ -39,9 +39,9 @@
<div class="card-header"> <div class="card-header">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fa-sliders-h mr-2"></i>Store</h5> <h5 class="card-title"><i class="fas fa-sliders-h mr-2"></i>{{__('Store')}}</h5>
<a href="{{route('admin.store.create')}}" class="btn btn-sm btn-primary"><i <a href="{{route('admin.store.create')}}" class="btn btn-sm btn-primary"><i
class="fas fa-plus mr-1"></i>Create new</a> class="fas fa-plus mr-1"></i>{{__('Create new')}}</a>
</div> </div>
</div> </div>
@ -50,12 +50,12 @@
<table id="datatable" class="table table-striped"> <table id="datatable" class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Active</th> <th>{{__('Active')}}</th>
<th>Type</th> <th>{{__('Type')}}</th>
<th>Price</th> <th>{{__('Price')}}</th>
<th>Display</th> <th>{{__('Display')}}</th>
<th>Description</th> <th>{{__('Description')}}</th>
<th>Created at</th> <th>{{__('Created at')}}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>