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
d7db34b4
Commit
d7db34b4
authored
Feb 02, 2024
by
tdgiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate code
parent
e35e29ac
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
43 deletions
+72
-43
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
+67
-36
No files found.
src/app/assets/languages/locates/vi/translation.json
View file @
d7db34b4
...
...
@@ -169,7 +169,7 @@
"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_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_CANNOT_CHANGE"
:
"Không thể thay đổi trạng thái."
,
"ERROR_BANK_ID_MISSING"
:
"Thiếu ngân hàng."
,
...
...
src/app/views/Company/Function/View.js
View file @
d7db34b4
...
...
@@ -66,7 +66,7 @@ function CustomerView(props) {
<
TextField
variant
=
"outlined"
className
=
"w-full"
label
=
"
Tên chức năng
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
...
...
src/app/views/Company/GroupRole/View.js
View file @
d7db34b4
...
...
@@ -65,7 +65,7 @@ function CustomerView(props) {
<
TextField
variant
=
"outlined"
className
=
"w-full"
label
=
"
Tên nhóm quyền
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
...
...
src/app/views/Company/Role/View.js
View file @
d7db34b4
...
...
@@ -77,7 +77,7 @@ function CustomerView(props) {
<
TextField
variant
=
"outlined"
className
=
"w-full"
label
=
"
Tên hành động
"
label
=
"
Nhập từ khoá
"
onChange
=
{(
e
)
=>
{
const
text
=
e
.
target
.
value
setTimeout
(()
=>
{
...
...
src/app/views/GasStation/Create.js
View file @
d7db34b4
...
...
@@ -179,8 +179,6 @@ const SimpleForm = (props) => {
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
if
(
i
==
index
)
{
if
(
e
.
gas_olines
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
if
(
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
name
==
data
.
name
...
...
src/app/views/GasStation/Table.js
View file @
d7db34b4
...
...
@@ -57,7 +57,7 @@ const columns = [
minWidth
:
'auto'
,
},
{
id
:
'
store_owner
'
,
id
:
'
representative
'
,
label
:
'Người đại diện'
,
align
:
'left'
,
minWidth
:
'auto'
,
...
...
src/app/views/GasStation/Update.js
View file @
d7db34b4
...
...
@@ -183,48 +183,80 @@ const SimpleForm = (props) => {
const
createFountain
=
(
data
,
index
)
=>
{
let
arr
=
[...
listField
]
let
newList
=
arr
.
map
((
e
,
i
)
=>
{
if
(
i
==
index
)
{
if
(
e
.
gas_olines
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
if
(
e
.
gas_olines
.
findIndex
((
e
)
=>
e
.
name
==
data
.
name
)
==
-
1
&&
e
.
gas_olines
.
findIndex
((
e
)
=>
e
.
code
==
data
.
code
)
==
-
1
)
{
//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
)
=>
{
if
(
i
==
index
)
{
if
(
e
.
gas_olines
)
{
console
.
log
(
'data'
,
data
)
console
.
log
(
'e.gas_olines'
,
e
.
gas_olines
)
if
(
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
name
==
data
.
name
)
==
-
1
&&
e
.
gas_olines
.
findIndex
(
(
e
)
=>
e
.
code
==
data
.
code
)
==
-
1
)
{
return
{
...
e
,
gas_olines
:
[
{
...
data
,
},
].
concat
(
e
.
gas_olines
),
}
}
else
{
// toast.warning('Mã vòi xăng đã tồn tại', {
// theme: 'colored',
// })
return
{
...
e
,
gas_olines
:
e
.
gas_olines
,
}
}
}
else
{
return
{
...
e
,
gas_olines
:
[
{
...
data
,
},
]
.
concat
(
e
.
gas_olines
)
,
],
}
}
else
{
toast
.
warning
(
'Mã vòi xăng đã tồn tại'
,
{
theme
:
'colored'
,
})
return
{
...
e
,
gas_olines
:
e
.
gas_olines
,
}
}
}
else
{
return
{
...
e
,
gas_olines
:
[
{
...
data
,
},
],
}
}
}
else
return
{
...
e
}
})
}
else
return
{
...
e
}
})
console
.
log
(
'newList'
,
newList
)
setListField
(
newList
)
console
.
log
(
'newList'
,
newList
)
setListField
(
newList
)
}
}
const
deleteFountain
=
(
item
,
index
)
=>
{
console
.
log
(
'item'
,
item
)
...
...
@@ -458,11 +490,10 @@ const SimpleForm = (props) => {
>
<
div
>
<
Typography
variant
=
"subtitle1"
>
S
ố
l
ượ
ng
v
ò
i
m
ỗ
i
tr
ụ
:{
' '
}
{
listField
.
length
}
S
ố
l
ượ
ng
tr
ụ
:
{
listField
.
length
}
<
/Typography
>
<
Typography
variant
=
"subtitle1"
>
S
ố
l
ượ
ng
tr
ụ
:
{
countFountain
()}
S
ố
l
ượ
ng
v
ò
i
:
{
countFountain
()}
<
/Typography
>
<
/div
>
<
Button
...
...
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