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
1c026c14
Commit
1c026c14
authored
Sep 28, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
apdet malem2 sebelum bubu See merge request
!383
parents
e0731415
2b6ad044
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
342 additions
and
170 deletions
+342
-170
index.js
src/api/index.js
+5
-2
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+31
-3
HomePage.js
src/container/HomePage.js
+18
-3
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+9
-0
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+279
-162
No files found.
src/api/index.js
View file @
1c026c14
...
@@ -201,13 +201,14 @@ const create = (type = "") => {
...
@@ -201,13 +201,14 @@ const create = (type = "") => {
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
const
getAllOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/get_all_operating_indicator_report'
,
body
)
const
getAllOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/get_all_operating_indicator_report'
,
body
)
const
getOperatingIndDetail
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_report_hierarki'
,
body
)
const
getOperatingIndDetail
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_report_hierarki'
,
body
)
const
createOpetaingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/create_submission_report'
,
body
)
const
createOpetaingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/create_submission_report'
,
body
)
const
checkUploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/check_import'
,
body
)
const
checkUploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/check_import'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/master_budget/get_dashboard'
)
//Template
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
@@ -354,7 +355,9 @@ const create = (type = "") => {
...
@@ -354,7 +355,9 @@ const create = (type = "") => {
uploadOperatingInd
,
uploadOperatingInd
,
getLastestUpdateMB
,
getLastestUpdateMB
,
countingFormula
,
countingFormula
,
submitMasterBudget
submitMasterBudget
,
getIdDeleteFromExcel
,
getDashboard
}
}
}
}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
1c026c14
...
@@ -284,6 +284,19 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -284,6 +284,19 @@ export default class CorporateAnnualTarget extends Component {
}
}
checkUpload
()
{
checkUpload
()
{
let
dataDelete
=
this
.
state
.
dataDelete
api
.
create
().
getIdDeleteFromExcel
(
this
.
state
.
payload
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
let
idDelete
=
response
.
data
.
data
.
item_report_id
if
(
idDelete
.
length
>
0
)
{
idDelete
.
map
((
item
,
index
)
=>
{
dataDelete
.
push
(
item
)
})
this
.
setState
({
dataDelete
})
}
}
})
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
console
.
log
(
response
)
...
@@ -343,11 +356,24 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -343,11 +356,24 @@ export default class CorporateAnnualTarget extends Component {
}
}
uploadCAT
(
type
)
{
uploadCAT
(
type
)
{
let
payload
=
{
"item_report_id"
:
this
.
state
.
dataDelete
}
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
api
.
create
().
deleteAllItemReport
(
payload
).
then
((
response
)
=>
{
this
.
functionUpload
(
type
)
})
}
else
{
this
.
functionUpload
(
type
)
}
}
functionUpload
(
type
)
{
let
data
=
[]
let
data
=
[]
console
.
log
(
this
.
state
.
dataTable
)
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
"item_report_id"
:
i
[
0
],
"item_report_id"
:
i
[
1
],
"item_report"
:
String
(
i
[
6
]),
"item_report"
:
String
(
i
[
6
]),
"weight"
:
String
(
i
[
7
]),
"weight"
:
String
(
i
[
7
]),
"uom"
:
String
(
i
[
8
]),
"uom"
:
String
(
i
[
8
]),
...
@@ -534,6 +560,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -534,6 +560,7 @@ export default class CorporateAnnualTarget extends Component {
// })
// })
})
})
}
else
{
}
else
{
console
.
log
(
'sini jing'
)
// api.create().validateSubmitReport(payloadBro).then((response) => {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// console.log(response)
// console.log(response)
// if (response.data.data.result) {
// if (response.data.data.result) {
...
@@ -732,7 +759,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -732,7 +759,7 @@ export default class CorporateAnnualTarget extends Component {
const
handleAction
=
(
idParent
)
=>
{
const
handleAction
=
(
idParent
)
=>
{
if
(
idParent
!==
null
)
{
if
(
idParent
!==
null
)
{
let
indexsss
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
idParent
)
let
indexsss
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
idParent
)
if
(
dataTable2
[
indexsss
][
6
]
==
'CUSTOMER PERSPECTIVE'
||
dataTable2
[
indexsss
][
6
]
==
'INTERNAL PERSPECTIVE'
)
{
if
(
dataTable2
[
indexsss
][
6
]
==
'CUSTOMER PERSPECTIVE'
||
dataTable2
[
indexsss
][
6
]
==
'INTERNAL
BUSINESS PROCESS
PERSPECTIVE'
)
{
return
true
return
true
}
else
{
}
else
{
return
false
return
false
...
@@ -1901,7 +1928,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -1901,7 +1928,7 @@ export default class CorporateAnnualTarget extends Component {
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
{
this
.
state
.
visibleCAT
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
{
this
.
state
.
visibleCAT
?
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
Submission
-
Corporate
Annual
Target
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
-
Corporate
Annual
Target
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
...
@@ -2068,6 +2095,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -2068,6 +2095,7 @@ export default class CorporateAnnualTarget extends Component {
<
/div
>
<
/div
>
{
this
.
state
.
dataLoaded
&&
(
{
this
.
state
.
dataLoaded
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
...
...
src/container/HomePage.js
View file @
1c026c14
...
@@ -13,7 +13,8 @@ class HomePage extends Component {
...
@@ -13,7 +13,8 @@ class HomePage extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
userData
:
null
userData
:
null
,
listDashboard
:
[]
}
}
}
}
...
@@ -28,10 +29,24 @@ class HomePage extends Component {
...
@@ -28,10 +29,24 @@ class HomePage extends Component {
}
}
}
}
})
})
this
.
getDashboard
()
}
getDashboard
()
{
let
listDashboard
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
if
(
String
(
response
.
data
.
status
).
toLocaleLowerCase
()
==
'success'
)
{
let
data
=
response
.
data
.
data
data
.
map
((
item
,
index
)
=>
{
listDashboard
.
push
([
index
+
1
,
item
.
approval_id
,
item
.
company_name
,
`
${
item
.
type_report
}
-
${
item
.
periode
}
`
,
item
.
revision
,
item
.
status
])
})
this
.
setState
({
listDashboard
})
}
})
}
}
render
()
{
render
()
{
const
columns
=
[
"#"
,
"
Nama Perusahaan
"
,
"Revisi"
,
"Status"
,
{
const
columns
=
[
"#"
,
"
ID"
,
"Nama Perusahaan"
,
"Jenis Report
"
,
"Revisi"
,
"Status"
,
{
name
:
"Action"
,
name
:
"Action"
,
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
...
@@ -123,7 +138,7 @@ class HomePage extends Component {
...
@@ -123,7 +138,7 @@ class HomePage extends Component {
<
div
>
<
div
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
data
}
data
=
{
this
.
state
.
listDashboard
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
1c026c14
...
@@ -261,6 +261,12 @@ export default class OperatingIndicator extends Component {
...
@@ -261,6 +261,12 @@ export default class OperatingIndicator extends Component {
})
})
}
}
saveOperatingInd
(
payload
)
{
api
.
create
().
createOpetaingInd
(
payload
).
then
((
response
)
=>
{
this
.
getReport
()
})
}
render
()
{
render
()
{
const
columns
=
[
"#"
,
"Jenis Laporan"
,
const
columns
=
[
"#"
,
"Jenis Laporan"
,
// {
// {
...
@@ -453,6 +459,9 @@ export default class OperatingIndicator extends Component {
...
@@ -453,6 +459,9 @@ export default class OperatingIndicator extends Component {
height
=
{
this
.
props
.
height
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
width
=
{
this
.
props
.
width
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailOpt
:
false
,
visibleOperatingIndicator
:
true
},
this
.
forceUpdate
())}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailOpt
:
false
,
visibleOperatingIndicator
:
true
},
this
.
forceUpdate
())}
getReport
=
{()
=>
this
.
getReport
()}
saveOperatingInd
=
{
this
.
saveOperatingInd
.
bind
(
this
)}
/
>
/
>
}
}
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
1c026c14
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