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
964c413b
Commit
964c413b
authored
Oct 15, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment console
parent
dd6887b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
26 deletions
+25
-26
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+25
-26
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
964c413b
...
...
@@ -56,7 +56,6 @@ export default class FixedAssetsMovement extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
);
}
getLatestUpdate
()
{
...
...
@@ -88,7 +87,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id"
:
this
.
props
.
submissionID
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
let
dataTable
=
[]
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
...
...
@@ -240,7 +239,7 @@ export default class FixedAssetsMovement extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
`
)
res
=
await
res
.
blob
()
console
.
log
(
res
)
//
console.log(res)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
...
...
@@ -259,7 +258,7 @@ export default class FixedAssetsMovement extends Component {
}
else
{
let
isi
=
resp
.
rows
.
slice
(
3
)
console
.
log
(
resp
.
rows
[
2
]);
//
console.log(resp.rows[2]);
let
payload
=
[]
let
reg
=
/^
[
-+
]?(?:[
0-9
]
+,
)
*
[
0-9
]
+
(?:\.[
0-9
]
+
)?
$/
;
isi
.
map
((
i
,
index
)
=>
{
...
...
@@ -292,7 +291,7 @@ export default class FixedAssetsMovement extends Component {
report_id
:
this
.
props
.
report_id
,
fixed_asset_movement
:
payload
}
console
.
log
(
body
)
//
console.log(body)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
});
...
...
@@ -301,7 +300,7 @@ export default class FixedAssetsMovement extends Component {
checkUpload
()
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleFixedAssetsMovement
:
false
,
loading
:
true
})
...
...
@@ -337,7 +336,7 @@ export default class FixedAssetsMovement extends Component {
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
24
].
length
>
0
)
{
console
.
log
(
'masuk'
)
//
console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
})
...
...
@@ -379,9 +378,9 @@ export default class FixedAssetsMovement extends Component {
fixed_asset_movement
:
data
,
status
:
type
}
console
.
log
(
JSON
.
stringify
(
body
));
//
console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
...
...
@@ -417,7 +416,7 @@ export default class FixedAssetsMovement extends Component {
handleValidate
()
{
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
//
console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
...
...
@@ -439,7 +438,7 @@ export default class FixedAssetsMovement extends Component {
total_more_year
:
i
[
0
]
===
3
&&
i
[
21
]
===
""
?
"0"
:
String
(
i
[
21
])
})
})
console
.
log
(
JSON
.
stringify
(
data
))
//
console.log(JSON.stringify(data))
let
payload
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -449,7 +448,7 @@ export default class FixedAssetsMovement extends Component {
"status"
:
"submitted"
}
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
})
}
else
{
...
...
@@ -881,7 +880,7 @@ export default class FixedAssetsMovement extends Component {
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -970,7 +969,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1059,7 +1058,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1148,7 +1147,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1237,7 +1236,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1326,7 +1325,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1415,7 +1414,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1504,7 +1503,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1593,7 +1592,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1682,7 +1681,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1771,7 +1770,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1860,7 +1859,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -1987,7 +1986,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
@@ -2065,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
}}
/
>
}
...
...
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