fix(user): membuat address menjadi nullable

This commit is contained in:
Yoga Pangestu 2025-11-13 11:32:34 +07:00
parent 2f0a8fe2c6
commit dc7617a269
3 changed files with 6 additions and 10 deletions

View File

@ -53,7 +53,7 @@ public function rules(): array
'base_salary' => ['required', new UnsignedInteger],
'birthdate' => ['required', 'date', 'before:'.Carbon::now()->subYears(18)->format('Y-m-d')],
'hire_date' => ['required', 'date'],
'address' => ['required', 'string'],
'address' => ['nullable', 'string'],
'gender' => ['required', Rule::in(Gender::cases())],
'status' => ['required', Rule::in(UserStatus::cases())],
'outlet_ids' => ['required', 'array', 'min:1'],

View File

@ -21,7 +21,7 @@ public function up(): void
$table->string('phone_number', 20);
$table->unsignedInteger('base_salary')->default(0);
$table->enum('gender', [Gender::values()])->comment(Gender::comment());
$table->text('address');
$table->text('address')->nullable();
$table->date('birthdate');
$table->date('hire_date');
$table->date('resign_date')->nullable();

View File

@ -78,14 +78,10 @@
</flux:field>
<div class="md:col-span-2">
<flux:field>
<flux:label>Alamat <span class="text-red-500 ms-1">*</span></flux:label>
<flux:textarea
placeholder="Jl. Taman Pahlawan No.41, Nagri Kaler, Kec. Purwakarta, Kabupaten Purwakarta, Jawa Barat 41119"
wire:model.live.debounce.500ms="form.address" autocomplete="off"
rows="2" />
<flux:error name="form.address" />
</flux:field>
<flux:textarea label="Alamat"
placeholder="Jl. Taman Pahlawan No.41, Nagri Kaler, Kec. Purwakarta, Kabupaten Purwakarta, Jawa Barat 41119"
wire:model.live.debounce.500ms="form.address" autocomplete="off"
rows="2" />
</div>
</div>
</flux:card>