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
08dd1ab1
Commit
08dd1ab1
authored
Sep 22, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!353
parents
3d99476e
1415023b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
171 additions
and
220 deletions
+171
-220
index.js
src/api/index.js
+6
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+111
-89
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+16
-69
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+38
-61
No files found.
src/api/index.js
View file @
08dd1ab1
...
...
@@ -202,6 +202,9 @@ const create = (type = "") => {
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
createOpetaingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/create_submission_report'
,
body
)
const
checkUploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/check_import'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
...
@@ -343,7 +346,9 @@ const create = (type = "") => {
getOpetratingIndID
,
createAllItemReport
,
deleteAllItemReport
,
validateSubmitReport
validateSubmitReport
,
checkUploadOperatingInd
,
uploadOperatingInd
}
}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
08dd1ab1
This diff is collapsed.
Click to expand it.
src/container/OprIndicator/OperatingIndicator.js
View file @
08dd1ab1
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
,
Select
,
FormControlLabel
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
,
Select
,
FormControlLabel
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
Images
from
'../../assets/Images'
;
import
OperatingIndicatorDetail
from
'./OperatingIndicatorDetail'
...
...
@@ -10,6 +10,9 @@ import { ExcelRenderer } from 'react-excel-renderer';
import
UploadFile
from
"../../library/Upload"
;
import
{
format
}
from
'date-fns'
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
export
default
class
OperatingIndicator
extends
Component
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -121,7 +124,7 @@ export default class OperatingIndicator extends Component {
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
year
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getReport
()
this
.
get
Submission
()
this
.
get
OperatingID
()
})
}
}
...
...
@@ -156,7 +159,7 @@ export default class OperatingIndicator extends Component {
})
}
get
Submission
()
{
get
OperatingID
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
...
...
@@ -353,7 +356,7 @@ export default class OperatingIndicator extends Component {
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
getReport
()
this
.
get
Submission
()
this
.
get
OperatingID
()
// this.getReportAttachment()
})}
debug
...
...
@@ -369,7 +372,7 @@ export default class OperatingIndicator extends Component {
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
getReport
()
this
.
get
Submission
()
this
.
get
OperatingID
()
// this.getReportAttachment()
})}
debug
...
...
@@ -379,72 +382,15 @@ export default class OperatingIndicator extends Component {
value
=
{
this
.
state
.
company
}
/
>
<
/div
>
{
/* <div style={{ marginTop: 20 }}>
<Autocomplete
{...this.state.listRevision}
id="revision"
onChange={(event, newInputValue) => this.setState({ revision: newInputValue }, () => {
this.getReport()
this.getReportAttachment()
})}
debug
disableClearable
style={{ width: 250 }}
renderInput={(params) => <TextField {...params} label="Revision" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.revision}
/>
</div> */
}
<
div
style
=
{{
marginTop
:
20
}}
>
<
MUIDataTable
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
open
=
{
this
.
props
.
open
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
/
>
<
/div
>
{
/* <div style={{ display: 'flex', marginTop: 20 }}>
<div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div>
<div style={{ width: '50%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
onClick={() => this.setState({ visibleUpload: true })}
>
<Typography style={{ fontSize: '16px', color: '#5198ea' }}>Upload File</Typography>
</button>
</div>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<div style={{ display: 'flex', marginTop: 10 }}>
<div style={{ width: '50%', paddingLeft: 20 }}>
{this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => {
return (
<Typography style={{ fontSize: '16px', color: '#4b4b4b' }}>{item.attachment_name}</Typography>
)
})
: null
}
</div>
<div style={{ width: '50%' }}>
{this.state.listAttachment.length > 0 ?
this.state.listAttachment.map((item) => {
return (
<Typography style={{ fontSize: '16px', color: '#ff3939' }}>Delete</Typography>
)
})
: null
}
</div>
</div> */
}
<
/div
>
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
...
@@ -459,6 +405,7 @@ export default class OperatingIndicator extends Component {
{
this
.
state
.
visibleDetailOpt
&&
<
OperatingIndicatorDetail
open
=
{
this
.
props
.
open
}
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
08dd1ab1
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