Fakultas Ilmu Komputer UI

Commit 95259eaf authored by Azhar Difa Arnanda's avatar Azhar Difa Arnanda 💬
Browse files

Merge branch 'hotfix' into 'master'

Bug fix: undefined stock in add new product

See merge request !2
parents 327859f0 fe734e1b
Pipeline #63737 passed with stages
in 6 minutes and 52 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -22,7 +22,7 @@ const FormProduk = ({ onSubmit, initialData = null }) => {
subcategory: initialData["subcategory"],
description: initialData["description"],
price: initialData["price"].split(".")[0],
stock: initialData["stock"],
stock: initialData["stock"].split(".")[0],
modal: initialData["modal"].split(".")[0],
}
: {},
......@@ -158,6 +158,7 @@ const FormProduk = ({ onSubmit, initialData = null }) => {
data-testid="stock-produk-input"
type="number"
name="stock"
ref={register({ required: true })}
/>
{errors.stock && <ErrorDiv>Stok Produk tidak boleh kosong</ErrorDiv>}
</RowInput>
......
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