Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
pilar
pilar-web
Commits
fe734e1b
Commit
fe734e1b
authored
Mar 13, 2021
by
Azhar Difa Arnanda
Browse files
Bug fix: undefined stock in add new product
parent
327859f0
Pipeline
#63736
passed with stages
in 8 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
package-lock.json
View file @
fe734e1b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/page/produk/FormProduk.jsx
View file @
fe734e1b
...
...
@@ -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
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment