refactor(enums): menghapus icon dan menyesuaikan di inputnya
This commit is contained in:
parent
c0a14e26a4
commit
6b0fbe47c2
@ -26,12 +26,4 @@ public function color()
|
|||||||
self::FEMALE => 'pink',
|
self::FEMALE => 'pink',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon()
|
|
||||||
{
|
|
||||||
return match ($this) {
|
|
||||||
self::MALE => 'mars',
|
|
||||||
self::FEMALE => 'venus',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,12 +27,4 @@ public function color()
|
|||||||
self::INACTIVE => 'red',
|
self::INACTIVE => 'red',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon()
|
|
||||||
{
|
|
||||||
return match ($this) {
|
|
||||||
self::ACTIVE => 'check-circle',
|
|
||||||
self::INACTIVE => 'x-circle',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,13 +30,4 @@ public function color()
|
|||||||
self::TERMINATED => 'red',
|
self::TERMINATED => 'red',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon()
|
|
||||||
{
|
|
||||||
return match ($this) {
|
|
||||||
self::OPERATIONAL => 'check-circle',
|
|
||||||
self::UNDER_CONSTRUCTION => 'wrench-screwdriver',
|
|
||||||
self::TERMINATED => 'x-circle',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,13 +30,4 @@ public function color()
|
|||||||
self::SUSPENDED => 'red',
|
self::SUSPENDED => 'red',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon()
|
|
||||||
{
|
|
||||||
return match ($this) {
|
|
||||||
self::ACTIVE => 'check-circle',
|
|
||||||
self::INACTIVE => 'x-circle',
|
|
||||||
self::SUSPENDED => 'ban',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,12 +27,4 @@ public function color()
|
|||||||
self::PERCENTAGE => 'pink',
|
self::PERCENTAGE => 'pink',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon()
|
|
||||||
{
|
|
||||||
return match ($this) {
|
|
||||||
self::FIXED => 'currency-dollar',
|
|
||||||
self::PERCENTAGE => 'percent-badge',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class="transition-all duration-500 ease-in-out {{ $currentStep === $step['id'] ?
|
|||||||
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1"
|
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1"
|
||||||
label="Jenis Kelamin">
|
label="Jenis Kelamin">
|
||||||
@foreach (\App\Enums\Gender::cases() as $gender)
|
@foreach (\App\Enums\Gender::cases() as $gender)
|
||||||
<flux:radio value="{{ $gender->value }}" icon="{{ $gender->icon() }}">
|
<flux:radio value="{{ $gender->value }}">
|
||||||
{{ $gender->label() }}
|
{{ $gender->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<flux:label>Jenis Kelamin <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Jenis Kelamin <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1">
|
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\Gender::cases() as $gender)
|
@foreach (\App\Enums\Gender::cases() as $gender)
|
||||||
<flux:radio value="{{ $gender->value }}" icon="{{ $gender->icon() }}">
|
<flux:radio value="{{ $gender->value }}">
|
||||||
{{ $gender->label() }}
|
{{ $gender->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class="**:data-[slot=content]:min-h-[100px]!" />
|
|||||||
<flux:label>Jumlah Diskon <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Jumlah Diskon <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:radio.group wire:model.live="form.type" variant="buttons" class="w-full *:flex-1">
|
<flux:radio.group wire:model.live="form.type" variant="buttons" class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\VoucherType::cases() as $item)
|
@foreach (\App\Enums\VoucherType::cases() as $item)
|
||||||
<flux:radio value="{{ $item->value }}" icon="{{ $item->icon() }}">
|
<flux:radio value="{{ $item->value }}">
|
||||||
{{ $item->label() }}
|
{{ $item->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -135,7 +135,7 @@ class="**:data-[slot=content]:min-h-[100px]!" />
|
|||||||
<flux:radio.group wire:model.live="form.is_active" variant="buttons"
|
<flux:radio.group wire:model.live="form.is_active" variant="buttons"
|
||||||
class="w-full *:flex-1">
|
class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\IsActive::cases() as $item)
|
@foreach (\App\Enums\IsActive::cases() as $item)
|
||||||
<flux:radio value="{{ $item->value }}" icon="{{ $item->icon() }}">
|
<flux:radio value="{{ $item->value }}">
|
||||||
{{ $item->label() }}
|
{{ $item->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@ -80,7 +80,7 @@
|
|||||||
<flux:radio.group wire:model.live="form.status" variant="buttons"
|
<flux:radio.group wire:model.live="form.status" variant="buttons"
|
||||||
class="w-full *:flex-1">
|
class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\OutletStatus::cases() as $status)
|
@foreach (\App\Enums\OutletStatus::cases() as $status)
|
||||||
<flux:radio value="{{ $status->value }}" icon="{{ $status->icon() }}">
|
<flux:radio value="{{ $status->value }}">
|
||||||
{{ $status->label() }}
|
{{ $status->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@ -97,7 +97,7 @@
|
|||||||
<flux:label>Jenis Kelamin <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Jenis Kelamin <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1">
|
<flux:radio.group wire:model.live="form.gender" variant="buttons" class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\Gender::cases() as $gender)
|
@foreach (\App\Enums\Gender::cases() as $gender)
|
||||||
<flux:radio value="{{ $gender->value }}" icon="{{ $gender->icon() }}">
|
<flux:radio value="{{ $gender->value }}">
|
||||||
{{ $gender->label() }}
|
{{ $gender->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<flux:label>Status <span class="text-red-500 ms-1">*</span></flux:label>
|
<flux:label>Status <span class="text-red-500 ms-1">*</span></flux:label>
|
||||||
<flux:radio.group wire:model.live="form.status" variant="buttons" class="w-full *:flex-1">
|
<flux:radio.group wire:model.live="form.status" variant="buttons" class="w-full *:flex-1">
|
||||||
@foreach (\App\Enums\UserStatus::cases() as $status)
|
@foreach (\App\Enums\UserStatus::cases() as $status)
|
||||||
<flux:radio value="{{ $status->value }}" icon="{{ $status->icon() }}">
|
<flux:radio value="{{ $status->value }}">
|
||||||
{{ $status->label() }}
|
{{ $status->label() }}
|
||||||
</flux:radio>
|
</flux:radio>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user