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
f97d5d21
Commit
f97d5d21
authored
Feb 06, 2025
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chcm
parent
e288c640
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
826 additions
and
49 deletions
+826
-49
index.js
src/api/index.js
+6
-0
ChcmDocument.js
src/container/CHCM/ChcmDocument.js
+8
-1
EditDocumentChcm.js
src/container/CHCM/EditDocumentChcm.js
+532
-0
PopUpDelete.js
src/container/CHCM/PopUpDelete.js
+77
-0
TableChcmDocument.js
src/container/CHCM/TableChcmDocument.js
+203
-48
No files found.
src/api/index.js
View file @
f97d5d21
...
...
@@ -494,6 +494,9 @@ const create = (type = "") => {
const
uploadCarfmDocument
=
(
body
)
=>
api
.
post
(
'document/upload_cafrm_document'
,
body
)
const
getChcmDocumentBySubmenu
=
(
body
)
=>
api
.
post
(
'document/get_chcm_document_by_submenu'
,
body
);
const
uploadChcmDocument
=
(
body
)
=>
api
.
post
(
'document/upload_chcm_document'
,
body
)
const
deleteReportChcm
=
(
id
)
=>
api
.
post
(
`document/delete_chcm_document/
${
id
}
`
)
const
getDetailReportChcm
=
(
id
)
=>
api
.
get
(
`document/get_chcm_document_by_id/
${
id
}
`
)
const
updateReportChcm
=
(
body
)
=>
api
.
post
(
'document/update_chcm_document'
,
body
)
// Monitoring
...
...
@@ -677,6 +680,9 @@ const create = (type = "") => {
uploadCarfmDocument
,
getChcmDocumentBySubmenu
,
uploadChcmDocument
,
deleteReportChcm
,
getDetailReportChcm
,
updateReportChcm
,
updateDocument
,
downloadDocument
,
getPerusahaanUserActive
,
...
...
src/container/CHCM/ChcmDocument.js
View file @
f97d5d21
...
...
@@ -101,6 +101,8 @@ export default class ChcmDocument extends Component {
menu
:
subMenu
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
console
.
log
(
`status get permission
${
response
.
data
.
status
}
`
);
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -108,6 +110,8 @@ export default class ChcmDocument extends Component {
btncreate
:
response
.
data
.
data
.
create
,
btnview
:
response
.
data
.
data
.
view
,
btndownload
:
response
.
data
.
data
.
download
,
btnedit
:
response
.
data
.
data
.
edit
,
btndelete
:
response
.
data
.
data
.
delete
,
load
:
true
,
})
console
.
log
(
"btn create "
+
this
.
state
.
btncreate
);
...
...
@@ -190,7 +194,6 @@ export default class ChcmDocument extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
message
===
"Data was Saved Successfully"
)
{
console
.
log
(
"tes123"
);
this
.
setState
({
visibleCreate
:
false
,
visibleTrue
:
true
,
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
},
()
=>
{
// window.location.reload();
...
...
@@ -295,6 +298,10 @@ export default class ChcmDocument extends Component {
name
=
{
this
.
state
.
name
}
submenu_id
=
{
this
.
state
.
submenu_id
}
btndownload
=
{
this
.
state
.
btndownload
}
btnedit
=
{
this
.
state
.
btnedit
}
btndelete
=
{
this
.
state
.
btndelete
}
menuName
=
{
this
.
state
.
menu_title
}
submenu_id
=
{
this
.
state
.
submenu_id
}
/>
)
}
<
/div
>
...
...
src/container/CHCM/EditDocumentChcm.js
0 → 100644
View file @
f97d5d21
This diff is collapsed.
Click to expand it.
src/container/CHCM/PopUpDelete.js
0 → 100644
View file @
f97d5d21
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
PopUpDelete
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
id
:
''
,
getApprovedBy
:
null
,
getTypes
:
null
,
}
}
componentDidMount
()
{
console
.
log
(
this
.
props
);
if
(
this
.
props
.
type
===
'delete'
)
{
// console.log(this.props.idoc)
// console.log(this.props.data)
}
}
onClickDelete
()
{
if
(
this
.
props
.
type
==
'delete'
)
{
let
payload
=
this
.
props
.
idoc
this
.
props
.
deleteDoc
(
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'
}}
>
Delete
{
this
.
props
.
data
[
1
]}
?
<
/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
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
onClickDelete
()
},
100
);
})
}
>
<
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/CHCM/TableChcmDocument.js
View file @
f97d5d21
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