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
f5ce2a3a
Commit
f5ce2a3a
authored
Aug 17, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!109
parents
ced8b1c2
9b29adba
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
116 deletions
+200
-116
index.js
src/api/index.js
+4
-2
VisualisasiAM.js
src/container/ApprovalMatrix/VisualisasiAM.js
+1
-1
VisualPerusahaan.js
src/container/MasterData/Perusahaan/VisualPerusahaan.js
+80
-4
VisualReportItems.js
...container/MasterData/formReportItems/VisualReportItems.js
+115
-109
No files found.
src/api/index.js
View file @
f5ce2a3a
...
...
@@ -94,6 +94,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
createPerusahaan
=
(
body
)
=>
api
.
post
(
'/company/create_company'
,
body
)
const
updatePerusahaan
=
(
body
)
=>
api
.
post
(
'/company/update_company'
,
body
)
const
getPerusahaanHierarki
=
()
=>
api
.
get
(
'company/get_company_hierarki'
)
const
saveVisualisasiPerusahaan
=
(
body
)
=>
api
.
post
(
'company/save_visualization'
,
body
)
// APPROVAL MATRIX
const
getAM
=
()
=>
api
.
get
(
'approval_matrix/get_all_approval_matrix'
)
...
...
@@ -125,7 +126,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
updateReportItems
=
(
body
)
=>
api
.
post
(
'/item_report/update_item_report'
,
body
)
const
checkUploadReportItems
=
(
body
)
=>
api
.
post
(
'/item_report/check_import'
,
body
)
const
uploadReportItems
=
(
body
)
=>
api
.
post
(
'/item_report/import_item_report'
,
body
)
const
getItemReportHierarki
=
(
)
=>
api
.
get
(
'item_report/get_item_report_hierarki'
)
const
getItemReportHierarki
=
(
body
)
=>
api
.
post
(
'item_report/get_item_report_hierarki'
,
body
)
const
saveVisualisasiReport
=
(
body
)
=>
api
.
post
(
'item_report/save_visualization'
,
body
)
//PARAMETER
...
...
@@ -214,7 +215,8 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
uploadParameter
,
getItemReportHierarki
,
getMenuByRole
,
saveVisualisasiReport
saveVisualisasiReport
,
saveVisualisasiPerusahaan
}
}
...
...
src/container/ApprovalMatrix/VisualisasiAM.js
View file @
f5ce2a3a
...
...
@@ -174,7 +174,7 @@ export default class VisualisasiAM extends Component {
<
/div
>
<
ReactDragListView
{...
dragProps
}
>
<
ol
style
=
{{
paddingLeft
:
15
}}
>
{
this
.
state
.
listApproval
.
map
((
item
,
index
)
=>
(
{
this
.
state
.
listApproval
.
sort
((
a
,
b
)
=>
a
.
orderId
-
b
.
orderId
).
map
((
item
,
index
)
=>
(
<
li
key
=
{
index
}
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
14
}}
>
<
a
href
=
'#'
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
'14px'
,
cursor
:
'auto'
,
outline
:
'none'
}}
>
<
div
className
=
"grid grid-3x grid-mobile-none gap-20px margin-bottom-20px"
style
=
{{
width
:
'75%'
}}
>
...
...
src/container/MasterData/Perusahaan/VisualPerusahaan.js
View file @
f5ce2a3a
...
...
@@ -9,20 +9,96 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import
ChevronRightIcon
from
'@material-ui/icons/ChevronRight'
;
import
TreeItem
from
'@material-ui/lab/TreeItem'
;
import
Nestable
from
'react-nestable/dist/Nestable'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
import
RemoveIcon
from
'@material-ui/icons/Remove'
;
import
api
from
'../../../api'
;
export
default
class
VisualPerusahaan
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
items
:
[
{
id
:
0
,
GG
:
'Accumulated Depreciation (negative value)'
,
collapse
:
false
,
children
:
[
{
id
:
3
,
GG
:
'Beginning Balance'
,
collapse
:
false
},
{
id
:
4
,
GG
:
'Depreciation expense MTD (please fill in, if any)'
,
collapse
:
false
},
{
id
:
5
,
GG
:
'Depreciation expense MTD (please fill in, if any)'
,
collapse
:
false
}
]
},{
id
:
1
,
GG
:
'Control Gain/(Loss) on Fixed Assets'
,
collapse
:
false
},{
id
:
2
,
GG
:
'Gain/(Loss) on Fixed Assets'
,
collapse
:
false
,
children
:
[
{
id
:
6
,
GG
:
'NBV'
,
collapse
:
false
,
children
:
[
{
id
:
8
,
GG
:
'Cost'
,
collapse
:
false
},
{
id
:
9
,
GG
:
'Accm. Depreciation'
,
collapse
:
false
},
]
},
{
id
:
7
,
GG
:
'Proceed from sale or disposal of Fixed Assets (please fill in, if any)'
,
collapse
:
false
},
]
},
],
arrayCollapse
:
[],
defaultCollapsed
:
false
}
}
componentDidMount
()
{
console
.
log
(
this
.
props
.
height
)
this
.
getPerusahaan
()
}
getPerusahaan
()
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
items
:
response
.
data
.
data
})
console
.
log
(
response
.
data
.
data
)
}
})
}
onDefaultCollapsed
=
()
=>
this
.
setState
({
defaultCollapsed
:
!
this
.
state
.
defaultCollapsed
});
collapse
=
(
collapseCase
)
=>
{
let
arrayCollapse
=
this
.
state
.
arrayCollapse
let
index
=
arrayCollapse
.
findIndex
((
val
)
=>
val
.
id
===
collapseCase
)
if
(
arrayCollapse
.
includes
(
collapseCase
))
{
arrayCollapse
.
splice
(
index
,
1
)
}
else
{
arrayCollapse
.
push
(
collapseCase
)
}
if
(
this
.
refNestable
)
{
this
.
refNestable
.
collapse
(
arrayCollapse
.
length
>
0
?
arrayCollapse
:
'NONE'
);
}
};
handleSave
()
{
let
payload
=
{
"company"
:
this
.
state
.
items
}
api
.
create
().
saveVisualisasiPerusahaan
(
payload
).
then
((
response
)
=>
{
// if (response.data.status == 'ucces') {
this
.
props
.
onClickClose
()
// } else {
// alert(response.data.message)
// }
})
}
renderItem
=
({
item
,
collapseIcon
})
=>
{
return
(
<
div
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
collapse
(
item
.
id
)}
>
{
collapseIcon
?
(
this
.
state
.
arrayCollapse
.
includes
(
item
.
id
)?
<
AddIcon
/>
:
<
RemoveIcon
/>
)
:
null
}
<
/button
>
<
label
style
=
{{
marginLeft
:
collapseIcon
?
10
:
0
}}
>
{
item
.
company_name
}
<
/label
>
<
/div
>
)
};
render
()
{
return
(
...
...
@@ -88,7 +164,7 @@ export default class VisualPerusahaan extends Component {
<
div
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Batal
<
/span
>
<
/div
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
marginLeft
:
25
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
div
onClick
=
{()
=>
this
.
handleSave
()}
style
=
{{
width
:
102
,
height
:
30
,
marginLeft
:
25
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/formReportItems/VisualReportItems.js
View file @
f5ce2a3a
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