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
b6c5d5a1
Commit
b6c5d5a1
authored
Sep 22, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menegdoc
parent
22dc9811
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
209 deletions
+251
-209
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+219
-209
Upload.js
src/library/Upload.js
+32
-0
No files found.
src/container/DocumentManagement/EditManagementDoc.js
View file @
b6c5d5a1
This diff is collapsed.
Click to expand it.
src/library/Upload.js
View file @
b6c5d5a1
...
@@ -45,6 +45,13 @@ class Upload extends Component {
...
@@ -45,6 +45,13 @@ class Upload extends Component {
}
}
}
}
componentDidMount
()
{
if
(
this
.
props
.
docName
!==
undefined
&&
this
.
props
.
docName
!==
""
)
{
console
.
log
(
'masuk'
);
this
.
setState
({
docName
:
this
.
props
.
docName
,
docSize
:
this
.
props
.
docSize
,
inputVisible
:
false
,
editVisible
:
true
})
}
}
onDrop
=
(
acceptedFiles
)
=>
{
onDrop
=
(
acceptedFiles
)
=>
{
const
formData
=
new
FormData
()
const
formData
=
new
FormData
()
let
length
=
acceptedFiles
[
0
].
name
.
split
(
"."
).
length
let
length
=
acceptedFiles
[
0
].
name
.
split
(
"."
).
length
...
@@ -116,6 +123,7 @@ class Upload extends Component {
...
@@ -116,6 +123,7 @@ class Upload extends Component {
if
(
this
.
props
.
intent
===
"management"
)
{
if
(
this
.
props
.
intent
===
"management"
)
{
this
.
setState
({
this
.
setState
({
previewVisible
:
false
,
previewVisible
:
false
,
editVisible
:
false
,
inputVisible
:
true
,
inputVisible
:
true
,
uploadProgress
:
false
,
uploadProgress
:
false
,
percentage
:
'0'
percentage
:
'0'
...
@@ -124,6 +132,7 @@ class Upload extends Component {
...
@@ -124,6 +132,7 @@ class Upload extends Component {
}
else
{
}
else
{
this
.
setState
({
this
.
setState
({
previewVisible
:
false
,
previewVisible
:
false
,
editVisible
:
false
,
inputVisible
:
true
,
inputVisible
:
true
,
uploadProgress
:
false
,
uploadProgress
:
false
,
percentage
:
'0'
percentage
:
'0'
...
@@ -187,6 +196,29 @@ class Upload extends Component {
...
@@ -187,6 +196,29 @@ class Upload extends Component {
<
/div
>
<
/div
>
:
null
}
:
null
}
{
/* edit */
}
{
this
.
state
.
editVisible
?
<
div
className
=
"u-p-file u-p-preview"
>
<
div
className
=
"display-flex-normal"
>
<
div
className
=
"width width-35px"
>
<
button
onClick
=
{
this
.
onRemove
}
className
=
"btn btn-small-circle btn-black"
type
=
"button"
>
<
img
src
=
{
Images
.
close
}
/
>
<
/button
>
<
/div
>
<
div
className
=
"width width-full margin-left-10px"
>
<
div
className
=
"txt-site txt-12 txt-white txt-bold"
>
{
this
.
state
.
docName
}
<
/div
>
<
div
className
=
"txt-site txt-11 txt-white txt-thin"
>
{
this
.
state
.
docSize
}
KB
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
null
}
{
/* file */
}
{
/* file */
}
{
this
.
state
.
previewVisible
{
this
.
state
.
previewVisible
?
?
...
...
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