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
7462c7bd
Commit
7462c7bd
authored
Jan 10, 2024
by
fahrur huzain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
closing dan logactivity
parent
7a14bac1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
271 additions
and
30 deletions
+271
-30
AuditTrails.js
src/container/GeneralSetting/AuditTrails.js
+11
-15
CloseClosingReport.js
src/container/GeneralSetting/CloseClosingReport.js
+99
-0
ClosingReport.js
src/container/GeneralSetting/ClosingReport.js
+59
-12
ExtendClosingReport.js
src/container/GeneralSetting/ExtendClosingReport.js
+99
-0
RollbackAuditTrails.js
src/container/GeneralSetting/RollbackAuditTrails.js
+3
-3
No files found.
src/container/GeneralSetting/AuditTrails.js
View file @
7462c7bd
...
...
@@ -11,7 +11,8 @@ import UploadFile from "../../library/Upload";
import
CreateApprovalMatrix
from
"../ApprovalMatrix/CreateApprovalMatrix"
;
import
EditApprovalMatrix
from
"../ApprovalMatrix/EditApprovalMatrix"
;
import
VisualisasiAM
from
"../ApprovalMatrix/VisualisasiAM"
;
import
DeleteApprovalMatrix
from
"../ApprovalMatrix/DeleteApprovalMatrix"
;
import
DeleteApprovalMatrix
from
"../ApprovalMatrix/DeleteApprovalMatrix"
import
RollbackAuditTrails
from
"../GeneralSetting/RollbackAuditTrails"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
...
...
@@ -136,11 +137,6 @@ export default class AuditTrails extends Component {
rowData
:
index
,
popupRollback
:
true
})
}
else
if
(
type
===
'delete'
)
{
this
.
setState
({
rowData
:
index
,
popupDel
:
true
})
}
else
{
this
.
setState
({
...
...
@@ -235,12 +231,12 @@ export default class AuditTrails extends Component {
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'
edit
'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'
rollback
'
)}
>
<
img
src
=
{
Images
.
rollback
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"
edit
"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"
rollback
"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/span>
}
<
/div
>
);
...
...
@@ -354,7 +350,7 @@ export default class AuditTrails extends Component {
/>
</div> */
}
<
/div
>
<
div
style
=
{{
padding
:
25
,
width
:
'100%'
}}
>
<
div
style
=
{{
padding
Top
:
25
,
paddingLeft
:
25
,
paddingRight
:
25
,
width
:
'100%'
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
...
...
@@ -379,13 +375,13 @@ export default class AuditTrails extends Component {
/
>
:
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
<
div
class
=
"main-color"
style
=
{{
height
:
195
,
width
:
'100%'
}}
/
>
<
div
class
=
"main-color"
style
=
{{
height
:
this
.
props
.
height
,
width
:
'100%'
}}
/
>
<
div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
165
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Preview
Data
<
/label
>
<
/div
>
<
div
style
=
{{
padding
:
25
}}
>
<
div
style
=
{{
padding
Top
:
25
,
paddingLeft
:
25
,
paddingRight
:
25
}}
>
{
this
.
state
.
dataLoaded
&&
(
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
...
...
@@ -424,10 +420,10 @@ export default class AuditTrails extends Component {
<
/div
>
<
/div
>
}
{
this
.
state
.
popup
Del
&&
(
<
DeleteApprovalMatrix
type
=
{
"
delete
"
}
onClickClose
=
{()
=>
this
.
setState
({
popup
Del
:
false
})}
{
this
.
state
.
popup
Rollback
&&
(
<
RollbackAuditTrails
type
=
{
"
rollback
"
}
onClickClose
=
{()
=>
this
.
setState
({
popup
Rollback
:
false
})}
data
=
{
this
.
state
.
rowData
}
// getList={() => this.getData.bind(this)}
deleteAM
=
{
this
.
deleteAM
.
bind
(
this
)}
...
...
src/container/GeneralSetting/CloseClosingReport.js
0 → 100644
View file @
7462c7bd
import
React
,
{
Component
}
from
'react'
;
import
Images
from
'../../assets/Images'
;
import
{
Typography
}
from
'@material-ui/core'
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
export
default
class
CloseClosingReport
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
id
:
''
,
getApprovedBy
:
null
,
getTypes
:
null
,
}
}
componentDidMount
()
{
if
(
this
.
props
.
type
===
'close'
)
{
this
.
getDetailAM
()
}
}
getDetailAM
()
{
api
.
create
().
getDetailAM
(
this
.
props
.
data
[
1
]).
then
(
response
=>
{
// console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
this
.
setState
({
id
:
data
.
approval_matrix_id
,
getTypes
:
data
.
approval_type_name
,
getApprovedBy
:
data
.
fullname
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
onClickDelete
()
{
if
(
this
.
props
.
type
===
'close'
)
{
let
payload
=
this
.
state
.
id
this
.
props
.
deleteAM
(
payload
)
}
}
render
()
{
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
paddingTop
:
20
}}
>
<
img
src
=
{
Images
.
failed
}
/
>
<
/div
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'center'
,
marginTop
:
20
,
paddingBottom
:
20
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
fontWeight
:
'bold'
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Do
you
wanna
close
{
this
.
state
.
getTypes
}
-
{
this
.
state
.
getApprovedBy
}?
<
/span
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
onClickDelete
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Delete
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
src/container/GeneralSetting/ClosingReport.js
View file @
7462c7bd
...
...
@@ -10,8 +10,10 @@ import MuiAlert from '@material-ui/lab/Alert';
import
UploadFile
from
"../../library/Upload"
;
import
CreateApprovalMatrix
from
"../ApprovalMatrix/CreateApprovalMatrix"
;
import
EditApprovalMatrix
from
"../ApprovalMatrix/EditApprovalMatrix"
;
import
CloseClosingReport
from
"../GeneralSetting/CloseClosingReport"
;
import
VisualisasiAM
from
"../ApprovalMatrix/VisualisasiAM"
;
import
DeleteApprovalMatrix
from
"../ApprovalMatrix/DeleteApprovalMatrix"
;
import
ExtendClosingReport
from
"../GeneralSetting/ExtendClosingReport"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
...
...
@@ -59,7 +61,8 @@ export default class ClosingReport extends Component {
btndelete
:
false
,
load
:
false
,
judul
:
''
,
popupDel
:
false
,
popupExtend
:
false
,
popupClose
:
false
,
loading
:
false
}
}
...
...
@@ -130,15 +133,15 @@ export default class ClosingReport extends Component {
}
openPopUp
(
index
,
type
)
{
if
(
type
===
'e
dit
'
)
{
if
(
type
===
'e
xtend
'
)
{
this
.
setState
({
rowData
:
index
,
visibleEdit
:
true
popupExtend
:
true
})
}
else
if
(
type
===
'
delet
e'
)
{
}
else
if
(
type
===
'
clos
e'
)
{
this
.
setState
({
rowData
:
index
,
popup
Del
:
true
popup
Close
:
true
})
}
else
{
...
...
@@ -182,6 +185,33 @@ export default class ClosingReport extends Component {
})
}
deleteAM
=
(
payload
)
=>
{
this
.
setState
({
popupDel
:
false
})
api
.
create
().
deleteAM
(
payload
).
then
(
response
=>
{
// console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
getData
()
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
...
...
@@ -198,7 +228,7 @@ export default class ClosingReport extends Component {
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
this
.
state
.
btnedit
&&
<
span
>
<
a
data
-
tip
=
{
'E
dit'
}
data
-
for
=
"edit
"
>
<
a
data
-
tip
=
{
'E
xtend'
}
data
-
for
=
"extend
"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -207,15 +237,15 @@ export default class ClosingReport extends Component {
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'e
dit
'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'e
xtend
'
)}
>
<
img
src
=
{
Images
.
circleCheck
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"e
dit
"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"e
xtend
"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/span>
}
{
this
.
state
.
btndelete
&&
<
span
>
<
a
data
-
tip
=
{
'
Delete'
}
data
-
for
=
"delet
e"
>
<
a
data
-
tip
=
{
'
Close'
}
data
-
for
=
"clos
e"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -223,12 +253,12 @@ export default class ClosingReport extends Component {
borderColor
:
'transparent'
,
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'
delet
e'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'
clos
e'
)}
>
<
img
src
=
{
Images
.
crossCircle
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"
delet
e"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"
clos
e"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/span>
}
<
/div
>
);
...
...
@@ -412,7 +442,24 @@ export default class ClosingReport extends Component {
<
/div
>
<
/div
>
}
{
this
.
state
.
popupExtend
&&
(
<
ExtendClosingReport
type
=
{
"extend"
}
onClickClose
=
{()
=>
this
.
setState
({
popupExtend
:
false
})}
data
=
{
this
.
state
.
rowData
}
// getList={() => this.getData.bind(this)}
deleteAM
=
{
this
.
deleteAM
.
bind
(
this
)}
/
>
)}
{
this
.
state
.
popupClose
&&
(
<
CloseClosingReport
type
=
{
"close"
}
onClickClose
=
{()
=>
this
.
setState
({
popupClose
:
false
})}
data
=
{
this
.
state
.
rowData
}
// getList={() => this.getData.bind(this)}
deleteAM
=
{
this
.
deleteAM
.
bind
(
this
)}
/
>
)}
{
this
.
state
.
popupError
&&
(
<
PopUpFailedSave
onClickClose
=
{()
=>
this
.
setState
({
popupError
:
false
})}
/
>
)}
...
...
src/container/GeneralSetting/ExtendClosingReport.js
0 → 100644
View file @
7462c7bd
import
React
,
{
Component
}
from
'react'
;
import
Images
from
'../../assets/Images'
;
import
{
Typography
}
from
'@material-ui/core'
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
export
default
class
ExtendClosingReport
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
id
:
''
,
getApprovedBy
:
null
,
getTypes
:
null
,
}
}
componentDidMount
()
{
if
(
this
.
props
.
type
===
'extend'
)
{
this
.
getDetailAM
()
}
}
getDetailAM
()
{
api
.
create
().
getDetailAM
(
this
.
props
.
data
[
1
]).
then
(
response
=>
{
// console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
this
.
setState
({
id
:
data
.
approval_matrix_id
,
getTypes
:
data
.
approval_type_name
,
getApprovedBy
:
data
.
fullname
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
onClickDelete
()
{
if
(
this
.
props
.
type
===
'extend'
)
{
let
payload
=
this
.
state
.
id
this
.
props
.
deleteAM
(
payload
)
}
}
render
()
{
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
paddingTop
:
20
}}
>
<
img
src
=
{
Images
.
failed
}
/
>
<
/div
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'center'
,
marginTop
:
20
,
paddingBottom
:
20
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
fontWeight
:
'bold'
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Do
you
wanna
extend
{
this
.
state
.
getTypes
}
-
{
this
.
state
.
getApprovedBy
}?
<
/span
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
onClickDelete
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Delete
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
src/container/GeneralSetting/RollbackAuditTrails.js
View file @
7462c7bd
...
...
@@ -15,7 +15,7 @@ export default class RollbackAuditTrails extends Component {
}
componentDidMount
()
{
if
(
this
.
props
.
type
===
'
delete
'
)
{
if
(
this
.
props
.
type
===
'
rollback
'
)
{
this
.
getDetailAM
()
}
}
...
...
@@ -52,7 +52,7 @@ export default class RollbackAuditTrails extends Component {
}
onClickDelete
()
{
if
(
this
.
props
.
type
===
'
delete
'
)
{
if
(
this
.
props
.
type
===
'
rollback
'
)
{
let
payload
=
this
.
state
.
id
this
.
props
.
deleteAM
(
payload
)
}
...
...
@@ -67,7 +67,7 @@ export default class RollbackAuditTrails extends Component {
<
/div
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'center'
,
marginTop
:
20
,
paddingBottom
:
20
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
fontWeight
:
'bold'
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
D
elete
{
this
.
state
.
getTypes
}
-
{
this
.
state
.
getApprovedBy
}?
D
o
you
wanna
rollback
{
this
.
state
.
getTypes
}
-
{
this
.
state
.
getApprovedBy
}?
<
/span
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
...
...
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