Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Dida Adams Arizona
Tia-dev
Commits
d33882ea
Commit
d33882ea
authored
Sep 07, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update issue
parent
56353a9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
167 additions
and
180 deletions
+167
-180
ReportItems.js
src/container/MasterData/ReportItems.js
+162
-175
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+2
-2
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+2
-2
ResetPassword.js
src/container/ResetPassword.js
+1
-1
No files found.
src/container/MasterData/ReportItems.js
View file @
d33882ea
...
@@ -64,9 +64,9 @@ export default class ReportItems extends Component {
...
@@ -64,9 +64,9 @@ export default class ReportItems extends Component {
if
(
item
.
length
>
0
)
{
if
(
item
.
length
>
0
)
{
payload
.
push
({
payload
.
push
({
id
:
index
+
1
,
id
:
index
+
1
,
report
:
item
[
0
],
report
:
item
[
0
]
===
undefined
?
""
:
item
[
0
]
,
company
:
item
[
1
],
company
:
item
[
1
]
==
undefined
?
""
:
item
[
1
]
,
orders
:
item
[
2
],
orders
:
item
[
2
]
===
undefined
?
""
:
item
[
2
]
,
description
:
item
[
3
]
===
undefined
?
"-"
:
item
[
3
],
description
:
item
[
3
]
===
undefined
?
"-"
:
item
[
3
],
parent
:
item
[
4
]
===
undefined
?
0
:
item
[
4
],
parent
:
item
[
4
]
===
undefined
?
0
:
item
[
4
],
uom
:
item
[
5
]
===
undefined
?
null
:
item
[
5
],
uom
:
item
[
5
]
===
undefined
?
null
:
item
[
5
],
...
@@ -98,7 +98,7 @@ export default class ReportItems extends Component {
...
@@ -98,7 +98,7 @@ export default class ReportItems extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
index
+
1
,
//
index + 1,
item
.
report
,
item
.
report
,
item
.
company
,
item
.
company
,
item
.
orders
,
item
.
orders
,
...
@@ -116,25 +116,24 @@ export default class ReportItems extends Component {
...
@@ -116,25 +116,24 @@ export default class ReportItems extends Component {
]
]
})
})
let
columns
=
[
let
columns
=
[
"Data"
,
{
{
name
:
"Report Type"
,
name
:
"Report Type"
,
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'report'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'report'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"reportname"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"reportname"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"reportname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"reportname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -147,19 +146,19 @@ export default class ReportItems extends Component {
...
@@ -147,19 +146,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'company'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'company'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"companyname"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"companyname"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"companyname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"companyname"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -172,19 +171,19 @@ export default class ReportItems extends Component {
...
@@ -172,19 +171,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'orders'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"order"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"order"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"order"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"order"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -197,19 +196,19 @@ export default class ReportItems extends Component {
...
@@ -197,19 +196,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'description'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'description'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"desc"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"desc"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"desc"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"desc"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -222,19 +221,19 @@ export default class ReportItems extends Component {
...
@@ -222,19 +221,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'parent'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'parent'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"parents"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"parents"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"parents"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"parents"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -247,19 +246,19 @@ export default class ReportItems extends Component {
...
@@ -247,19 +246,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'uom'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'uom'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"uoms"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"uoms"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"uoms"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"uoms"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -272,19 +271,19 @@ export default class ReportItems extends Component {
...
@@ -272,19 +271,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'weight'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'weight'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"weights"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"weights"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"weights"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"weights"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -297,19 +296,19 @@ export default class ReportItems extends Component {
...
@@ -297,19 +296,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'type_report'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'type_report'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"datatype"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"datatype"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"datatype"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"datatype"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -322,19 +321,19 @@ export default class ReportItems extends Component {
...
@@ -322,19 +321,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'formula'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'formula'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"formulas"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"formulas"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"formulas"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"formulas"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -347,19 +346,19 @@ export default class ReportItems extends Component {
...
@@ -347,19 +346,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'condition_it_should_be'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'condition_it_should_be'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"values"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"values"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"values"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"values"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -372,19 +371,19 @@ export default class ReportItems extends Component {
...
@@ -372,19 +371,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'condition_if_wrong'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'condition_if_wrong'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"conditions"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"conditions"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"conditions"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"conditions"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -397,19 +396,19 @@ export default class ReportItems extends Component {
...
@@ -397,19 +396,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"startdate"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"startdate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"startdate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"startdate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -422,19 +421,19 @@ export default class ReportItems extends Component {
...
@@ -422,19 +421,19 @@ export default class ReportItems extends Component {
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
let
check
=
null
if
(
tableMeta
.
rowData
[
1
4
]
!=
null
)
{
if
(
tableMeta
.
rowData
[
1
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
1
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
check
=
tableMeta
.
rowData
[
1
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
check
>
-
1
)
{
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
this
.
setState
({
buttonError
:
true
})
}
}
}
}
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
1
4
]
!=
null
&&
check
>
-
1
?
{
tableMeta
.
rowData
[
1
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
4
][
check
].
message
}
data
-
for
=
"enddate"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
1
3
][
check
].
message
}
data
-
for
=
"enddate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
}
<
ReactTooltip
border
=
{
true
}
id
=
"enddate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"enddate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
...
@@ -861,37 +860,22 @@ export default class ReportItems extends Component {
...
@@ -861,37 +860,22 @@ export default class ReportItems extends Component {
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
{
this
.
state
.
itemReport
===
true
?
{
this
.
state
.
itemReport
===
true
?
<
div
>
this
.
state
.
load
&&
(
{
this
.
state
.
load
&&
(
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
180
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
182
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'20%'
,
}}
>
Master
Data
-
Report
Items
<
/label
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'50%'
,
}}
>
Master
Data
-
Report
Items
<
/label
>
{
/* <div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
{
/* <div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
<InputBase
style={{ width: '100%' }}
style={{ width: '100%' }}
placeholder="Search"
placeholder="Search"
value={this.state.search}
value={this.state.search}
onChange={(e) => this.handleInputChange(e.target.value)}
onChange={(e) => this.handleInputChange(e.target.value)}
inputProps={{ 'aria-label': 'naked' }}
inputProps={{ 'aria-label': 'naked' }}
/>
/>
</div> */
}
</div> */
}
<
div
style
=
{{
width
:
'30%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
width
:
'30%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadFile
()}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
buttonCreate
&&
(
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -899,71 +883,76 @@ export default class ReportItems extends Component {
...
@@ -899,71 +883,76 @@ export default class ReportItems extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
null
}
onClick
=
{()
=>
this
.
downloadFile
()
}
>
>
<
img
src
=
{
Images
.
upload
}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})
}
/
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a
>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
buttonCreate
&&
(
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
this
.
downloadDataTable
()}
onClick
=
{()
=>
null
}
>
>
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
upload
}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
)}
<
a
data
-
tip
=
{
'Visualization'
}
data
-
for
=
"visualisasi"
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
button
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visualisasi
:
true
,
itemReport
:
false
})}
>
<
img
src
=
{
Images
.
visualisasi
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
buttonCreate
&&
(
<
a
data
-
tip
=
{
'Add New'
}
data
-
for
=
"tambah"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
,
margin
:
5
marginRight
:
20
}}
}}
onClick
=
{()
=>
this
.
downloadDataTable
()}
>
>
<
img
src
=
{
Images
.
add
}
onClick
=
{()
=>
this
.
setState
({
add
:
true
})
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a
>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Visualization'
}
data
-
for
=
"visualisasi"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visualisasi
:
true
,
itemReport
:
false
})}
>
<
img
src
=
{
Images
.
visualisasi
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
buttonCreate
&&
(
<
a
data
-
tip
=
{
'Add New'
}
data
-
for
=
"tambah"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
,
marginRight
:
20
}}
>
<
img
src
=
{
Images
.
add
}
onClick
=
{()
=>
this
.
setState
({
add
:
true
})}
/
>
<
/button
>
<
/a
>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"tambah"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
<
div
style
=
{{
padding
:
25
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
)
:
:
this
.
state
.
visualisasi
==
true
?
this
.
state
.
visualisasi
==
true
?
<
VisualReportItems
<
VisualReportItems
...
@@ -978,16 +967,14 @@ export default class ReportItems extends Component {
...
@@ -978,16 +967,14 @@ export default class ReportItems extends Component {
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Preview
Data
<
/label
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Preview
Data
<
/label
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
25
}}
>
<
div
style
=
{{
padding
:
25
}}
>
{
this
.
state
.
dataLoaded
&&
(
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
theme
=
{
getMuiTheme
()}
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
rows
}
data
=
{
this
.
state
.
rows
}
columns
=
{
this
.
state
.
cols
}
columns
=
{
this
.
state
.
cols
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
)}
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
width
:
'100%'
,
placeContent
:
'flex-end'
,
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
width
:
'100%'
,
placeContent
:
'flex-end'
,
padding
:
20
}}
>
<
button
<
button
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
d33882ea
...
@@ -785,7 +785,7 @@ export default class CreateReportItems extends Component {
...
@@ -785,7 +785,7 @@ export default class CreateReportItems extends Component {
margin
=
"normal"
margin
=
"normal"
id
=
"startDate"
id
=
"startDate"
label
=
"Valid From"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
error
=
{
this
.
state
.
errorStartDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
helperText
=
{
this
.
state
.
msgErrorSD
}
...
@@ -817,7 +817,7 @@ export default class CreateReportItems extends Component {
...
@@ -817,7 +817,7 @@ export default class CreateReportItems extends Component {
margin
=
"normal"
margin
=
"normal"
id
=
"endDate"
id
=
"endDate"
label
=
"Valid To"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
endDate
==
""
?
null
:
this
.
state
.
endDate
}
value
=
{
this
.
state
.
endDate
==
""
?
null
:
this
.
state
.
endDate
}
error
=
{
this
.
state
.
errorEndDate
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
helperText
=
{
this
.
state
.
msgErrorED
}
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
d33882ea
...
@@ -767,7 +767,7 @@ export default class EditReportItems extends Component {
...
@@ -767,7 +767,7 @@ export default class EditReportItems extends Component {
margin
=
"normal"
margin
=
"normal"
id
=
"startDate"
id
=
"startDate"
label
=
"Valid From"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
error
=
{
this
.
state
.
errorStartDate
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorSD
}
helperText
=
{
this
.
state
.
msgErrorSD
}
...
@@ -798,7 +798,7 @@ export default class EditReportItems extends Component {
...
@@ -798,7 +798,7 @@ export default class EditReportItems extends Component {
margin
=
"normal"
margin
=
"normal"
id
=
"endDate"
id
=
"endDate"
label
=
"Valid To"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
end_date
}
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
end_date
}
error
=
{
this
.
state
.
errorEndDate
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
helperText
=
{
this
.
state
.
msgErrorED
}
...
...
src/container/ResetPassword.js
View file @
d33882ea
...
@@ -76,7 +76,7 @@ class ResetPassword extends Component {
...
@@ -76,7 +76,7 @@ class ResetPassword extends Component {
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Confirmation
Cannot be Empty.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Repeat Password
Cannot be Empty.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match.'
})
}
else
{
}
else
{
...
...
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