Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CmsPetrolPay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
CmsPetrolPay
Commits
6a1f19b5
Commit
6a1f19b5
authored
Jan 25, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
be49e123
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
314 additions
and
42 deletions
+314
-42
Index.js
src/app/views/Company/Employee/Index.js
+36
-17
Table.js
src/app/views/Company/Employee/Table.js
+6
-6
View.js
src/app/views/Company/Employee/View.js
+75
-1
Create.js
src/app/views/Company/Function/Create.js
+1
-1
Update.js
src/app/views/Company/Function/Update.js
+1
-1
Table.js
src/app/views/Company/GroupRole/Table.js
+3
-2
Index.js
src/app/views/Company/Role/Index.js
+26
-1
Table.js
src/app/views/Company/Role/Table.js
+10
-3
View.js
src/app/views/Company/Role/View.js
+42
-1
Index.js
src/app/views/Merchant/Index.js
+1
-1
Create.js
src/app/views/product/product/Create.js
+1
-1
Index.js
src/app/views/product/product/Index.js
+33
-4
Update.js
src/app/views/product/product/Update.js
+1
-1
View.js
src/app/views/product/product/View.js
+78
-2
No files found.
src/app/views/Company/Employee/Index.js
View file @
6a1f19b5
...
...
@@ -12,6 +12,10 @@ import { showLoading, hideLoading } from 'app/redux/actions/loadingAction'
import
{
toast
}
from
'react-toastify'
import
useDebounce
from
'app/hooks/useDebounce'
import
{
useTranslation
}
from
'react-i18next'
import
{
dropdownDepartment
,
dropdownUserGroup
,
}
from
'app/apis/Functions/dropdown'
const
ToolNotificate
=
(
props
)
=>
{
const
[
txtSearch
,
setTxtSearch
]
=
useState
(
''
)
...
...
@@ -21,29 +25,21 @@ const ToolNotificate = (props) => {
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
)
const
[
pageSize
]
=
useState
(
10
)
const
[
totalRecords
,
setTotalRecord
]
=
useState
(
0
)
const
[
status
,
setStatus
]
=
useState
()
const
history
=
useHistory
()
const
{
t
}
=
useTranslation
()
const
[
data
,
setData
]
=
useState
([])
const
[
permissions
,
setPermissions
]
=
useState
([])
// useEffect(() => {
// getListPermission();
// }, []);
// const getListPermission = () => {
// let temp = localStorage.getItem(KEY.LISTPATH);
// let listPath = JSON.parse(temp);
// if (listPath) {
// const newlist = listPath.map((e) => {
// if (e.function_code) return e.function_code;
// return e.action_code;
// });
// setPermissions(newlist);
// }
// };
const
[
role
,
setRole
]
=
useState
()
const
[
listRole
,
setListRole
]
=
useState
([])
useEffect
(()
=>
{
getUserGroup
()
},
[])
const
handeChangeActive
=
async
(
id
,
status_id
)
=>
{
props
.
showLoading
()
const
res
=
await
changeStatusEmployee
({
id
,
status_id
})
const
res
=
await
changeStatusEmployee
({
id
:
id
,
status_id
})
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
getData
()
...
...
@@ -64,6 +60,8 @@ const ToolNotificate = (props) => {
full_name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
status
,
user_group_id
:
role
,
})
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
...
...
@@ -87,7 +85,7 @@ const ToolNotificate = (props) => {
useEffect
(()
=>
{
getData
()
},
[
searchDebount
,
pageIndex
])
},
[
searchDebount
,
pageIndex
,
status
,
role
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
@@ -110,6 +108,22 @@ const ToolNotificate = (props) => {
}
}
const
getUserGroup
=
async
()
=>
{
const
res
=
await
dropdownUserGroup
({})
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setListRole
(
res
.
data
.
data
)
}
else
if
(
res
.
data
.
code
==
401
)
{
setTimeout
(()
=>
{
history
.
push
(
'/'
)
},
100
)
}
else
{
toast
.
error
(
t
(
res
.
data
.
error
),
{
theme
:
'colored'
,
})
}
}
return
(
<
ToolUserView
data
=
{
data
}
...
...
@@ -124,6 +138,11 @@ const ToolNotificate = (props) => {
handeChangeActive
=
{
handeChangeActive
}
totalRecords
=
{
totalRecords
}
permissions
=
{
permissions
}
status
=
{
status
}
setStatus
=
{
setStatus
}
role
=
{
role
}
setRole
=
{
setRole
}
listRole
=
{
listRole
}
/
>
)
}
...
...
src/app/views/Company/Employee/Table.js
View file @
6a1f19b5
...
...
@@ -55,12 +55,12 @@ const columns = [
align
:
'left'
,
minWidth
:
'auto'
,
},
//
{
// id: 'phon
e',
// label: 'Điện thoại
',
//
align: 'left',
//
minWidth: 'auto',
//
},
{
id
:
'user_group_nam
e'
,
label
:
'Vai trò
'
,
align
:
'left'
,
minWidth
:
'auto'
,
},
]
function
TableList
(
props
)
{
...
...
src/app/views/Company/Employee/View.js
View file @
6a1f19b5
...
...
@@ -32,6 +32,11 @@ function CustomerView(props) {
pageIndex
,
totalRecords
,
permissions
,
status
,
setStatus
,
role
,
setRole
,
listRole
,
}
=
props
const
handleChange
=
(
event
)
=>
{
setAge
(
event
.
target
.
value
)
...
...
@@ -59,7 +64,16 @@ function CustomerView(props) {
container
spacing
=
{
3
}
>
<
Grid
item
lg
=
{
3
}
md
=
{
3
}
sm
=
{
6
}
xs
=
{
6
}
>
<
Grid
container
spacing
=
{
3
}
item
lg
=
{
8
}
md
=
{
8
}
sm
=
{
8
}
xs
=
{
8
}
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
TextField
variant
=
"outlined"
className
=
"w-full"
...
...
@@ -72,6 +86,66 @@ function CustomerView(props) {
}}
/
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Vai
tr
ò
<
/InputLabel
>
<
Select
label
=
"Vai trò"
value
=
{
role
}
onChange
=
{(
e
)
=>
setRole
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{
listRole
.
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Tr
ạ
ng
th
á
i
<
/InputLabel
>
<
Select
label
=
"Trạng thái"
value
=
{
status
}
onChange
=
{(
e
)
=>
setStatus
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{[
{
id
:
1
,
name
:
'Hoạt động'
,
},
{
id
:
2
,
name
:
'Khoá'
,
},
].
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
/Grid
>
{
checkRole
(
user
,
'/employee/create'
)
?
(
<
Link
to
=
"/employee/create"
>
<
Button
...
...
src/app/views/Company/Function/Create.js
View file @
6a1f19b5
...
...
@@ -27,7 +27,7 @@ const SimpleForm = (props) => {
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/function'
)
if
(
res
.
data
.
code
==
200
)
{
toast
.
success
(
'Tạo
hành độ
ng thành công!'
,
{
toast
.
success
(
'Tạo
chức nă
ng thành công!'
,
{
theme
:
'colored'
,
})
}
...
...
src/app/views/Company/Function/Update.js
View file @
6a1f19b5
...
...
@@ -51,7 +51,7 @@ const SimpleForm = (props) => {
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/function'
)
if
(
res
.
data
.
code
==
200
)
{
toast
.
success
(
'Cập nhật
hành độ
ng thành công!'
,
{
toast
.
success
(
'Cập nhật
chức nă
ng thành công!'
,
{
theme
:
'colored'
,
})
}
...
...
src/app/views/Company/GroupRole/Table.js
View file @
6a1f19b5
...
...
@@ -49,6 +49,7 @@ const columns = [
align
:
'left'
,
minWidth
:
'auto'
,
},
{
id
:
'date_created'
,
label
:
'Ngày tạo'
,
...
...
@@ -56,8 +57,8 @@ const columns = [
minWidth
:
'auto'
,
},
{
id
:
'date_
cre
ated'
,
label
:
'Ngày
tạo
'
,
id
:
'date_
upd
ated'
,
label
:
'Ngày
cập nhật
'
,
align
:
'left'
,
minWidth
:
'auto'
,
},
...
...
src/app/views/Company/Role/Index.js
View file @
6a1f19b5
...
...
@@ -12,6 +12,8 @@ import { showLoading, hideLoading } from 'app/redux/actions/loadingAction'
import
{
toast
}
from
'react-toastify'
import
useDebounce
from
'app/hooks/useDebounce'
import
{
useTranslation
}
from
'react-i18next'
import
{
getDropFunction
}
from
'app/apis/Functions/dropdown'
const
ToolNotificate
=
(
props
)
=>
{
const
[
txtSearch
,
setTxtSearch
]
=
useState
(
''
)
const
[
activeSelected
,
setActiveSeleted
]
=
useState
(
null
)
...
...
@@ -21,12 +23,18 @@ const ToolNotificate = (props) => {
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
)
const
[
pageSize
]
=
useState
(
10
)
const
[
totalRecords
,
setTotalRecord
]
=
useState
(
0
)
const
[
listFunction
,
setListFunction
]
=
useState
([])
const
[
function_id
,
setFunction
]
=
useState
()
const
history
=
useHistory
()
const
[
data
,
setData
]
=
useState
([])
const
[
permissions
,
setPermissions
]
=
useState
([])
useEffect
(()
=>
{
getDropDown
()
},
[])
const
handeChangeActive
=
async
(
id
,
status_id
)
=>
{
props
.
showLoading
()
const
res
=
await
changeStatusAction
({
id
,
status_id
})
...
...
@@ -49,6 +57,7 @@ const ToolNotificate = (props) => {
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
function_id
,
})
props
.
hideLoading
()
...
...
@@ -75,7 +84,7 @@ const ToolNotificate = (props) => {
useEffect
(()
=>
{
getData
()
},
[
txtSearch
,
pageIndex
])
},
[
searchDebount
,
pageIndex
,
function_id
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
@@ -98,6 +107,19 @@ const ToolNotificate = (props) => {
}
}
const
getDropDown
=
async
()
=>
{
try
{
const
res
=
await
getDropFunction
()
console
.
log
(
res
)
const
newList
=
res
.
data
.
data
.
map
((
e
)
=>
{
return
{
...
e
}
})
setListFunction
(
newList
)
}
catch
(
err
)
{
//toast.error(t(err))
}
}
return
(
<
ToolUserView
data
=
{
data
}
...
...
@@ -112,6 +134,9 @@ const ToolNotificate = (props) => {
handeChangeActive
=
{
handeChangeActive
}
totalRecords
=
{
totalRecords
}
permissions
=
{
permissions
}
function_id
=
{
function_id
}
setFunction
=
{
setFunction
}
listFunction
=
{
listFunction
}
/
>
)
}
...
...
src/app/views/Company/Role/Table.js
View file @
6a1f19b5
...
...
@@ -36,19 +36,26 @@ const columns = [
align
:
'center'
,
minWidth
:
50
,
},
{
id
:
'code'
,
label
:
'Mã code'
,
align
:
'left'
,
minWidth
:
'auto'
,
},
{
id
:
'name'
,
label
:
'Tên
chức nă
ng'
,
label
:
'Tên
hành độ
ng'
,
align
:
'left'
,
minWidth
:
'auto'
,
},
{
id
:
'
cod
e'
,
label
:
'
Mã code
'
,
id
:
'
function_nam
e'
,
label
:
'
Thuộc chức năng
'
,
align
:
'left'
,
minWidth
:
'auto'
,
},
{
id
:
'url'
,
label
:
'Đường dẫn'
,
...
...
src/app/views/Company/Role/View.js
View file @
6a1f19b5
...
...
@@ -32,6 +32,9 @@ function CustomerView(props) {
pageIndex
,
totalRecords
,
permissions
,
function_id
,
setFunction
,
listFunction
,
}
=
props
const
{
user
}
=
useAuth
()
const
handleChange
=
(
event
)
=>
{
...
...
@@ -61,7 +64,16 @@ function CustomerView(props) {
container
spacing
=
{
3
}
>
<
Grid
item
lg
=
{
3
}
md
=
{
3
}
sm
=
{
6
}
xs
=
{
6
}
>
<
Grid
container
item
spacing
=
{
3
}
lg
=
{
8
}
md
=
{
8
}
sm
=
{
8
}
xs
=
{
8
}
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
6
}
xs
=
{
6
}
>
<
TextField
variant
=
"outlined"
className
=
"w-full"
...
...
@@ -74,6 +86,35 @@ function CustomerView(props) {
}}
/
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
6
}
xs
=
{
6
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Ch
ứ
c
n
ă
ng
<
/InputLabel
>
<
Select
label
=
"Chức năng"
value
=
{
function_id
}
onChange
=
{(
e
)
=>
setFunction
(
e
.
target
.
value
)
}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{
listFunction
.
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
/Grid
>
{
checkRole
(
user
,
'/role/create'
)
?
(
<
Link
to
=
"/role/create"
>
<
Button
...
...
src/app/views/Merchant/Index.js
View file @
6a1f19b5
...
...
@@ -47,7 +47,7 @@ const ToolNotificate = (props) => {
const
getData
=
async
()
=>
{
props
.
showLoading
()
const
res
=
await
getListMerchants
({
name
:
searchDebount
,
text_search
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
...
...
src/app/views/product/product/Create.js
View file @
6a1f19b5
...
...
@@ -119,7 +119,7 @@ const SimpleForm = (props) => {
<
Grid
xs
=
{
6
}
sm
=
{
6
}
item
>
<
SelectValidator
variant
=
{
'outlined'
}
label
=
{
'Thuộc
chức năng
*'
}
label
=
{
'Thuộc
loại sản phẩm
*'
}
className
=
"mb-4 w-full"
value
=
{
type_id
||
''
}
displayEmpty
...
...
src/app/views/product/product/Index.js
View file @
6a1f19b5
...
...
@@ -12,24 +12,31 @@ import { showLoading, hideLoading } from 'app/redux/actions/loadingAction'
import
{
toast
}
from
'react-toastify'
import
useDebounce
from
'app/hooks/useDebounce'
import
{
useTranslation
}
from
'react-i18next'
import
{
dropdownProductType
}
from
'app/apis/Functions/dropdown'
const
ToolNotificate
=
(
props
)
=>
{
const
[
txtSearch
,
setTxtSearch
]
=
useState
(
''
)
const
[
activeSelected
,
setActiveSeleted
]
=
useState
(
null
)
const
[
changeActive
,
setChangeActive
]
=
useState
(
1
)
const
searchDebount
=
useDebounce
(
txtSearch
,
1000
)
const
[
status
,
setStatus
]
=
useState
()
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
)
const
[
pageSize
]
=
useState
(
10
)
const
[
totalRecords
,
setTotalRecord
]
=
useState
(
0
)
const
[
type
,
setType
]
=
useState
()
const
[
listType
,
setListType
]
=
useState
([])
const
history
=
useHistory
()
const
{
t
}
=
useTranslation
()
const
[
data
,
setData
]
=
useState
([])
const
[
permissions
,
setPermissions
]
=
useState
([])
useEffect
(()
=>
{
getListType
()
},
[])
const
handeChangeActive
=
async
(
id
,
status_id
)
=>
{
props
.
showLoading
()
const
res
=
await
changeStatusProduct
({
id
,
status_id
})
const
res
=
await
changeStatusProduct
({
id
Guid
:
id
,
status_id
})
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
getData
()
...
...
@@ -46,9 +53,11 @@ const ToolNotificate = (props) => {
const
getData
=
async
()
=>
{
props
.
showLoading
()
const
res
=
await
getListProduct
({
nam
e
:
searchDebount
,
cod
e
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
status
,
type_id
:
type
,
})
props
.
hideLoading
()
...
...
@@ -75,7 +84,7 @@ const ToolNotificate = (props) => {
useEffect
(()
=>
{
getData
()
},
[
txtSearch
,
pageIndex
])
},
[
searchDebount
,
pageIndex
,
status
,
type
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
@@ -98,6 +107,21 @@ const ToolNotificate = (props) => {
}
}
const
getListType
=
async
()
=>
{
const
res
=
await
dropdownProductType
({})
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
const
newList
=
res
.
data
.
data
.
map
((
e
)
=>
{
return
{
name
:
e
.
type_name
,
value
:
e
.
id
,
...
e
}
})
setListType
(
newList
)
}
else
{
toast
.
error
(
t
(
res
.
data
.
error
),
{
theme
:
'colored'
,
})
}
}
return
(
<
ToolUserView
data
=
{
data
}
...
...
@@ -112,6 +136,11 @@ const ToolNotificate = (props) => {
handeChangeActive
=
{
handeChangeActive
}
totalRecords
=
{
totalRecords
}
permissions
=
{
permissions
}
status
=
{
status
}
setStatus
=
{
setStatus
}
listType
=
{
listType
}
type
=
{
type
}
setType
=
{
setType
}
/
>
)
}
...
...
src/app/views/product/product/Update.js
View file @
6a1f19b5
...
...
@@ -127,7 +127,7 @@ const SimpleForm = (props) => {
<
Grid
xs
=
{
6
}
sm
=
{
6
}
item
>
<
SelectValidator
variant
=
{
'outlined'
}
label
=
{
'Thuộc
chức năng
*'
}
label
=
{
'Thuộc
loại sản phẩm
*'
}
className
=
"mb-4 w-full"
value
=
{
type_id
||
''
}
disabled
...
...
src/app/views/product/product/View.js
View file @
6a1f19b5
...
...
@@ -32,6 +32,11 @@ function CustomerView(props) {
pageIndex
,
totalRecords
,
permissions
,
status
,
setStatus
,
listType
,
type
,
setType
,
}
=
props
const
{
user
}
=
useAuth
()
const
handleChange
=
(
event
)
=>
{
...
...
@@ -61,11 +66,20 @@ function CustomerView(props) {
container
spacing
=
{
3
}
>
<
Grid
item
lg
=
{
3
}
md
=
{
3
}
sm
=
{
6
}
xs
=
{
6
}
>
<
Grid
container
spacing
=
{
3
}
item
lg
=
{
8
}
md
=
{
8
}
sm
=
{
8
}
xs
=
{
8
}
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
TextField
variant
=
"outlined"
className
=
"w-full"
label
=
"Tên sản phẩ
m"
label
=
"Tìm kiế
m"
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
...
...
@@ -74,6 +88,68 @@ function CustomerView(props) {
}}
/
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Lo
ạ
i
s
ả
n
ph
ẩ
m
<
/InputLabel
>
<
Select
label
=
"Loại sản phẩm"
value
=
{
type
}
onChange
=
{(
e
)
=>
setType
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{
listType
.
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
4
}
xs
=
{
4
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
Tr
ạ
ng
th
á
i
<
/InputLabel
>
<
Select
label
=
"Trạng thái"
value
=
{
status
}
onChange
=
{(
e
)
=>
setStatus
(
e
.
target
.
value
)}
inputProps
=
{{
name
:
'age'
,
id
:
'outlined-age-native-simple'
,
}}
>
<
MenuItem
value
=
""
>
<
em
>
T
ấ
t
c
ả
<
/em
>
<
/MenuItem
>
{[
{
id
:
1
,
name
:
'Hoạt động'
,
},
{
id
:
2
,
name
:
'Khoá'
,
},
].
map
((
e
)
=>
(
<
MenuItem
value
=
{
e
.
id
}
>
{
e
.
name
}
<
/MenuItem
>
))}
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
/Grid
>
{
checkRole
(
user
,
'/product/create'
)
?
(
<
Link
to
=
"/product/create"
>
<
Button
...
...
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