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
ec936265
Commit
ec936265
authored
May 10, 2021
by
Mohammad Dwikurnia Apriadi
Browse files
[REFACTOR] Mengubah posisi form satuan
parent
1803369e
Pipeline
#76276
passed with stages
in 3 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/page/produk/FormProduk.jsx
View file @
ec936265
...
...
@@ -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
}
/>
...
...
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