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
1fd34b93
Commit
1fd34b93
authored
Sep 04, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update build
parent
cd1dc3f6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
15 deletions
+37
-15
helpers.js
src/app/apis/helpers.js
+10
-9
translation.json
src/app/assets/languages/locates/vi/translation.json
+3
-1
UpdateTimeStore.jsx
src/app/components/dialog/UpdateTimeStore.jsx
+15
-0
Index.js
src/app/views/GasStation/Index.js
+7
-4
Table.js
src/app/views/GasStation/Table.js
+2
-1
No files found.
src/app/apis/helpers.js
View file @
1fd34b93
...
@@ -30,7 +30,7 @@ export async function GetData(url, data) {
...
@@ -30,7 +30,7 @@ export async function GetData(url, data) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -60,7 +60,7 @@ export async function PostHaveKey(url, json, key) {
...
@@ -60,7 +60,7 @@ export async function PostHaveKey(url, json, key) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -94,7 +94,7 @@ export async function GetHaveKey(url, data, key) {
...
@@ -94,7 +94,7 @@ export async function GetHaveKey(url, data, key) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -127,7 +127,7 @@ export async function GetURL(url, data) {
...
@@ -127,7 +127,7 @@ export async function GetURL(url, data) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -176,11 +176,12 @@ export async function PostData(url, json, isAuth = true) {
...
@@ -176,11 +176,12 @@ export async function PostData(url, json, isAuth = true) {
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
then
((
response
)
=>
response
)
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
'error.request.status----'
,
error
.
request
.
status
)
const
err
=
{
const
err
=
{
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -208,7 +209,7 @@ export async function PostURL(url) {
...
@@ -208,7 +209,7 @@ export async function PostURL(url) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -238,7 +239,7 @@ export async function PostFormData(url, data) {
...
@@ -238,7 +239,7 @@ export async function PostFormData(url, data) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -281,7 +282,7 @@ export async function PostExportFile(url, json, isAuth = true) {
...
@@ -281,7 +282,7 @@ export async function PostExportFile(url, json, isAuth = true) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
400
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
@@ -309,7 +310,7 @@ export async function PostNonToken(url, json, isAuth = true) {
...
@@ -309,7 +310,7 @@ export async function PostNonToken(url, json, isAuth = true) {
message
:
'error'
,
message
:
'error'
,
status
:
error
.
request
.
status
,
status
:
error
.
request
.
status
,
data
:
{
data
:
{
code
:
401
,
code
:
error
?.
request
?.
status
,
},
},
}
}
return
err
return
err
...
...
src/app/assets/languages/locates/vi/translation.json
View file @
1fd34b93
...
@@ -363,7 +363,9 @@
...
@@ -363,7 +363,9 @@
"ERROR_QUEUE_CODE_EXIST"
:
"Mã Queue đã tồn tại"
,
"ERROR_QUEUE_CODE_EXIST"
:
"Mã Queue đã tồn tại"
,
"ERROR_NAME_PACKAGE_IS_EXITS"
:
"Tên gói đã tồn tại"
,
"ERROR_NAME_PACKAGE_IS_EXITS"
:
"Tên gói đã tồn tại"
,
"ERROR_NAME_FUNCTION_IS_EXITS"
:
"Tên chức năng đã tồn tại"
,
"ERROR_NAME_FUNCTION_IS_EXITS"
:
"Tên chức năng đã tồn tại"
,
"ERROR_USER_GROUP_EXISTS_DATA"
:
"Nhóm quyền đã có dữ liệu"
"ERROR_USER_GROUP_EXISTS_DATA"
:
"Nhóm quyền đã có dữ liệu"
,
"ERROR_DATE_INVALID"
:
"Thời gian không hợp lệ"
}
}
src/app/components/dialog/UpdateTimeStore.jsx
View file @
1fd34b93
...
@@ -23,16 +23,31 @@ import { useTranslation } from 'react-i18next'
...
@@ -23,16 +23,31 @@ import { useTranslation } from 'react-i18next'
import
{
hideLoading
,
showLoading
}
from
'app/redux/actions/loadingAction'
import
{
hideLoading
,
showLoading
}
from
'app/redux/actions/loadingAction'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
KeyboardDatePicker
}
from
'@material-ui/pickers'
import
{
KeyboardDatePicker
}
from
'@material-ui/pickers'
import
{
convertDate
,
getTimeDDMM
}
from
'app/config/Function'
function
FormDialog
(
props
)
{
function
FormDialog
(
props
)
{
const
{
t
}
=
useTranslation
()
const
{
t
}
=
useTranslation
()
const
{
open
,
handleClose
,
data
,
onAgree
}
=
props
const
{
open
,
handleClose
,
data
,
onAgree
}
=
props
console
.
log
(
'data'
,
data
)
const
[
forever
,
setForever
]
=
useState
(
false
)
const
[
forever
,
setForever
]
=
useState
(
false
)
const
[
name
,
setName
]
=
useState
()
const
[
name
,
setName
]
=
useState
()
const
[
date
,
setDate
]
=
useState
(
addOneYear
())
const
[
date
,
setDate
]
=
useState
(
addOneYear
())
useEffect
(()
=>
{
if
(
data
&&
data
?.
date_expried
)
{
if
(
data
.
date_expried
!=
'Vô thời hạ'
&&
data
.
date_expried
!=
'Vô thời hạn'
)
{
setDate
(
getTimeDDMM
(
data
.
date_expried
))
}
else
{
setDate
(
new
Date
())
}
}
},
[
data
])
const
handleDateChangeLast
=
(
date
)
=>
{
const
handleDateChangeLast
=
(
date
)
=>
{
setDate
(
date
)
setDate
(
date
)
...
...
src/app/views/GasStation/Index.js
View file @
1fd34b93
...
@@ -177,7 +177,7 @@ const ToolNotificate = (props) => {
...
@@ -177,7 +177,7 @@ const ToolNotificate = (props) => {
props.showLoading()
props.showLoading()
const res = await changeStatusStore({
const res = await changeStatusStore({
id: item.id,
id: item.id,
status: 1,
status:
item?.status == 3 ? 0 :
1,
expired: forever ? null : convertDate(date),
expired: forever ? null : convertDate(date),
})
})
props.hideLoading()
props.hideLoading()
...
@@ -202,9 +202,12 @@ const ToolNotificate = (props) => {
...
@@ -202,9 +202,12 @@ const ToolNotificate = (props) => {
})
})
props.hideLoading()
props.hideLoading()
if (res.data.code == 200) {
if (res.data.code == 200) {
toast.success(`
$
{
'Phê duyệt'
}
c
â
y
x
ă
ng
th
à
nh
c
ô
ng
`, {
toast.success(
theme: 'colored',
`
$
{
'Điều chỉnh thời gian hoạt động của'
}
c
â
y
x
ă
ng
th
à
nh
c
ô
ng
`,
})
{
theme: 'colored',
}
)
getData()
getData()
} else {
} else {
toast.error(t(res.data.error), {
toast.error(t(res.data.error), {
...
...
src/app/views/GasStation/Table.js
View file @
1fd34b93
...
@@ -73,7 +73,7 @@ const columns = [
...
@@ -73,7 +73,7 @@ const columns = [
},
},
{
{
id
:
'
representa
tive'
,
id
:
'
connec
tive'
,
label
:
'Người đại diện'
,
label
:
'Người đại diện'
,
align
:
'left'
,
align
:
'left'
,
minWidth
:
140
,
minWidth
:
140
,
...
@@ -458,6 +458,7 @@ function TableList(props) {
...
@@ -458,6 +458,7 @@ function TableList(props) {
/
>
/
>
<
UpdateTimeStore
<
UpdateTimeStore
data
=
{
selected
}
open
=
{
openUpdate
}
open
=
{
openUpdate
}
handleClose
=
{()
=>
{
handleClose
=
{()
=>
{
setOpenUpdate
(
false
)
setOpenUpdate
(
false
)
...
...
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