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
f5b4e102
Commit
f5b4e102
authored
Jun 27, 2022
by
syadziy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update doc management
parent
25105f54
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
1374 deletions
+6
-1374
AuditTahunan.js
src/container/DocumentManagement/AuditTahunan.js
+0
-299
BOD.js
src/container/DocumentManagement/BOD.js
+0
-303
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+6
-50
ManualBookETMS.js
src/container/DocumentManagement/ManualBookETMS.js
+0
-131
ManualBookTia.js
src/container/DocumentManagement/ManualBookTia.js
+0
-296
QReview.js
src/container/DocumentManagement/QReview.js
+0
-295
No files found.
src/container/DocumentManagement/AuditTahunan.js
deleted
100644 → 0
View file @
25105f54
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/BOD.js
deleted
100644 → 0
View file @
25105f54
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/DocumentManagement.js
View file @
f5b4e102
...
@@ -2,14 +2,14 @@ import React, { Component } from 'react'
...
@@ -2,14 +2,14 @@ import React, { Component } from 'react'
import
{
Tabs
,
Tab
,
Typography
,
Paper
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
import
{
Tabs
,
Tab
,
Typography
,
Paper
,
withStyles
,
Snackbar
}
from
'@material-ui/core'
import
ReactTooltip
from
'react-tooltip'
import
ReactTooltip
from
'react-tooltip'
import
Images
from
'../../assets/Images'
import
Images
from
'../../assets/Images'
import
ManualBookTia
from
'./ManualBookTia'
//
import ManualBookTia from './ManualBookTia'
import
api
from
'../../api'
import
api
from
'../../api'
import
AuditTahunan
from
'./AuditTahunan'
//
import AuditTahunan from './AuditTahunan'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
CreateManagementDoc
from
'./CreateManagementDoc'
import
AllDocument
from
'./AllDocument'
import
AllDocument
from
'./AllDocument'
import
QReview
from
'./QReview'
//
import QReview from './QReview'
import
BOD
from
'./BOD'
//
import BOD from './BOD'
import
ManualBookETMS
from
'./ManualBookETMS'
//
import ManualBookETMS from './ManualBookETMS'
import
PopUpKonfirmasi
from
"./PopUpKonfirmasi"
;
import
PopUpKonfirmasi
from
"./PopUpKonfirmasi"
;
import
Constant
from
'../../library/Constant'
import
Constant
from
'../../library/Constant'
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
...
@@ -61,7 +61,7 @@ export default class DocumentManagement extends Component {
...
@@ -61,7 +61,7 @@ export default class DocumentManagement extends Component {
selectTab
=
(
event
,
newEvent
)
=>
{
selectTab
=
(
event
,
newEvent
)
=>
{
this
.
setState
({
tab
:
newEvent
})
this
.
setState
({
tab
:
newEvent
})
//
console.log(this.state.tab)
console
.
log
(
this
.
state
.
tab
)
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -304,50 +304,6 @@ export default class DocumentManagement extends Component {
...
@@ -304,50 +304,6 @@ export default class DocumentManagement extends Component {
handleLoading
=
{
this
.
handleLoading
.
bind
(
this
)}
handleLoading
=
{
this
.
handleLoading
.
bind
(
this
)}
name
=
{
this
.
state
.
name
}
name
=
{
this
.
state
.
name
}
/
>
/
>
// this.state.id === 68542 ?
// <AuditTahunan
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68541 ?
// <ManualBookTia
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68544 ?
// <QReview
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// :
// this.state.id === 68543 ?
// <BOD
// data={this.state.listData[this.state.tab]}
// refresh={this.state.refresh}
// btnedit={this.state.btnedit}
// btndelete={this.state.btndelete}
// load={this.state.load}
// />
// // :
// // this.state.id === 68545 ?
// // <ManualBookETMS
// // data={this.state.listData[this.state.tab]}
// // refresh={this.state.refresh}
// // />
// :
// <span>Coming Soon</span>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/DocumentManagement/ManualBookETMS.js
deleted
100644 → 0
View file @
25105f54
import
React
,
{
Component
}
from
'react'
import
MUIDataTable
from
'mui-datatables'
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
ReactTooltip
from
'react-tooltip'
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
options
=
ct
.
customOptions
();
export
default
class
ManualBookETMS
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
dataTable
:
[],
visibleCreate
:
false
,
refresh
:
''
}
}
componentDidMount
()
{
// console.log(this.props.data)
this
.
getData
()
}
componentWillReceiveProps
(
props
)
{
// console.log(props);
const
{
refresh
,
id
}
=
this
.
props
;
if
(
props
.
refresh
!==
refresh
)
{
this
.
getData
()
}
}
getData
()
{
let
payload
=
{
"setting_id"
:
this
.
props
.
data
.
setting_id
}
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
document_name
,
item
.
description
,
item
.
company_name
,
item
.
document_type
,
String
(
Number
(
item
.
document_size
)
/
1000
+
' KB'
),
item
.
created_by
,
item
.
created_at
,
]
})
this
.
setState
({
dataTable
})
let
docPath
=
response
.
data
.
data
.
map
((
item
)
=>
{
return
[
item
.
document_filepath
]
})
this
.
setState
({
docPath
})
})
}
openPopUp
=
async
(
index
,
val
,
type
)
=>
{
if
(
type
===
'download'
)
{
console
.
log
(
this
.
state
.
docPath
[
val
])
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/document/download_document?documentName=`
+
this
.
state
.
docPath
[
val
]
+
"&&fileType="
+
index
[
5
]
)
res
=
await
res
.
blob
()
// console.log(res)
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
index
[
1
];
a
.
click
();
}
}
}
render
()
{
let
columns
=
[{
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
)
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {this.state.btnedit && <span> */
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginRight
:
15
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
val
,
'download'
)}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
/* </span>} */
}
<
/div
>
);
}
}
},
"Nama File"
,
"Keterangan"
,
"Perusahaan"
,
"Tipe"
,
"Ukuran"
,
"Ditambahkan Oleh"
,
"Ditambahkan Tanggal"
]
return
(
<
div
style
=
{{
width
:
'100%'
}}
>
<
div
style
=
{{
padding
:
25
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
dataTable
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
)
}
}
src/container/DocumentManagement/ManualBookTia.js
deleted
100644 → 0
View file @
25105f54
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/QReview.js
deleted
100644 → 0
View file @
25105f54
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