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
1f6e62c9
Commit
1f6e62c9
authored
Feb 20, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updtae code
parent
d7db34b4
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
233 additions
and
72 deletions
+233
-72
translation.json
src/app/assets/languages/locates/vi/translation.json
+4
-3
CreateFountain.jsx
src/app/components/dialog/CreateFountain.jsx
+1
-1
Index.js
src/app/views/Company/Employee/Index.js
+27
-11
Index.js
src/app/views/Company/Function/Index.js
+24
-8
Index.js
src/app/views/Company/GroupRole/Index.js
+23
-9
Index.js
src/app/views/Company/Role/Index.js
+26
-10
Index.js
src/app/views/GasStation/Index.js
+6
-2
Table.js
src/app/views/GasStation/Table.js
+6
-0
View.js
src/app/views/GasStation/View.js
+38
-0
Index.js
src/app/views/System/LogAction/Index.js
+26
-10
Index.js
src/app/views/System/LogApi/Index.js
+26
-9
Index.js
src/app/views/System/LogAuth/Index.js
+26
-9
No files found.
src/app/assets/languages/locates/vi/translation.json
View file @
1f6e62c9
...
...
@@ -346,10 +346,11 @@
"ERROR_UPDATE_FAIL_ERROR_PHONE_EXIST"
:
"Số điện thoại đã tồn tại"
,
"ERROR_UPDATE_FAIL_ERROR_EMAIL_EXIST"
:
"Email đã tồn tại"
,
"ERROR_UPDATE_FAIL_ERROR_USERNAME_EXIST"
:
"Tài khoản đã tồn tại."
,
"ERROR_USERNAME_MISSING"
:
"Thiếu tài khoản"
"ERROR_USERNAME_MISSING"
:
"Thiếu tài khoản"
,
"ERROR_PERMISSION_IS_EXIST"
:
"Nhóm quyền đã tồn tại"
,
"ERROR_CODE_IS_EXISTS"
:
"Mã code đã tồn tại"
,
"ERROR_NAME_IS_EXISTS"
:
"Tên sản phẩm đã tồn tại"
}
src/app/components/dialog/CreateFountain.jsx
View file @
1f6e62c9
...
...
@@ -128,7 +128,7 @@ export default function FormDialog({ onCreate }) {
return
(
<>
<
Tooltip
title=
"
Chuyển tiền đáo hạn
"
>
<
Tooltip
title=
"
Thêm mới vòi xăng
"
>
<
IconButton
onClick=
{
handleClickOpen
}
>
<
Icon
style=
{
{
color
:
'#4caf50'
}
}
>
add_circle
</
Icon
>
</
IconButton
>
...
...
src/app/views/Company/Employee/Index.js
View file @
1f6e62c9
...
...
@@ -53,16 +53,29 @@ const ToolNotificate = (props) => {
}
}
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
try
{
props
.
showLoading
()
const
res
=
await
getListEmployees
({
full_name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
status
,
user_group_id
:
role
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getListEmployees
({
full_name
:
searchDebount
,
page_no
:
0
,
page_size
:
pageSize
,
status
,
user_group_id
:
role
,
})
}
else
{
res
=
await
getListEmployees
({
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
)
{
const
newList
=
res
.
data
.
data
.
data
.
map
((
e
,
i
)
=>
{
...
...
@@ -84,15 +97,18 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
searchDebount
,
pageIndex
,
status
,
role
])
getData
(
true
)
},
[
searchDebount
,
status
,
role
])
useEffect
(()
=>
{
getData
(
false
)
},
[
pageIndex
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
const
res
=
await
deleteEmployee
({
id
})
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
getData
()
getData
(
true
)
toast
.
success
(
'Xoá bản ghi thành công!'
,
{
theme
:
'colored'
,
})
...
...
src/app/views/Company/Function/Index.js
View file @
1f6e62c9
...
...
@@ -58,13 +58,25 @@ const ToolNotificate = (props) => {
}
}
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getListFunction
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getListFunction
({
name
:
searchDebount
,
page_no
:
0
,
page_size
:
pageSize
,
})
}
else
{
res
=
await
getListFunction
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
}
props
.
hideLoading
()
...
...
@@ -89,8 +101,12 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
searchDebount
,
pageIndex
])
getData
(
true
)
},
[
searchDebount
])
useEffect
(()
=>
{
getData
(
false
)
},
[
pageIndex
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
src/app/views/Company/GroupRole/Index.js
View file @
1f6e62c9
...
...
@@ -42,13 +42,23 @@ const ToolNotificate = (props) => {
}
}
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getListGroups
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getListGroups
({
name
:
searchDebount
,
page_no
:
0
,
page_size
:
pageSize
,
})
}
else
{
res
=
await
getListGroups
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
}
props
.
hideLoading
()
...
...
@@ -73,15 +83,19 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
searchDebount
,
pageIndex
])
getData
(
false
)
},
[
pageIndex
])
useEffect
(()
=>
{
getData
(
true
)
},
[
searchDebount
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
const
res
=
await
deleteGroup
({
id
})
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
getData
()
getData
(
true
)
toast
.
success
(
'Xoá bản ghi thành công!'
,
{
theme
:
'colored'
,
})
...
...
src/app/views/Company/Role/Index.js
View file @
1f6e62c9
...
...
@@ -51,14 +51,26 @@ const ToolNotificate = (props) => {
}
}
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getListActions
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
function_id
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getListActions
({
name
:
searchDebount
,
page_no
:
0
,
page_size
:
pageSize
,
function_id
,
})
}
else
{
res
=
await
getListActions
({
name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
function_id
,
})
}
props
.
hideLoading
()
...
...
@@ -83,8 +95,12 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
searchDebount
,
pageIndex
,
function_id
])
getData
(
false
)
},
[
pageIndex
])
useEffect
(()
=>
{
getData
(
true
)
},
[
searchDebount
,
function_id
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
@@ -101,7 +117,7 @@ const ToolNotificate = (props) => {
history
.
push
(
'/'
)
},
100
)
}
else
{
toast
.
error
(
t
(
res
.
data
.
error
)
,
{
toast
.
error
(
'Bản ghi đã sử dụng, xoá hành động thất bại'
,
{
theme
:
'colored'
,
})
}
...
...
src/app/views/GasStation/Index.js
View file @
1f6e62c9
...
...
@@ -20,7 +20,7 @@ const ToolNotificate = (props) => {
const
{
t
}
=
useTranslation
()
const
[
activeSelected
,
setActiveSeleted
]
=
useState
(
null
)
const
[
changeActive
,
setChangeActive
]
=
useState
(
1
)
const
[
status
,
setStatus
]
=
useState
()
const
[
pageIndex
,
setPageIndex
]
=
useState
(
0
)
const
[
pageSize
]
=
useState
(
10
)
const
[
totalRecords
,
setTotalRecord
]
=
useState
(
0
)
...
...
@@ -61,6 +61,7 @@ const ToolNotificate = (props) => {
page_no
:
0
,
page_size
:
pageSize
,
merchant_id
:
merchant
,
status
,
})
}
else
{
res
=
await
getListGasStation
({
...
...
@@ -68,6 +69,7 @@ const ToolNotificate = (props) => {
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
merchant_id
:
merchant
,
status
,
})
}
...
...
@@ -112,7 +114,7 @@ const ToolNotificate = (props) => {
useEffect
(()
=>
{
getData
(
true
)
},
[
searchDebount
,
merchant
])
},
[
searchDebount
,
merchant
,
status
])
const
removeItem
=
async
(
id
)
=>
{
props
.
showLoading
()
...
...
@@ -152,6 +154,8 @@ const ToolNotificate = (props) => {
listMerchant
=
{
listMerchant
}
merchant
=
{
merchant
}
setMerchant
=
{
setMerchant
}
status
=
{
status
}
setStatus
=
{
setStatus
}
/
>
)
}
...
...
src/app/views/GasStation/Table.js
View file @
1f6e62c9
...
...
@@ -37,6 +37,12 @@ const columns = [
align
:
'center'
,
minWidth
:
50
,
},
// {
// id: 'id',
// label: 'id',
// align: 'center',
// minWidth: 50,
// },
{
id
:
'store_name'
,
...
...
src/app/views/GasStation/View.js
View file @
1f6e62c9
...
...
@@ -34,6 +34,8 @@ function CustomerView(props) {
merchant
,
setMerchant
,
listMerchant
,
status
,
setStatus
,
}
=
props
const
[
age
,
setAge
]
=
React
.
useState
(
''
)
const
{
user
}
=
useAuth
()
...
...
@@ -87,6 +89,7 @@ function CustomerView(props) {
}}
/
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
6
}
xs
=
{
6
}
>
<
FormControl
variant
=
"outlined"
fullWidth
>
<
InputLabel
htmlFor
=
"outlined-age-native-simple"
>
...
...
@@ -114,6 +117,41 @@ function CustomerView(props) {
<
/Select
>
<
/FormControl
>
<
/Grid
>
<
Grid
item
lg
=
{
4
}
md
=
{
4
}
sm
=
{
6
}
xs
=
{
6
}
>
<
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
,
'/gas-station/create'
)
?
(
<
Link
to
=
"/gas-station/create"
>
...
...
src/app/views/System/LogAction/Index.js
View file @
1f6e62c9
...
...
@@ -18,15 +18,28 @@ const ToolNotificate = (props) => {
const
history
=
useHistory
()
const
[
data
,
setData
]
=
useState
([])
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getLogAction
({
search
:
txtSearch
,
results
,
functions
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getLogAction
({
search
:
txtSearch
,
results
,
functions
,
page_no
:
0
,
page_size
:
pageSize
,
})
}
else
{
res
=
await
getLogAction
({
search
:
txtSearch
,
results
,
functions
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
}
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
...
...
@@ -47,8 +60,11 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
txtSearch
,
pageIndex
,
functions
,
results
])
getData
(
true
)
},
[
txtSearch
,
functions
,
results
])
useEffect
(()
=>
{
getData
(
false
)
},
[
pageIndex
])
return
(
<
LogAuth
...
...
src/app/views/System/LogApi/Index.js
View file @
1f6e62c9
...
...
@@ -17,14 +17,27 @@ const ToolNotificate = (props) => {
const
[
data
,
setData
]
=
useState
([])
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getLogApi
({
search
:
txtSearch
,
applications
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getLogApi
({
search
:
txtSearch
,
applications
,
page_no
:
0
,
page_size
:
pageSize
,
})
}
else
{
res
=
await
getLogApi
({
search
:
txtSearch
,
applications
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
}
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
const
newList
=
res
.
data
.
data
.
data
.
map
((
e
,
i
)
=>
{
...
...
@@ -44,8 +57,12 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
txtSearch
,
pageIndex
,
applications
])
getData
(
true
)
},
[
txtSearch
,
applications
])
useEffect
(()
=>
{
getData
(
false
)
},
[
pageIndex
])
return
(
<
LogAuth
...
...
src/app/views/System/LogAuth/Index.js
View file @
1f6e62c9
...
...
@@ -17,14 +17,27 @@ const ToolNotificate = (props) => {
const
[
data
,
setData
]
=
useState
([])
const
getData
=
async
()
=>
{
const
getData
=
async
(
isInit
)
=>
{
props
.
showLoading
()
const
res
=
await
getLogAuth
({
search
:
txtSearch
,
applications
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
let
res
if
(
isInit
)
{
setPageIndex
(
0
)
res
=
await
getLogAuth
({
search
:
txtSearch
,
applications
,
page_no
:
0
,
page_size
:
pageSize
,
})
}
else
{
res
=
await
getLogAuth
({
search
:
txtSearch
,
applications
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
})
}
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
...
...
@@ -45,8 +58,12 @@ const ToolNotificate = (props) => {
}
useEffect
(()
=>
{
getData
()
},
[
txtSearch
,
pageIndex
,
applications
])
getData
(
true
)
},
[
txtSearch
,
applications
])
useEffect
(()
=>
{
getData
(
false
)
},
[
pageIndex
])
return
(
<
LogAuth
...
...
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