2021-06-05 09:26:32 +00:00
|
|
|
@extends('layouts.main')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<!-- CONTENT HEADER -->
|
|
|
|
<section class="content-header">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<div class="col-sm-6">
|
2021-12-17 09:41:32 +00:00
|
|
|
<h1>{{ __('Store') }}</h1>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
2021-12-17 09:41:32 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
|
|
|
|
<li class="breadcrumb-item"><a href="{{ route('admin.store.index') }}">{{ __('Store') }}</a></li>
|
2021-12-13 07:59:27 +00:00
|
|
|
<li class="breadcrumb-item"><a class="text-muted"
|
2022-05-30 09:07:10 +00:00
|
|
|
href="{{ route('admin.store.edit', $shopProduct->id) }}">{{ __('Edit') }}</a>
|
2021-06-05 09:26:32 +00:00
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
|
|
<!-- MAIN CONTENT -->
|
|
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
2022-05-30 09:07:10 +00:00
|
|
|
<form action="{{ route('admin.store.update', $shopProduct->id) }}" method="POST">
|
2021-06-05 09:26:32 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
|
|
|
<div class="d-flex flex-row-reverse">
|
|
|
|
<div class="custom-control custom-switch">
|
2022-05-30 09:07:10 +00:00
|
|
|
<input type="checkbox" @if ($shopProduct->disabled) checked @endif name="disabled"
|
2021-12-17 09:41:32 +00:00
|
|
|
class="custom-control-input custom-control-input-danger" id="switch1">
|
|
|
|
<label class="custom-control-label" for="switch1">{{ __('Disabled') }} <i
|
|
|
|
data-toggle="popover" data-trigger="hover"
|
|
|
|
data-content="{{ __('Will hide this option from being selected') }}"
|
2021-12-13 07:59:27 +00:00
|
|
|
class="fas fa-info-circle"></i></label>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2021-12-17 09:41:32 +00:00
|
|
|
<label for="type">{{ __('Type') }}</label>
|
2021-12-13 07:59:27 +00:00
|
|
|
<select required name="type" id="type"
|
2021-12-17 09:41:32 +00:00
|
|
|
class="custom-select @error('name') is-invalid @enderror">
|
2022-06-13 06:59:16 +00:00
|
|
|
<option @if ($shopProduct->type == 'credits') selected @endif value="Credits">{{ CREDITS_DISPLAY_NAME }}</option>
|
|
|
|
<option @if ($shopProduct->type == 'Server slots') selected @endif value="Server slots">{{__("Server Slots")}}</option>
|
2021-06-05 09:26:32 +00:00
|
|
|
</select>
|
|
|
|
@error('name')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="text-danger">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2021-12-17 09:41:32 +00:00
|
|
|
<label for="currency_code">{{ __('Currency code') }}</label>
|
2021-12-13 07:59:27 +00:00
|
|
|
<select required name="currency_code" id="currency_code"
|
2021-12-17 09:41:32 +00:00
|
|
|
class="custom-select @error('name') is-invalid @enderror">
|
|
|
|
@foreach ($currencyCodes as $code)
|
2022-05-30 09:07:10 +00:00
|
|
|
<option @if ($shopProduct->currency_code == $code) selected @endif value="{{ $code }}">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ $code }}</option>
|
2021-06-05 09:26:32 +00:00
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
@error('currency_code')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="text-danger">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
<div class="text-muted">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ __('Checkout the paypal docs to select the appropriate code') }} <a
|
2021-12-13 07:59:27 +00:00
|
|
|
target="_blank"
|
|
|
|
href="https://developer.paypal.com/docs/api/reference/currency-codes/">link</a>
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="price">Price</label>
|
2022-05-30 09:07:10 +00:00
|
|
|
<input value="{{ $shopProduct->price }}" id="price" name="price" type="number"
|
2021-12-17 09:41:32 +00:00
|
|
|
placeholder="10.00" step="any"
|
|
|
|
class="form-control @error('price') is-invalid @enderror" required="required">
|
2021-06-05 09:26:32 +00:00
|
|
|
@error('price')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="invalid-feedback">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="quantity">Quantity</label>
|
2022-05-30 09:07:10 +00:00
|
|
|
<input value="{{ $shopProduct->quantity }}" id="quantity" name="quantity"
|
2021-12-17 09:41:32 +00:00
|
|
|
type="number" placeholder="1000"
|
|
|
|
class="form-control @error('quantity') is-invalid @enderror" required="required">
|
2021-06-05 09:26:32 +00:00
|
|
|
@error('quantity')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="invalid-feedback">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
<div class="text-muted">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ __('Amount given to the user after purchasing') }}
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="display">Display</label>
|
2022-05-30 09:07:10 +00:00
|
|
|
<input value="{{ $shopProduct->display }}" id="display" name="display" type="text"
|
2021-12-17 09:41:32 +00:00
|
|
|
placeholder="750 + 250" class="form-control @error('display') is-invalid @enderror"
|
|
|
|
required="required">
|
2021-06-05 09:26:32 +00:00
|
|
|
@error('display')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="invalid-feedback">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
<div class="text-muted">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ __('This is what the user sees at store and checkout') }}
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="description">Description</label>
|
2022-05-30 09:07:10 +00:00
|
|
|
<input value="{{ $shopProduct->description }}" id="description" name="description"
|
2021-12-17 09:41:32 +00:00
|
|
|
type="text" placeholder="{{ __('Adds 1000 credits to your account') }}"
|
|
|
|
class="form-control @error('description') is-invalid @enderror" required="required">
|
2021-06-05 09:26:32 +00:00
|
|
|
@error('description')
|
2021-12-17 09:41:32 +00:00
|
|
|
<div class="invalid-feedback">
|
|
|
|
{{ $message }}
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
@enderror
|
|
|
|
<div class="text-muted">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ __('This is what the user sees at checkout') }}
|
2021-06-05 09:26:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group text-right">
|
|
|
|
<button type="submit" class="btn btn-primary">
|
2021-12-17 09:41:32 +00:00
|
|
|
{{ __('Submit') }}
|
2021-06-05 09:26:32 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<!-- END CONTENT -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@endsection
|