%PDF- %PDF-
Direktori : /www/loslex/production/resources/views/organizers/ |
Current File : /www/loslex/production/resources/views/organizers/show.blade.php |
<x-app-layout> @push('scripts') <script type="module"> $(document).ready(function() { $('#user_id').select2({ width: '100%', language: { noResults: function(){return ' {{ __('No results found') }}';}}, dropdownCssClass: ':all:', selectionCssClass: ':all:' }); }); </script> @endpush @push('footerelements') <x-modal name="add-organizer-member" :show="$errors->addOrgMember->isNotEmpty()" focusable> <form method="POST" action="{{ route('orgmember.store') }}" class="p-6"> @csrf <input type="hidden" name="organizer_group_id" value="{{ $group->id }}" /> <div class="mt-6"> <x-input-label for="user_id" value="{{ __('Add new member') }}" /> <x-select name="user_id" id="user_id"> <option value="">{{ __('Select person') }}</option> @foreach ($users as $user)<option @selected(old('user_id') == $user->id) value="{{ $user->id }}">{{$user->username}} - {{ $user->displayname }}</option>@endforeach </x-select> <x-input-error :messages="$errors->addOrgMember->get('user_id')" class="mt-2" /> </div> <div class="mt-6 flex justify-end"> <x-secondary-button x-on:click="$dispatch('close')">{{ __('Cancel') }}</x-secondary-button> <x-primary-button class="ml-3">{{ __('Save') }}</x-button> </div> </form> </x-modal> @endpush <x-slot name="pagetitle">{{ __('Organizer group') . ' - ' . $group->name }}</x-slot> <x-slot name="header"><h2 class="text-gray-800 dark:text-gray-200 leading-tight">{{ __("Organizer group") }}</h2></x-slot> <div class="text-center space-x-2 mb-4"> <x-primary-button x-data="" x-on:click.prevent="$dispatch('open-modal', 'add-organizer-member')">{{ __('Add new member') }}</x-primary-button> </div> <table class="mx-auto table-auto"> <thead> <tr class="bg-zinc-300 dark:bg-zinc-800"> <th colspan="2" class="text-lg px-2">{{ $group->name }}</th> {{-- <th class="px-2"></th> --}} </tr> <input type="hidden" name="organizer_group_id" value="{{ $group->id }}" /> </thead> <tbody> @foreach ($group->users as $member) <tr class="odd:bg-gray-100 dark:odd:bg-gray-700 text-center text-sm"> <td class="px-2">{{ $member->displayname }} <span class="text-xs">({{ $member->username}})</span></td> <td class="px-2"> <form method="post" action="{{ route('orgmember.destroy', $member->pivot->id) }}"> @csrf @method('DELETE') <button type="submit" class="fa-solid fa-square-xmark text-red-500"></button> </form> </td> </tr> @endforeach </tbody> </table> <div class="text-center mt-2"><a href="{{route('organizer.index')}}">{{__('Back')}}</a></div> </x-app-layout>