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
4c108e10
Commit
4c108e10
authored
Feb 22, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
f012418b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
102 additions
and
45 deletions
+102
-45
Sidenav.jsx
src/app/components/Sidenav/Sidenav.jsx
+3
-3
navigations.js
src/app/navigations.js
+21
-23
Table.js
src/app/views/Company/Employee/Table.js
+10
-2
Table.js
src/app/views/Company/Function/Table.js
+10
-2
Table.js
src/app/views/Company/GroupRole/Table.js
+10
-3
Table.js
src/app/views/Company/Role/Table.js
+7
-2
Table.js
src/app/views/GasStation/Table.js
+10
-2
Table.js
src/app/views/Merchant/Table.js
+11
-2
Table.js
src/app/views/product/product/Table.js
+10
-3
Table.js
src/app/views/product/type/Table.js
+10
-3
No files found.
src/app/components/Sidenav/Sidenav.jsx
View file @
4c108e10
...
@@ -6,7 +6,7 @@ import clsx from 'clsx'
...
@@ -6,7 +6,7 @@ import clsx from 'clsx'
import
useSettings
from
'app/hooks/useSettings'
import
useSettings
from
'app/hooks/useSettings'
import
{
useSelector
}
from
'react-redux'
import
{
useSelector
}
from
'react-redux'
import
useAuth
from
'app/hooks/useAuth'
import
useAuth
from
'app/hooks/useAuth'
import
{
navigationsAdmin
}
from
'app/navigations'
import
{
navigationsAdmin
,
navigations
}
from
'app/navigations'
const
useStyles
=
makeStyles
(({
palette
,
...
theme
})
=>
({
const
useStyles
=
makeStyles
(({
palette
,
...
theme
})
=>
({
scrollable
:
{
scrollable
:
{
...
@@ -32,7 +32,7 @@ const Sidenav = ({ children }) => {
...
@@ -32,7 +32,7 @@ const Sidenav = ({ children }) => {
const
classes
=
useStyles
()
const
classes
=
useStyles
()
const
{
settings
,
updateSettings
}
=
useSettings
()
const
{
settings
,
updateSettings
}
=
useSettings
()
const
[
navigationUser
,
setNavigationUser
]
=
useState
([])
const
[
navigationUser
,
setNavigationUser
]
=
useState
([])
let
navigation
=
useSelector
(({
navigations
})
=>
navigations
)
//
let navigation = useSelector(({ navigations }) => navigations)
const
{
user
}
=
useAuth
()
const
{
user
}
=
useAuth
()
useEffect
(()
=>
{
useEffect
(()
=>
{
getNavigationUser
()
getNavigationUser
()
...
@@ -47,7 +47,7 @@ const Sidenav = ({ children }) => {
...
@@ -47,7 +47,7 @@ const Sidenav = ({ children }) => {
console
.
log
(
"user"
,
user
.
user_permissions
)
console
.
log
(
"user"
,
user
.
user_permissions
)
if
(
user
.
user_permissions
?.
length
>
0
)
{
if
(
user
.
user_permissions
?.
length
>
0
)
{
const
newList
=
navigation
.
map
((
item
)
=>
{
const
newList
=
navigation
s
.
map
((
item
)
=>
{
//level 2
//level 2
if
(
item
.
children
)
{
if
(
item
.
children
)
{
let
flag
=
false
;
let
flag
=
false
;
...
...
src/app/navigations.js
View file @
4c108e10
import
{
authRoles
}
from
'./auth/authRoles'
export
const
navigations
=
[
export
const
navigations
=
[
{
{
name
:
'Dashboard'
,
name
:
'Dashboard'
,
...
@@ -14,36 +12,36 @@ export const navigations = [
...
@@ -14,36 +12,36 @@ export const navigations = [
path
:
'/merchant'
,
path
:
'/merchant'
,
icon
:
'apartment'
,
icon
:
'apartment'
,
id
:
'MERCHANT'
,
id
:
'MERCHANT'
,
hide
:
fals
e
,
hide
:
tru
e
,
},
},
{
{
name
:
'Quản lý cây xăng'
,
name
:
'Quản lý cây xăng'
,
path
:
'/gas-station'
,
path
:
'/gas-station'
,
icon
:
'local_gas_station'
,
icon
:
'local_gas_station'
,
id
:
'GAS
_
STATION'
,
id
:
'GAS
-
STATION'
,
hide
:
fals
e
,
hide
:
tru
e
,
},
},
{
{
name
:
'Quản lý sản phẩm'
,
name
:
'Quản lý sản phẩm'
,
icon
:
'wb_iridescent'
,
icon
:
'wb_iridescent'
,
hide
:
fals
e
,
hide
:
tru
e
,
children
:
[
children
:
[
{
{
name
:
'Sản phẩm'
,
name
:
'Sản phẩm'
,
path
:
'/product'
,
path
:
'/product'
,
iconText
:
'EM'
,
iconText
:
'EM'
,
//icon: 'group',
//icon: 'group',
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'
EMPLOYEE
'
,
id
:
'
PRODUCT
'
,
},
},
{
{
name
:
'Loại sản phẩm'
,
name
:
'Loại sản phẩm'
,
iconText
:
'FN'
,
iconText
:
'FN'
,
path
:
'/product-type'
,
path
:
'/product-type'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'
FUNCTION
'
,
id
:
'
PRODUCT-TYPE
'
,
},
},
],
],
},
},
...
@@ -51,72 +49,72 @@ export const navigations = [
...
@@ -51,72 +49,72 @@ export const navigations = [
name
:
'Quản lý giao dịch'
,
name
:
'Quản lý giao dịch'
,
path
:
'/transations'
,
path
:
'/transations'
,
icon
:
'receipt_long'
,
icon
:
'receipt_long'
,
id
:
'
DASHBOARD
'
,
id
:
'
TRANSATIONS
'
,
hide
:
fals
e
,
hide
:
tru
e
,
},
},
{
{
name
:
'Quản lý thu phí'
,
name
:
'Quản lý thu phí'
,
path
:
'/list-fee'
,
path
:
'/list-fee'
,
icon
:
'diamond'
,
icon
:
'diamond'
,
id
:
'
DASHBOARD
'
,
id
:
'
LIST-FEE
'
,
hide
:
fals
e
,
hide
:
tru
e
,
},
},
{
{
name
:
'Quản lý hệ thống'
,
name
:
'Quản lý hệ thống'
,
icon
:
'wb_iridescent'
,
icon
:
'wb_iridescent'
,
hide
:
fals
e
,
hide
:
tru
e
,
children
:
[
children
:
[
{
{
name
:
'Nhân viên'
,
name
:
'Nhân viên'
,
path
:
'/employee'
,
path
:
'/employee'
,
iconText
:
'EM'
,
iconText
:
'EM'
,
//icon: 'group',
//icon: 'group',
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'EMPLOYEE'
,
id
:
'EMPLOYEE'
,
},
},
{
{
name
:
'Chức năng'
,
name
:
'Chức năng'
,
iconText
:
'FN'
,
iconText
:
'FN'
,
path
:
'/function'
,
path
:
'/function'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'FUNCTION'
,
id
:
'FUNCTION'
,
},
},
{
{
name
:
'Hành động'
,
name
:
'Hành động'
,
iconText
:
'RO'
,
iconText
:
'RO'
,
path
:
'/role'
,
path
:
'/role'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'ROLE'
,
id
:
'ROLE'
,
},
},
{
{
name
:
'Nhóm quyền'
,
name
:
'Nhóm quyền'
,
iconText
:
'GR'
,
iconText
:
'GR'
,
path
:
'/group-role'
,
path
:
'/group-role'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'GROUP
_
ROLE'
,
id
:
'GROUP
-
ROLE'
,
},
},
{
{
name
:
'Log login,logout'
,
name
:
'Log login,logout'
,
iconText
:
'NO'
,
iconText
:
'NO'
,
path
:
'/system/log-auth'
,
path
:
'/system/log-auth'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'LOG_AUTH'
,
id
:
'LOG_AUTH'
,
},
},
{
{
name
:
'Log Hành động'
,
name
:
'Log Hành động'
,
iconText
:
'SM'
,
iconText
:
'SM'
,
path
:
'/system/log-action'
,
path
:
'/system/log-action'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'LOG_ACTION'
,
id
:
'LOG_ACTION'
,
},
},
{
{
name
:
'Log Api'
,
name
:
'Log Api'
,
iconText
:
'SM'
,
iconText
:
'SM'
,
path
:
'/system/log-api'
,
path
:
'/system/log-api'
,
hide
:
fals
e
,
hide
:
tru
e
,
id
:
'LOG_API'
,
id
:
'LOG_API'
,
},
},
],
],
...
...
src/app/views/Company/Employee/Table.js
View file @
4c108e10
...
@@ -116,7 +116,7 @@ function TableList(props) {
...
@@ -116,7 +116,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/employee/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -125,6 +125,7 @@ function TableList(props) {
...
@@ -125,6 +125,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -169,6 +170,10 @@ function TableList(props) {
...
@@ -169,6 +170,10 @@ function TableList(props) {
)
)
})}
})}
{
checkRole
(
user
,
'/employee/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -187,9 +192,12 @@ function TableList(props) {
...
@@ -187,9 +192,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
user
,
'/employee/delete'
)
?
(
{
checkRole
(
user
,
'/employee/delete'
)
?
(
<
Tooltip
title
=
"Xoá"
>
<
Tooltip
title
=
"Xoá"
>
...
...
src/app/views/Company/Function/Table.js
View file @
4c108e10
...
@@ -123,7 +123,7 @@ function TableList(props) {
...
@@ -123,7 +123,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/function/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -132,6 +132,7 @@ function TableList(props) {
...
@@ -132,6 +132,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -176,6 +177,10 @@ function TableList(props) {
...
@@ -176,6 +177,10 @@ function TableList(props) {
)
)
})}
})}
{
checkRole
(
user
,
'/function/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -194,9 +199,12 @@ function TableList(props) {
...
@@ -194,9 +199,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
user
,
'/function/delete'
)
?
(
{
checkRole
(
user
,
'/function/delete'
)
?
(
<
Tooltip
title
=
"Xoá"
>
<
Tooltip
title
=
"Xoá"
>
...
...
src/app/views/Company/GroupRole/Table.js
View file @
4c108e10
...
@@ -117,6 +117,7 @@ function TableList(props) {
...
@@ -117,6 +117,7 @@ function TableList(props) {
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/group-role/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -125,7 +126,7 @@ function TableList(props) {
...
@@ -125,7 +126,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
textAlign
:
'center'
,
textAlign
:
'center'
,
...
@@ -168,7 +169,10 @@ function TableList(props) {
...
@@ -168,7 +169,10 @@ function TableList(props) {
<
/TableCell
>
<
/TableCell
>
)
)
})}
})}
{
checkRole
(
user
,
'/group-role/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -187,9 +191,12 @@ function TableList(props) {
...
@@ -187,9 +191,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
{
checkRole
(
user
,
user
,
...
...
src/app/views/Company/Role/Table.js
View file @
4c108e10
...
@@ -130,7 +130,7 @@ function TableList(props) {
...
@@ -130,7 +130,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/role/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -139,6 +139,7 @@ function TableList(props) {
...
@@ -139,6 +139,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -183,6 +184,7 @@ function TableList(props) {
...
@@ -183,6 +184,7 @@ function TableList(props) {
)
)
})}
})}
{
checkRole
(
user
,
'/role/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -201,9 +203,12 @@ function TableList(props) {
...
@@ -201,9 +203,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
user
,
'/role/delete'
)
?
(
{
checkRole
(
user
,
'/role/delete'
)
?
(
<
Tooltip
title
=
"Xoá"
>
<
Tooltip
title
=
"Xoá"
>
...
...
src/app/views/GasStation/Table.js
View file @
4c108e10
...
@@ -135,7 +135,7 @@ function TableList(props) {
...
@@ -135,7 +135,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/gas-station/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -144,6 +144,7 @@ function TableList(props) {
...
@@ -144,6 +144,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -188,6 +189,10 @@ function TableList(props) {
...
@@ -188,6 +189,10 @@ function TableList(props) {
)
)
})}
})}
{
checkRole
(
user
,
'/gas-station/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -206,9 +211,12 @@ function TableList(props) {
...
@@ -206,9 +211,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
{
checkRole
(
user
,
user
,
...
...
src/app/views/Merchant/Table.js
View file @
4c108e10
...
@@ -135,7 +135,7 @@ function TableList(props) {
...
@@ -135,7 +135,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/merchant/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -144,6 +144,7 @@ function TableList(props) {
...
@@ -144,6 +144,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -188,6 +189,10 @@ function TableList(props) {
...
@@ -188,6 +189,10 @@ function TableList(props) {
)
)
})}
})}
{
checkRole
(
user
,
'/merchant/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -206,9 +211,13 @@ function TableList(props) {
...
@@ -206,9 +211,13 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
user
,
'/merchant/delete'
)
?
(
{
checkRole
(
user
,
'/merchant/delete'
)
?
(
<
Tooltip
title
=
"Xoá"
>
<
Tooltip
title
=
"Xoá"
>
...
...
src/app/views/product/product/Table.js
View file @
4c108e10
...
@@ -115,7 +115,7 @@ function TableList(props) {
...
@@ -115,7 +115,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/product/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -124,6 +124,7 @@ function TableList(props) {
...
@@ -124,6 +124,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -167,7 +168,10 @@ function TableList(props) {
...
@@ -167,7 +168,10 @@ function TableList(props) {
<
/TableCell
>
<
/TableCell
>
)
)
})}
})}
{
checkRole
(
user
,
'/product/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -186,9 +190,12 @@ function TableList(props) {
...
@@ -186,9 +190,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
user
,
'/product/delete'
)
?
(
{
checkRole
(
user
,
'/product/delete'
)
?
(
<
Tooltip
title
=
"Xoá"
>
<
Tooltip
title
=
"Xoá"
>
...
...
src/app/views/product/type/Table.js
View file @
4c108e10
...
@@ -110,7 +110,7 @@ function TableList(props) {
...
@@ -110,7 +110,7 @@ function TableList(props) {
{
column
.
label
}
{
column
.
label
}
<
/TableCell
>
<
/TableCell
>
))}
))}
{
checkRole
(
user
,
'/product-type/changeStatus'
)
&&
(
<
TableCell
<
TableCell
style
=
{{
style
=
{{
backgroundColor
:
colors
.
headerTable
,
backgroundColor
:
colors
.
headerTable
,
...
@@ -119,6 +119,7 @@ function TableList(props) {
...
@@ -119,6 +119,7 @@ function TableList(props) {
>
>
Tra
̣
ng
tha
́
i
Tra
̣
ng
tha
́
i
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
<
TableCell
style
=
{{
style
=
{{
...
@@ -162,7 +163,10 @@ function TableList(props) {
...
@@ -162,7 +163,10 @@ function TableList(props) {
<
/TableCell
>
<
/TableCell
>
)
)
})}
})}
{
checkRole
(
user
,
'/product-type/changeStatus'
)
&&
(
<
TableCell
className
=
{
classes
.
border
}
>
<
TableCell
className
=
{
classes
.
border
}
>
<
Select
<
Select
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -181,9 +185,12 @@ function TableList(props) {
...
@@ -181,9 +185,12 @@ function TableList(props) {
<
MenuItem
value
=
{
1
}
>
<
MenuItem
value
=
{
1
}
>
Ho
ạ
t
độ
ng
Ho
ạ
t
độ
ng
<
/MenuItem
>
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
MenuItem
value
=
{
2
}
>
Kho
́
a
<
/MenuItem
>
<
/Select
>
<
/Select
>
<
/TableCell
>
<
/TableCell
>
)}
<
TableCell
>
<
TableCell
>
{
checkRole
(
{
checkRole
(
user
,
user
,
...
...
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