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
0ac19812
Commit
0ac19812
authored
Aug 09, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update build
parent
a18e4537
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
53 deletions
+67
-53
RootRoutes.jsx
src/app/RootRoutes.jsx
+1
-1
url.js
src/app/apis/url.js
+7
-0
Create.js
src/app/views/Company/Employee/Create.js
+24
-24
Update.js
src/app/views/Company/Employee/Update.js
+23
-23
Create.js
src/app/views/GasStation/Create.js
+3
-0
Update.js
src/app/views/GasStation/Update.js
+4
-0
Index.js
src/app/views/Ncc/Index.js
+2
-2
Analytics.jsx
src/app/views/dashboard/Analytics.jsx
+1
-1
Detail.js
src/app/views/landingpage/register/Detail.js
+2
-2
No files found.
src/app/RootRoutes.jsx
View file @
0ac19812
...
@@ -18,7 +18,7 @@ import GasStationRoutes from './views/GasStation/GasStationRoutes'
...
@@ -18,7 +18,7 @@ import GasStationRoutes from './views/GasStation/GasStationRoutes'
import
ListRequestRoutes
from
'./views/ListRequest/routes'
import
ListRequestRoutes
from
'./views/ListRequest/routes'
import
SignUp
from
'./views/SignUp/routes'
import
SignUp
from
'./views/SignUp/routes'
import
InvoiceSupplier
from
'./views/InvoiceSupplier/routes'
import
InvoiceSupplier
from
'./views/InvoiceSupplier/routes'
//
import Package from './views/package/routers'
import
Package
from
'./views/package/routers'
import
NccRouter
from
'./views/Ncc/router'
import
NccRouter
from
'./views/Ncc/router'
import
LandingpageRouter
from
'./views/landingpage/router'
import
LandingpageRouter
from
'./views/landingpage/router'
...
...
src/app/apis/url.js
View file @
0ac19812
...
@@ -2,8 +2,15 @@
...
@@ -2,8 +2,15 @@
//const root = 'https://apigw.petropos.vn/api'
//const root = 'https://apigw.petropos.vn/api'
//const root = 'http://dcvf.tasvietnam.vn:9986/api'
//const root = 'http://dcvf.tasvietnam.vn:9986/api'
//const root = 'https://apigw-v2.petropos.vn/api'
//const root = 'https://apigw-v2.petropos.vn/api'
//v2
//const root = 'https://apitest-v2.petropos.vn/api'
//v3
const
root
=
'https://apitest.petropos.vn/api'
const
root
=
'https://apitest.petropos.vn/api'
//const root = 'http://petropos-api.tasvietnam.vn/api'
export
default
{
export
default
{
//Dang nhap,thong tin ca nhan
//Dang nhap,thong tin ca nhan
urlLogin
:
`
${
root
}
/auth/adminLogin`
,
urlLogin
:
`
${
root
}
/auth/adminLogin`
,
...
...
src/app/views/Company/Employee/Create.js
View file @
0ac19812
...
@@ -91,43 +91,43 @@ const SimpleForm = (props) => {
...
@@ -91,43 +91,43 @@ const SimpleForm = (props) => {
const
handleSubmit
=
async
(
event
)
=>
{
const
handleSubmit
=
async
(
event
)
=>
{
const
newValue
=
trimObject
(
state
)
const
newValue
=
trimObject
(
state
)
if
(
listChecked
.
length
>
0
)
{
if
(
listChecked
.
length
>
0
)
{
if
(
image
)
{
//
if (image) {
const
newList
=
listChecked
.
map
((
e
)
=>
{
const
newList
=
listChecked
.
map
((
e
)
=>
{
return
{
action_id
:
e
}
return
{
action_id
:
e
}
})
})
props
.
showLoading
()
props
.
showLoading
()
const
res
=
await
createEmployee
({
const
res
=
await
createEmployee
({
...
newValue
,
...
newValue
,
user_group_id
:
role
,
user_group_id
:
role
,
userPermissions
:
newList
,
userPermissions
:
newList
,
avatar
:
image
,
avatar
:
image
,
status
:
1
,
status
:
1
,
})
})
console
.
log
(
res
)
console
.
log
(
res
)
props
.
hideLoading
()
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/employee'
)
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/employee'
)
toast
.
success
(
'Tạo nhân viên thành công!'
,
{
if
(
res
.
data
.
code
==
200
)
{
toast
.
success
(
'Tạo nhân viên thành công!'
,
{
theme
:
'colored'
,
})
}
}
else
{
toast
.
error
(
t
(
res
.
data
.
error
),
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
}
else
{
}
else
{
toast
.
warning
(
'Bạn chưa chọn ảnh đại diện cho nhân viên!'
,
{
toast
.
error
(
t
(
res
.
data
.
error
)
,
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
}
else
{
}
else
{
toast
.
warning
(
'Bạn chưa
thêm quyề
n cho nhân viên!'
,
{
toast
.
warning
(
'Bạn chưa
chọn ảnh đại diệ
n cho nhân viên!'
,
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
// } else {
// toast.warning('Bạn chưa thêm quyền cho nhân viên!', {
// theme: 'colored',
// })
// }
}
}
const
handleChange
=
(
event
)
=>
{
const
handleChange
=
(
event
)
=>
{
...
...
src/app/views/Company/Employee/Update.js
View file @
0ac19812
...
@@ -128,42 +128,42 @@ const SimpleForm = (props) => {
...
@@ -128,42 +128,42 @@ const SimpleForm = (props) => {
const
handleSubmit
=
async
(
event
)
=>
{
const
handleSubmit
=
async
(
event
)
=>
{
const
newValue
=
trimObject
(
state
)
const
newValue
=
trimObject
(
state
)
if
(
listChecked
.
length
>
0
)
{
if
(
listChecked
.
length
>
0
)
{
if
(
image
)
{
//
if (image) {
const
newList
=
listChecked
.
map
((
e
)
=>
{
const
newList
=
listChecked
.
map
((
e
)
=>
{
return
{
action_id
:
e
}
return
{
action_id
:
e
}
})
})
props
.
showLoading
()
props
.
showLoading
()
const
res
=
await
updateEmployee
({
const
res
=
await
updateEmployee
({
...
newValue
,
...
newValue
,
user_group_id
:
role
,
user_group_id
:
role
,
userPermissions
:
newList
,
userPermissions
:
newList
,
avatar
:
image
,
avatar
:
image
,
})
})
console
.
log
(
res
)
console
.
log
(
res
)
props
.
hideLoading
()
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/employee'
)
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
history
.
push
(
'/employee'
)
toast
.
success
(
'Cập nhật nhân viên thành công!'
,
{
if
(
res
.
data
.
code
==
200
)
{
toast
.
success
(
'Cập nhật nhân viên thành công!'
,
{
theme
:
'colored'
,
})
}
}
else
{
toast
.
error
(
t
(
res
.
data
.
error
),
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
}
else
{
}
else
{
toast
.
warning
(
'Bạn chưa chọn ảnh đại diện cho nhân viên!'
,
{
toast
.
error
(
t
(
res
.
data
.
error
)
,
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
}
else
{
}
else
{
toast
.
warning
(
'Bạn chưa
thêm quyề
n cho nhân viên!'
,
{
toast
.
warning
(
'Bạn chưa
chọn ảnh đại diệ
n cho nhân viên!'
,
{
theme
:
'colored'
,
theme
:
'colored'
,
})
})
}
}
// } else {
// toast.warning('Bạn chưa thêm quyền cho nhân viên!', {
// theme: 'colored',
// })
// }
}
}
const
handleChange
=
(
event
)
=>
{
const
handleChange
=
(
event
)
=>
{
...
...
src/app/views/GasStation/Create.js
View file @
0ac19812
...
@@ -73,6 +73,9 @@ const SimpleForm = (props) => {
...
@@ -73,6 +73,9 @@ const SimpleForm = (props) => {
const
res
=
await
createGasStation
({
const
res
=
await
createGasStation
({
...
newValue
,
...
newValue
,
gas_fields
:
listField
,
gas_fields
:
listField
,
account
:
newValue
?.
account
,
user_name
:
newValue
?.
user_name
,
password
:
newValue
?.
password
,
})
})
props
.
hideLoading
()
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
...
...
src/app/views/GasStation/Update.js
View file @
0ac19812
...
@@ -109,6 +109,10 @@ const SimpleForm = (props) => {
...
@@ -109,6 +109,10 @@ const SimpleForm = (props) => {
gas_fields
:
listField
,
gas_fields
:
listField
,
store_code
:
newValue
?.
store_code
,
store_code
:
newValue
?.
store_code
,
queue_name
:
newValue
?.
queue_name
,
queue_name
:
newValue
?.
queue_name
,
account
:
newValue
?.
account
,
user_name
:
newValue
?.
user_name
,
password
:
newValue
?.
password
,
})
})
props
.
hideLoading
()
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
...
...
src/app/views/Ncc/Index.js
View file @
0ac19812
...
@@ -54,14 +54,14 @@ const ToolNotificate = (props) => {
...
@@ -54,14 +54,14 @@ const ToolNotificate = (props) => {
if
(
isInit
)
{
if
(
isInit
)
{
setPageIndex
(
0
)
setPageIndex
(
0
)
res
=
await
getListSupplier
({
res
=
await
getListSupplier
({
fuel
_name
:
searchDebount
,
supp
_name
:
searchDebount
,
page_no
:
0
,
page_no
:
0
,
page_size
:
pageSize
,
page_size
:
pageSize
,
status
,
status
,
})
})
}
else
{
}
else
{
res
=
await
getListSupplier
({
res
=
await
getListSupplier
({
fuel
_name
:
searchDebount
,
supp
_name
:
searchDebount
,
page_no
:
pageIndex
+
1
,
page_no
:
pageIndex
+
1
,
page_size
:
pageSize
,
page_size
:
pageSize
,
status
,
status
,
...
...
src/app/views/dashboard/Analytics.jsx
View file @
0ac19812
...
@@ -30,7 +30,7 @@ const dataLine = [
...
@@ -30,7 +30,7 @@ const dataLine = [
},
},
{
{
id
:
3
,
id
:
3
,
textLeft
:
"Sản phẩm mới"
,
textLeft
:
'Sản phẩm mới'
,
textRight
:
'Hợp đồng'
,
textRight
:
'Hợp đồng'
,
data
:
[
820
,
932
,
1901
,
934
,
1290
,
1330
,
120
],
data
:
[
820
,
932
,
1901
,
934
,
1290
,
1330
,
120
],
bg
:
'yellow'
,
bg
:
'yellow'
,
...
...
src/app/views/landingpage/register/Detail.js
View file @
0ac19812
...
@@ -31,9 +31,9 @@ const SimpleForm = (props) => {
...
@@ -31,9 +31,9 @@ const SimpleForm = (props) => {
props
.
hideLoading
()
props
.
hideLoading
()
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setState
({
setState
({
...
res
.
data
.
data
,
...
res
.
data
.
data
?.
data
,
status_name
:
status_name
:
res
.
data
.
data
.
status
==
1
res
.
data
.
data
?.
data
.
status
==
1
?
'Đã thanh toán'
?
'Đã thanh toán'
:
'Chưa thanh toán'
,
:
'Chưa thanh toán'
,
})
})
...
...
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