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
5e620906
Commit
5e620906
authored
4 years ago
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
update action company See merge request
!144
parents
d534fd40
f6c27c4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+6
-7
Perusahaan.js
src/container/MasterData/Perusahaan/Perusahaan.js
+7
-7
No files found.
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
5e620906
...
@@ -48,9 +48,8 @@ export default class CreatePerusahaan extends Component {
...
@@ -48,9 +48,8 @@ export default class CreatePerusahaan extends Component {
this
.
getParentCompany
()
this
.
getParentCompany
()
this
.
getAllUnitBisnis
()
this
.
getAllUnitBisnis
()
if
(
this
.
props
.
type
===
'edit'
)
{
if
(
this
.
props
.
type
===
'edit'
)
{
let
data
=
this
.
props
.
data
this
.
getDetailPerusahaan
()
this
.
getDetailPerusahaan
(
data
.
company_id
,)
// console.log(this.props.data);
console
.
log
(
this
.
props
.
data
);
}
else
{
}
else
{
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
// console.log(date);
// console.log(date);
...
@@ -61,8 +60,8 @@ export default class CreatePerusahaan extends Component {
...
@@ -61,8 +60,8 @@ export default class CreatePerusahaan extends Component {
}
}
}
}
getDetailPerusahaan
(
id
)
{
getDetailPerusahaan
()
{
api
.
create
().
getDetailPerusahaan
(
id
).
then
(
response
=>
{
api
.
create
().
getDetailPerusahaan
(
this
.
props
.
data
[
1
]
).
then
(
response
=>
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
);
console
.
log
(
response
);
this
.
setState
({
this
.
setState
({
...
@@ -229,7 +228,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -229,7 +228,7 @@ export default class CreatePerusahaan extends Component {
"company_name"
:
this
.
state
.
company
,
"company_name"
:
this
.
state
.
company
,
"parent"
:
this
.
state
.
getPerusahaan
==
null
?
null
:
this
.
state
.
getPerusahaan
.
company_id
,
"parent"
:
this
.
state
.
getPerusahaan
==
null
?
null
:
this
.
state
.
getPerusahaan
.
company_id
,
"business_unit_id"
:
this
.
state
.
getTypes
.
business_unit_id
,
"business_unit_id"
:
this
.
state
.
getTypes
.
business_unit_id
,
"total_report"
:
this
.
state
.
totalReport
,
//
"total_report": this.state.totalReport,
"start_date"
:
this
.
state
.
startDate
,
"start_date"
:
this
.
state
.
startDate
,
"end_date"
:
this
.
state
.
endDate
"end_date"
:
this
.
state
.
endDate
}
}
...
@@ -356,7 +355,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -356,7 +355,7 @@ export default class CreatePerusahaan extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
==
-
null
?
""
:
this
.
props
.
data
.
updated
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
src/container/MasterData/Perusahaan/Perusahaan.js
View file @
5e620906
...
@@ -238,7 +238,7 @@ export default class Perusahaan extends Component {
...
@@ -238,7 +238,7 @@ export default class Perusahaan extends Component {
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
let
listData
=
data
.
sort
((
a
,
b
)
=>
a
.
company_id
-
b
.
company_id
).
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
company_id
,
item
.
company_name
,
item
.
parent_name
,
item
.
business_unit_name
,
item
.
total_report
,
item
.
status
]
return
[
index
,
item
.
company_id
,
item
.
company_name
,
item
.
parent_name
,
item
.
business_unit_name
,
item
.
total_report
,
item
.
status
]
})
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
})
...
@@ -248,15 +248,15 @@ export default class Perusahaan extends Component {
...
@@ -248,15 +248,15 @@ export default class Perusahaan extends Component {
})
})
}
}
openPopUp
(
index
,
type
)
{
openPopUp
(
rowData
,
type
)
{
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
this
.
setState
({
this
.
setState
({
selectIndex
:
index
,
rowData
:
rowData
,
visibleEdit
:
true
visibleEdit
:
true
})
})
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
data
:
this
.
state
.
listData
[
index
]
,
rowData
:
rowData
,
visibleCreate
:
true
visibleCreate
:
true
})
})
}
}
...
@@ -268,7 +268,7 @@ export default class Perusahaan extends Component {
...
@@ -268,7 +268,7 @@ export default class Perusahaan extends Component {
"keyword"
:
e
"keyword"
:
e
}
}
api
.
create
().
searchPerusahaan
(
body
).
then
(
response
=>
{
api
.
create
().
searchPerusahaan
(
body
).
then
(
response
=>
{
console
.
log
(
response
.
data
);
//
console.log(response.data);
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
let
listData
=
data
.
map
((
item
,
index
)
=>
{
...
@@ -357,7 +357,7 @@ export default class Perusahaan extends Component {
...
@@ -357,7 +357,7 @@ export default class Perusahaan extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
// onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })}
// onClick={() => this.setState({ visibleEdit: true, data: tableMeta.rowData })}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
row
Index
,
'edit'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
row
Data
,
'edit'
)}
>
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
<
/button
>
...
@@ -600,7 +600,7 @@ export default class Perusahaan extends Component {
...
@@ -600,7 +600,7 @@ export default class Perusahaan extends Component {
<
CreatePerusahaan
<
CreatePerusahaan
type
=
{
"edit"
}
type
=
{
"edit"
}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleEdit
:
false
})}
data
=
{
this
.
state
.
listData
[
this
.
state
.
selectIndex
]
}
data
=
{
this
.
state
.
rowData
}
updatePerusahaan
=
{
this
.
updatePerusahaan
.
bind
(
this
)}
updatePerusahaan
=
{
this
.
updatePerusahaan
.
bind
(
this
)}
/
>
/
>
)}
)}
...
...
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