File manager - Edit - /var/www/ratemypay/resources/views/components/network/request-card.blade.php
Back
@props(['user']) <div x-data="{ isVisible: true, isLoading: false, async handleRequest(action) { this.isLoading = true; const url = action === 'accept' ? '{{ route('network.accept', $user->id) }}' : '{{ route('network.ignore', $user->id) }}'; try { const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': '{{ csrf_token() }}' } }); if (response.ok) { this.isVisible = false; } } catch (error) { console.error('Action failed:', error); } finally { this.isLoading = false; } } }" x-show="isVisible" x-transition:leave="transition ease-in duration-300" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-90" class="bg-white rounded-xl border-2 border-[#2F3D7E]/10 p-6 hover:shadow-md transition-shadow relative overflow-hidden h-full flex flex-col" > {{-- Decorative Left Border --}} <div class="absolute top-0 left-0 w-1 h-full bg-[#2F3D7E] z-10"></div> {{-- Header Section --}} <div class="flex justify-between items-start mb-4 w-full"> <div class="flex gap-3 items-center min-w-0 flex-1 mr-2"> {{-- Avatar --}} <div class="relative flex h-12 w-12 shrink-0 overflow-hidden rounded-full bg-blue-50 text-[#2F3D7E]"> <div class="flex h-full w-full items-center justify-center rounded-full bg-blue-50 font-bold text-[#2F3D7E]"> {{ strtoupper(substr($user->nickname, 0, 2)) }} </div> </div> <div class="min-w-0"> <h3 class="font-bold text-gray-900 text-sm truncate"> {{ '@' . $user->nickname }} </h3> <p class="text-xs text-gray-500 truncate">{{ $user->companyType }}</p> </div> </div> {{-- Badge (shrink-0 ensures it never gets pushed out/hidden) --}} <div class="shrink-0 inline-flex items-center rounded-full border border-blue-100 px-2.5 py-0.5 text-xs font-semibold bg-blue-50 text-[#2F3D7E]"> Request </div> </div> {{-- Info Section --}} <div class="mb-6 flex-1"> <div class="text-lg font-semibold text-[#2F3D7E] mb-1 truncate">{{ $user->role }}</div> <div class="flex items-center gap-4 text-xs text-gray-500"> <div class="flex items-center gap-1 min-w-0"> <svg class="w-3 h-3 shrink-0" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"/><circle cx="12" cy="10" r="3"/></svg> <span class="truncate">{{ $user->location }}</span> </div> </div> </div> {{-- Action Buttons --}} <div class="flex gap-2 mt-auto"> {{-- Accept Button --}} <button @click="handleRequest('accept')" :disabled="isLoading" class="flex-1 inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:opacity-50 h-9 px-3 bg-[#2F3D7E] hover:bg-[#232d5e] text-white shadow-sm" > <span x-show="!isLoading" class="flex items-center gap-2"> <svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg> Accept </span> <span x-show="isLoading" style="display: none;">...</span> </button> {{-- Ignore Button --}} <button @click="handleRequest('ignore')" :disabled="isLoading" class="flex-1 inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors border border-gray-200 text-gray-500 hover:text-red-600 hover:bg-red-50 h-9 px-3 bg-white" > <span class="flex items-center gap-2"> <svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg> Ignore </span> </button> </div> </div>
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings