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
819a7fe5
Commit
819a7fe5
authored
Jan 12, 2021
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fam
parent
e70541fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
417 additions
and
413 deletions
+417
-413
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+417
-413
No files found.
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
819a7fe5
...
...
@@ -49,7 +49,7 @@ export default class FixedAssetsMovementMR extends Component {
updateBy
:
'-'
,
notesUpdate
:
'-'
,
get_for
:
'view'
,
viewOnly
:
true
viewOnly
:
true
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -61,7 +61,7 @@ export default class FixedAssetsMovementMR extends Component {
}
handleGetFor
(
type
)
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
})
...
...
@@ -93,7 +93,7 @@ export default class FixedAssetsMovementMR extends Component {
checkStatus
=
false
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
})
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
})
}
getLatestUpdate
()
{
...
...
@@ -201,10 +201,12 @@ export default class FixedAssetsMovementMR extends Component {
}
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
refresh
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
,
refresh
:
true
})
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
refresh
:
false
})
},
300
);
this
.
setState
({
loading
:
false
,
refresh
:
false
})
},
200
);
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -484,7 +486,7 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(valuezz);
}
}
else
{
let
data
=
tableMeta
.
rowData
[
13
]
==
null
?
[]
:
tableMeta
.
rowData
[
13
]
let
data
=
tableMeta
.
rowData
[
13
]
==
null
?
[]
:
tableMeta
.
rowData
[
13
]
let
indexID
=
data
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
))
if
(
indexID
!==
-
1
)
{
let
valuezz
=
data
[
indexID
].
value
...
...
@@ -507,7 +509,7 @@ export default class FixedAssetsMovementMR extends Component {
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
opet
=
item
}
else
{
anjay
.
push
(
opet
==
''
?
Number
(
item
)
:
Number
(
String
(
opet
+
String
(
item
))))
anjay
.
push
(
opet
==
''
?
Number
(
item
)
:
Number
(
String
(
opet
+
String
(
item
))))
tambahan
=
false
opet
=
""
}
...
...
@@ -680,13 +682,13 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(tableMeta.rowData[9]);
// console.log(total)
if
(
dex
===
2
)
{
total
=
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
6
])
==
NaN
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
6
])
total
=
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
6
])
==
NaN
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
6
])
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
// console.log(tableMeta.rowData[8]);
// console.log(tableMeta.rowData[6]);
// console.log(total)
}
else
if
(
dex
===
3
)
{
total
=
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
7
])
==
NaN
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
7
])
total
=
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
7
])
==
NaN
?
"0.0"
:
Number
(
tableMeta
.
rowData
[
8
])
-
Number
(
tableMeta
.
rowData
[
7
])
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
+
type
]
=
Number
(
total
).
toFixed
(
1
)
// console.log(tableMeta.rowData[8]);
// console.log(tableMeta.rowData[7]);
...
...
@@ -694,6 +696,8 @@ export default class FixedAssetsMovementMR extends Component {
}
// console.log(dex)
// console.log(Number(tableMeta.columnIndex) + Number(type))
console
.
log
(
total
);
console
.
log
(
dataTable2
);
return
total
}
...
...
@@ -803,7 +807,7 @@ export default class FixedAssetsMovementMR extends Component {
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
45
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
,
height
:
45
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
,
height
:
45
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
...
...
@@ -875,7 +879,7 @@ export default class FixedAssetsMovementMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
...
...
@@ -900,10 +904,10 @@ export default class FixedAssetsMovementMR extends Component {
<
NumberFormat
thousandSeparator
=
{
true
}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
color
:
this
.
props
.
isApprover
||
this
.
state
.
get_for
==
'view'
?
'black'
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
this
.
props
.
isApprover
||
this
.
state
.
get_for
==
'view'
?
'black'
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
(
this
.
state
.
get_for
==
'view'
?
true
:
false
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
(
this
.
state
.
get_for
==
'view'
?
true
:
false
)}
value
=
{
Number
(
tableMeta
.
rowData
[
8
]).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
8
)
...
...
@@ -912,7 +916,7 @@ export default class FixedAssetsMovementMR extends Component {
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
5
||
tableMeta
.
rowData
[
0
]
===
6
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
...
...
@@ -1000,7 +1004,7 @@ export default class FixedAssetsMovementMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
...
...
@@ -1039,7 +1043,7 @@ export default class FixedAssetsMovementMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
...
...
@@ -1085,7 +1089,7 @@ export default class FixedAssetsMovementMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
...
...
@@ -1124,7 +1128,7 @@ export default class FixedAssetsMovementMR extends Component {
<
div
style
=
{{
textAlign
:
'right'
,
width
:
120
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
...
...
@@ -1242,7 +1246,7 @@ export default class FixedAssetsMovementMR extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
{
this
.
props
.
isApprover
===
true
||
this
.
state
.
get_for
==
'view'
?
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
...
...
@@ -1273,7 +1277,7 @@ export default class FixedAssetsMovementMR extends Component {
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadTemplate
()
}
onClick
=
{()
=>
this
.
downloadTemplate
()}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
...
...
@@ -1366,7 +1370,7 @@ export default class FixedAssetsMovementMR extends Component {
outline
:
'none'
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
,
refresh
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
,
refresh
:
true
},
()
=>
{
this
.
handleGetFor
(
'edit'
)
// setTimeout(() => {
// this.setState({ loading: 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