Updated reseller create & edit for blade components

Updated reseller create & edit for blade components
This commit is contained in:
cp6 2022-03-02 14:47:27 +11:00
parent 6e337fbcbb
commit 5be2891985
2 changed files with 200 additions and 227 deletions

View File

@ -45,147 +45,145 @@
</div> </div>
<div class="col-12 col-md-6 mb-3"> <div class="col-12 col-md-6 mb-3">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"><span class="input-group-text">Dedicated IP</span></div> <div class="input-group-prepend"><span class="input-group-text">Dedicated IP</span>
</div>
<input type="text" name="dedicated_ip" class="form-control"></div> <input type="text" name="dedicated_ip" class="form-control"></div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-providers-select>
<div class="input-group-prepend"><span class="input-group-text">Provider</span></div> <x-slot name="current">1</x-slot>
<select class="form-control" name="provider_id"> </x-providers-select>
@foreach ($Providers as $provider)
<option value="{{ $provider['id'] }}">
{{ $provider['name'] }}
</option>
@endforeach
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Price</span></div> <x-slot name="title">Price</x-slot>
<input type="number" id="price" name="price" class="form-control" min="0" max="999" <x-slot name="name">price</x-slot>
step="0.01" required="" value="2.50"></div> <x-slot name="value">2.50</x-slot>
<x-slot name="max">9999</x-slot>
<x-slot name="step">0.01</x-slot>
<x-slot name="required"></x-slot>
</x-number-input>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-term-select></x-term-select>
<div class="input-group-prepend"><span class="input-group-text">Term</span></div>
<select class="form-control" id="payment_term" name="payment_term">
<option value="1" selected="">Monthly</option>
<option value="2">Quarterly</option>
<option value="3">Half annual (half year)</option>
<option value="4">Annual (yearly)</option>
<option value="5">Biennial (2 years)</option>
<option value="6">Triennial (3 years)</option>
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-currency-select></x-currency-select>
<div class="input-group-prepend"><span class="input-group-text">Currency</span></div>
<select class="form-control" id="currency" name="currency">
<option value="AUD">AUD</option>
<option value="USD" selected="">USD</option>
<option value="GBP">GBP</option>
<option value="EUR">EUR</option>
<option value="NZD">NZD</option>
<option value="JPY">JPY</option>
<option value="CAD">CAD</option>
</select></div>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-locations-select>
<div class="input-group-prepend"> <x-slot name="current">1</x-slot>
<span class="input-group-text">Location</span> </x-locations-select>
</div>
<select class="form-control" name="location_id">
@foreach ($Locations as $location)
<option value="{{ $location['id'] }}">
{{ $location['name'] }}
</option>
@endforeach
</select>
</div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-yes-no-select>
<div class="input-group-prepend"><span class="input-group-text">Was promo</span></div> <x-slot name="title">Was promo</x-slot>
<select class="form-control" name="was_promo"> <x-slot name="name">was_promo</x-slot>
<option value="0">No</option> <x-slot name="value">1</x-slot>
<option value="1">Yes</option> </x-yes-no-select>
</select></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"> <x-slot name="title">Owned since</x-slot>
<span class="input-group-text">Owned since</span> <x-slot name="name">owned_since</x-slot>
</div> <x-slot name="value">{{Carbon\Carbon::now()->format('Y-m-d') }}</x-slot>
<input type="date" class="form-control" id="owned_since" name="owned_since" value="{{Carbon\Carbon::now()->subYear(1)->format('Y-m-d') }}"></div> </x-date-input>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"><span class="input-group-text">Next due date</span> <x-slot name="title">Next due date</x-slot>
</div> <x-slot name="name">next_due_date</x-slot>
<input type="date" class="form-control next-dd" id="next_due_date" name="next_due_date" value="{{Carbon\Carbon::now()->addMonth(1)->format('Y-m-d') }}"> <x-slot name="value">{{Carbon\Carbon::now()->addDays(30)->format('Y-m-d') }}</x-slot>
</div> </x-date-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p>Limits:</p> <p class="text-muted"><b>Limits</b></p>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Accounts</span></div> <x-slot name="title">Accounts</x-slot>
<input type="number" name="accounts" class="form-control" value="10" min="1" max="9999"> <x-slot name="name">accounts</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">10</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Domains</span></div> <x-slot name="title">Domains</x-slot>
<input type="number" name="domains" class="form-control" value="10" min="1" max="9999"> <x-slot name="name">domains</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">10</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Sub domains</span></div> <x-slot name="title">Sub domains</x-slot>
<input type="number" name="sub_domains" class="form-control" value="10" min="1" max="9999"> <x-slot name="name">sub_domains</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">20</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Disk</span></div> <x-slot name="title">Disk GB</x-slot>
<input type="number" name="disk" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">disk</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">50</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Email</span></div> <x-slot name="title">Email</x-slot>
<input type="number" name="email" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">Email</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Bandwidth</span> <x-slot name="title">Bandwidth GB</x-slot>
</div> <x-slot name="name">bandwidth</x-slot>
<input type="number" name="bandwidth" class="form-control" value="999" min="1" <x-slot name="value">1</x-slot>
max="99999"> <x-slot name="max">999999</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="step">1</x-slot>
</div> <x-slot name="value">500</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">FTP</span></div> <x-slot name="title">ftp</x-slot>
<input type="number" name="ftp" class="form-control" value="99" min="1" max="99999"> <x-slot name="name">ftp</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">DB</span></div> <x-slot name="title">DB</x-slot>
<input type="number" name="db" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">db</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">

