Update setup with new component based layout
This commit is contained in:
parent
45794ff109
commit
b145856ce9
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
use App\Http\Requests\SiteEdit;
|
||||||
use App\Models\{Account,
|
use App\Models\{Account,
|
||||||
Charge,
|
Charge,
|
||||||
Invoice,
|
Invoice,
|
||||||
@ -187,63 +188,43 @@ class AdminController extends Controller
|
|||||||
* Site setup
|
* Site setup
|
||||||
*
|
*
|
||||||
* @note This method is protected by the routes
|
* @note This method is protected by the routes
|
||||||
* @param Request $request
|
* @param SiteEdit $request
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Http\RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function setup(Request $request)
|
public function setup(SiteEdit $request)
|
||||||
{
|
{
|
||||||
if ($request->post()) {
|
$site = config('site');
|
||||||
$validated = $request->validate([
|
$images = ['site_logo','email_logo'];
|
||||||
'site_name' => 'required|string|min:2|max:255',
|
$validated = collect($request->validated());
|
||||||
'site_email' => 'required|string|email|max:255',
|
|
||||||
'site_address1' => 'required|string|min:2|max:255',
|
|
||||||
'site_address2' => 'nullable|string|min:2|max:255',
|
|
||||||
'site_city' => 'required|string|min:2|max:64',
|
|
||||||
'site_state' => 'required|string|min:2|max:32',
|
|
||||||
'site_postcode' => 'required|string|min:2|max:8',
|
|
||||||
'site_description' => 'nullable|string|min:5',
|
|
||||||
'site_phone' => 'nullable|regex:/[0-9 ]+/|min:6|max:12',
|
|
||||||
'site_fax' => 'nullable|regex:/[0-9 ]+/|min:6|max:12',
|
|
||||||
'site_tax' => 'required|regex:/[0-9 ]+/|size:14',
|
|
||||||
'social' => 'nullable|array',
|
|
||||||
'top_menu' => 'nullable|array',
|
|
||||||
'site_logo' => 'nullable|image',
|
|
||||||
'email_logo' => 'nullable|image',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$site = config('site');
|
// Handle the images
|
||||||
|
foreach($images as $key)
|
||||||
|
if ($x=$request->validated($key))
|
||||||
|
$validated->put($key,$x->storeAs('site/'.$site->site_id,$x->getClientOriginalName(),'public'));
|
||||||
|
|
||||||
// @todo - not currently rendered in the home page
|
foreach ($site->details as $oo)
|
||||||
$validated['social'] = [];
|
if ($validated->has($oo->key)) {
|
||||||
$validated['top_menu'] = [];
|
// Dont set the following keys to null if they are null
|
||||||
|
if (in_array($oo->key,$images) && is_null($validated->get($oo->key)))
|
||||||
|
continue;
|
||||||
|
|
||||||
// Handle the images
|
$oo->value = $validated->get($oo->key) ?: '';
|
||||||
foreach(['site_logo','email_logo'] as $key)
|
$oo->save();
|
||||||
if (array_key_exists($key,$validated))
|
|
||||||
$validated[$key] = ($x=$validated[$key])->storeAs('site/'.$site->site_id,$x->getClientOriginalName(),'public');
|
|
||||||
|
|
||||||
foreach ($site->details as $oo)
|
$validated->forget($oo->key);
|
||||||
if (array_key_exists($oo->key,$validated)) {
|
|
||||||
$oo->value = Arr::get($validated,$oo->key);
|
|
||||||
$oo->save();
|
|
||||||
|
|
||||||
unset($validated[$oo->key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Left over values to be created.
|
|
||||||
foreach ($validated as $k=>$v) {
|
|
||||||
$oo = new SiteDetail;
|
|
||||||
$oo->key = $k;
|
|
||||||
$oo->value = $v ?: '';
|
|
||||||
|
|
||||||
$site->details()->save($oo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()
|
// Left over values to be created.
|
||||||
->back()
|
foreach ($validated as $k=>$v) {
|
||||||
->with('success','Settings saved');
|
$oo = new SiteDetail;
|
||||||
|
$oo->key = $k;
|
||||||
|
$oo->value = $v ?: '';
|
||||||
|
|
||||||
|
$site->details()->save($oo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('theme.backend.adminlte.a.setup');
|
return redirect()
|
||||||
|
->back()
|
||||||
|
->with('success','Settings saved');
|
||||||
}
|
}
|
||||||
}
|
}
|
43
app/Http/Requests/SiteEdit.php
Normal file
43
app/Http/Requests/SiteEdit.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
|
||||||
|
class SiteEdit extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return Gate::allows('wholesaler');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'site_name' => 'required|string|min:2|max:255',
|
||||||
|
'site_email' => 'required|string|email|max:255',
|
||||||
|
'site_address1' => 'required|string|min:2|max:255',
|
||||||
|
'site_address2' => 'nullable|string|min:2|max:255',
|
||||||
|
'site_city' => 'required|string|min:2|max:64',
|
||||||
|
'site_state' => 'required|string|min:2|max:32',
|
||||||
|
'site_postcode' => 'required|string|min:2|max:8',
|
||||||
|
'site_description' => 'nullable|string|min:5',
|
||||||
|
'site_phone' => 'nullable|regex:/[0-9 ]+/|min:6|max:12',
|
||||||
|
'site_fax' => 'nullable|regex:/[0-9 ]+/|min:6|max:12',
|
||||||
|
'site_tax' => 'required|regex:/[0-9 ]+/|size:14',
|
||||||
|
'social' => 'nullable|array',
|
||||||
|
'top_menu' => 'nullable|array',
|
||||||
|
'site_logo' => 'nullable|image',
|
||||||
|
'email_logo' => 'nullable|image',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
22
composer.lock
generated
22
composer.lock
generated
@ -2288,16 +2288,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "2.4.3",
|
"version": "2.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/commonmark.git",
|
"url": "https://github.com/thephpleague/commonmark.git",
|
||||||
"reference": "b7a7af3a23a818dcc5836e62e93e4b9ce4704481"
|
"reference": "0026475f5c9a104410ae824cb5a4d63fa3bdb1df"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b7a7af3a23a818dcc5836e62e93e4b9ce4704481",
|
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0026475f5c9a104410ae824cb5a4d63fa3bdb1df",
|
||||||
"reference": "b7a7af3a23a818dcc5836e62e93e4b9ce4704481",
|
"reference": "0026475f5c9a104410ae824cb5a4d63fa3bdb1df",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2310,8 +2310,8 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"cebe/markdown": "^1.0",
|
"cebe/markdown": "^1.0",
|
||||||
"commonmark/cmark": "0.30.3",
|
"commonmark/cmark": "0.31.0",
|
||||||
"commonmark/commonmark.js": "0.30.0",
|
"commonmark/commonmark.js": "0.31.0",
|
||||||
"composer/package-versions-deprecated": "^1.8",
|
"composer/package-versions-deprecated": "^1.8",
|
||||||
"embed/embed": "^4.4",
|
"embed/embed": "^4.4",
|
||||||
"erusev/parsedown": "^1.0",
|
"erusev/parsedown": "^1.0",
|
||||||
@ -2333,7 +2333,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "2.5-dev"
|
"dev-main": "2.6-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -2390,7 +2390,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-07-22T12:31:21+00:00"
|
"time": "2024-07-22T18:18:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/config",
|
"name": "league/config",
|
||||||
@ -3056,11 +3056,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leenooks/laravel",
|
"name": "leenooks/laravel",
|
||||||
"version": "11.1.1",
|
"version": "11.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitea.dege.au/laravel/leenooks.git",
|
"url": "https://gitea.dege.au/laravel/leenooks.git",
|
||||||
"reference": "b9a3cd564759218fd6b3bc1ebf58e798833f014e"
|
"reference": "f32c29fa8c4b189add48bde26b7b7115be49355f"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@ -3093,7 +3093,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"leenooks"
|
"leenooks"
|
||||||
],
|
],
|
||||||
"time": "2024-07-22T14:11:06+00:00"
|
"time": "2024-07-23T08:47:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leenooks/passkey",
|
"name": "leenooks/passkey",
|
||||||
|
@ -21,9 +21,7 @@
|
|||||||
<div class="card card-dark">
|
<div class="card card-dark">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h1 class="card-title">Setup Configuration</h1>
|
<h1 class="card-title">Setup Configuration</h1>
|
||||||
@if(session()->has('success'))
|
<x-leenooks::button.success class="float-right"/>
|
||||||
<span class="ml-3 pt-0 pb-0 pr-1 pl-1 btn btn-outline-success"><small>{{ session()->get('success') }}</small></span>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@ -31,182 +29,69 @@
|
|||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">
|
<div class="col-12 col-sm-6 col-lg-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col">
|
||||||
<div class="form-group has-validation">
|
<x-leenooks::form.text name="site_name" label="Organisation Name" helper="System Name used everywhere." feedback="Organisation Name is required!" :value="$site->site_name" required/>
|
||||||
<label for="site_name">Organisation Name</label>
|
|
||||||
<input type="text" class="form-control form-control-border @error('site_name') is-invalid @enderror" id="site_name" name="site_name" placeholder="Site Name..." value="{{ old('site_name',$site->site_name) }}" required>
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_name')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
Organisation Name is required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
<span class="input-helper">System Name used everywhere.</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col">
|
||||||
<div class="form-group has-validation">
|
<x-leenooks::form.text name="site_address1" label="Address" placeholder="Address..." :value="$site->site_address1" required/>
|
||||||
<label for="site_logo">Site Logo</label>
|
<x-leenooks::form.text name="site_address2" helper="At Least 1 address line required" :value="$site->site_address2"/>
|
||||||
<input type="file" class="form-control @error('site_logo') is-invalid @enderror" id="site_logo" name="site_logo"><img class="col-12" src="{{ asset($site->site_logo) }}">
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_logo')
|
|
||||||
{{ $message }}
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col-12 col-md-8">
|
||||||
<div class="form-group has-validation">
|
<x-leenooks::form.text name="site_city" label="City" feedback="City is required" :value="$site->site_city" required/>
|
||||||
<label for="email_logo">Email Logo</label>
|
</div>
|
||||||
<input type="file" class="form-control @error('email_logo') is-invalid @enderror" id="email_logo" name="email_logo"><img class="col-12" src="{{ asset($site->email_logo) }}">
|
</div>
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('email_logo')
|
<div class="row">
|
||||||
{{ $message }}
|
<div class="col-12 col-md-4">
|
||||||
@enderror
|
<x-leenooks::form.text name="site_state" label="State" feedback="State is required" :value="$site->site_state" required/>
|
||||||
</span>
|
</div>
|
||||||
</div>
|
<div class="col-12 col-md-4">
|
||||||
|
<x-leenooks::form.text name="site_postcode" label="Post Code" feedback="Postcode is required" :value="$site->site_postcode" required/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-12 col-sm-6 col-lg-4">
|
||||||
<div class="row">
|
<x-leenooks::form.text name="site_phone" label="Phone" :value="$site->site_phone"/>
|
||||||
<div class="col-12">
|
<x-leenooks::form.text name="site_fax" label="Fax" :value="$site->site_fax"/>
|
||||||
<div class="form-group has-validation">
|
<x-leenooks::form.email name="site_email" label="Email" feedback="Email is required" :value="$site->site_email" required/>
|
||||||
<label for="site_address1">Address Lines</label>
|
<x-leenooks::form.text name="site_tax" label="Tax Number" prepend="<small>ABN</small>" feedback="Tax Number is required" :value="$site->site_tax" required/>
|
||||||
<input type="text" class="form-control form-control-border @error('site_address1') is-invalid @enderror" id="site_address1" name="site_address1" placeholder="Address1" value="{{ old('site_address1',$site->site_address1) }}" required>
|
|
||||||
<input type="text" class="form-control form-control-border" id="site_address2" name="site_address2" placeholder="Address2" value="{{ old('site_address2',$site->site_address2) }}">
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_address1')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
Atleast 1 address line required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="form-group has-validation">
|
|
||||||
<label for="site_city">City</label>
|
|
||||||
<input type="text" class="form-control form-control-border @error('site_city') is-invalid @enderror" id="site_city" name="site_city" placeholder="City" value="{{ old('site_city',$site->site_city) }}">
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_city')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
City is required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12" style="display: inline-flex;">
|
|
||||||
<div class="form-group has-validation">
|
|
||||||
<label for="site_state">State</label>
|
|
||||||
<input type="text" class="form-control form-control-border @error('site_state') is-invalid @enderror col-5" id="site_state" name="site_state" placeholder="State" value="{{ old('site_state',$site->site_state) }}">
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_state')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
State is required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group has-validation">
|
|
||||||
<label for="site_postcode">Postal Code</label>
|
|
||||||
<input type="text" class="form-control form-control-border @error('site_postcode') is-invalid @enderror col-5" id="site_postcode" name="site_postcode" placeholder="Postal Code" value="{{ old('site_postcode',$site->site_postcode) }}">
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_postcode')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
Postcode is required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-12 col-sm-6 col-lg-4">
|
||||||
<div class="form-group has-validation">
|
<div class="row">
|
||||||
<label for="site_phone">Phone</label>
|
<div class="col">
|
||||||
<input type="text" class="form-control form-control-border @error('site_phone') is-invalid @enderror" id="site_phone" name="site_phone" placeholder="Site Phone" value="{{ old('site_phone',$site->site_phone) }}">
|
<x-leenooks::form.file name="site_logo" label="Site Logo" helper="Choose a file" :value="$site->site_logo"><img class="col-12 p-2 border mb-4" src="{{ asset($site->site_logo) }}"></x-leenooks::form.file>
|
||||||
<span class="invalid-feedback" role="alert">
|
</div>
|
||||||
@error('site_phone')
|
|
||||||
{{ $message }}
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group has-validation">
|
<div class="row">
|
||||||
<label for="site_fax">Fax</label>
|
<div class="col">
|
||||||
<input type="text" class="form-control form-control-border @error('site_fax') is-invalid @enderror" id="site_fax" name="site_fax" placeholder="Site Fax" value="{{ old('site_fax',$site->site_fax) }}">
|
<x-leenooks::form.file name="email_logo" label="Email Logo" helper="Choose a file" :value="$site->email_logo"><img class="col-12 p-2 border mb-4" src="{{ asset($site->email_logo) }}"></x-leenooks::form.file>
|
||||||
<span class="invalid-feedback" role="alert">
|
</div>
|
||||||
@error('site_fax')
|
|
||||||
{{ $message }}
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group has-validation">
|
|
||||||
<label for="site_email">Email</label>
|
|
||||||
<input type="email" class="form-control form-control-border @error('site_email') is-invalid @enderror" id="site_email" name="site_email" placeholder="Site Email" value="{{ old('site_email',$site->site_email) }}" required>
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_email')
|
|
||||||
{{ $message }}
|
|
||||||
@else
|
|
||||||
Email required.
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group has-validation">
|
|
||||||
<label for="site_tax">Tax Number</label>
|
|
||||||
<span class="input-group-prepend">ABN</span>
|
|
||||||
<input type="text" class="form-control form-control-border @error('site_tax') is-invalid @enderror" id="site_tax" name="site_tax" placeholder="Site Tax" value="{{ old('site_tax',$site->site_tax) }}" required>
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_tax')
|
|
||||||
{{ $message }}
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group has-validation">
|
<x-leenooks::form.textarea name="site_description" label="Organisation Description" placeholder="Site Description..." helper="Brief description of site." :value="$site->site_description"/>
|
||||||
<label for="site_description">Organisation Description</label>
|
|
||||||
<textarea class="form-control @error('site_description') is-invalid @enderror" id="site_description" name="site_description" placeholder="Site Description...">{{ old('site_description',$site->site_description) }}</textarea>
|
|
||||||
<span class="input-helper">Brief description of site.</span>
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
@error('site_description')
|
|
||||||
{{ $message }}
|
|
||||||
@enderror
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<a href="{{ url('/home') }}" class="btn btn-danger">Cancel</a>
|
<x-leenooks::button.cancel/>
|
||||||
@can('wholesaler')
|
@can('wholesaler')
|
||||||
<button type="submit" name="submit" class="btn btn-success mr-0 float-right">@if ($site->exists)Save @else Add @endif</button>
|
<x-leenooks::button.submit class="float-right">Save</x-leenooks::button.submit>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="card-title">Update Settings</div>
|
<div class="card-title">Update Settings</div>
|
||||||
@session('success')<x-leenooks::success class="float-right">{{ $value }}</x-leenooks::success>@endsession
|
<x-leenooks::button.success class="float-right"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form method="POST" action="{{ url(request()->path(),[($o??$user)->id]) }}">
|
<form method="POST" action="{{ url(request()->path(),[($o??$user)->id]) }}">
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<x-leenooks::form.password id="password_confirm" name="password_confirmation" icon="fa-lock" label="Password Confirm"/>
|
<x-leenooks::form.password id="password_confirm" name="password_confirmation" icon="fa-lock" label="Password Confirm" helper="Verify Password"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -101,8 +101,8 @@
|
|||||||
|
|
||||||
<div class="row pt-3">
|
<div class="row pt-3">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button type="reset" name="cancel" class="btn btn-danger">Cancel</button>
|
<x-leenooks::button.cancel/>
|
||||||
<button type="submit" name="submit" class="btn btn-success float-right">Save</button>
|
<x-leenooks::button.submit class="float-right">Save</x-leenooks::button.submit>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +63,8 @@ Route::get('admin/switch/stop',[SwitchUserController::class,'switch_stop'])
|
|||||||
// Our Admin Routes - for wholesalers
|
// Our Admin Routes - for wholesalers
|
||||||
Route::group(['middleware'=>['auth','role:wholesaler'],'prefix'=>'a'],function() {
|
Route::group(['middleware'=>['auth','role:wholesaler'],'prefix'=>'a'],function() {
|
||||||
// Site Setup
|
// Site Setup
|
||||||
Route::match(['get','post'],'setup',[AdminController::class,'setup']);
|
Route::view('setup','theme.backend.adminlte.a.setup');
|
||||||
|
Route::post('setup',[AdminController::class,'setup']);
|
||||||
|
|
||||||
// Checkout Setup (Payments)
|
// Checkout Setup (Payments)
|
||||||
Route::get('checkout',[CheckoutController::class,'home']);
|
Route::get('checkout',[CheckoutController::class,'home']);
|
||||||
|
Loading…
Reference in New Issue
Block a user