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
3fb532c2
Commit
3fb532c2
authored
Jun 25, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
Ggmac See merge request
!1533
parents
e67c5070
94ebf5d8
Changes
6
Expand all
Show 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 @
3fb532c2
...
@@ -473,6 +473,11 @@ const create = (type = "") => {
...
@@ -473,6 +473,11 @@ const create = (type = "") => {
const
getDetailDocument
=
(
id
)
=>
api
.
get
(
`document/get_document_by_id/
${
id
}
`
)
const
getDetailDocument
=
(
id
)
=>
api
.
get
(
`document/get_document_by_id/
${
id
}
`
)
const
deleteDocument
=
(
id
)
=>
api
.
post
(
`document/delete_document/
${
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
// STEP 3
// ------
// ------
...
@@ -813,7 +818,11 @@ const create = (type = "") => {
...
@@ -813,7 +818,11 @@ const create = (type = "") => {
getDetailReportOLPACAT
,
getDetailReportOLPACAT
,
createCATOLPA
,
createCATOLPA
,
getRatioLOCF
,
getRatioLOCF
,
triggerRatioFromLOCF
triggerRatioFromLOCF
,
getMonitoringMB
,
getMonitoringMR
,
getMonitoringRO
,
getMonitoringOLPA
,
}
}
}
}
...
...
src/container/Home.js
View file @
3fb532c2
...
@@ -12,6 +12,7 @@ import MenuIcon from '@material-ui/icons/Menu';
...
@@ -12,6 +12,7 @@ import MenuIcon from '@material-ui/icons/Menu';
import
ExpandMore
from
'@material-ui/icons/ExpandMore'
import
ExpandMore
from
'@material-ui/icons/ExpandMore'
import
ExpandLess
from
'@material-ui/icons/ExpandLess'
import
ExpandLess
from
'@material-ui/icons/ExpandLess'
import
ReportIcon
from
'@material-ui/icons/PriorityHigh'
import
ReportIcon
from
'@material-ui/icons/PriorityHigh'
import
Announcement
from
'@material-ui/icons/Announcement'
;
import
ChevronLeftIcon
from
'@material-ui/icons/ChevronLeft'
;
import
ChevronLeftIcon
from
'@material-ui/icons/ChevronLeft'
;
import
ListItem
from
'@material-ui/core/ListItem'
;
import
ListItem
from
'@material-ui/core/ListItem'
;
import
ListItemIcon
from
'@material-ui/core/ListItemIcon'
;
import
ListItemIcon
from
'@material-ui/core/ListItemIcon'
;
...
@@ -157,6 +158,8 @@ export default function MiniDrawer() {
...
@@ -157,6 +158,8 @@ export default function MiniDrawer() {
const
[
userPhoto
,
setUserPhoto
]
=
React
.
useState
(
""
)
const
[
userPhoto
,
setUserPhoto
]
=
React
.
useState
(
""
)
const
[
application
,
setApplication
]
=
React
.
useState
([])
const
[
application
,
setApplication
]
=
React
.
useState
([])
const
[
setting
,
setSetting
]
=
React
.
useState
([])
const
[
setting
,
setSetting
]
=
React
.
useState
([])
const
[
isApprover
,
setIsApprover
]
=
React
.
useState
(
false
);
const
[
data
,
setData
]
=
React
.
useState
({
const
[
data
,
setData
]
=
React
.
useState
({
array
:
[
array
:
[
{
{
...
@@ -318,6 +321,7 @@ export default function MiniDrawer() {
...
@@ -318,6 +321,7 @@ export default function MiniDrawer() {
if
(
userFullname
===
""
&&
userEmail
===
""
)
{
if
(
userFullname
===
""
&&
userEmail
===
""
)
{
getUserData
()
getUserData
()
getMenuHierarki
()
getMenuHierarki
()
getDetailUser
()
}
}
})
})
...
@@ -335,6 +339,48 @@ export default function MiniDrawer() {
...
@@ -335,6 +339,48 @@ export default function MiniDrawer() {
return
data
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
=
()
=>
{
const
getMenuHierarki
=
()
=>
{
api
.
create
().
getMenuByRole
().
then
((
response
)
=>
{
api
.
create
().
getMenuByRole
().
then
((
response
)
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
...
@@ -567,17 +613,17 @@ export default function MiniDrawer() {
...
@@ -567,17 +613,17 @@ export default function MiniDrawer() {
}
}
<
/div
>
<
/div
>
))}
))}
{
/*
<Link to={`${url}/progress-reports`}>
{
isApprover
&&
<
Link
to
=
{
`
${
url
}
/progress-reports`
}
>
<div style={{ paddingLeft: 5 }} className={selectedIndex === '
progress-reports
' ? "active" : ""}>
<
div
style
=
{{
paddingLeft
:
5
}}
className
=
{
selectedIndex
===
'
Progress Report
'
?
"active"
:
""
}
>
<a data-tip={'
progress-reports'} data-for={'progress-reports
'}>
<
a
data
-
tip
=
{
'
Progress Report'
}
data
-
for
=
{
'Progress Report
'
}
>
<ListItem button key={'progress-reports'} onClick={() => selectIndex('
progress-reports
')}>
<
ListItem
button
key
=
{
'progress-reports'
}
onClick
=
{()
=>
selectIndex
(
'
Progress Report
'
)}
>
<ListItemIcon style={{ minWidth: open ? 40 : 56
}}><ReportIcon style={{marginLeft: -5}}
/></ListItemIcon>
<
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
>
<
Typography
style
=
{{
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#525355'
,
fontSize
:
14
}}
>
{
'Progress Report'
}
<
/Typography
>
<
/ListItem
>
<
/ListItem
>
<
/a
>
<
/a
>
{
!
open
&&
(
<
ReactTooltip
border
=
{
true
}
id
=
{
'Progress Report'
}
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
)}
{
!
open
&&
(
<
ReactTooltip
border
=
{
true
}
id
=
{
'Progress Report'
}
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
)}
<
/div
>
<
/div
>
</Link>
*/
}
<
/Link>
}
<
/List
>
<
/List
>
{
open
&&
setting
.
length
>
0
&&
{
open
&&
setting
.
length
>
0
&&
<
div
style
=
{{
marginLeft
:
20
}}
>
<
div
style
=
{{
marginLeft
:
20
}}
>
...
@@ -669,7 +715,7 @@ export default function MiniDrawer() {
...
@@ -669,7 +715,7 @@ export default function MiniDrawer() {
path
=
{
route
.
path
}
path
=
{
route
.
path
}
// exact={route.exact}
// exact={route.exact}
location
=
{
location
}
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
>
<
/Switch
>
...
...
src/container/MonthlyReport.js
View file @
3fb532c2
...
@@ -629,6 +629,18 @@ export default class MonthlyReport extends Component {
...
@@ -629,6 +629,18 @@ export default class MonthlyReport extends Component {
// this.getPL(type)
// this.getPL(type)
if
(
type
!=
undefined
&&
type
==
'PL'
)
{
if
(
type
!=
undefined
&&
type
==
'PL'
)
{
this
.
getPL
(
type
)
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
{
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
}
}
...
@@ -2164,7 +2176,7 @@ export default class MonthlyReport extends Component {
...
@@ -2164,7 +2176,7 @@ export default class MonthlyReport extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
periode
.
periode
<=
2020
?
this
.
state
.
periode
.
periode
<=
2020
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
:
...
@@ -3017,7 +3029,7 @@ export default class MonthlyReport extends Component {
...
@@ -3017,7 +3029,7 @@ export default class MonthlyReport extends Component {
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
PLBSFAMSubmitted
=
{
this
.
state
.
lastStatus
==
'APPROVED'
?
true
:
false
}
PLBSFAMSubmitted
=
{
this
.
state
.
lastStatus
==
'APPROVED'
?
true
:
false
}
// PLBSFAMSubmitted={false}
// PLBSFAMSubmitted={false}
createCashFlow
=
{
this
.
createCashFlow
.
bind
(
this
)}
createCashFlow
=
{
this
.
createCashFlow
.
bind
(
this
)}
/
>
/
>
...
...
src/container/Progress/ProgressReport.js
View file @
3fb532c2
This diff is collapsed.
Click to expand it.
src/container/Progress/TableProgressReport.js
View file @
3fb532c2
This diff is collapsed.
Click to expand it.
src/library/CustomTable.js
View file @
3fb532c2
...
@@ -482,6 +482,144 @@ exports.customTable3 = function () {
...
@@ -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
()
{
exports
.
customOptions
=
function
()
{
return
{
return
{
// selectableRows: false,
// selectableRows: false,
...
@@ -547,3 +685,23 @@ exports.customOptionsManagementDocument = function () {
...
@@ -547,3 +685,23 @@ exports.customOptionsManagementDocument = function () {
search
:
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