36 lines
2.3 KiB
PHP
36 lines
2.3 KiB
PHP
|
|
@extends('layouts.app')
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="max-w-3xl mx-auto px-4 py-8">
|
||
|
|
<div class="mb-6 flex items-center space-x-3">
|
||
|
|
<a href="{{ route('admin.departments.index') }}" class="text-slate-400 hover:text-indigo-600 transition-colors">
|
||
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
|
||
|
|
</a>
|
||
|
|
<h2 class="text-2xl font-bold text-slate-800 tracking-tight">Tambah Departemen Baru</h2>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 overflow-hidden">
|
||
|
|
<form action="{{ route('admin.departments.store') }}" method="POST" class="p-6 sm:p-8 space-y-6">
|
||
|
|
@csrf
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="name" class="block text-sm font-bold text-slate-700 mb-2">Nama Departemen <span class="text-red-500">*</span></label>
|
||
|
|
<input type="text" name="name" id="name" value="{{ old('name') }}" required placeholder="Contoh: Quality Assurance"
|
||
|
|
class="w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:bg-white focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-600 transition-all">
|
||
|
|
@error('name') <span class="text-xs text-red-500 mt-1 block">{{ $message }}</span> @enderror
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div>
|
||
|
|
<label for="code" class="block text-sm font-bold text-slate-700 mb-2">Kode Departemen</label>
|
||
|
|
<input type="text" name="code" id="code" value="{{ old('code') }}" placeholder="Contoh: QA"
|
||
|
|
class="w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl focus:bg-white focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-600 transition-all uppercase">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="pt-4 flex justify-end space-x-3 border-t border-slate-100">
|
||
|
|
<a href="{{ route('admin.departments.index') }}" class="px-5 py-2.5 text-sm font-semibold text-slate-600 hover:bg-slate-100 rounded-xl transition-colors">Batal</a>
|
||
|
|
<button type="submit" class="px-5 py-2.5 text-sm font-semibold text-white bg-indigo-600 hover:bg-indigo-700 rounded-xl shadow-md transition-all">Simpan Departemen</button>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
@endsection
|