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
55034199
Commit
55034199
authored
Oct 13, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
Deni dev(pc) See merge request
!518
parents
04d49a73
b8541d2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
15 deletions
+62
-15
index.js
src/api/index.js
+3
-1
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+8
-3
HomePage.js
src/container/HomePage.js
+51
-11
No files found.
src/api/index.js
View file @
55034199
...
...
@@ -210,6 +210,7 @@ const create = (type = "") => {
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
getDashboardUser
=
()
=>
api
.
get
(
'transaction/get_dashboard_sub_co'
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_id'
,
body
)
const
getSubmitOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_periode_submit'
,
body
)
...
...
@@ -421,7 +422,8 @@ const create = (type = "") => {
checkApproverOLPA
,
getLastPeriodeOI
,
getSubmitOI
,
getLastPeriodOI
getLastPeriodOI
,
getDashboardUser
}
}
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
55034199
...
...
@@ -512,10 +512,15 @@ export default class FixedAssetsMovement extends Component {
}
else
{
// console.log(item)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
22
]
==
item
)
// console.log(dataTable2[indexID]
[tableMeta.columnIndex]
)
// console.log(dataTable2[indexID])
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
else
{
if
(
item
===
'(-1)'
)
{
anjay
.
push
(
-
1
)
}
// console.log(item);
}
}
}
...
...
@@ -551,8 +556,8 @@ export default class FixedAssetsMovement extends Component {
// console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') {
//
console.log(baru)
//
console.log(anjay)
//
console.log(baru)
//
console.log(anjay)
// console.log(total)
// }
...
...
src/container/HomePage.js
View file @
55034199
...
...
@@ -22,6 +22,8 @@ class HomePage extends Component {
{
nama
:
'Dharma Group'
,
status
:
'overdue'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
],
listSubcoMB
:
[],
valueSubmit
:
0
,
isApprover
:
true
}
}
...
...
@@ -47,6 +49,7 @@ class HomePage extends Component {
// }
// })
this
.
getApprMat
()
this
.
getListUserSubco
()
}
componentDidUpdate
()
{
...
...
@@ -56,6 +59,26 @@ class HomePage extends Component {
}
}
getListUserSubco
()
{
api
.
create
().
getDashboardUser
().
then
(
response
=>
{
console
.
log
(
response
);
let
valueSubmit
=
0
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
is_submit
===
true
)
{
valueSubmit
+=
1
}
})
this
.
setState
({
listSubcoMB
:
response
.
data
.
data
,
valueSubmit
})
}
}
})
}
getDashboard
()
{
let
listDashboard
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
...
...
@@ -74,14 +97,14 @@ class HomePage extends Component {
api
.
create
().
getAM
().
then
((
response
)
=>
{
console
.
log
(
response
);
let
actAM
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
)
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
)
{
return
item
}
})
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
if
(
indexId
===
-
1
){
if
(
indexId
===
-
1
)
{
this
.
setState
({
isApprover
:
false
})
}
console
.
log
(
actAM
)
...
...
@@ -188,7 +211,7 @@ class HomePage extends Component {
/
>
<
/MuiThemeProvider
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
{
/*
<div style={{ marginTop: 20 }}>
<Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Status Laporan</Typography>
<div style={{ marginTop: 10, display: 'flex' }}>
<div style={{ width: 280, height: 400, padding: 20, backgroundColor: 'white', borderRadius: 6, border: 'solid 1px #c4c4c4', marginRight: 25 }}>
...
...
@@ -315,7 +338,7 @@ class HomePage extends Component {
</div>
</div>
</div>
<
/div
>
</div>
*/
}
<
/div
>
<
/div
>
:
...
...
@@ -329,16 +352,33 @@ class HomePage extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
width
:
4
0
0
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
Master
Budget
-
Oct
2020
(
1
/
4
)
<
/Typography
>
{
this
.
state
.
list
MasterBudget
.
map
((
item
,
index
)
=>
{
<
Paper
style
=
{{
width
:
4
5
0
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
{
`Master Budget
${
this
.
state
.
valueSubmit
}
/
${
this
.
state
.
listSubcoMB
.
length
}
`
}
<
/Typography
>
{
this
.
state
.
list
SubcoMB
.
map
((
item
,
index
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginTop
:
10
,
paddingLeft
:
10
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
img
src
=
{
item
.
status
===
"overdue"
?
Images
.
dotOverdue
:
item
.
status
===
"open"
?
Images
.
dotOpen
:
Images
.
dotDone
}
/
>
<
Typography
style
=
{{
marginLeft
:
10
,
color
:
'#5198ea'
,
fontSize
:
13
}}
>
{
item
.
nama
}
<
/Typography
>
<
img
src
=
{
item
.
is_submit
===
true
?
Images
.
dotDone
:
item
.
is_overdue
===
true
?
Images
.
dotOverdue
:
Images
.
dotOpen
}
/
>
<
Link
to
=
{{
pathname
:
`/home/master-budget/`
,
state
:
{
userType
:
'user'
,
rawData
:
item
}
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
,
outline
:
'none'
}}
>
<
Typography
style
=
{{
marginLeft
:
10
,
color
:
'#5198ea'
,
fontSize
:
13
}}
>
{
item
.
company_name
}
<
/Typography
>
<
/button
>
<
/Link
>
<
/div
>
{
item
.
status
===
'overdue'
&&
(
{
item
.
is_overdue
&&
(
<
div
style
=
{{
backgroundColor
:
'#f65a4c'
,
paddingRight
:
5
,
paddingLeft
:
5
,
borderRadius
:
5
,
alignSelf
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
color
:
'#fff'
}}
>
Overdue
<
/Typography
>
<
/div
>
...
...
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