Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Last active November 26, 2020 01:17
Show Gist options
  • Save NandoKstroNet/fdb0c5c14e88e7b61e0d5d1b5713ac66 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/fdb0c5c14e88e7b61e0d5d1b5713ac66 to your computer and use it in GitHub Desktop.
View Componente Edita Expense do curso Livewire na Prática da http://codeexperts.com.br
<div class="max-w-7xl mx-auto py-15 px-4">
<x-slot name="header">
Criar Registro
</x-slot>
@include('includes.message')
<form action="" wire:submit.prevent="updateExpense" class="w-full max-w-7xl mx-auto">
<div class="flex flex-wrap -mx-3 mb-6">
<p class="w-full px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">Descrição Registro</label>
<input type="text" name="description" wire:model="description"
class="block appearance-none w-full bg-gray-200 border @error('description') border-red-500 @else border-gray-200 @enderror text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
@error('description')
<h5 class="text-red-500 text-xs italic">{{$message}}</h5>
@enderror
</p>
<p class="w-full px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">Valor do Registro</label>
<input type="text" name="amount" wire:model="amount"
class="block appearance-none w-full bg-gray-200 border @error('amount') border-red-500 @else border-gray-200 @enderror text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
@error('amount')
<h5 class="text-red-500 text-xs italic">{{$message}}</h5>
@enderror
</p>
<p class="w-full px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">Tipo do Registro</label>
<select name="type" id="" wire:model="type" class="block appearance-none w-full bg-gray-200 border @error('type') border-red-500 @else border-gray-200 @enderror text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
<option value="">Selecione o tipo do registro: Entrada ou Saída...</option>
<option value="1">Entrada</option>
<option value="2">Saída</option>
</select>
@error('type')
<h5 class="text-red-500 text-xs italic">{{$message}}</h5>
@enderror
</p>
</div>
<div class="w-full py-4 px-3 mb-6 md:mb-0">
<button type="submit"
class="flex-shrink-0 bg-teal-500 hover:bg-teal-700 border-teal-500 hover:border-teal-700 text-sm border-4 text-white py-1 px-2 rounded">Criar Registro</button>
</div>
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment