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
8d32f088
Commit
8d32f088
authored
Aug 28, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
fixed issue company See merge request
!202
parents
6fb1eefd
d742784c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
87 deletions
+135
-87
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+113
-76
VisualPerusahaan.js
src/container/MasterData/Perusahaan/VisualPerusahaan.js
+22
-11
No files found.
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
8d32f088
This diff is collapsed.
Click to expand it.
src/container/MasterData/Perusahaan/VisualPerusahaan.js
View file @
8d32f088
import
React
,
{
Component
}
from
'react'
;
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
{
TextField
}
from
'@material-ui/core'
;
import
MenuItem
from
'@material-ui/core/MenuItem'
;
import
{
Typography
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
;
import
Perusahaan
from
"./Perusahaan"
;
import
TreeView
from
'@material-ui/lab/TreeView'
;
import
ExpandMoreIcon
from
'@material-ui/icons/ExpandMore'
;
import
ChevronRightIcon
from
'@material-ui/icons/ChevronRight'
;
import
TreeItem
from
'@material-ui/lab/TreeItem'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
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'
;
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
export
default
class
VisualPerusahaan
extends
Component
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -40,7 +38,10 @@ export default class VisualPerusahaan extends Component {
},
],
arrayCollapse
:
[],
defaultCollapsed
:
false
defaultCollapsed
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
}
}
...
...
@@ -50,9 +51,16 @@ export default class VisualPerusahaan extends Component {
getPerusahaan
()
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
items
:
response
.
data
.
data
})
console
.
log
(
response
.
data
.
data
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
items
:
response
.
data
.
data
})
console
.
log
(
response
.
data
.
data
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -98,6 +106,9 @@ export default class VisualPerusahaan extends Component {
)
};
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
...
...
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