View File

@ -90,167 +90,142 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-providers-select>
<div class="input-group-prepend"><span class="input-group-text">Provider</span></div> <x-slot name="current">{{$reseller[0]->provider_id}}</x-slot>
<select class="form-control" name="provider_id"> </x-providers-select>
<option value="0">Select provider</option>
@foreach ($providers as $pr)
<option
value="{{ $pr['id'] }}" {{ ( $pr['id'] === $reseller[0]->provider_id) ? 'selected' : '' }}> {{ $pr['name'] }} </option>
@endforeach
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Price</span></div> <x-slot name="title">Price</x-slot>
<input type="number" id="price" name="price" class="form-control" min="0" max="999" <x-slot name="name">price</x-slot>
step="0.01" required="" value="{{ $reseller[0]->price }}"></div> <x-slot name="value">{{$reseller[0]->price}}</x-slot>
<x-slot name="max">9999</x-slot>
<x-slot name="step">0.01</x-slot>
<x-slot name="required"></x-slot>
</x-number-input>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-term-select>
<div class="input-group-prepend"><span class="input-group-text">Term</span></div> <x-slot name="current">{{$reseller[0]->term}}</x-slot>
<select class="form-control" id="payment_term" name="payment_term"> </x-term-select>
<option value="1" {{ ($reseller[0]->term === 1) ? 'selected' : '' }}>Monthly
</option>
<option value="2" {{ ($reseller[0]->term === 2) ? 'selected' : '' }}>Quarterly
</option>
<option value="3" {{ ($reseller[0]->term === 3) ? 'selected' : '' }}>Half annual
(half
year)
</option>
<option value="4" {{ ($reseller[0]->term === 4) ? 'selected' : '' }}>Annual (yearly)
</option>
<option value="5" {{ ($reseller[0]->term === 5) ? 'selected' : '' }}>Biennial (2
years)
</option>
<option value="6" {{ ($reseller[0]->term === 6) ? 'selected' : '' }}>Triennial (3
years)
</option>
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-currency-select>
<div class="input-group-prepend"><span class="input-group-text">Currency</span></div> <x-slot name="current">{{$reseller[0]->currency}}</x-slot>
<select class="form-control" id="currency" name="currency"> </x-currency-select>
<option value="AUD" {{ ($reseller[0]->currency === 'AUD') ? 'selected' : '' }}>AUD
</option>
<option value="USD" {{ ($reseller[0]->currency === 'USD') ? 'selected' : '' }}>USD
</option>
<option value="GBP" {{ ($reseller[0]->currency === 'GBP') ? 'selected' : '' }}>GBP
</option>
<option value="EUR" {{ ($reseller[0]->currency === 'EUR') ? 'selected' : '' }}>EUR
</option>
<option value="NZD" {{ ($reseller[0]->currency === 'NZD') ? 'selected' : '' }}>NZD
</option>
<option value="JPY" {{ ($reseller[0]->currency === 'JPY') ? 'selected' : '' }}>JPY
</option>
<option value="CAD" {{ ($reseller[0]->currency === 'CAD') ? 'selected' : '' }}>CAD
</option>
</select></div>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-locations-select>
<div class="input-group-prepend"> <x-slot name="current">{{$reseller[0]->location_id}}</x-slot>
<span class="input-group-text">Location</span> </x-locations-select>
</div>
<select class="form-control" name="location_id">
<option value="999">Null</option>
@foreach ($locations as $loc)
<option
value="{{ $loc->id }}" {{ ( $loc->id === $reseller[0]->provider_id) ? 'selected' : '' }}> {{ $loc ->name }} </option>
@endforeach
</select>
</div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-yes-no-select>
<div class="input-group-prepend"><span class="input-group-text">Was promo</span></div> <x-slot name="title">Promo price</x-slot>
<select class="form-control" name="was_promo"> <x-slot name="name">was_promo</x-slot>
<option value="0" {{ ($reseller[0]->was_promo === 0) ? 'selected' : '' }}>No <x-slot name="value">{{ $reseller[0]->was_promo }}</x-slot>
</option> </x-yes-no-select>
<option value="1" {{ ($reseller[0]->was_promo === 1) ? 'selected' : '' }}>Yes
</option>
</select></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"> <x-slot name="title">Owned since</x-slot>
<span class="input-group-text">Owned since</span> <x-slot name="name">owned_since</x-slot>
</div> <x-slot name="value">{{$reseller[0]->owned_since }}</x-slot>
<input type="date" class="form-control" id="owned_since" name="owned_since" </x-date-input>
value="{{ $reseller[0]->owned_since }}"></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"><span class="input-group-text">Next due date</span> <x-slot name="title">Next due date</x-slot>
</div> <x-slot name="name">next_due_date</x-slot>
<input type="date" class="form-control next-dd" id="next_due_date" name="next_due_date" <x-slot name="value">{{$reseller[0]->next_due_date }}</x-slot>
value="{{ $reseller[0]->next_due_date }}"> </x-date-input>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p>Limits:</p> <p class="text-muted"><b>Limits</b></p>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Domains</span></div> <x-slot name="title">Accounts</x-slot>
<input type="number" name="domains" class="form-control" <x-slot name="name">accounts</x-slot>
value="{{$reseller[0]->domains_limit}}" <x-slot name="value">1</x-slot>
min="1" max="9999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->accounts}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Sub domains</span></div> <x-slot name="title">Domains</x-slot>
<input type="number" name="sub_domains" class="form-control" <x-slot name="name">domains</x-slot>
value="{{$reseller[0]->subdomains_limit}}" min="1" max="9999"> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->domains_limit}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Disk</span></div> <x-slot name="title">Sub domains</x-slot>
<input type="number" name="disk" class="form-control" <x-slot name="name">sub_domains</x-slot>
value="{{$reseller[0]->disk_as_gb}}" <x-slot name="value">1</x-slot>
min="1" max="99999"> <x-slot name="max">999999</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="step">1</x-slot>
</div> <x-slot name="value">{{$reseller[0]->subdomains_limit}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Email</span></div> <x-slot name="title">Disk GB</x-slot>
<input type="number" name="email" class="form-control" <x-slot name="name">disk</x-slot>
value="{{$reseller[0]->email_limit}}" <x-slot name="value">1</x-slot>
min="1" max="99999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->disk_as_gb}}</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Bandwidth</span> <x-slot name="title">Email</x-slot>
</div> <x-slot name="name">Email</x-slot>
<input type="number" name="bandwidth" class="form-control" <x-slot name="value">1</x-slot>
value="{{$reseller[0]->bandwidth}}" min="1" <x-slot name="max">999999</x-slot>
max="99999"> <x-slot name="step">1</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="value">{{$reseller[0]->email_limit}}</x-slot>
</div> </x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">FTP</span></div> <x-slot name="title">Bandwidth GB</x-slot>
<input type="number" name="ftp" class="form-control" value="{{$reseller[0]->ftp_limit}}" <x-slot name="name">bandwidth</x-slot>
min="1" <x-slot name="value">1</x-slot>
max="99999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->bandwidth}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">DB</span></div> <x-slot name="title">ftp</x-slot>
<input type="number" name="db" class="form-control" value="{{$reseller[0]->db_limit}}" <x-slot name="name">ftp</x-slot>
min="1" max="99999"> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->ftp_limit}}</x-slot>
</x-number-input>
</div>
<div class="col-12 col-lg-3 mb-4">
<x-number-input>
<x-slot name="title">DB</x-slot>
<x-slot name="name">db</x-slot>
<x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">{{$reseller[0]->db_limit}}</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">