Fakultas Ilmu Komputer UI

Commit ec936265 authored by Mohammad Dwikurnia Apriadi's avatar Mohammad Dwikurnia Apriadi
Browse files

[REFACTOR] Mengubah posisi form satuan

parent 1803369e
Pipeline #76276 passed with stages
in 3 minutes and 33 seconds
......@@ -90,6 +90,16 @@ const FormProduk = ({ onSubmit, initialData = null }) => {
/>
{errors.name && <ErrorDiv>Nama Produk tidak boleh kosong</ErrorDiv>}
</RowInput>
<RowInput>
<LabelInput htmlFor="unit">Satuan
<span css={css`color:red`}>*</span></LabelInput>
<InputForm
data-testid="unit-produk-input"
name="unit"
ref={register({ required: true })}
/>
{errors.unit && <ErrorDiv>Satuan Produk tidak boleh kosong</ErrorDiv>}
</RowInput>
{results === undefined || Object.keys(results).length === 0 ? null : (
<RowInput>
<LabelInput htmlFor="name">Kategori
......@@ -180,16 +190,6 @@ const FormProduk = ({ onSubmit, initialData = null }) => {
/>
{errors.stock && <ErrorDiv>Stok Produk tidak boleh kosong</ErrorDiv>}
</RowInput>
<RowInput>
<LabelInput htmlFor="unit">Satuan
<span css={css`color:red`}>*</span></LabelInput>
<InputForm
data-testid="unit-produk-input"
name="unit"
ref={register({ required: true })}
/>
{errors.unit && <ErrorDiv>Satuan Produk tidak boleh kosong</ErrorDiv>}
</RowInput>
<RowInput>
<LabelInput htmlFor="gambar">Foto Produk </LabelInput>
<InputForm type="file" name="image" ref={register} />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment