Initial commit

This commit is contained in:
Ronald Huynen
2026-03-23 21:37:59 +01:00
commit 2547717edb
2193 changed files with 972171 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<div>
<!-- Countries dropdown -->
<div class="mb-6">
@if (!$hideLabel)
<label class="rounder-md block text-sm font-medium text-theme-primary"> {{ __('Country') }}</label>
@endif
<select class="shadow-outline w-80 rounded border border-theme-muted bg-white p-2 px-4 py-2 pr-8 leading-tight placeholder-gray-300 shadow-md hover:border-theme-muted focus:appearance-none focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent"
wire:change="countrySelected" wire:key="country-dropdown" wire:model.live="country">
<option selected value="">-- {{ __('Choose a country') }} --</option>
@foreach ($countries->sortBy(function ($country) {
return $country->translations->first()->name;
}) as $country)
<option value="{{ $country->id }}">{{ $country->code === 'XX' ? $country->flag . ' ' . __('~ My country is not listed') : $country->flag . ' ' . $country->translations->first()->name }}
</option>
@endforeach
</select>
</div>
<!-- Cities dropdown if there are cities -->
@if (count($cities) > 0)
<div class="mb-6 mt-6" wire:init="countrySelected">
@if (!$hideLabel)
<label class="rounder-md block text-sm font-medium text-theme-primary">{{ __('City') }}</label>
@endif
<select class="shadow-outline w-80 rounded border border-theme-muted bg-white p-2 px-4 py-2 pr-8 leading-tight placeholder-gray-300 shadow-md hover:border-theme-muted focus:appearance-none focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent"
wire:key="city-dropdown" wire:model.live="city">
<option selected value="">-- {{ __('Choose a city') }} --</option>
@foreach ($cities->sortBy(function ($city) {
return $city->translations->first()->name;
}) as $city)
<option value="{{ $city->id }}">{{ $city->translations->first()->name }}</option>
@endforeach
</select>
</div>
<!-- Divisions dropdown if there no cities but if there are divisions -->
@elseif (count($divisions) > 0)
<div class="mb-6 mt-6" wire:init="countrySelected">
@if (!$hideLabel)
<label class="rounder-md block text-sm font-medium text-theme-primary">{{ __('Division') }}</label>
@endif
<select class="shadow-outline w-80 rounded border border-theme-muted bg-white p-2 px-4 py-2 pr-8 leading-tight placeholder-gray-300 shadow-md hover:border-theme-muted focus:appearance-none focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent"
wire:change="divisionSelected" wire:key="division-dropdown" wire:model.live="division">
<option selected value="">-- {{ __('Choose a division') }} --</option>
@foreach ($divisions->sortBy(function ($division) {
return $division->translations->first()->name;
}) as $division)
<option value="{{ $division->id }}">{{ $division->translations->first()->name }}</option>
@endforeach
</select>
</div>
@endif
<!-- Districts dropdown if there are districts -->
@if (count($districts) > 0)
<div class="mb-6 mt-6" wire:init="countrySelected">
@if (!$hideLabel)
<label class="rounder-md block text-sm font-medium text-theme-primary">{{ __('District') }}</label>
@endif
<select class="shadow-outline w-80 rounded border border-theme-muted bg-white p-2 px-4 py-2 pr-8 leading-tight placeholder-gray-300 shadow-md hover:border-theme-muted focus:appearance-none focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent"
wire:key="district-dropdown" wire:model.live="district">
<option selected value="">-- {{ __('Choose a district') }} --</option>
@foreach ($districts->sortBy(function ($district) {
return $district->translations->first()->name;
}) as $district)
<option value="{{ $district->id }}">{{ $district->translations->first()->name }}</option>
@endforeach
</select>
</div>
@endif
</div>

View File

@@ -0,0 +1,44 @@
<x-jetstream.form-section submit="updateProfileInformation">
<x-slot name="title">
</x-slot>
<x-slot name="description">
<div class="">
@livewire('side-post', [
'type' => 'SiteContents\User\Edit\Location' ?? null,
'sticky' => false, 'random' => true,
'fallbackTitle' => __('Location'),
'fallbackDescription' => str_replace('@PLATFORM_USERS@', platform_users(), __('Most exchanges take place in your own area. Please indicate where this is so you can easily meet other @PLATFORM_USERS@ who are around.')) ])
</div>
</x-slot>
<x-slot name="form">
<!--- Location -->
<div class="grid col-span-6 sm:col-span-4" wire:init="emitLocationToChildren">
<!-- TODO: Explanantion for location dropdowns -->
@livewire('locations.locations-dropdown')
@error('country')
<p class="text-sm text-red-500">{{$message}}</p>
@enderror
@error('division')
<p class="text-sm text-red-500">{{$message}}</p>
@enderror
@error('city')
<p class="text-sm text-red-500">{{$message}}</p>
@enderror
</div>
</x-slot>
<x-slot name="actions">
<x-jetstream.action-message class="mr-3" on="saved">
{{ __('Saved') }}
</x-jetstream.action-message>
<x-jetstream.button wire:loading.attr="disabled" wire:target="updateProfileInformation" wire:click="updateProfileInformation">
{{ __('Save') }}
</x-jetstream.button>
</x-slot>
</x-jetstream.form-section>