Initial commit
This commit is contained in:
304
resources/views/livewire/profile/export-profile-data.blade.php
Normal file
304
resources/views/livewire/profile/export-profile-data.blade.php
Normal file
@@ -0,0 +1,304 @@
|
||||
<x-jetstream.form-section submit="">
|
||||
<x-slot name="title">
|
||||
{{ __('Download your personal data') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __('Your data belongs to you. You have the right to know what information we have collected about you and how it is used. Furthermore we support your right to transfer your data to another service or platform.') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
<!-- Transactions Export Section -->
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="export-transactions" value="{{ __('Export transactions') }}" />
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('Export all transactions from your accounts') }}
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<x-jetstream.secondary-button wire:click="exportTransactions('ods')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTransactions('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('ODS') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTransactions('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTransactions('xlsx')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTransactions('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('XLSX') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTransactions('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTransactions('csv')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTransactions('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('CSV') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTransactions('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTransactions('json')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTransactions('json')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('JSON') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTransactions('json')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
{{-- <div class="border-t border-gray-200 pt-6"></div> --}}
|
||||
</div>
|
||||
|
||||
<!-- Profile Data Export Section -->
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="export-profile" value="{{ __('Export profile') }}" />
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('Export your profile information') }}
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<x-jetstream.secondary-button wire:click="exportProfileData('ods')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportProfileData('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('ODS') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportProfileData('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportProfileData('xlsx')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportProfileData('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('XLSX') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportProfileData('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportProfileData('csv')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportProfileData('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('CSV') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportProfileData('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportProfileData('json')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportProfileData('json')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('JSON') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportProfileData('json')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
{{-- <div class="border-t border-gray-200 pt-6"></div> --}}
|
||||
</div>
|
||||
|
||||
<!-- Messages Export Section -->
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="export-messages" value="{{ __('Export messages') }}" />
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('Export all messages from your conversations') }}
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<x-jetstream.secondary-button wire:click="exportMessages('ods')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportMessages('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('ODS') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportMessages('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportMessages('xlsx')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportMessages('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('XLSX') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportMessages('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportMessages('csv')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportMessages('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('CSV') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportMessages('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportMessages('json')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportMessages('json')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('JSON') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportMessages('json')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
{{-- <div class="border-t border-gray-200 pt-6"></div> --}}
|
||||
</div>
|
||||
|
||||
<!-- Tags Export Section -->
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="export-tags" value="{{ __('Export tags') }}" />
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('Export all tags (skills) associated with your profile') }}
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<x-jetstream.secondary-button wire:click="exportTags('ods')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTags('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('ODS') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTags('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTags('xlsx')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTags('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('XLSX') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTags('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTags('csv')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTags('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('CSV') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTags('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportTags('json')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportTags('json')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('JSON') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportTags('json')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
{{-- <div class="border-t border-gray-200 pt-6"></div> --}}
|
||||
</div>
|
||||
|
||||
<!-- Contacts Export Section -->
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="export-contacts" value="{{ __('Export contacts') }}" />
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ __('Export all your contacts') }}
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<x-jetstream.secondary-button wire:click="exportContacts('ods')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportContacts('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('ODS') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportContacts('ods')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportContacts('xlsx')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportContacts('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('XLSX') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportContacts('xlsx')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportContacts('csv')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportContacts('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('CSV') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportContacts('csv')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
<x-jetstream.secondary-button wire:click="exportContacts('json')" wire:loading.attr="disabled">
|
||||
<span wire:loading.remove wire:target="exportContacts('json')">
|
||||
<x-icon class="mr-1 h-4 w-4" name="arrow-down-tray" />
|
||||
{{ __('JSON') }}
|
||||
</span>
|
||||
<span wire:loading wire:target="exportContacts('json')">
|
||||
<x-icon class="mr-1 h-4 w-4 animate-spin" name="arrow-path" />
|
||||
{{ __('Loading...') }}
|
||||
</span>
|
||||
</x-jetstream.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-jetstream.action-message class="mr-3" on="saved">
|
||||
{{ __('Export started') }}
|
||||
</x-jetstream.action-message>
|
||||
|
||||
@if (session('error'))
|
||||
<div class="text-sm text-red-600">
|
||||
{{ session('error') }}
|
||||
</div>
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<x-select
|
||||
label="{{ $label }}"
|
||||
placeholder="{{ __('You can select multiple languages') }}"
|
||||
multiselect
|
||||
:options="$langOptions"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
wire:model.live="langSelected"
|
||||
/>
|
||||
</div>
|
||||
@@ -0,0 +1,51 @@
|
||||
<div>
|
||||
<x-jetstream.form-section submit="">
|
||||
<x-slot name="title">
|
||||
</x-slot>
|
||||
<x-slot name="description">
|
||||
<div class="">
|
||||
@livewire('side-post', [
|
||||
'type' => 'SiteContents\User\Edit\MigrateSkills' ?? null,
|
||||
'sticky' => false, 'random' => true,
|
||||
'fallbackTitle' => __('Important: update your offered skills'),
|
||||
'fallbackDescription' => __('You still need to move the skills you offered on our old website to our new tagging system. Without this step your skills will not be visible on your profile page!')
|
||||
])
|
||||
</div>
|
||||
</x-slot>
|
||||
<x-slot name="form">
|
||||
|
||||
|
||||
@if($showCyclosReference)
|
||||
<!-- Skills old website -->
|
||||
<div class="col-span-6 sm:col-span-4 ">
|
||||
|
||||
<label class="rounder-md block text-sm font-medium text-theme-primary">
|
||||
{{ __('Your skills from our old website')}}
|
||||
</label>
|
||||
<div class="inline-flex pl-4 pr-1 py-3 bg-theme-text-surface border-1 border border-theme-text-primary rounded-xl text-theme-primary text-base">
|
||||
<!-- Left column with flex-grow for skills content -->
|
||||
<div class="flex-grow">
|
||||
{{ getActiveProfile()->cyclos_skills }}
|
||||
</div>
|
||||
<!-- Right column with X button, vertically centered -->
|
||||
<div class="flex items-start ml-2">
|
||||
<x title="" tabindex="-1" class="tagify__tag__removeBtn hover:bg-red-400 font-medium" role="button" aria-label="remove tag"
|
||||
wire:click="removeCyclosTags()"
|
||||
wire:confirm="{{ __('Forget this reference to the old website? This cannot be undone.') }}"></x>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Vertical line with arrow, centered under the grey bubble -->
|
||||
<div class="flex flex-col items-center mb-1">
|
||||
{{-- <div class="w-1 h-8 bg-gray-400"></div> --}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 -15 24 39" stroke-width="2.5" stroke="currentColor" class="text-theme-muted size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V-15" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<livewire:main-page.skills-card-full :label="$skillsCardLabel" />
|
||||
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
</div>
|
||||
85
resources/views/livewire/profile/select-profile.blade.php
Normal file
85
resources/views/livewire/profile/select-profile.blade.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<div x-data class="max-w-md">
|
||||
|
||||
<label for="selectProfile" class="block text-sm font-medium text-theme-primary"> {{ $label }} </label>
|
||||
|
||||
<div class="relative">
|
||||
<div class="pointer-events-none absolute inset-y-0 left-0 flex pl-3 pt-2">
|
||||
<svg class="h-5 w-5 text-theme-muted" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd"
|
||||
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
|
||||
<!----- When nothing is selected ---->
|
||||
@if (!isset($selected['id']) || $search != '')
|
||||
|
||||
<input wire:model.live.debounce.300ms="search" x-on:blur="$wire.inputBlur()"
|
||||
class="block w-full rounded-md border border-theme-border bg-white py-2 pl-10 pr-3 leading-5 placeholder-gray-400 shadow-sm transition duration-150 ease-in-out focus:border-theme-border focus:placeholder-gray-700 sm:text-sm"
|
||||
placeholder="{{ __('Search') . ' (' . $placeholder . ')' }}" type="search" autocomplete="off">
|
||||
|
||||
@if (strlen($search) > 2)
|
||||
<ul
|
||||
class="absolute z-[60] mt-0 w-full rounded-md border border-theme-border bg-white text-sm text-theme-primary shadow-lg">
|
||||
@forelse ($searchResults as $searchResult)
|
||||
<li>
|
||||
<a wire:click="selectProfile({{ $searchResult['id'] }})"
|
||||
class="flex items-center px-2 py-2 hover:bg-gray-100">
|
||||
<img src="{{ $searchResult['profile_photo_path'] }}" class="w-10 rounded-full profile-photo">
|
||||
<div class="ml-3 leading-tight">
|
||||
<div class="font-semibold text-theme-primary">
|
||||
@if (array_key_exists('name', $searchResult))
|
||||
{{ $searchResult['name'] }}
|
||||
@else
|
||||
{{ __('No results found') }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-theme-secondary">
|
||||
@if (array_key_exists('description', $searchResult))
|
||||
{{ $searchResult['description'] }}
|
||||
@else
|
||||
{{ __('No results found') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@empty
|
||||
<li class="px-4 py-4">{{ __('No results found for') }} "{{ $search }}"</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
@endif
|
||||
<div
|
||||
class=" focus:shadow-outline-blue my-3 w-full rounded-md border border-theme-border bg-white pl-0 pr-3 leading-5 transition duration-150 ease-in-out focus:border-theme-border focus:outline-none sm:text-sm">
|
||||
<div class="flex items-center px-2 py-2">
|
||||
<div class="ml-3 h-10">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!----- When selected ---->
|
||||
@else
|
||||
<input wire:model.live.debounce.300ms="search"
|
||||
class="shadow-sm block w-full rounded-md border border-theme-border bg-white py-2 pl-10 pr-3 leading-5 placeholder-gray-400 transition duration-150 ease-in-out focus:border-theme-border focus:placeholder-gray-300 focus:outline-none sm:text-sm"
|
||||
placeholder="{{ __('Search again...') }}" type="search" autocomplete="off">
|
||||
<div
|
||||
class=" focus:shadow-outline-blue my-3 w-full rounded-md border border-theme-border bg-white pl-0 pr-3 leading-5 transition duration-150 ease-in-out focus:border-theme-border focus:outline-none sm:text-sm">
|
||||
<div class="flex items-center px-2 py-2">
|
||||
<img src="{{ $selected['profile_photo_path'] }}" class="w-10 rounded-full profile-photo">
|
||||
<div class="ml-3 leading-tight">
|
||||
<div class="font-semibold">
|
||||
{{ $selected['name'] }}
|
||||
</div>
|
||||
<div class="text-theme-secondary">
|
||||
{{ $selected['description'] }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="ml-auto text-theme-secondary hover:text-red-600" wire:click="removeSelectedProfile">
|
||||
<x-icon mini name="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
415
resources/views/livewire/profile/show.blade.php
Normal file
415
resources/views/livewire/profile/show.blade.php
Normal file
@@ -0,0 +1,415 @@
|
||||
<div>
|
||||
<section>
|
||||
|
||||
<!-- Card -->
|
||||
<div class="bg-theme-background p-8 md:12 lg:p-16 shadow-xl sm:rounded-lg">
|
||||
@php
|
||||
// Don't blur if viewer is Admin/Bank viewing an incomplete-only profile
|
||||
$isIncompleteOnly = $isIncomplete && !$inactive && !$emailUnverifiedLabel;
|
||||
$canViewIncomplete = in_array(get_class(getActiveProfile()), ['App\Models\Admin', 'App\Models\Bank']);
|
||||
// Never blur when viewing your own profile
|
||||
$isViewingOwnProfile = getActiveProfile() &&
|
||||
get_class(getActiveProfile()) === get_class($profile) &&
|
||||
getActiveProfile()->id === $profile->id;
|
||||
$shouldBlur = $hidden && !($isIncompleteOnly && $canViewIncomplete) && !$isViewingOwnProfile;
|
||||
@endphp
|
||||
<div class="{{ $shouldBlur ? 'blur-md pointer-events-none select-none' : '' }}">
|
||||
|
||||
<!-- Top section -->
|
||||
<div class="flex-start flex flex-col justify-center gap-4 sm:flex-row sm:justify-between">
|
||||
|
||||
<div class="flex justify-between sm:contents">
|
||||
<!-- Profile photo -->
|
||||
<div class="flex-shrink-0">
|
||||
<img alt="{{ $profile->name }}"
|
||||
class="h-36 w-36 min-h-36 min-w-36 lg:h-56 lg:w-56 lg:min-h-56 lg:min-w-56 aspect-square rounded-full profile-photo object-cover outline outline-1 outline-offset-1 outline-theme-secondary"
|
||||
src="{{ Storage::url($profile->profile_photo_path) }}">
|
||||
</div>
|
||||
|
||||
<!-- Reaction buttons visible only on extra small screens (top right next to photo) -->
|
||||
<div class="flex sm:hidden">
|
||||
<!-- Star button -->
|
||||
<span>
|
||||
@livewire('reaction-button', [
|
||||
'typeName' => 'star',
|
||||
'showCounter' => true,
|
||||
'reactionCounter' => $profile->reactionCounter,
|
||||
'modelInstance' => $profile,
|
||||
])
|
||||
</span>
|
||||
<!-- Bookmark button -->
|
||||
<span>
|
||||
@livewire('reaction-button', [
|
||||
'typeName' => 'bookmark',
|
||||
'showCounter' => false,
|
||||
'reactionCounter' => null,
|
||||
'modelInstance' => $profile,
|
||||
])
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col mx-6 justify-between">
|
||||
<div class="">
|
||||
<!-- Name details aligned to the left -->
|
||||
<div class="">
|
||||
<h1
|
||||
class="mb-2 text-2xl lg:text-4xl font-extrabold text-black group-hover:text-white dark:text-white">
|
||||
{{ $profile->name }}
|
||||
</h1>
|
||||
<div class="text-base lg:text-lg text-black">
|
||||
{{ $profile->full_name }} {{ $age }}
|
||||
</div>
|
||||
@if ($inactiveLabel || $removedSince || $incompleteLabel || $noExchangesYetLabel)
|
||||
@if ($removedSince)
|
||||
<div class="text-base lg:text-lg text-red-700">
|
||||
{{ __('Removed') }}
|
||||
</div>
|
||||
@elseif ($inactiveLabel)
|
||||
<div class="text-base lg:text-lg text-red-700">
|
||||
{{ __('Inactive') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($incompleteLabel && !$removedSince)
|
||||
<div class="text-base lg:text-lg text-red-700">
|
||||
{{ __('Incomplete profile') }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($noExchangesYetLabel && !$removedSince)
|
||||
<div class="text-base lg:text-lg text-red-700">
|
||||
{{ __('No exchanges yet, but ready to help') }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="my-4 lg:my-6 text-base lg:text-lg leading-relaxed text-theme-primary font-semibold ">
|
||||
{{ Illuminate\Support\Str::ucfirst($profile->about_short) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col lg:flex-row lg:items-end lg:justify-between text-theme-primary gap-2">
|
||||
|
||||
<div class="flex flex-row items-end justify-between lg:gap-4">
|
||||
<!-- Online status -->
|
||||
@php
|
||||
// Map profile class to guard name
|
||||
$guardName = match(get_class($profile)) {
|
||||
'App\Models\Admin' => 'admin',
|
||||
'App\Models\Bank' => 'bank',
|
||||
'App\Models\Organization' => 'organization',
|
||||
default => 'web'
|
||||
};
|
||||
@endphp
|
||||
<livewire:profile-status-badge :guard="$guardName" :profileId="$profile->id" :showIcon="true"
|
||||
:showText="true" size="lg" />
|
||||
|
||||
<!-- Phone -->
|
||||
@if (!empty($phone))
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="h-6 w-6 flex-shrink-0" fill="none" stroke-width="1.5"
|
||||
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"
|
||||
stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<a class="text-base lg:text-lg underline hover:text-theme-secondary" href="{{ $location['url'] }}" >
|
||||
{{ $phone }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
@if (!empty($location['url']) && !empty($location['name']))
|
||||
<div class="flex items-start gap-2 min-w-0">
|
||||
<svg class="h-6 w-6 flex-shrink-0" fill="none" stroke-width="1.5"
|
||||
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"
|
||||
stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<a class="text-base lg:text-lg underline hover:text-theme-secondary break-words" target="_blank" href="{{ $location['url'] }}">
|
||||
{{ $location['name'] }}
|
||||
</a>
|
||||
</div>
|
||||
@elseif (!empty($location['name']))
|
||||
<div class="flex items-start gap-2 min-w-0">
|
||||
<svg class="h-6 w-6 flex-shrink-0" fill="none" stroke-width="1.5"
|
||||
stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"
|
||||
stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<span class="text-base lg:text-lg break-words">{{ $location['name'] }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Reaction buttons on all screens 640px and larger (aligned to the right) -->
|
||||
<div class="hidden sm:flex lg:flex">
|
||||
<!-- Star button -->
|
||||
<span>
|
||||
@livewire('reaction-button', [
|
||||
'typeName' => 'star',
|
||||
'showCounter' => true,
|
||||
'reactionCounter' => $profile->reactionCounter,
|
||||
'modelInstance' => $profile,
|
||||
])
|
||||
</span>
|
||||
<!-- Bookmark button -->
|
||||
<span>
|
||||
@livewire('reaction-button', [
|
||||
'typeName' => 'bookmark',
|
||||
'showCounter' => false,
|
||||
'reactionCounter' => null,
|
||||
'modelInstance' => $profile,
|
||||
])
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Bottom section -->
|
||||
|
||||
<!-- About -->
|
||||
@php
|
||||
if (empty($profile->about) === true && !empty($profile->cyclos_skills) === true) {
|
||||
$about = $profile->cyclos_skills;
|
||||
} else {
|
||||
$about = $profile->about;
|
||||
}
|
||||
@endphp
|
||||
@if ($about && strlen(strip_tags(html_entity_decode($about))) > 350)
|
||||
<div class="text-sm lg:text-base leading-relaxed" x-data="{ showAboutFullText: false }">
|
||||
<p class="my-10 text-theme-primary font-semibold">
|
||||
<span x-show="!showAboutFullText">{!! nl2br(e(Illuminate\Support\Str::limit(strip_tags(html_entity_decode($about)), 350))) !!}</span>
|
||||
|
||||
<span x-show="showAboutFullText">{!! nl2br(e(strip_tags(html_entity_decode($about)))) !!}</span> <a @click.prevent="showAboutFullText = !showAboutFullText"
|
||||
class="text-sm lg:text-base text-theme-primary underline transition-colors duration-100 hover:text-theme-primary hover:underline font-normal whitespace-nowrap"
|
||||
href="#"><span x-show="!showAboutFullText">{{ __('Read more') }}<svg class="inline h-4 w-4 rtl:-scale-x-100" fill="currentColor" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path clip-rule="evenodd"
|
||||
d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
|
||||
fill-rule="evenodd"></path>
|
||||
</svg></span><span x-show="showAboutFullText"><svg class="inline h-4 w-4 scale-x-[-1] transform" fill="currentColor" viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path clip-rule="evenodd"
|
||||
d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
|
||||
fill-rule="evenodd"></path>
|
||||
</svg> {{ __('Show less') }}</span></a>
|
||||
</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="">
|
||||
<p class="my-10 text-sm lg:text-base text-theme-primary font-semibold">
|
||||
{!! nl2br(e(strip_tags(html_entity_decode($about)))) !!}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!--- Languages -->
|
||||
@if ($profile->languages->count() > 0)
|
||||
<div class="mt-10 flex flex-wrap gap-x-4 gap-y-1 text-sm lg:text-base text-theme-primary">
|
||||
@foreach ($profile->languages as $language)
|
||||
<div class="flex items-center gap-2">
|
||||
<span>{{ $language['flag'] }}</span>
|
||||
<span>{{ trans($language['name']) }}, {{ trans($language->competence_name) }}</span>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@if ($profile->lang_preference)
|
||||
<div class="mb-10 mt-2 flex items-center text-sm lg:text-base text-theme-primary">
|
||||
{{ trans($profile->lang_preference) }} {{ __('is preferred') }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<!--- Skills -->
|
||||
@if (($skills->count() > 0))
|
||||
<div class="my-10 flex flex-wrap gap-2">
|
||||
@foreach ($skills->sortBy('category_color') as $skill)
|
||||
<span class="bg-{{ $skill['category_color'] . '-400' }} rounded px-2 py-1 text-sm lg:text-base text-black lg:block max-w-full truncate"
|
||||
style="cursor: default;" title="{{ $skill['category_path'] }}">{{ $skill['name'] }}</span>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Motivation --->
|
||||
@if (!empty($profile->motivation))
|
||||
<div class="mt-10 flex flex-col item-start text-sm lg:text-base leading-relaxed text-theme-primary">
|
||||
<div class="font-semibold">
|
||||
{{ __('Why Timebank?') }}
|
||||
</div>
|
||||
{{ $profile->motivation }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Acivity info -->
|
||||
<div class="my-8 grid grid-cols-1 gap-y-8 gap-x-4 md:grid-cols-3 text-sm lg:text-base text-theme-primary">
|
||||
|
||||
<!--- Last login, last exchange, registered since -->
|
||||
<div>
|
||||
@if($lastLoginAt || $lastLoginAt || $registeredSince)
|
||||
<p class="font-semibold">{{ __('Activity') }} </p>
|
||||
@endif
|
||||
|
||||
@if ($lastLoginAt)
|
||||
<div>
|
||||
{{ __('Last login') . ' ' . $lastLoginAt }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($lastExchangeAt)
|
||||
<div>
|
||||
{{ __('Last exchange') . ' ' . $lastExchangeAt }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{{ __('Registered') . ' ' . $registeredSince }}
|
||||
</div>
|
||||
|
||||
@if ($inactiveSince || $removedSince)
|
||||
@if ($removedSince)
|
||||
<div class="text-red-700">
|
||||
{{ __('Removed') . ' ' . $removedSince }}
|
||||
</div>
|
||||
@else
|
||||
<div class="text-red-700">
|
||||
{{ __('Inactive') . ' ' . $inactiveSince }}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@if ($emailUnverifiedLabel)
|
||||
<div class="text-red-700">
|
||||
{{ __('Email not verified') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!--- Transaction info-->
|
||||
@if (
|
||||
(($accountsTotals['transfersReceived'] ?? false) && ($accountsTotals['transfersGiven'] ?? false)) ||
|
||||
($accountsTotals['transfersReceivedOrGiven'] ?? false))
|
||||
<div>
|
||||
<p class="font-semibold">{{ __('Transactions') }} </p>
|
||||
@if ($accountsTotals['transfersReceived'] && $accountsTotals['transfersGiven'])
|
||||
@if ($accountsTotals['transfersReceived'])
|
||||
<p>{{ $accountsTotals['transfersReceived'] }}
|
||||
{{ __('× received') . ' ' . trans(timebank_config('account_info.' . $type . '.countTransfersSince_humanReadable')) }}
|
||||
</p>
|
||||
@endif
|
||||
@if ($accountsTotals['transfersGiven'])
|
||||
<p>{{ $accountsTotals['transfersGiven'] }}
|
||||
{{ __('× given') . ' ' . trans(timebank_config('account_info.' . $type . '.countTransfersSince_humanReadable')) }}
|
||||
</p>
|
||||
@endif
|
||||
@elseif ($accountsTotals['transfersReceivedOrGiven'])
|
||||
<p>{{ $accountsTotals['transfersReceivedOrGiven'] }}
|
||||
{{ __('×') . ' ' . trans(timebank_config('account_info.' . $type . '.countTransfersSince_humanReadable')) }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Account info -->
|
||||
@if ($accountsTotals['sumBalances'])
|
||||
<div>
|
||||
<p class="font-semibold">{{ __('Balance') }} </p>
|
||||
<p>{{ tbFormat($accountsTotals['sumBalances']) }} {{ __('available') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Website -->
|
||||
@if ($profile->website)
|
||||
<div class="my-6 text-sm lg:text-base">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-4 w-4 lg:h-6 lg:w-6 flex-shrink-0">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
||||
</svg>
|
||||
<a class="underline hover:text-theme-secondary" href="{{ $profile->website }}" target="_blank">
|
||||
{{ Illuminate\Support\Str::after($profile->website, '://') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Social Media -->
|
||||
@if ($socials && count($socials) > 0)
|
||||
<div class="mt-6 mb-12 md:mb-8 lg:mb-0">
|
||||
<div class="flex flex-wrap items-center gap-2 g:gap-4">
|
||||
@foreach ($socials as $value)
|
||||
<a aria-label="{{ $value->name }}"
|
||||
class="text-theme-light hover:text-theme-light dark:text-theme-light dark:hover:text-theme-light"
|
||||
href="{{ str_starts_with($value->pivot->user_on_social, 'https://')
|
||||
? $value->pivot->user_on_social
|
||||
: str_replace('#', $value->pivot->server_of_social, $value->url_structure) . $value->pivot->user_on_social }}"
|
||||
target="_blank">
|
||||
<img alt="{{ $value->name }}" class="h-6 w-6 lg:h-8 lg:w-8 opacity-100 hover:opacity-75"
|
||||
src="{{ Storage::url($value->icon) }}"
|
||||
title="{{ $value->pivot->user_on_social . ' on ' . $value->name }}" />
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Action buttons -->
|
||||
<div class="col-span-6 row-start-4">
|
||||
<div class="">
|
||||
<div class="bg-theme-background flex items-center justify-end gap-8 text-right">
|
||||
@if (
|
||||
(get_class(getActiveProfile()) === get_class($profile) && getActiveProfile()->id === $profile->id) ||
|
||||
$profile->isRemoved())
|
||||
<!--- Disabled buttons -->
|
||||
<x-jetstream.button disabled wire:click="payButton">
|
||||
{{ __('Pay') }}
|
||||
</x-jetstream.button>
|
||||
<x-jetstream.button disabled wire:click="createConversation">
|
||||
{{ __('Send Message') }}
|
||||
</x-jetstream.button>
|
||||
@else
|
||||
<!-- Enabled buttons -->
|
||||
<x-jetstream.button wire:click="payButton" :disabled="!canActiveProfileCreatePayments()">
|
||||
{{ __('Pay') }}
|
||||
</x-jetstream.button>
|
||||
<x-jetstream.button wire:click="createConversation">
|
||||
{{ __('Send Message') }}
|
||||
</x-jetstream.button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@php
|
||||
$showPrivateCalls = $isViewingOwnProfile || $canViewIncomplete;
|
||||
$profileCalls = \App\Http\Livewire\Calls\ProfileCalls::getCallsForProfile($profile, $showPrivateCalls);
|
||||
@endphp
|
||||
@if ($profileCalls->isNotEmpty())
|
||||
<div class="mt-8 mx-2 sm:mx-0">
|
||||
<h3 class="mb-4 text-lg font-medium text-theme-primary">{{ __('Active calls') }}</h3>
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
@foreach ($profileCalls as $index => $result)
|
||||
<x-call-card :result="$result" :index="$index" :show-callable="false" height-class="h-[380px] md:h-[500px] lg:h-[380px]" />
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
@php
|
||||
$social = App\Models\Social::find($socialsOptionSelected);
|
||||
$needsServer = $social && Str::contains($social->url_structure, '#');
|
||||
$canEnable = $social && $userOnSocial && (!$needsServer || $serverOfSocial);
|
||||
@endphp
|
||||
|
||||
<form>
|
||||
<div class="grid col-span3 sm:col-span-3 mt-3">
|
||||
<x-select id="create"
|
||||
placeholder="{{ __('Select social media') }}"
|
||||
wire:model.live="socialsOptionSelected"
|
||||
class="placeholder-gray-300"
|
||||
>
|
||||
@foreach ($socialsOptions as $option)
|
||||
<x-select.option src="{{ Storage::url($option->icon) }}" label="{{ $option->name}}" value="{{ $option->id }}" />
|
||||
@endforeach
|
||||
</x-select>
|
||||
</div>
|
||||
|
||||
<div class="grid col-span3 sm:col-span-3 my-2">
|
||||
@if(App\Models\Social::find($socialsOptionSelected))
|
||||
@if(App\Models\Social::find($socialsOptionSelected)->url_structure === '')
|
||||
<x-jetstream.input wire:model.live="userOnSocial" label="{{ __('Link to your page on social media') }}" placeholder="{{ __('Link or URL address') }}" prefix=" " class="placeholder-gray-300"/>
|
||||
@else
|
||||
<x-jetstream.input wire:model.live="userOnSocial" label="{{ __('Your username on social media') }}" placeholder="{{ __('account-name') }}" prefix="@ " class="placeholder-gray-300 my-2"/>
|
||||
@if(Str::contains(App\Models\Social::find($socialsOptionSelected)->url_structure, '#'))
|
||||
<x-jetstream.input wire:model.live="serverOfSocial" label="{{ __('Server of social media') }}" placeholder="{{ __('server-name.org') }}" prefix="@ " class="placeholder-gray-300"/>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<button
|
||||
wire:click.prevent="store()"
|
||||
class="inline-flex items-center px-4 py-2 bg-gray-100 border border-theme-border rounded-md font-semibold text-xs text-theme-primary uppercase tracking-widest shadow-sm hover:bg-gray-200 hover:text-theme-secondary focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent active:text-theme-primary active:bg-gray-50 disabled:opacity-25 transition"
|
||||
@disabled(!$canEnable)
|
||||
>
|
||||
{{ __('Add social media') }}
|
||||
</button>
|
||||
@if (session()->has('message'))
|
||||
<span x-data="{show: true}" x-init="setTimeout(() => show = false, 2000)" x-show="show" x-transition:leave.opacity.duration.1500ms>
|
||||
<span class="ml-3 text-sm text-theme-secondary">
|
||||
{{ session('message') }}
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,28 @@
|
||||
<form>
|
||||
|
||||
<div class="grid col-span3 sm:col-span-3">
|
||||
<x-select id="update"
|
||||
label=" {{ __('Select social media profile')}}"
|
||||
placeholder="{{$selectedPlaceholder->name}}"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
wire:model.live="socialsOptionSelected"
|
||||
wire:key="{{ $socialsOptionSelected}}.select">
|
||||
@foreach ($socialsOptions as $socialOption)
|
||||
<x-select.user-option src="{{ Storage::url($socialOption->icon) }}" label="{{$socialOption->name}}" value="{{ $socialOption->id }}"/>
|
||||
@endforeach
|
||||
</x-select>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-6 mt-3 mb-3 md:grid-cols-2">
|
||||
<x-jetstream.input wire:model.live="userOnSocial" label="{{ __('Your username on social media') }}" placeholder="{{ __('account-name') }}" prefix="@ " />
|
||||
@if(App\Models\Social::find($socialsOptionSelected))
|
||||
@if(Str::contains(App\Models\Social::find($socialsOptionSelected)->url_structure, '#'))
|
||||
<x-jetstream.input wire:model.live="serverOfSocial" label="{{ __('Server of social media') }}" placeholder="{{ __('server-name.org') }}" prefix="@ " />
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<button wire:click.prevent="update()" class="inline-flex items-center px-4 py-2 mr-3 bg-gray-100 border border-theme-border rounded-md font-semibold text-xs text-theme-primary uppercase tracking-widest shadow-sm hover:bg-gray-200 hover:text-theme-secondary focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent active:text-theme-primary active:bg-gray-50 disabled:opacity-25 transition">{{__('Update')}}</button>
|
||||
<button wire:click.prevent="cancel()" class="inline-flex items-center px-4 py-2 bg-gray-100 border border-theme-border rounded-md font-semibold text-xs text-theme-primary uppercase tracking-widest shadow-sm hover:bg-gray-200 hover:text-theme-secondary focus:outline-none focus:border-theme-accent focus:ring-1 focus:ring-theme-accent active:text-theme-primary active:bg-gray-50 disabled:opacity-25 transition">{{__('Cancel')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
75
resources/views/livewire/profile/socials-form.blade.php
Normal file
75
resources/views/livewire/profile/socials-form.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<div id="updateFocus">
|
||||
<x-label>{{ __('Social media profiles') }}</x-label>
|
||||
<div class="grid col-span3 sm:col-span-3">
|
||||
<table class="table border-none">
|
||||
<tbody>
|
||||
@if ($socials)
|
||||
@foreach ($socials as $value)
|
||||
@php
|
||||
// Determine the display text and URL based on social network type
|
||||
$isBlueSky = $value->id == 3; // Assuming Blue Sky has ID 3
|
||||
$isFullUrl = str_starts_with($value->pivot->user_on_social, 'https://');
|
||||
|
||||
if ($isBlueSky) {
|
||||
// For Blue Sky, the handle already includes the domain (user.bsky.social)
|
||||
$displayText = '@' . $value->pivot->user_on_social;
|
||||
$url = "https://bsky.app/profile/{$value->pivot->user_on_social}";
|
||||
} elseif ($isFullUrl) {
|
||||
// For other services that store full URLs (like WhatsApp links)
|
||||
$displayText = Str::of($value->pivot->user_on_social)->limit(44);
|
||||
$url = $value->pivot->user_on_social;
|
||||
} elseif ($value->pivot->server_of_social) {
|
||||
// For Mastodon and similar services with servers
|
||||
$displayText =
|
||||
'@' . $value->pivot->user_on_social . '@' . $value->pivot->server_of_social;
|
||||
$url =
|
||||
str_replace('#', $value->pivot->server_of_social, $value->url_structure) .
|
||||
$value->pivot->user_on_social;
|
||||
} else {
|
||||
// For standard services (Facebook, Twitter, etc.)
|
||||
$displayText = '@' . $value->pivot->user_on_social;
|
||||
$url = $value->url_structure . $value->pivot->user_on_social;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<tr class="flex mt-3">
|
||||
<td class="flex-none">
|
||||
<img alt="{{ $value->name }}" class="h-5 w-5 sm:mr-3" src="{{ Storage::url($value->icon) }}" />
|
||||
</td>
|
||||
<td class="grow">
|
||||
<a class="text-theme-secondary transition hover:border-theme-primary hover:text-theme-primary focus:border-theme-accent focus:text-theme-primary focus:outline-none"
|
||||
href="{{ $url }}" target="_blank">
|
||||
{{ Str::of($displayText)->limit(43) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<button class="inline-flex items-center px-2 py-1 text-xs uppercase tracking-widest text-theme-secondary transition hover:text-theme-primary focus:rounded-sm focus:border-theme-accent focus:outline-none focus:ring-1 focus:ring-theme-accent active:text-theme-primary disabled:opacity-25"
|
||||
wire:click.prevent="edit({{ $value->pivot->id }})">
|
||||
<x-icon class="h-4 w-4" name="pencil" />
|
||||
</button>
|
||||
<button class="inline-flex items-center px-2 py-1 text-xs uppercase tracking-widest text-theme-secondary transition hover:text-theme-primary focus:rounded-sm focus:border-theme-accent focus:outline-none focus:ring-1 focus:ring-theme-accent active:text-theme-primary disabled:opacity-25"
|
||||
wire:click.prevent="delete({{ $value->pivot->id }})">
|
||||
<x-icon class="h-4 w-4" name="trash" />
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="update">
|
||||
@if (!$updateMode)
|
||||
@include('livewire.profile.socials-form-create')
|
||||
@else
|
||||
@include('livewire.profile.socials-form-update')
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('contentChanged', e => {
|
||||
$("#selected-focus").attr('class', 'text-theme-secondary uppercase');
|
||||
})
|
||||
</script>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<div class="bg-white shadow-xl sm:rounded-lg">
|
||||
<div class="p-6 sm:px-20">
|
||||
|
||||
<div class="my-6">
|
||||
<h3 class="text-lg font-medium text-theme-primary">
|
||||
@if ($this->enabled)
|
||||
{{ __('You have now enabled two factor authentication') }}
|
||||
@else
|
||||
{{ __('You have not enabled two factor authentication') }}
|
||||
@endif
|
||||
</h3>
|
||||
|
||||
@if (!$this->enabled)
|
||||
<div class="mt-3 text-sm text-theme-secondary">
|
||||
<p>
|
||||
{{ __('This is a security risk since you can manage profiles with critical permissions. You should enable two factor authentication now.') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-3 text-right">
|
||||
<x-jetstream.button type="button" wire:click="redirectToSettings" wire:loading.attr="disabled">
|
||||
{{ __('Enable') }}
|
||||
</x-jetstream.button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<x-jetstream.form-section submit="updateMessageSettings">
|
||||
<x-slot name="title">
|
||||
{{ __('Message settings') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __('Update you message settings') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
<div class="col-span-8 sm:col-span-4 !font-normal">
|
||||
<x-jetstream.label for="email-settings" value="{{ __('Emails') }}" />
|
||||
<div class="p-2"></div>
|
||||
|
||||
<x-checkbox id="system_messages" secondary label="{{ __('System messages') }}" wire:model="systemMessage" readonly="true" disabled="true"/>
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
<x-checkbox id="payments" secondary label="{{ __('Payments received') }}" wire:model="paymentReceived"/>
|
||||
@endif
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
<x-checkbox id="stars" secondary label="{{ __('Stars received') }}" wire:model="starReceived"/>
|
||||
@endif
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
<x-checkbox id="call_expiry" secondary label="{{ __('Call expiration notifications') }}" wire:model="callExpiry"/>
|
||||
@endif
|
||||
<div class="p-2"></div>
|
||||
|
||||
<x-checkbox id="local_newsletter" secondary label="{{ __('Local newsletters') }}" wire:model="localNewsletter"/>
|
||||
<x-checkbox id="general_newsletter" secondary label="{{ __('General newsletters') }}" wire:model="generalNewsletter"/>
|
||||
<div class="p-2"></div>
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
<x-checkbox id="personal_chat_messages" secondary label="{{ __('Unread personal chat messages') }}" wire:model="personalChat"/>
|
||||
<x-checkbox id="group_chat_messages" secondary label="{{ __('Unread group chat messages') }}" wire:model="groupChat"/>
|
||||
<div class="p-2"></div>
|
||||
<x-jetstream.label for="unread_chat_delay" value="{{ __('Delay for sending unread chat message emails') }}" />
|
||||
<div class="p-1"></div>
|
||||
<div class="w-28">
|
||||
<x-maskable
|
||||
id="unread_chat_delay"
|
||||
mask="##"
|
||||
suffix="{{ __('hours') }}"
|
||||
placeholder="0"
|
||||
wire:model="chatUnreadDelay"
|
||||
/>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-jetstream.action-message class="mr-3" on="saved">
|
||||
{{ __('Saved') }}
|
||||
</x-jetstream.action-message>
|
||||
|
||||
<x-jetstream.button>
|
||||
{{ __('Save') }}
|
||||
</x-jetstream.button>
|
||||
@error('paymentReceived')
|
||||
<p class="col-span-6 -mt-6 text-sm text-red-500">{{$message}}</p>
|
||||
@enderror
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
@@ -0,0 +1,79 @@
|
||||
<div>
|
||||
|
||||
<x-jetstream.form-section submit="updatePassword">
|
||||
<x-slot name="title">
|
||||
{{ __('Update Password') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __('Ensure your profile is using a long, random password to stay secure.') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
<div class="col-span-6 sm:col-span-4" x-data="{ showPassword: false }">
|
||||
<x-jetstream.label for="current_password" value="{{ __('Current Password') }}" />
|
||||
<div class="relative">
|
||||
<x-jetstream.input id="current_password" ::type="showPassword ? 'text' : 'password'" class="mt-1 block w-full pr-10" wire:model="state.current_password" autocomplete="current-password" />
|
||||
<div class="absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5">
|
||||
<button type="button" @click="showPassword = !showPassword" class="text-gray-500 hover:text-gray-700 focus:outline-none focus:text-gray-700">
|
||||
<template x-if="!showPassword">
|
||||
<x-icon name="eye" class="h-5 w-5" />
|
||||
</template>
|
||||
<template x-if="showPassword">
|
||||
<x-icon name="eye-slash" class="h-5 w-5" />
|
||||
</template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<x-jetstream.input-error for="state.current_password" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-4" x-data="{ showPassword: false }">
|
||||
<x-jetstream.label for="password" value="{{ __('New Password') }}" />
|
||||
<div class="relative">
|
||||
<x-jetstream.input id="password" ::type="showPassword ? 'text' : 'password'" class="mt-1 block w-full pr-10" wire:model="state.password" autocomplete="new-password" />
|
||||
<div class="absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5">
|
||||
<button type="button" @click="showPassword = !showPassword" class="text-gray-500 hover:text-gray-700 focus:outline-none focus:text-gray-700">
|
||||
<template x-if="!showPassword">
|
||||
<x-icon name="eye" class="h-5 w-5" />
|
||||
</template>
|
||||
<template x-if="showPassword">
|
||||
<x-icon name="eye-slash" class="h-5 w-5" />
|
||||
</template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<x-jetstream.input-error for="state.password" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="col-span-6 sm:col-span-4" x-data="{ showPassword: false }">
|
||||
<x-jetstream.label for="password_confirmation" value="{{ __('Confirm Password') }}" />
|
||||
<div class="relative">
|
||||
<x-jetstream.input id="password_confirmation" ::type="showPassword ? 'text' : 'password'" class="mt-1 block w-full pr-10" wire:model="state.password_confirmation" autocomplete="new-password" />
|
||||
<div class="absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5">
|
||||
<button type="button" @click="showPassword = !showPassword" class="text-gray-500 hover:text-gray-700 focus:outline-none focus:text-gray-700">
|
||||
<template x-if="!showPassword">
|
||||
<x-icon name="eye" class="h-5 w-5" />
|
||||
</template>
|
||||
<template x-if="showPassword">
|
||||
<x-icon name="eye-slash" class="h-5 w-5" />
|
||||
</template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<x-jetstream.input-error for="state.password_confirmation" class="mt-2" />
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-jetstream.action-message class="mr-3" on="saved">
|
||||
{{ __('Saved') }}
|
||||
</x-jetstream.action-message>
|
||||
|
||||
<x-jetstream.button>
|
||||
{{ __('Save') }}
|
||||
</x-jetstream.button>
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
<x-jetstream.form-section submit="updateProfilePhone">
|
||||
<x-slot name="title">
|
||||
{{ __('Mobile phone number') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
@if (getActiveProfileType() == 'User')
|
||||
{{ __('Your mobile phone can be used to authorize lost access to your account.') }}
|
||||
{{ trans_with_platform('Choose if @PLATFORM_NAME@ users can also see this phone number. Otherwise your number will be kept private.') }}
|
||||
@else
|
||||
{{ __('A mobile phone number can be used to authorize lost access to your account.') }}
|
||||
{{ trans_with_platform('Choose if @PLATFORM_NAME@ users can also see this phone number. Otherwise your number will be kept private.') }}
|
||||
@endif
|
||||
@else
|
||||
{{ __('A mobile phone number can be used to authorize lost access to your account.') }}
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="col-span-6 -mb-6">
|
||||
<x-jetstream.label for="phone" value="{{ __('Mobile phone') }}" />
|
||||
</div>
|
||||
<div class="">
|
||||
<x-native-select
|
||||
id="phonecode"
|
||||
wire:model="phonecode"
|
||||
:options="$phoneCodeOptions"
|
||||
option-value="code"
|
||||
option-label="label"
|
||||
class="w-6 placeholder-gray-300"
|
||||
>
|
||||
</x-native-select>
|
||||
</div>
|
||||
<div class="col-span-2 -ml-3">
|
||||
<x-input
|
||||
id="phone"
|
||||
placeholder="{{ __('Mobile phone number') }}"
|
||||
wire:model="state.phone"
|
||||
class="placeholder-gray-300"/>
|
||||
</div>
|
||||
|
||||
@if (getActiveProfileType() != 'Admin')
|
||||
@if (isset($state['phone_public']))
|
||||
<div class="col-span-6 ">
|
||||
<x-checkbox id="public-phone" label="{{ trans_with_platform('Visible for registered @PLATFORM_NAME@ users') }}" wire:model.live="state.phone_public"/>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
@error('state.phone')
|
||||
<p class="col-span-6 -mt-6 text-sm text-red-500">{{$message}}</p>
|
||||
@enderror
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
{{ __('Save') }}
|
||||
</x-jetstream.button>
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
@@ -0,0 +1,22 @@
|
||||
<div>
|
||||
<x-jetstream.form-section submit="">
|
||||
<x-slot name="title">
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
<div class="">
|
||||
@livewire('side-post', [
|
||||
'type' => 'SiteContents\User\Edit\Skills' ?? null,
|
||||
'sticky' => false, 'random' => true,
|
||||
'fallbackTitle' => __('Activities and skills'),
|
||||
'fallbackDescription' => __('Add tags to describe the type of work or assistance you are offering at the moment to our community.') ])
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
<livewire:main-page.skills-card-full />
|
||||
</x-slot>
|
||||
|
||||
</x-jetstream.form-section>
|
||||
</div>
|
||||
</div>
|
||||
122
resources/views/livewire/profile/update-settings-form.blade.php
Normal file
122
resources/views/livewire/profile/update-settings-form.blade.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<x-jetstream.form-section submit="updateProfileInformation">
|
||||
<x-slot name="title">
|
||||
{{ __('Credentials') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="description">
|
||||
{{ __('Update your profile information and email address.') }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="form">
|
||||
<!-- Profile Photo -->
|
||||
@if (Laravel\Jetstream\Jetstream::managesProfilePhotos())
|
||||
<div x-data="{photoName: null, photoPreview: null}" class="col-span-6 sm:col-span-4">
|
||||
<!-- Profile Photo File Input -->
|
||||
<input type="file" class="hidden"
|
||||
wire:model.live="photo"
|
||||
x-ref="photo"
|
||||
x-on:change="
|
||||
photoName = $refs.photo.files[0].name;
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
photoPreview = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL($refs.photo.files[0]);
|
||||
" />
|
||||
|
||||
<x-jetstream.label for="photo" value="{{ __('Profile Photo') }}" />
|
||||
|
||||
<!-- Current Profile Photo -->
|
||||
<div class="mt-3 mb-3" x-show="! photoPreview">
|
||||
<img src="{{ Storage::url(Session('activeProfilePhoto')) }}" alt="{{ getActiveProfile()->name }}" class="rounded-full profile-photo h-20 w-20 object-cover shadow outline outline-1 outline-offset-1 outline-gray-500">
|
||||
</div>
|
||||
|
||||
<!-- New Profile Photo Preview -->
|
||||
<div class="mt-3 mb-3" x-show="photoPreview" style="display: none;">
|
||||
<span class="block rounded-full w-20 h-20 bg-cover bg-no-repeat bg-center"
|
||||
x-bind:style="'background-image: url(\'' + photoPreview + '\');'">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<x-jetstream.secondary-button class="mt-2 mr-2" type="button" x-on:click.prevent="$refs.photo.click()">
|
||||
{{ __('Change Photo') }}
|
||||
</x-jetstream.secondary-button>
|
||||
|
||||
@if (getActiveProfile()->profile_photo_path)
|
||||
<x-jetstream.secondary-button type="button" class="mt-2" wire:click="deleteProfilePhoto">
|
||||
{{ __('Delete Photo') }}
|
||||
</x-jetstream.secondary-button>
|
||||
@endif
|
||||
|
||||
<x-jetstream.input-error for="photo" class="mt-2" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Full Name -->
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-jetstream.label for="full_name" value="{{ __('Full name') }}" />
|
||||
@if(getActiveProfile() instanceof \App\Models\User)
|
||||
<x-jetstream.input id="full_name" type="text" class="mt-1 block w-full text-theme-muted
|
||||
bg-gray-100 bg-clip-padding
|
||||
border border-solid border-theme-border"
|
||||
wire:model="state.full_name"
|
||||
placeholder="{{__('Your real, full name, only visible for') . ' ' . __('messages.platform_users')}}"
|
||||
autocomplete="name" disabled />
|
||||
@else
|
||||
<x-jetstream.input id="full_name" type="text" class="mt-1 block w-full"
|
||||
wire:model="state.full_name"
|
||||
placeholder="{{__('Your real, full name, only visible for') . ' ' . __('messages.platform_users')}}"
|
||||
autocomplete="name" />
|
||||
@endif
|
||||
<x-jetstream.input-error for="state.full_name" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Username -->
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-jetstream.label for="name" value="{{ __('Username') }}" />
|
||||
<x-jetstream.input id="name" type="text" class="mt-1 block w-full text-theme-muted
|
||||
bg-gray-100 bg-clip-padding
|
||||
border border-solid border-theme-border"
|
||||
wire:model="state.name"
|
||||
placeholder="{{__('Unique and public name, also used outside this platform')}}"
|
||||
autocomplete="username" disabled />
|
||||
<x-jetstream.input-error for="name" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div class="col-span-6 sm:col-span-4">
|
||||
<x-jetstream.label for="email" value="{{ __('Email') }}" />
|
||||
<x-jetstream.input id="email" type="email" class="mt-1 block w-full" wire:model="state.email" />
|
||||
<x-jetstream.input-error for="state.email" class="mt-2" />
|
||||
|
||||
|
||||
<!-- Email verification for Org, Bank, Admin -->
|
||||
@if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::emailVerification()) && ! getActiveProfile()->hasVerifiedEmail())
|
||||
<p class="text-sm mt-2">
|
||||
{{ __('Your email address is unverified.') }}
|
||||
|
||||
<button type="button" class="underline text-sm text-theme-secondary hover:text-theme-primary" wire:click.prevent="sendEmailVerification">
|
||||
{{ __('Click here to re-send the verification email.') }}
|
||||
</button>
|
||||
</p>
|
||||
|
||||
@if ($verificationLinkSent)
|
||||
<p v-show="verificationLinkSent" class="mt-2 font-medium text-sm text-green-600">
|
||||
{{ __('A new verification link has been sent to your email address.') }}
|
||||
</p>
|
||||
@endif
|
||||
@endif
|
||||
</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="photo">
|
||||
{{ __('Save') }}
|
||||
</x-jetstream.button>
|
||||
</x-slot>
|
||||
</x-jetstream.form-section>
|
||||
Reference in New Issue
Block a user