refactor: fix validation for add gacha roll item

- Pisahkan type dan schema untuk gacha roll item
- Perbaiki validasi gacha roll item
- Parsing angka pada component ControlledInputField
- Update type number untuk component Input dan InputField
This commit is contained in:
Hafid Nur
2025-04-05 07:39:57 +07:00
parent 885d156833
commit 3958ae1098
8 changed files with 58 additions and 27 deletions
@@ -78,7 +78,8 @@ const StepOne = ({ nextStep }: IStepOneProps) => {
control={form.control}
label="Quantity"
name="quantity"
type="text"
type="number"
min={1}
placeholder="Masukkan Kuantitas Item"
size="lg"
className="w-full"
@@ -87,8 +88,12 @@ const StepOne = ({ nextStep }: IStepOneProps) => {
control={form.control}
label="Chance Rate"
name="chanceRate"
type="text"
placeholder="Masukkan Chance Rate (0.1 - 1)"
type="number"
value={0.1}
min={0.1}
step={0.1}
max={1}
placeholder="Masukkan Chance Rate (0,1 - 1)"
size="lg"
className="w-full"
/>