@extends('admin.layout.master') @section('open-executive', 'open') @section('menu-executive', 'bg-gradient-to-r from-[#53BF6A] to-[#275931] text-white') @section('menu-executive-karyawan', 'bg-gradient-to-r from-[#53BF6A] to-[#275931] text-white') @section('addCss') @endsection @section('content') @php $canEditEmployee = auth()->user()->can('edit karyawan'); $canReadEmployee = auth()->user()->can('baca karyawan'); $isReadOnly = !$canEditEmployee; $inputClass = $isReadOnly ? 'w-full rounded-2xl border border-slate-200 bg-slate-100 px-4 py-3 text-sm text-slate-900 readonly-style' : 'w-full rounded-2xl border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-900 focus:bg-white focus:outline-none focus:ring-4 focus:ring-blue-600/20 focus:border-blue-300'; @endphp Karyawan / Edit Karyawan Edit Karyawan Perbarui data karyawan di bawah ini. @csrf @method('PUT') Foto Profil @if ($isReadOnly) @if ($profileImage) @else Tidak ada foto profil @endif @else @endif @error('profile_image') {{ $message }} @enderror Nama @error('name') {{ $message }} @enderror Tanggal Lahir @error('birthday') {{ $message }} @enderror Email @error('email') {{ $message }} @enderror No. Hp @error('phone') {{ $message }} @enderror Jabatan @error('position') {{ $message }} @enderror Gudang -- Pilih Gudang -- @foreach ($warehouses as $warehouse) warehouse_id) == $warehouse->id ? 'selected' : '' }}> {{ $warehouse->name }} @endforeach @if ($isReadOnly) @endif @error('warehouse_id') {{ $message }} @enderror Negara -- Select Country -- @foreach ($countries as $country) country ?? 'Indonesia') == $country['countryName'] ? 'selected' : '' }}> {{ $country['countryName'] }} @endforeach @if ($isReadOnly) @endif @error('country') {{ $message }} @enderror Provinsi -- Pilih Provinsi -- @if ($isReadOnly) @endif @error('province') {{ $message }} @enderror Kota -- Pilih Kota -- @if ($isReadOnly) @endif @error('city') {{ $message }} @enderror Kode Pos @error('postal_code') {{ $message }} @enderror Alamat Lengkap {{ old('address', $employee->address) }} @error('address') {{ $message }} @enderror @if (!$isReadOnly) Update @endif @endsection @section('addJs') @if (!$isReadOnly) @endif @if (session('success')) @endif @if (session('error')) @endif @endsection
Perbarui data karyawan di bawah ini.
{{ $message }}