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
e216e637
Commit
e216e637
authored
Sep 18, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateBalancesitttt & upload size
parent
24f6eb8f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
500 additions
and
282 deletions
+500
-282
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+92
-102
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+22
-1
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+22
-1
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+179
-86
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+182
-90
Upload.js
src/library/Upload.js
+3
-2
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
e216e637
This diff is collapsed.
Click to expand it.
src/container/MasterData/Parameter/Parameter.js
View file @
e216e637
...
@@ -50,7 +50,8 @@ export default class Parameter extends Component {
...
@@ -50,7 +50,8 @@ export default class Parameter extends Component {
delete
:
false
,
delete
:
false
,
load
:
false
,
load
:
false
,
judul
:
''
,
judul
:
''
,
loading
:
false
loading
:
false
,
sizeUpload
:
"1"
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -58,6 +59,25 @@ export default class Parameter extends Component {
...
@@ -58,6 +59,25 @@ export default class Parameter extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getAllParameter
()
this
.
getAllParameter
()
this
.
getPermission
()
this
.
getPermission
()
this
.
getSizeUpload
()
}
getSizeUpload
(){
let
body
=
{
group
:
'MAX_FILE_SIZE'
,
company_id
:
0
,
type
:
'MAX_FILE_SIZE'
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
sizeUpload
:
response
.
data
.
data
[
0
].
value
})
}
}
})
}
}
getPermission
()
{
getPermission
()
{
...
@@ -1047,6 +1067,7 @@ export default class Parameter extends Component {
...
@@ -1047,6 +1067,7 @@ export default class Parameter extends Component {
type
=
{
this
.
state
.
uploadStatus
}
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
percentage
=
{
this
.
state
.
percentage
}
result
=
{
this
.
state
.
result
}
result
=
{
this
.
state
.
result
}
sizeUpload
=
{
Number
(
this
.
state
.
sizeUpload
)}
acceptedFiles
=
{[
"xlsx"
]}
acceptedFiles
=
{[
"xlsx"
]}
onHandle
=
{(
dt
)
=>
{
onHandle
=
{(
dt
)
=>
{
this
.
fileHandler
(
dt
)
this
.
fileHandler
(
dt
)
...
...
src/container/MasterData/UnitBisnis.js
View file @
e216e637
...
@@ -62,7 +62,8 @@ export default class UnitBisnis extends Component {
...
@@ -62,7 +62,8 @@ export default class UnitBisnis extends Component {
rowData
:
[],
rowData
:
[],
unitBisnisName
:
''
,
unitBisnisName
:
''
,
// visibleLoad: true,
// visibleLoad: true,
loading
:
false
loading
:
false
,
sizeUpload
:
"1"
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -225,6 +226,25 @@ export default class UnitBisnis extends Component {
...
@@ -225,6 +226,25 @@ export default class UnitBisnis extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getData
()
this
.
getData
()
this
.
getPermission
()
this
.
getPermission
()
this
.
getSizeUpload
()
}
getSizeUpload
(){
let
body
=
{
group
:
'MAX_FILE_SIZE'
,
company_id
:
0
,
type
:
'MAX_FILE_SIZE'
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
sizeUpload
:
response
.
data
.
data
[
0
].
value
})
}
}
})
}
}
getPermission
()
{
getPermission
()
{
...
@@ -771,6 +791,7 @@ export default class UnitBisnis extends Component {
...
@@ -771,6 +791,7 @@ export default class UnitBisnis extends Component {
type
=
{
this
.
state
.
uploadStatus
}
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
percentage
=
{
this
.
state
.
percentage
}
result
=
{
this
.
state
.
result
}
result
=
{
this
.
state
.
result
}
sizeUpload
=
{
Number
(
this
.
state
.
sizeUpload
)}
acceptedFiles
=
{[
"xlsx"
]}
acceptedFiles
=
{[
"xlsx"
]}
onHandle
=
{(
dt
)
=>
{
onHandle
=
{(
dt
)
=>
{
this
.
fileHandler
(
dt
)
this
.
fileHandler
(
dt
)
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
e216e637
This diff is collapsed.
Click to expand it.
src/container/MasterData/formReportItems/EditReportItems.js
View file @
e216e637
This diff is collapsed.
Click to expand it.
src/library/Upload.js
View file @
e216e637
...
@@ -25,7 +25,8 @@ class Upload extends Component {
...
@@ -25,7 +25,8 @@ class Upload extends Component {
percentage
:
'0'
,
percentage
:
'0'
,
completed
:
'0'
,
completed
:
'0'
,
alert
:
false
,
alert
:
false
,
alertMessage
:
''
alertMessage
:
''
,
sizeUpload
:
this
.
props
.
sizeUpload
===
undefined
?
0
:
this
.
props
.
sizeUpload
}
}
}
}
...
@@ -146,7 +147,7 @@ class Upload extends Component {
...
@@ -146,7 +147,7 @@ class Upload extends Component {
// alert('File Tidak Boleh Lebih Dari 1MB')
// alert('File Tidak Boleh Lebih Dari 1MB')
}
}
}
else
{
}
else
{
if
(
this
.
state
.
sizeFile
<
1000
)
{
if
(
this
.
state
.
sizeFile
<
this
.
state
.
sizeUpload
*
1000
)
{
this
.
props
.
onUpload
()
this
.
props
.
onUpload
()
}
else
{
}
else
{
this
.
setState
({
alertMessage
:
'The file is too large. Allowed maximum size is 1MB'
,
alert
:
true
})
this
.
setState
({
alertMessage
:
'The file is too large. Allowed maximum size is 1MB'
,
alert
:
true
})
...
...
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