Client portal improvements (#3654)

* Invoice table filters

* Quotes table filters

* Improve tables & translation

* Fix profile page inputs

* Fix profile page inputs & bump TailwindCSS version
This commit is contained in:
Benjamin Beganović 2020-04-25 01:17:37 +02:00 committed by GitHub
parent ffa3550e4a
commit 3aa884dc11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 192 additions and 108 deletions

View File

@ -4,6 +4,7 @@ namespace App\Http\Livewire;
use App\Models\Invoice;
use App\Traits\WithSorting;
use Carbon\Carbon;
use Livewire\Component;
use Livewire\WithPagination;
@ -32,17 +33,24 @@ class InvoicesTable extends Component
$query = Invoice::query();
$query = $query->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
// So $status_id will come in three way:
// paid, unpaid & overdue. Need to transform them to real values.
if (in_array('paid', $this->status)) {
$query = $query->orWhere('status_id', Invoice::STATUS_PAID);
}
if (count($this->status)) {
$query = $query->whereIn('status_id', $this->status);
if (in_array('unpaid', $this->status)) {
$query = $query->orWhereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]);
}
if (in_array('overdue', $this->status)) {
$query = $query->orWhereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
->where('due_date', '<', Carbon::now())
->orWhere('partial_due_date', '<', Carbon::now());
}
$query = $query->paginate($this->per_page);
return render('components.livewire.invoices-table', [
'invoices' => $query
'invoices' => $query,
]);
}
}

View File

@ -26,14 +26,23 @@ class QuotesTable extends Component
public function render()
{
// So $status_id will come in three way:
// draft, sent, approved & expired. Need to transform them to real values.
$query = Quote::query()
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
if (count($this->status)) {
$query = $query->whereIn('status_id', $this->status);
if (in_array('draft', $this->status)) {
$query = $query->orWhere('status_id', Quote::STATUS_DRAFT);
}
if (in_array('sent', $this->status)) {
$query = $query->orWhere('status_id', Quote::STATUS_SENT);
}
if (in_array('approved', $this->status)) {
$query = $query->orWhere('status_id', Quote::STATUS_APPROVED);
}
if (in_array('expired', $this->status)) {
$query = $query->orWhere('status_id', Quote::STATUS_EXPIRED);
}
$query = $query->paginate($this->per_page);

View File

@ -25,7 +25,7 @@
"resolve-url-loader": "^3.1.0",
"sass": "^1.15.2",
"sass-loader": "^8.0.0",
"tailwindcss": "^1.2.0",
"tailwindcss": "^1.3",
"turbolinks": "^5.2.0"
}
}

View File

@ -3203,4 +3203,6 @@ return [
'of' => 'Of',
'view_credit' => 'View Credit',
'to_view_entity_password' => 'To view the :entity you need to enter password.',
'showing_x_of' => 'Showing :first to :last out of :total results',
'no_results' => 'No results found.'
];

View File

@ -39,33 +39,43 @@
</tr>
</thead>
<tbody>
@foreach($credits as $credit)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ App\Utils\Number::formatMoney($credit->amount, $credit->client) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ App\Utils\Number::formatMoney($credit->balance, $credit->client) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $credit->formatDate($credit->date, $credit->client->date_format()) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ empty($credit->public_notes) ? '/' : $credit->public_notes }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
<a href="{{ route('client.credits.show', $credit->hashed_id) }}" class="button-link">
@lang('texts.view')
</a>
</td>
</tr>
@endforeach
@forelse($credits as $credit)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ App\Utils\Number::formatMoney($credit->amount, $credit->client) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ App\Utils\Number::formatMoney($credit->balance, $credit->client) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $credit->formatDate($credit->date, $credit->client->date_format()) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ empty($credit->public_notes) ? '/' : $credit->public_notes }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
<a href="{{ route('client.credits.show', $credit->hashed_id) }}" class="button-link">
@lang('texts.view')
</a>
</td>
</tr>
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $credits->firstItem() }} to {{ $credits->lastItem() }} out of {{ $credits->total() }}</span>
@if($credits->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $credits->firstItem(), 'last' => $credits->lastItem(), 'total' => $credits->total()]) }}
</span>
@endif
{{ $credits->links() }}
</div>
</div>

View File

