-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Middleware can manage for seeing users etc
- Loading branch information
1 parent
a491506
commit a4ad8de
Showing
2 changed files
with
61 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,64 @@ | ||
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8"> | ||
@if (session()->has('message')) | ||
<div class="bg-green-100 mb-4 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert"> | ||
<span class="block sm:inline">{{ session('message') }}</span> | ||
</div> | ||
@endif | ||
<div class="p-2 md:p-0 md:py-4"> | ||
<x-slot name="header"> | ||
<h2 class="text-gray-800 flex items-center gap-4 leading-tight"> | ||
<i class="fas text-green-500 fa-shopping-bag"></i> | ||
{{ __('Edit User') }} | ||
</h2> | ||
</x-slot> | ||
|
||
<form wire:submit.prevent="save" enctype="multipart/form-data"> | ||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2"> | ||
<div> | ||
<label for="name" class="block text-sm font-medium text-gray-700">Name</label> | ||
<input type="text" wire:model="name" id="name" class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" required> | ||
@error('name') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
<div class="max-w-7xl relative h-full mx-auto"> | ||
<div class="flex gap-4 sm:mx-3 lg:mx-4 flex-col h-full md:flex-row"> | ||
<div class="bg-white p-6 relative md:w-2/3 rounded-lg shadow-sm"> | ||
@if (session()->has('message')) | ||
<div class="bg-green-100 mb-4 border border-green-400 text-green-700 px-4 py-3 rounded relative" | ||
role="alert"> | ||
<span class="block sm:inline">{{ session('message') }}</span> | ||
</div> | ||
@endif | ||
|
||
<div> | ||
<label for="phone" class="block text-sm font-medium text-gray-700">Phone</label> | ||
<input type="text" wire:model="phone" id="phone" class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
@error('phone') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
<form wire:submit.prevent="save" enctype="multipart/form-data"> | ||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2"> | ||
<div> | ||
<label for="name" class="block text-sm font-medium text-gray-700">Name</label> | ||
<input type="text" wire:model="name" id="name" | ||
class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" required> | ||
@error('name') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
|
||
<div> | ||
<label for="location" class="block text-sm font-medium text-gray-700">Location</label> | ||
<input type="text" wire:model="location" id="location" class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
@error('location') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
<div> | ||
<label for="phone" class="block text-sm font-medium text-gray-700">Phone</label> | ||
<input type="text" wire:model="phone" id="phone" | ||
class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
@error('phone') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
|
||
<div> | ||
<label for="role" class="block text-sm font-medium text-gray-700">Role</label> | ||
<select wire:model="role" id="role" class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
<option value="writer">Writer</option> | ||
<option value="client">Client</option> | ||
<option value="admin">Admin</option> | ||
</select> | ||
@error('role') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
</div> | ||
<div> | ||
<label for="location" class="block text-sm font-medium text-gray-700">Location</label> | ||
<input type="text" wire:model="location" id="location" | ||
class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
@error('location') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
|
||
<div class="mt-6"> | ||
<button type="submit" class="inline-flex items-center px-4 py-2 bg-blue-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-blue-500 focus:outline-none focus:border-blue-700 focus:ring focus:ring-blue-200 active:bg-blue-600 disabled:opacity-25 transition"> | ||
Save | ||
</button> | ||
<div> | ||
<label for="role" class="block text-sm font-medium text-gray-700">Role</label> | ||
<select wire:model="role" id="role" | ||
class="mt-1 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | ||
<option value="writer">Writer</option> | ||
<option value="client">Client</option> | ||
<option value="admin">Admin</option> | ||
</select> | ||
@error('role') <span class="text-red-500 text-sm">{{ $message }}</span> @enderror | ||
</div> | ||
</div> | ||
|
||
<div class="mt-6"> | ||
<button type="submit" | ||
class="inline-flex items-center px-4 py-2 bg-blue-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-blue-500 focus:outline-none focus:border-blue-700 focus:ring focus:ring-blue-200 active:bg-blue-600 disabled:opacity-25 transition"> | ||
Save | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters