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
9
Issues
9
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
d7db34b4
Commit
d7db34b4
authored
a year ago
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate code
parent
e35e29ac
master
…
dev
dev_3
ladingpage
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
16 deletions
+45
-16
translation.json
src/app/assets/languages/locates/vi/translation.json
+1
-1
View.js
src/app/views/Company/Function/View.js
+1
-1
View.js
src/app/views/Company/GroupRole/View.js
+1
-1
View.js
src/app/views/Company/Role/View.js
+1
-1
Create.js
src/app/views/GasStation/Create.js
+0
-2
Table.js
src/app/views/GasStation/Table.js
+1
-1
Update.js
src/app/views/GasStation/Update.js
+40
-9
No files found.
src/app/assets/languages/locates/vi/translation.json
View file @
d7db34b4
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
"ERROR_FUNC_ID_MISSING"
:
"Thiếu id chức năng."
,
"ERROR_FUNC_ID_MISSING"
:
"Thiếu id chức năng."
,
"ERROR_ADD_FAIL"
:
"Tạo giao dịch hoặc thẻ thất bại."
,
"ERROR_ADD_FAIL"
:
"Tạo giao dịch hoặc thẻ thất bại."
,
"ERROR_ID_MISSING"
:
"Thiếu ID."
,
"ERROR_ID_MISSING"
:
"Thiếu ID."
,
"ERROR_UPDATE_FAIL"
:
"Cập nhật
giao dịch
thất bại."
,
"ERROR_UPDATE_FAIL"
:
"Cập nhật
thông tin
thất bại."
,
"ERROR_STATUS_ID_MISSING"
:
"Thiếu id trạng thái."
,
"ERROR_STATUS_ID_MISSING"
:
"Thiếu id trạng thái."
,
"ERROR_STATUS_CANNOT_CHANGE"
:
"Không thể thay đổi trạng thái."
,
"ERROR_STATUS_CANNOT_CHANGE"
:
"Không thể thay đổi trạng thái."
,
"ERROR_BANK_ID_MISSING"
:
"Thiếu ngân hàng."
,
"ERROR_BANK_ID_MISSING"
:
"Thiếu ngân hàng."
,
...
...
This diff is collapsed.
Click to expand it.
src/app/views/Company/Function/View.js
View file @
d7db34b4
...
@@ -66,7 +66,7 @@ function CustomerView(props) {
...
@@ -66,7 +66,7 @@ function CustomerView(props) {
<
TextField
<
TextField
variant
=
"outlined"
variant
=
"outlined"
className
=
"w-full"
className
=
"w-full"
label
=
"
Tên chức năng
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/views/Company/GroupRole/View.js
View file @
d7db34b4
...
@@ -65,7 +65,7 @@ function CustomerView(props) {
...
@@ -65,7 +65,7 @@ function CustomerView(props) {
<
TextField
<
TextField
variant
=
"outlined"
variant
=
"outlined"
className
=
"w-full"
className
=
"w-full"
label
=
"
Tên nhóm quyền
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/views/Company/Role/View.js
View file @
d7db34b4
...
@@ -77,7 +77,7 @@ function CustomerView(props) {
...
@@ -77,7 +77,7 @@ function CustomerView(props) {
<
TextField
<
TextField
variant
=
"outlined"
variant
=
"outlined"
className
=
"w-full"
className
=
"w-full"
label
=
"
Tên hành động
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/views/GasStation/Create.js
View file @
d7db34b4
...
@@ -179,8 +179,6 @@ const SimpleForm = (props) => {
...
@@ -179,8 +179,6 @@ const SimpleForm = (props) => {
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
if
(
i
==
index
)
{
if
(
i
==
index
)
{
if
(
e
.
gas_olines
)
{
if
(
e
.
gas_olines
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
if
(
if
(
e
.
gas_olines
.
findIndex
(
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
name
==
data
.
name
(
e
)
=>
e
.
name
==
data
.
name
...
...
This diff is collapsed.
Click to expand it.
src/app/views/GasStation/Table.js
View file @
d7db34b4
...
@@ -57,7 +57,7 @@ const columns = [
...
@@ -57,7 +57,7 @@ const columns = [
minWidth
:
'auto'
,
minWidth
:
'auto'
,
},
},
{
{
id
:
'
store_owner
'
,
id
:
'
representative
'
,
label
:
'Người đại diện'
,
label
:
'Người đại diện'
,
align
:
'left'
,
align
:
'left'
,
minWidth
:
'auto'
,
minWidth
:
'auto'
,
...
...
This diff is collapsed.
Click to expand it.
src/app/views/GasStation/Update.js
View file @
d7db34b4
...
@@ -183,15 +183,46 @@ const SimpleForm = (props) => {
...
@@ -183,15 +183,46 @@ const SimpleForm = (props) => {
const
createFountain
=
(
data
,
index
)
=>
{
const
createFountain
=
(
data
,
index
)
=>
{
let
arr
=
[...
listField
]
let
arr
=
[...
listField
]
//check ma voi
let
flag
=
true
arr
.
map
((
e
,
i
)
=>
{
if
(
e
.
gas_olines
)
{
if
(
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
name
.
toUpperCase
()
==
data
.
name
.
toUpperCase
()
)
!=
-
1
)
{
toast
.
warning
(
'Tên vòi xăng đã tồn tại'
,
{
theme
:
'colored'
,
})
flag
=
false
}
if
(
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
code
.
toUpperCase
()
==
data
.
code
.
toUpperCase
()
)
!=
-
1
)
{
toast
.
warning
(
'Mã vòi xăng đã tồn tại'
,
{
theme
:
'colored'
,
})
flag
=
false
}
}
})
if
(
flag
)
{
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
if
(
i
==
index
)
{
if
(
i
==
index
)
{
if
(
e
.
gas_olines
)
{
if
(
e
.
gas_olines
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'data'
,
data
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
if
(
if
(
e
.
gas_olines
.
findIndex
((
e
)
=>
e
.
name
==
data
.
name
)
==
e
.
gas_olines
.
findIndex
(
-
1
&&
(
e
)
=>
e
.
name
==
data
.
name
e
.
gas_olines
.
findIndex
((
e
)
=>
e
.
code
==
data
.
code
)
==
-
1
)
==
-
1
&&
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
code
==
data
.
code
)
==
-
1
)
{
)
{
return
{
return
{
...
e
,
...
e
,
...
@@ -202,9 +233,9 @@ const SimpleForm = (props) => {
...
@@ -202,9 +233,9 @@ const SimpleForm = (props) => {
].
concat
(
e
.
gas_olines
),
].
concat
(
e
.
gas_olines
),
}
}
}
else
{
}
else
{
toast
.
warning
(
'Mã vòi xăng đã tồn tại'
,
{
//
toast.warning('Mã vòi xăng đã tồn tại', {
theme
:
'colored'
,
//
theme: 'colored',
})
//
})
return
{
return
{
...
e
,
...
e
,
gas_olines
:
e
.
gas_olines
,
gas_olines
:
e
.
gas_olines
,
...
@@ -226,6 +257,7 @@ const SimpleForm = (props) => {
...
@@ -226,6 +257,7 @@ const SimpleForm = (props) => {
console
.
log
(
'newList'
,
newList
)
console
.
log
(
'newList'
,
newList
)
setListField
(
newList
)
setListField
(
newList
)
}
}
}
const
deleteFountain
=
(
item
,
index
)
=>
{
const
deleteFountain
=
(
item
,
index
)
=>
{
console
.
log
(
'item'
,
item
)
console
.
log
(
'item'
,
item
)
...
@@ -458,11 +490,10 @@ const SimpleForm = (props) => {
...
@@ -458,11 +490,10 @@ const SimpleForm = (props) => {
>
>
<
div
>
<
div
>
<
Typography
variant
=
"subtitle1"
>
<
Typography
variant
=
"subtitle1"
>
S
ố
l
ượ
ng
v
ò
i
m
ỗ
i
tr
ụ
:{
' '
}
S
ố
l
ượ
ng
tr
ụ
:
{
listField
.
length
}
{
listField
.
length
}
<
/Typography
>
<
/Typography
>
<
Typography
variant
=
"subtitle1"
>
<
Typography
variant
=
"subtitle1"
>
S
ố
l
ượ
ng
tr
ụ
:
{
countFountain
()}
S
ố
l
ượ
ng
v
ò
i
:
{
countFountain
()}
<
/Typography
>
<
/Typography
>
<
/div
>
<
/div
>
<
Button
<
Button
...
...
This diff is collapsed.
Click to expand it.
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