@ -11,15 +11,15 @@
</div>
<div class="flex items-center">
<div class="mr-3">
<input wire:click="statusChange(paid)" type="checkbox" class="form-checkbox">
<input wire:click="statusChange('paid')" type="checkbox" class="form-checkbox">
<label for="paid" class="text-sm">{{ ctrans('texts.status_paid') }}</label>
</div>
<div class="mr-3">
<input wire:click="statusChange(unpaid)" value="unpaid" type="checkbox" class="form-checkbox">
<input wire:click="statusChange('unpaid')" type="checkbox" class="form-checkbox">
<label for="unpaid" class="text-sm">{{ ctrans('texts.status_unpaid') }}</label>
</div>
<div class="mr-3">
<input wire:click="statusChange(overdue)" value="overdue" type="checkbox" class="form-checkbox">
<input wire:click="statusChange('overdue')" type="checkbox" class="form-checkbox">
<label for="overdue" class="text-sm">{{ ctrans('texts.overdue') }}</label>
</div>
</div>
@ -63,7 +63,7 @@
</tr>
</thead>
<tbody>
@foreach($invoices as $invoice)
@forelse($invoices as $invoice)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900">
<label>
@ -96,13 +96,23 @@
</a>
</td>
</tr>
@endforeach
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $invoices->firstItem() }} to {{ $invoices->lastItem() }} out of {{ $invoices->total() }}</span>
@if($invoices->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $invoices->firstItem(), 'last' => $invoices->lastItem(), 'total' => $invoices->total()]) }}
</span>
@endif
{{ $invoices->links() }}
</div>
</div>

View File

@ -41,47 +41,57 @@
</tr>
</thead>
<tbody>
@foreach($payment_methods as $payment_method)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $payment_method->formatDateTimestamp($payment_method->created_at, $client->date_format()) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ ctrans("texts.{$payment_method->gateway_type->alias}") }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ ucfirst(optional($payment_method->meta)->brand) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@if(isset($payment_method->meta->exp_month) && isset($payment_method->meta->exp_year))
{{ $payment_method->meta->exp_month}} / {{ $payment_method->meta->exp_year }}
@endif
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@isset($payment_method->meta->last4)
**** {{ $payment_method->meta->last4 }}
@endisset
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@if($payment_method->is_default)
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check">
<path d="M20 6L9 17l-5-5" />
</svg>
@endif
</td>
<td class="px-6 py-4 whitespace-no-wrap flex items-center justify-end text-sm leading-5 font-medium">
<a href="{{ route('client.payment_methods.show', $payment_method->hashed_id) }}" class="text-blue-600 hover:text-indigo-900 focus:outline-none focus:underline">
@lang('texts.view')
</a>
</td>
</tr>
@endforeach
@forelse($payment_methods as $payment_method)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $payment_method->formatDateTimestamp($payment_method->created_at, $client->date_format()) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ ctrans("texts.{$payment_method->gateway_type->alias}") }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ ucfirst(optional($payment_method->meta)->brand) }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@if(isset($payment_method->meta->exp_month) && isset($payment_method->meta->exp_year))
{{ $payment_method->meta->exp_month}} / {{ $payment_method->meta->exp_year }}
@endif
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@isset($payment_method->meta->last4)
**** {{ $payment_method->meta->last4 }}
@endisset
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@if($payment_method->is_default)
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check">
<path d="M20 6L9 17l-5-5" />
</svg>
@endif
</td>
<td class="px-6 py-4 whitespace-no-wrap flex items-center justify-end text-sm leading-5 font-medium">
<a href="{{ route('client.payment_methods.show', $payment_method->hashed_id) }}" class="text-blue-600 hover:text-indigo-900 focus:outline-none focus:underline">
@lang('texts.view')
</a>
</td>
</tr>
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $payment_methods->firstItem() }} to {{ $payment_methods->lastItem() }} out of {{ $payment_methods->total() }}</span>
@if($payment_methods->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $payment_methods->firstItem(), 'last' => $payment_methods->lastItem(), 'total' => $payment_methods->total()]) }}
</span>
@endif
{{ $payment_methods->links() }}
</div>
</div>

View File

@ -43,8 +43,8 @@
</tr>
</thead>
<tbody>
@foreach($payments as $payment)
<tr class="cursor-pointer bg-white group hover:bg-gray-100">
@forelse($payments as $payment)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $payment->formatDate($payment->date, $payment->client->date_format()) }}
</td>
@ -66,12 +66,22 @@
</a>
</td>
</tr>
@endforeach
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $payments->firstItem() }} to {{ $payments->lastItem() }} out of {{ $payments->total() }}</span>
@if($payments->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $payments->firstItem(), 'last' => $payments->lastItem(), 'total' => $payments->total()]) }}
</span>
@endif
{{ $payments->links() }}
</div>
</div>

View File

@ -67,7 +67,7 @@
</tr>
</thead>
<tbody>
@foreach($quotes as $quote)
@forelse($quotes as $quote)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900">
<label>
@ -95,13 +95,23 @@
</a>
</td>
</tr>
@endforeach
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $quotes->firstItem() }} to {{ $quotes->lastItem() }} out of {{ $quotes->total() }}</span>
@if($quotes->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $quotes->firstItem(), 'last' => $quotes->lastItem(), 'total' => $quotes->total()]) }}
</span>
@endif
{{ $quotes->links() }}
</div>
</div>

