Membuat Nomor KJPP menjadi otomatis

This commit is contained in:
2024-09-30 17:44:07 +07:00
parent 6558d8348b
commit 7d8d3c21e9
2 changed files with 10 additions and 2 deletions

View File

@@ -32,7 +32,7 @@
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('code') border-danger @enderror" type="text" name="code"
value="{{ $kjpp->code ?? old('code') }}">
value="{{ isset($kjpp->id) ? $kjpp->code : (empty($kjpp->id) ? $fullKjppNumber : old('code')) }}">
@error('code')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror