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
08e0dbf6
Commit
08e0dbf6
authored
Aug 25, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
a9dddc68
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
61 deletions
+59
-61
VisualReportItems.js
...container/MasterData/formReportItems/VisualReportItems.js
+33
-46
AddUser.js
src/container/Otorisasi/User/AddUser.js
+4
-2
EditUser.js
src/container/Otorisasi/User/EditUser.js
+14
-9
AddRole.js
src/container/Otorisasi/UserRole/AddRole.js
+4
-2
EditRole.js
src/container/Otorisasi/UserRole/EditRole.js
+4
-2
No files found.
src/container/MasterData/formReportItems/VisualReportItems.js
View file @
08e0dbf6
...
@@ -55,30 +55,7 @@ export default class VisualReportItems extends Component {
...
@@ -55,30 +55,7 @@ export default class VisualReportItems extends Component {
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
open
:
false
,
open
:
false
,
items
:
[
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
:
[],
arrayCollapse
:
[],
defaultCollapsed
:
false
,
defaultCollapsed
:
false
,
listReport
:
null
,
listReport
:
null
,
...
@@ -87,7 +64,8 @@ export default class VisualReportItems extends Component {
...
@@ -87,7 +64,8 @@ export default class VisualReportItems extends Component {
company
:
null
,
company
:
null
,
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
messageAlert
:
''
messageAlert
:
''
,
realItems
:
[]
}
}
}
}
...
@@ -168,7 +146,7 @@ export default class VisualReportItems extends Component {
...
@@ -168,7 +146,7 @@ export default class VisualReportItems extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
items
:
response
.
data
.
data
})
this
.
setState
({
items
:
response
.
data
.
data
,
realItems
:
response
.
data
.
data
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
...
@@ -215,30 +193,39 @@ export default class VisualReportItems extends Component {
...
@@ -215,30 +193,39 @@ export default class VisualReportItems extends Component {
let
payload
=
{
let
payload
=
{
"item_report"
:
this
.
state
.
items
"item_report"
:
this
.
state
.
items
}
}
api
.
create
().
saveVisualisasiReport
(
payload
).
then
((
response
)
=>
{
if
(
JSON
.
stringify
(
this
.
state
.
items
)
===
JSON
.
stringify
(
this
.
state
.
realItems
))
{
console
.
log
(
response
);
this
.
setState
({
alert
:
true
,
messageAlert
:
'Save visualization item report success!'
,
tipeAlert
:
'success'
},
()
=>
{
// if (response.data.status == 'ucces') {
setTimeout
(()
=>
{
if
(
response
.
data
)
{
this
.
props
.
onClickClose
()
if
(
response
.
ok
)
{
},
1000
);
if
(
response
.
data
.
status
===
"success"
)
{
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
},
()
=>
{
}
else
{
setTimeout
(()
=>
{
api
.
create
().
saveVisualisasiReport
(
payload
).
then
((
response
)
=>
{
this
.
props
.
onClickClose
()
console
.
log
(
response
);
},
1000
);
// if (response.data.status == 'ucces') {
})
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
1000
);
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'
warning
'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'
error
'
})
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
}
else
{
// } else {
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
// alert(response.data.message)
}
// }
// } else {
})
// alert(response.data.message)
}
// }
})
}
}
renderItem
=
({
item
,
collapseIcon
})
=>
{
renderItem
=
({
item
,
collapseIcon
})
=>
{
...
...
src/container/Otorisasi/User/AddUser.js
View file @
08e0dbf6
...
@@ -195,8 +195,10 @@ export default class AddUser extends Component {
...
@@ -195,8 +195,10 @@ export default class AddUser extends Component {
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
props
.
onClickClose
()
setTimeout
(()
=>
{
this
.
props
.
refresh
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
},
750
);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
...
...
src/container/Otorisasi/User/EditUser.js
View file @
08e0dbf6
...
@@ -198,12 +198,16 @@ export default class EditUser extends Component {
...
@@ -198,12 +198,16 @@ export default class EditUser extends Component {
}
}
api
.
create
().
updateUser
(
payload
).
then
((
response
)
=>
{
api
.
create
().
updateUser
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
.
data
.
message
)
console
.
log
(
response
.
data
.
status
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
props
.
onClickClose
()
setTimeout
(()
=>
{
this
.
props
.
refresh
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
},
750
);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
...
@@ -295,13 +299,14 @@ export default class EditUser extends Component {
...
@@ -295,13 +299,14 @@ export default class EditUser extends Component {
let
indexIDs
=
this
.
state
.
company
.
findIndex
((
val
)
=>
val
===
item
.
parent
)
let
indexIDs
=
this
.
state
.
company
.
findIndex
((
val
)
=>
val
===
item
.
parent
)
if
(
indexIDs
!==
-
1
)
{
if
(
indexIDs
!==
-
1
)
{
company
.
splice
(
indexIDs
,
1
)
company
.
splice
(
indexIDs
,
1
)
}
}
if
(
item
.
children
!==
null
)
{
}
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
if
(
item
.
children
!==
null
)
{
this
.
handleItemClick
(
items
)
if
(
item
.
children
.
length
>
0
)
{
})
item
.
children
.
map
((
items
,
indexs
)
=>
{
}
this
.
handleItemClick
(
items
)
})
}
}
}
}
}
}
...
...
src/container/Otorisasi/UserRole/AddRole.js
View file @
08e0dbf6
...
@@ -138,8 +138,10 @@ export default class AddRole extends Component {
...
@@ -138,8 +138,10 @@ export default class AddRole extends Component {
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
props
.
refresh
()
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
},
750
);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
...
...
src/container/Otorisasi/UserRole/EditRole.js
View file @
08e0dbf6
...
@@ -158,8 +158,10 @@ export default class EditRole extends Component {
...
@@ -158,8 +158,10 @@ export default class EditRole extends Component {
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
props
.
refresh
()
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
},
750
);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
...
...
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