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
04530554
Commit
04530554
authored
Jun 25, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak rek demi eksasd tercinta
parent
430b6820
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
777 additions
and
237 deletions
+777
-237
index.js
src/api/index.js
+10
-1
Home.js
src/container/Home.js
+53
-7
MonthlyReport.js
src/container/MonthlyReport.js
+24
-12
ProgressReport.js
src/container/Progress/ProgressReport.js
+224
-69
TableProgressReport.js
src/container/Progress/TableProgressReport.js
+308
-148
CustomTable.js
src/library/CustomTable.js
+158
-0
No files found.
src/api/index.js
View file @
04530554
...
...
@@ -473,6 +473,11 @@ const create = (type = "") => {
const
getDetailDocument
=
(
id
)
=>
api
.
get
(
`document/get_document_by_id/
${
id
}
`
)
const
deleteDocument
=
(
id
)
=>
api
.
post
(
`document/delete_document/
${
id
}
`
)
// Monitoring
const
getMonitoringMB
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/master_budget/
${
body
.
year
}
`
)
const
getMonitoringMR
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/monthly_report/
${
body
.
year
}
/
${
body
.
month
}
`
)
const
getMonitoringRO
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/rolling_outlook/
${
body
.
year
}
/
${
body
.
quarter
}
`
)
const
getMonitoringOLPA
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/outlook_pa/
${
body
.
year
}
`
)
// ------
// STEP 3
// ------
...
...
@@ -813,7 +818,11 @@ const create = (type = "") => {
getDetailReportOLPACAT
,
createCATOLPA
,
getRatioLOCF
,
triggerRatioFromLOCF
triggerRatioFromLOCF
,
getMonitoringMB
,
getMonitoringMR
,
getMonitoringRO
,
getMonitoringOLPA
,
}
}
...
...
src/container/Home.js
View file @
04530554
...
...
@@ -12,6 +12,7 @@ import MenuIcon from '@material-ui/icons/Menu';
import
ExpandMore
from
'@material-ui/icons/ExpandMore'
import
ExpandLess
from
'@material-ui/icons/ExpandLess'
import
ReportIcon
from
'@material-ui/icons/PriorityHigh'
import
Announcement
from
'@material-ui/icons/Announcement'
;
import
ChevronLeftIcon
from
'@material-ui/icons/ChevronLeft'
;
import
ListItem
from
'@material-ui/core/ListItem'
;
import
ListItemIcon
from
'@material-ui/core/ListItemIcon'
;
...
...
@@ -157,6 +158,8 @@ export default function MiniDrawer() {
const
[
userPhoto
,
setUserPhoto
]
=
React
.
useState
(
""
)
const
[
application
,
setApplication
]
=
React
.
useState
([])
const
[
setting
,
setSetting
]
=
React
.
useState
([])
const
[
isApprover
,
setIsApprover
]
=
React
.
useState
(
false
);
const
[
data
,
setData
]
=
React
.
useState
({
array
:
[
{
...
...
@@ -318,6 +321,7 @@ export default function MiniDrawer() {
if
(
userFullname
===
""
&&
userEmail
===
""
)
{
getUserData
()
getMenuHierarki
()
getDetailUser
()
}
})
...
...
@@ -335,6 +339,48 @@ export default function MiniDrawer() {
return
data
}
const
getDetailUser
=
()
=>
{
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
getRole
(
response
.
data
.
data
.
role_id
)
}
}
}
})
}
const
getRole
=
(
id
)
=>
{
api
.
create
().
getDetailRole
(
id
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
status
===
'success'
)
{
// this.setState({ tempData: response.data.data, privileges: response.data.data.privileges })
// // // console.log(response.data.data)
if
(
String
(
response
.
data
.
data
.
role_name
).
toLocaleLowerCase
()
==
'superadmin'
)
{
getIsApprover
(
true
)
}
else
{
getIsApprover
(
false
)
}
}
else
{
getIsApprover
(
false
)
}
})
}
const
getIsApprover
=
(
superadmin
)
=>
{
api
.
create
().
getAM
().
then
((
response
)
=>
{
console
.
log
(
response
);
let
actAMActive
=
response
.
data
.
data
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
indexId
=
actAMActive
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
if
(
indexId
!=
-
1
||
superadmin
)
{
setIsApprover
(
true
)
}
})
}
const
getMenuHierarki
=
()
=>
{
api
.
create
().
getMenuByRole
().
then
((
response
)
=>
{
console
.
log
(
response
)
...
...
@@ -567,17 +613,17 @@ export default function MiniDrawer() {
}
<
/div
>
))}
{
/*
<Link to={`${url}/progress-reports`}>
<div style={{ paddingLeft: 5 }} className={selectedIndex === '
progress-reports
' ? "active" : ""}>
<a data-tip={'
progress-reports'} data-for={'progress-reports
'}>
<ListItem button key={'progress-reports'} onClick={() => selectIndex('
progress-reports
')}>
<ListItemIcon style={{ minWidth: open ? 40 : 56
}}><ReportIcon style={{marginLeft: -5}}
/></ListItemIcon>
{
isApprover
&&
<
Link
to
=
{
`
${
url
}
/progress-reports`
}
>
<
div
style
=
{{
paddingLeft
:
5
}}
className
=
{
selectedIndex
===
'
Progress Report
'
?
"active"
:
""
}
>
<
a
data
-
tip
=
{
'
Progress Report'
}
data
-
for
=
{
'Progress Report
'
}
>
<
ListItem
button
key
=
{
'progress-reports'
}
onClick
=
{()
=>
selectIndex
(
'
Progress Report
'
)}
>
<
ListItemIcon
style
=
{{
minWidth
:
open
?
40
:
56
}}
><
Announcement
style
=
{{
marginLeft
:
-
5
}}
/></
ListItemIcon
>
<
Typography
style
=
{{
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#525355'
,
fontSize
:
14
}}
>
{
'Progress Report'
}
<
/Typography
>
<
/ListItem
>
<
/a
>
{
!
open
&&
(
<
ReactTooltip
border
=
{
true
}
id
=
{
'Progress Report'
}
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
)}
<
/div
>
</Link>
*/
}
<
/Link>
}
<
/List
>
{
open
&&
setting
.
length
>
0
&&
<
div
style
=
{{
marginLeft
:
20
}}
>
...
...
@@ -669,7 +715,7 @@ export default function MiniDrawer() {
path
=
{
route
.
path
}
// exact={route.exact}
location
=
{
location
}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
open
=
{
open
}
location
=
{
location
}
selectIndex
=
{
selectIndex
.
bind
(
this
)}
/>
}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
open
=
{
open
}
location
=
{
location
}
selectIndex
=
{
selectIndex
.
bind
(
this
)}
/>
}
/>
))}
<
/Switch
>
...
...
src/container/MonthlyReport.js
View file @
04530554
...
...
@@ -629,6 +629,18 @@ export default class MonthlyReport extends Component {
// this.getPL(type)
if
(
type
!=
undefined
&&
type
==
'PL'
)
{
this
.
getPL
(
type
)
}
else
if
(
type
!=
undefined
&&
type
==
'LOCF'
)
{
let
bodyRatioLocf
=
{
"report"
:
'ratio'
,
"monthlyReportId"
:
this
.
state
.
monthlyReportId
,
"periode"
:
this
.
state
.
periode
.
periode
,
"companyId"
:
this
.
state
.
company
.
company_id
,
"months"
:
this
.
state
.
month
.
month_id
}
api
.
create
().
triggerRatioFromLOCF
(
bodyRatioLocf
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
setState
({
loading
:
false
})
})
}
else
{
this
.
setState
({
loading
:
false
})
}
...
...
@@ -1782,10 +1794,10 @@ export default class MonthlyReport extends Component {
this
.
setState
({
dbPL
:
listPL
},
()
=>
{
if
(
type
!=
undefined
)
{
if
(
type
==
'PL'
)
{
// console.log(this.state.dbPL)
// this.setState({ loading: false })
console
.
log
(
'tarik sis'
)
this
.
createPL
()
// console.log(this.state.dbPL)
// this.setState({ loading: false })
console
.
log
(
'tarik sis'
)
this
.
createPL
()
}
}
})
...
...
@@ -2164,14 +2176,14 @@ export default class MonthlyReport extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
this
.
state
.
periode
.
periode
<=
2020
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
// {
(
tableMeta
.
rowData
[
5
]
?
this
.
state
.
periode
.
periode
<=
2020
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
)
:
// {
(
tableMeta
.
rowData
[
5
]
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
)
// console.log(tableMeta.rowData)
// }
...
...
@@ -3017,7 +3029,7 @@ export default class MonthlyReport extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
isApprover
=
{
this
.
state
.
isApprover
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
PLBSFAMSubmitted
=
{
this
.
state
.
lastStatus
==
'APPROVED'
?
true
:
false
}
PLBSFAMSubmitted
=
{
this
.
state
.
lastStatus
==
'APPROVED'
?
true
:
false
}
// PLBSFAMSubmitted={false}
createCashFlow
=
{
this
.
createCashFlow
.
bind
(
this
)}
/
>
...
...
src/container/Progress/ProgressReport.js
View file @
04530554
This diff is collapsed.
Click to expand it.
src/container/Progress/TableProgressReport.js
View file @
04530554
This diff is collapsed.
Click to expand it.
src/library/CustomTable.js
View file @
04530554
...
...
@@ -482,6 +482,144 @@ exports.customTable3 = function () {
}
}
exports
.
customTable4
=
function
()
{
return
{
typography
:
{
useNextVariants
:
true
,
},
overrides
:
{
MUIDataTable
:
{
root
:
{
backgroundColor
:
secondColor
,
},
paper
:
{
boxShadow
:
"0 0 30px 0 rgba(154,161,171,.15)"
,
border
:
"1px rgba(0,0,0,0.1) solid"
,
borderRadius
:
"5px"
,
overflow
:
"hidden"
,
},
responsiveScrollMaxHeight
:
{
maxHeight
:
'700px !important'
},
},
MuiToolbar
:
{
root
:
{
left
:
{
flex
:
"0 0 auto !important"
},
actions
:
{
flex
:
"0 0 auto !important"
}
}
},
MUIDataTableToolbar
:
{
root
:
{
backgroundColor
:
secondColor
,
},
titleText
:
{
color
:
"#555"
},
icon
:
{
color
:
"#555"
},
},
MUIDataTableSearch
:
{
searchIcon
:
{
color
:
"#555"
},
searchText
:
{
color
:
"#555"
,
},
clearIcon
:
{
color
:
"#555"
},
},
MUIDataTableHead
:
{
main
:
{
backgroundColor
:
mainColor
,
color
:
"#555"
}
},
MUIDataTableHeadRow
:
{
root
:
{
backgroundColor
:
mainColor
,
}
},
MUIDataTableHeadCell
:
{
root
:
{
fontSize
:
"10pt"
,
fontWeight
:
"500"
,
color
:
mainColor
,
},
fixedHeader
:
{
position
:
"relative"
,
backgroundColor
:
secondColor
,
color
:
"#555"
,
padding
:
"10px"
,
height
:
"auto"
,
},
toolButton
:
{
display
:
"flex"
,
height
:
"auto"
},
data
:
{
display
:
"inline-block"
,
verticalAlign
:
"top"
,
},
sortActive
:
{
color
:
"#555"
},
sortAction
:
{
color
:
"#555"
,
display
:
"inline-block"
,
verticalAlign
:
"top"
,
MuiButtonBase
:
{
color
:
"#555"
,
root
:
{
color
:
"#555"
,
}
}
}
},
MUIDataTableBodyCell
:
{
root
:
{
fontSize
:
"10pt"
}
},
ColorPallete3
:
{
backgroundColor
:
'#37b5e6'
},
MuiTableCell
:
{
root
:
{
display
:
'table-cell'
,
padding
:
7
,
paddingLeft
:
25
,
paddingRight
:
25
,
fontSize
:
'0.875rem'
,
textAlign
:
'left'
,
fontFamily
:
"Roboto, Helvetica, Arial, sans-serif"
,
fontWeight
:
400
,
lineHeight
:
1.43
,
borderBottom
:
'1px solid rgba(224, 224, 224, 1)'
,
letterSpacing
:
'0.01071em'
,
verticalAlign
:
'inherit'
,
}
},
MUIDataTableSelectCell
:
{
headerCell
:
{
backgroundColor
:
secondColor
,
checkboxRoot
:
{
color
:
"#fff"
,
}
},
checkboxRoot
:
{
color
:
"#555"
}
},
}
}
}
exports
.
customOptions
=
function
()
{
return
{
// selectableRows: false,
...
...
@@ -546,4 +684,24 @@ exports.customOptionsManagementDocument = function () {
filter
:
true
,
search
:
true
,
}
}
exports
.
customOptionsFixedColumnMonitoring
=
function
()
{
return
{
selectableRows
:
false
,
selectableRows
:
'none'
,
filterType
:
false
,
filter
:
false
,
sort
:
true
,
responsive
:
'scrollMaxHeight'
,
viewColumns
:
false
,
// overflowX: 'auto',
print
:
false
,
download
:
false
,
elevation
:
5
,
search
:
true
,
pagination
:
true
,
rowsPerPage
:
25
,
rowsPerPageOptions
:
[
25
,
50
,
100
,
200
],
}
}
\ No newline at end of file
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