View File

@ -44,7 +44,7 @@
</tr>
</thead>
<tbody>
@foreach($invoices as $invoice)
@forelse($invoices as $invoice)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ \App\Models\RecurringInvoice::frequencyForKey($invoice->frequency_id) }}
@ -67,13 +67,23 @@
</a>
</td>
</tr>
@endforeach
@empty
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500" colspan="100%">
{{ ctrans('texts.no_results') }}
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<div class="flex justify-center md:justify-between mt-6 mb-6">
<span class="text-gray-700 text-sm hidden md:block">Showing {{ $invoices->firstItem() }} to {{ $invoices->lastItem() }} out of {{ $invoices->total() }}</span>
@if($quotes->total() > 0)
<span class="text-gray-700 text-sm hidden md:block">
{{ ctrans('texts.showing_x_of', ['first' => $quotes->firstItem(), 'last' => $quotes->lastItem(), 'total' => $quotes->total()]) }}
</span>
@endif
{{ $invoices->links() }}
</div>
</div>

View File

@ -29,7 +29,7 @@
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 sm:col-span-3">
<label for="first_name" class="input-label">@lang('texts.first_name')</label>
<input id="first_name" class="input" name="first_name"
<input id="first_name" class="input w-full" name="first_name"
value="{{ auth()->user()->first_name }}"/>
@error('first_name')
<div class="validation validation-fail">
@ -40,7 +40,7 @@
<div class="col-span-6 sm:col-span-3">
<label for="last_name" class="input-label">@lang('texts.last_name')</label>
<input id="last_name" class="input" name="last_name"
<input id="last_name" class="input w-full" name="last_name"
value="{{ auth()->user()->last_name }}"/>
@error('last_name')
<div class="validation validation-fail">
@ -51,7 +51,7 @@
<div class="col-span-6 sm:col-span-4">
<label for="email_address" class="input-label">@lang('texts.email_address')</label>
<input id="email_address" class="input" type="email" name="email"
<input id="email_address" class="input w-full" type="email" name="email"
value="{{ auth()->user()->email }}"/>
@error('email')
<div class="validation validation-fail">
@ -62,7 +62,7 @@
<div class="col-span-6 sm:col-span-4">
<label for="phone" class="input-label">@lang('texts.phone')</label>
<input id="phone" class="input" name="phone" value="{{ auth()->user()->phone }}"/>
<input id="phone" class="input w-full" name="phone" value="{{ auth()->user()->phone }}"/>
@error('phone')
<div class="validation validation-fail">
{{ $message }}
@ -72,7 +72,7 @@
<div class="col-span-6 sm:col-span-6 lg:col-span-3">
<label for="password" class="input-label">@lang('texts.password')</label>
<input id="password" class="input" name="password" type="password"/>
<input id="password" class="input w-full" name="password" type="password"/>
@error('password')
<div class="validation validation-fail">
{{ $message }}
@ -82,7 +82,7 @@
<div class="col-span-6 sm:col-span-3 lg:col-span-3">
<label for="state" class="input-label">@lang('texts.confirm_password')</label>
<input id="state" class="input" name="password_confirmation" type="password"/>
<input id="state" class="input w-full" name="password_confirmation" type="password"/>
@error('password_confirmation')
<div class="validation validation-fail">
{{ $message }}
@ -123,7 +123,7 @@
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 sm:col-span-3">
<label for="street" class="input-label">@lang('texts.name')</label>
<input id="name" class="input" name="name"
<input id="name" class="input w-full" name="name"
value="{{ auth()->user()->client->name }}"/>
@error('name')
<div class="validation validation-fail">
@ -133,7 +133,7 @@
</div>
<div class="col-span-6 sm:col-span-3">
<label for="website" class="input-label">@lang('texts.website')</label>
<input id="website" class="input" name="last_name"
<input id="website" class="input w-full" name="last_name"
value="{{ auth()->user()->client->website }}"/>
@error('website')
<div class="validation validation-fail">
@ -176,7 +176,7 @@
<div class="grid grid-cols-6 gap-6">
<div class="col-span-6 sm:col-span-4">
<label for="address1" class="input-label">@lang('texts.address1')</label>
<input id="address1" class="input" name="address1"
<input id="address1" class="input w-full" name="address1"
value="{{ auth()->user()->client->address1 }}"/>
@error('address1')
<div class="validation validation-fail">
@ -186,7 +186,7 @@
</div>
<div class="col-span-6 sm:col-span-3">
<label for="address2" class="input-label">@lang('texts.address2')</label>
<input id="address2" class="input" name="address2"
<input id="address2" class="input w-full" name="address2"
value="{{ auth()->user()->client->address2 }}"/>
@error('address2')
<div class="validation validation-fail">
@ -196,7 +196,7 @@
</div>
<div class="col-span-6 sm:col-span-3">
<label for="city" class="input-label">@lang('texts.city')</label>
<input id="city" class="input" name="city"
<input id="city" class="input w-full" name="city"
value="{{ auth()->user()->client->city }}"/>
@error('city')
<div class="validation validation-fail">
@ -206,7 +206,7 @@
</div>
<div class="col-span-6 sm:col-span-2">
<label for="state" class="input-label">@lang('texts.state')</label>
<input id="state" class="input" name="state"
<input id="state" class="input w-full" name="state"
value="{{ auth()->user()->client->state }}"/>
@error('state')
<div class="validation validation-fail">
@ -216,7 +216,7 @@
</div>
<div class="col-span-6 sm:col-span-2">
<label for="postal_code" class="input-label">@lang('texts.postal_code')</label>
<input id="postal_code" class="input" name="postal_code"
<input id="postal_code" class="input w-full" name="postal_code"
value="{{ auth()->user()->client->postal_code }}"/>
@error('postal_code')
<div class="validation validation-fail">
@ -226,10 +226,13 @@
</div>
<div class="col-span-6 sm:col-span-2">
<label for="country" class="input-label">@lang('texts.country')</label>
<select id="country" class="input form-select" name="country">
<select id="country" class="input w-full form-select" name="country">
@foreach($countries as $country)
<option
{{ $country == auth()->user()->client->country->id ? 'selected' : null }} value="{{ $country->id }}">{{ $country->full_name }}</option>
{{ $country == auth()->user()->client->country->id ? 'selected' : null }} value="{{ $country->id }}">
{{ $country->iso_3166_2 }}
({{ $country->name }})
</option>
@endforeach
</select>
@error('country')
@ -273,7 +276,7 @@
<div class="col-span-6 sm:col-span-4">
<label for="shipping_address1"
class="input-label">@lang('texts.shipping_address1')</label>
<input id="shipping_address1" class="input" name="shipping_address1"
<input id="shipping_address1" class="input w-full" name="shipping_address1"
value="{{ auth()->user()->client->shipping_address1 }}"/>
@error('shipping_address1')
<div class="validation validation-fail">
@ -284,7 +287,7 @@
<div class="col-span-6 sm:col-span-3">
<label for="shipping_address2"
class="input-label">@lang('texts.shipping_address2')</label>
<input id="shipping_address2" class="input" name="shipping_address2"
<input id="shipping_address2" class="input w-full" name="shipping_address2"
value="{{ auth()->user()->client->shipping_address2 }}"/>
@error('shipping_address2')
<div class="validation validation-fail">
@ -294,7 +297,7 @@
</div>
<div class="col-span-6 sm:col-span-3">
<label for="shipping_city" class="input-label">@lang('texts.shipping_city')</label>
<input id="shipping_city" class="input" name="shipping_city"
<input id="shipping_city" class="input w-full" name="shipping_city"
value="{{ auth()->user()->client->shipping_city }}"/>
@error('shipping_city')
<div class="validation validation-fail">
@ -305,7 +308,7 @@
<div class="col-span-6 sm:col-span-2">
<label for="shipping_state"
class="input-label">@lang('texts.shipping_state')</label>
<input id="shipping_state" class="input" name="shipping_state"
<input id="shipping_state" class="input w-full" name="shipping_state"
value="{{ auth()->user()->client->shipping_state }}"/>
@error('shipping_state')
<div class="validation validation-fail">
@ -316,7 +319,7 @@
<div class="col-span-6 sm:col-span-2">
<label for="shipping_postal_code"
class="input-label">@lang('texts.shipping_postal_code')</label>
<input id="shipping_postal_code" class="input" name="shipping_postal_code"
<input id="shipping_postal_code" class="input w-full" name="shipping_postal_code"
value="{{ auth()->user()->client->shipping_postal_code }}"/>
@error('shipping_postal_code')
<div class="validation validation-fail">
@ -324,13 +327,15 @@
</div>
@enderror
</div>
<div class="col-span-6 sm:col-span-2">
<div class="col-span-4 sm:col-span-2">
<label for="shipping_country"
class="input-label">@lang('texts.shipping_country')</label>
<select id="shipping_country" class="input form-select" name="shipping_country">
<select id="shipping_country" class="input w-full form-select" name="shipping_country">
@foreach($countries as $country)
<option
{{ $country == auth()->user()->client->shipping_country->id ? 'selected' : null }} value="{{ $country->id }}">{{ $country->full_name }}
{{ $country == auth()->user()->client->shipping_country->id ? 'selected' : null }} value="{{ $country->id }}">
{{ $country->iso_3166_2 }}
({{ $country->name }})
</option>
@endforeach
</select>