Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
Aqbits Trace Code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mai Thanh Cong
Aqbits Trace Code
Commits
3b453e46
Commit
3b453e46
authored
Jul 12, 2021
by
Mai Thanh Cong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update css in add product
parent
a0f105fb
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
43 deletions
+32
-43
src/components/Navbars/DemoNavbar.js
src/components/Navbars/DemoNavbar.js
+4
-4
src/components/Profile/AddDiary.js
src/components/Profile/AddDiary.js
+0
-9
src/components/Profile/AddProduct.js
src/components/Profile/AddProduct.js
+8
-7
src/components/Profile/AddProfile.js
src/components/Profile/AddProfile.js
+10
-12
src/components/Profile/DetailProfile.js
src/components/Profile/DetailProfile.js
+2
-2
src/components/Profile/Tracecode.js
src/components/Profile/Tracecode.js
+2
-2
src/services/ForgotPassword.js
src/services/ForgotPassword.js
+1
-1
src/services/ResetPassword.js
src/services/ResetPassword.js
+1
-1
src/services/Signin.js
src/services/Signin.js
+1
-1
src/services/Signup.js
src/services/Signup.js
+3
-3
src/views/IndexSections/Table.js
src/views/IndexSections/Table.js
+0
-1
No files found.
src/components/Navbars/DemoNavbar.js
View file @
3b453e46
...
...
@@ -273,12 +273,12 @@ const DemoNavbar = () => {
<
Nav
className
=
"
navbar-nav-hover align-items-lg-center ml-lg-auto
"
navbar
>
<
UncontrolledDropdown
nav
>
<
DropdownToggle
nav
>
<
div
class
=
"
media align-items-center
"
>
<
span
class
=
"
avatar avatar-sm rounded-circle
"
>
<
div
class
Name
=
"
media align-items-center
"
>
<
span
class
Name
=
"
avatar avatar-sm rounded-circle
"
>
<
img
alt
=
"
Image placeholder
"
src
=
{
require
(
"
assets/img/theme/team-4-800x800.jpg
"
)}
/
>
<
/span
>
<
div
class
=
"
media-body ml-2 d-none d-lg-block
"
>
<
span
class
=
"
mb-0 text-sm font-weight-bold
"
>
John
Snow
<
/span
>
<
div
class
Name
=
"
media-body ml-2 d-none d-lg-block
"
>
<
span
class
Name
=
"
mb-0 text-sm font-weight-bold
"
>
John
Snow
<
/span
>
<
/div
>
<
/div
>
<
/DropdownToggle
>
...
...
src/components/Profile/AddDiary.js
deleted
100644 → 0
View file @
a0f105fb
import
React
from
"
react
"
;
const
AddDiary
=
()
=>
{
return
(
<
div
><
/div
>
);
}
export
default
AddDiary
;
\ No newline at end of file
src/components/Profile/AddProduct.js
View file @
3b453e46
...
...
@@ -29,9 +29,6 @@ const AddProduct = () => {
history
.
push
(
"
/profile/add
"
);
}
const
newData
=
dummyData
.
data
.
filter
(
item
=>
item
.
id
===
profileId
);
console
.
log
(
"
newData
"
,
newData
);
const
onHandleAddProduct
=
(
event
)
=>
{
event
.
preventDefault
();
const
getTime
=
new
Date
().
getTime
();
...
...
@@ -49,9 +46,7 @@ const AddProduct = () => {
}
if
(
profileId
){
const
newData
=
dummyData
.
data
.
filter
(
item
=>
item
.
id
===
profileId
);
console
.
log
(
"
newData
"
,
newData
);
newData
.
profile_product
.
push
(
params
);
console
.
log
(
"
newData
"
,
newData
);
}
history
.
push
(
"
/profile/add
"
);
}
...
...
@@ -77,6 +72,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Tên sản phẩm
"
type
=
"
text
"
className
=
"
text-dark
"
value
=
{
productName
}
onChange
=
{(
e
)
=>
setProductName
(
e
.
target
.
value
)}
/
>
...
...
@@ -93,6 +89,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Mã sản phẩm
"
type
=
"
text
"
className
=
"
text-dark
"
value
=
{
traceCode
}
onChange
=
{(
e
)
=>
setTraceCode
(
e
.
target
.
value
)}
/
>
...
...
@@ -109,6 +106,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Giá sản phẩm
"
type
=
"
text
"
className
=
"
text-dark
"
value
=
{
cost
}
onChange
=
{(
e
)
=>
setCost
(
e
.
target
.
value
)}
/
>
...
...
@@ -125,6 +123,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Xuất xứ
"
type
=
"
text
"
className
=
"
text-dark
"
value
=
{
origin
}
onChange
=
{(
e
)
=>
setOrigin
(
e
.
target
.
value
)}
/
>
...
...
@@ -136,6 +135,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Mô tả
"
type
=
"
textarea
"
className
=
"
text-dark
"
value
=
{
description
}
onChange
=
{(
e
)
=>
setDescription
(
e
.
target
.
value
)}
/
>
...
...
@@ -147,6 +147,7 @@ const AddProduct = () => {
<
Input
placeholder
=
"
Điều kiện nuôi trồng
"
type
=
"
textarea
"
className
=
"
text-dark
"
value
=
{
growingConditions
}
onChange
=
{(
e
)
=>
setGrowingConditions
(
e
.
target
.
value
)}
/
>
...
...
@@ -154,7 +155,7 @@ const AddProduct = () => {
<
/FormGroup
>
<
FormGroup
row
>
<
Col
sm
=
{
10
}
>
<
Input
type
=
"
file
"
name
=
"
file
"
id
=
"
file-image
"
/>
<
Input
type
=
"
file
"
name
=
"
file
"
id
=
"
file-image
"
className
=
"
w-auto
"
/>
<
FormText
color
=
"
muted
"
>
L
ự
a
ch
ọ
n
ả
nh
s
ả
n
ph
ẩ
m
<
/FormText
>
...
...
@@ -165,7 +166,7 @@ const AddProduct = () => {
<
/div
>
<
div
className
=
"
d-flex justify-content-between mt-3
"
>
<
Button
color
=
"
info
"
color
=
"
secondary
"
type
=
"
button
"
className
=
"
btn-1
"
onClick
=
{
onHandleBack
}
...
...
src/components/Profile/AddProfile.js
View file @
3b453e46
...
...
@@ -122,7 +122,7 @@ const AddProfile = () => {
onChange
=
{(
e
)
=>
setPhoneNumber
(
e
.
target
.
value
)}
invalid
=
{
validPhoneNumber
}
/
>
<
FormFeedback
invalid
>
{
validPhoneNumber
?
"
Phải có 10 chữ số bắt đầu bằng chữ số 0
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
invalid
>
{
validPhoneNumber
?
"
Phải có 10 chữ số bắt đầu bằng chữ số 0
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
<
FormGroup
className
=
"
mb-4
"
>
...
...
@@ -149,20 +149,18 @@ const AddProfile = () => {
<
ProductTable
listProduct
=
{
detailProfile
.
profile_product
}
/
>
<
/div
>
<
div
className
=
"
d-flex justify-content-between mt-3
"
>
<
div
className
=
"
border border-secondary border-3 rounded
"
>
<
Button
color
=
"
secondary
"
type
=
"
button
"
className
=
"
btn-1 my-0
"
onClick
=
{
onHandleBack
}
>
Quay
l
ạ
i
<
/Button
>
<
/div
>
<
Button
color
=
"
secondary
"
type
=
"
button
"
className
=
"
btn-1
"
onClick
=
{
onHandleBack
}
>
Quay
l
ạ
i
<
/Button
>
<
Button
color
=
"
primary
"
type
=
"
submit
"
className
=
"
btn-1
my-0
"
className
=
"
btn-1
"
>
{
profileId
?
"
Sửa
"
:
"
Thêm mới
"
}
<
/Button
>
...
...
src/components/Profile/DetailProfile.js
View file @
3b453e46
...
...
@@ -31,7 +31,7 @@ const DetailProfile = (props) => {
{
listData
&&
listData
.
length
>
0
?
listData
.
map
(
data
=>
{
return
(
<
Container
>
<
Container
key
=
{
data
.
id
}
>
<
Row
className
=
"
row-grid align-items-center
"
>
<
Col
md
=
{
6
}
>
<
div
className
=
"
d-flex justify-content-center
"
>
...
...
@@ -75,7 +75,7 @@ const DetailProfile = (props) => {
});
}
return
(
<
Col
lg
=
{
6
}
md
=
{
12
}
className
=
"
my-3
"
>
<
Col
lg
=
{
6
}
md
=
{
12
}
className
=
"
my-3
"
key
=
{
product
.
product_id
}
>
<
Card
className
=
"
w-100 h-100 hover-shadow
"
onClick
=
{
onHandleTraceCode
}
>
<
CardHeader
className
=
"
h5 mb-3
"
>
{
product
.
name
}
<
/CardHeader
>
<
CardBody
>
...
...
src/components/Profile/Tracecode.js
View file @
3b453e46
...
...
@@ -122,7 +122,7 @@ const Tracecode = () => {
<
TabPane
tabId
=
"
plainTabs2
"
>
<
div
className
=
"
description
"
>
{
product
.
product_chain_diary
.
map
(
diary
=>
(
<
div
>
<
div
key
=
{
diary
.
id
}
>
<
div
className
=
"
h5 font-weight-bold mt-3
"
>
{
diary
.
company
}
<
/div
>
<
Row
className
=
"
h6 mb-3
"
>
<
Col
xs
=
{
4
}
>
{
formatDateTime
(
diary
.
date
)}
<
/Col
>
...
...
@@ -137,7 +137,7 @@ const Tracecode = () => {
<
div
className
=
"
description
"
>
<
Row
>
{
product
.
product_certification
.
map
((
certificate
)
=>
(
<
Col
xs
=
{
4
}
>
<
Col
xs
=
{
4
}
key
=
{
certificate
.
id
}
>
<
img
src
=
{
window
.
location
.
origin
+
certificate
.
image
}
alt
=
"
certificate
"
height
=
"
250px
"
/>
<
div
className
=
"
h5 mt-3 mb-3 font-weight-bold
"
>
{
certificate
.
certification_information
}
<
/div
>
<
/Col
>
...
...
src/services/ForgotPassword.js
View file @
3b453e46
...
...
@@ -111,7 +111,7 @@ export default () => {
value
=
{
email
}
onChange
=
{(
e
)
=>
setEmail
(
e
.
target
.
value
)}
invalid
=
{
validEmail
}
/
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
?
"
Không đúng định dạng email
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
===
true
?
"
Không đúng định dạng email
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
<
div
className
=
"
text-center
"
>
...
...
src/services/ResetPassword.js
View file @
3b453e46
...
...
@@ -149,7 +149,7 @@ export default () => {
onChange
=
{(
e
)
=>
setConfirmPassword
(
e
.
target
.
value
)}
invalid
=
{
checkPassword
}
/
>
<
FormFeedback
>
{
checkPassword
?
"
Please input match password
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
>
{
checkPassword
===
true
?
"
Please input match password
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
<
div
className
=
"
text-center
"
>
...
...
src/services/Signin.js
View file @
3b453e46
...
...
@@ -136,7 +136,7 @@ export default () => {
onChange
=
{(
e
)
=>
setEmail
(
e
.
target
.
value
)}
invalid
=
{
validEmail
}
/
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
?
"
Không đúng định dạng email
"
:
""
}
<
/FormFeedback
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
===
true
?
"
Không đúng định dạng email
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
<
FormGroup
id
=
"
password
"
>
...
...
src/services/Signup.js
View file @
3b453e46
...
...
@@ -125,7 +125,7 @@ export default () => {
value
=
{
email
}
onChange
=
{(
e
)
=>
setEmail
(
e
.
target
.
value
)}
invalid
=
{
validEmail
}
/
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
?
"
Không đúng định dạng email
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
className
=
"
bg-transparent shadow-0
"
>
{
validEmail
===
true
?
"
Không đúng định dạng email
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
...
...
@@ -145,7 +145,7 @@ export default () => {
onChange
=
{(
e
)
=>
setPassword
(
e
.
target
.
value
)}
invalid
=
{
checkPassword
}
/
>
<
FormFeedback
>
{
checkPassword
?
"
Mật khẩu không trùng nhau
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
>
{
checkPassword
===
true
?
"
Mật khẩu không trùng nhau
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
...
...
@@ -166,7 +166,7 @@ export default () => {
onChange
=
{(
e
)
=>
setConfirmPassword
(
e
.
target
.
value
)}
invalid
=
{
checkPassword
}
/
>
<
FormFeedback
>
{
checkPassword
?
"
Mật khẩu không trùng nhau
"
:
false
}
<
/FormFeedback
>
<
FormFeedback
>
{
checkPassword
===
true
?
"
Mật khẩu không trùng nhau
"
:
""
}
<
/FormFeedback
>
<
/InputGroup
>
<
/FormGroup
>
<
div
className
=
"
text-center
"
>
...
...
src/views/IndexSections/Table.js
View file @
3b453e46
...
...
@@ -185,7 +185,6 @@ export const ProfileTable = (props) => {
export
const
ProductTable
=
(
props
)
=>
{
const
history
=
useHistory
();
// const dispatch = useDispatch();
console
.
log
(
"
props
"
,
props
);
const
onHandleClickEdit
=
(
productId
)
=>
{
...
...
Write
Preview
Markdown
is supported
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