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
63a2dfb5
Commit
63a2dfb5
authored
Sep 29, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into faisal
parents
5532996d
ac9aac2c
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
530 additions
and
313 deletions
+530
-313
index.js
src/api/index.js
+2
-2
BudgetTahunan.js
src/container/BudgetTahunan.js
+89
-21
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+34
-29
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+37
-37
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+212
-158
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+138
-44
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+12
-8
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+5
-5
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+1
-9
No files found.
src/api/index.js
View file @
63a2dfb5
...
...
@@ -24,7 +24,7 @@ const create = (type = "") => {
'Content-Type'
:
'application/json'
,
},
// 60 second timeout...
timeout
:
3
0000
timeout
:
6
0000
})
break
;
case
'UPLOAD'
:
...
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type'
:
'application/json'
,
},
// 40 second timeout...
timeout
:
5
0000
timeout
:
6
0000
})
break
;
default
:
...
...
src/container/BudgetTahunan.js
View file @
63a2dfb5
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/BalanceSheet.js
View file @
63a2dfb5
...
...
@@ -45,7 +45,8 @@ export default class BalanceSheet extends Component {
editable
:
false
,
buttonError
:
false
,
judulColumn
:
null
,
updateBy
:
'-'
updateBy
:
'-'
,
handleTekTekTek
:
0
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -326,7 +327,7 @@ export default class BalanceSheet extends Component {
item
.
total_current_year
,
item
.
total_next_year
,
item
.
total_more_year
,
item
.
order
,
item
.
order
s
,
item
.
error
]
})
...
...
@@ -2126,13 +2127,14 @@ export default class BalanceSheet extends Component {
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(
()
=>
{
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMasterBudget
(
'draft'
)
},
100
);
})
}
})
}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
...
...
@@ -2141,17 +2143,14 @@ export default class BalanceSheet extends Component {
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
{
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
,
loading
:
false
})
},
100
);
})
:
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMasterBudget
(
'submitted'
)
})
}}
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
...
...
@@ -2233,11 +2232,14 @@ export default class BalanceSheet extends Component {
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'draft'
)
},
100
);
})}
})
)}
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
...
@@ -2247,11 +2249,14 @@ export default class BalanceSheet extends Component {
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'submitted'
)
},
100
);
})}
})
)}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
63a2dfb5
...
...
@@ -434,29 +434,29 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[9] == null? "" : i[9].value)
data
.
push
({
"item_report_id"
:
i
[
1
],
"item_name"
:
i
[
1
]
!
==
""
?
null
:
String
(
i
[
6
]),
"parent"
:
i
[
1
]
!
==
""
?
null
:
i
[
2
],
"item_name"
:
i
[
1
]
==
""
?
null
:
String
(
i
[
6
]),
"parent"
:
i
[
1
]
==
""
?
null
:
i
[
2
],
"weight"
:
String
(
i
[
7
]),
"uom"
:
String
(
i
[
8
]),
"kpi_type"
:
i
[
9
]
==
null
?
""
:
i
[
9
].
value
,
"max_ach"
:
i
[
10
]
==
null
?
""
:
i
[
10
].
value
,
"formula"
:
i
[
11
]
==
null
?
""
:
i
[
11
].
value
,
"total_actual_before"
:
String
(
i
[
12
]),
"january"
:
String
(
i
[
13
]),
"february"
:
String
(
i
[
14
]),
"march"
:
String
(
i
[
15
]),
"april"
:
String
(
i
[
16
]),
"may"
:
String
(
i
[
17
]),
"june"
:
String
(
i
[
18
]),
"july"
:
String
(
i
[
19
]),
"august"
:
String
(
i
[
20
]),
"september"
:
String
(
i
[
21
]),
"october"
:
String
(
i
[
22
]),
"november"
:
String
(
i
[
23
]),
"december"
:
String
(
i
[
24
]),
"total_current_year"
:
String
(
i
[
25
]),
"total_next_year"
:
String
(
i
[
26
]),
"total_more_year"
:
String
(
i
[
27
]),
"total_actual_before"
:
String
(
i
[
12
])
==
""
?
"0,0"
:
String
(
i
(
12
))
,
"january"
:
String
(
i
[
13
])
==
""
?
"0,0"
:
String
(
i
[
13
])
,
"february"
:
String
(
i
[
14
])
==
""
?
"0,0"
:
String
(
i
[
14
])
,
"march"
:
String
(
i
[
15
])
==
""
?
"0,0"
:
String
(
i
[
15
])
,
"april"
:
String
(
i
[
16
])
==
""
?
"0,0"
:
String
(
i
[
16
])
,
"may"
:
String
(
i
[
17
])
==
""
?
"0,0"
:
String
(
i
[
17
])
,
"june"
:
String
(
i
[
18
])
==
""
?
"0,0"
:
String
(
i
[
18
])
,
"july"
:
String
(
i
[
19
])
==
""
?
"0,0"
:
String
(
i
[
19
])
,
"august"
:
String
(
i
[
20
])
==
""
?
"0,0"
:
String
(
i
[
20
])
,
"september"
:
String
(
i
[
21
])
==
""
?
"0,0"
:
String
(
i
[
21
])
,
"october"
:
String
(
i
[
22
])
==
""
?
"0,0"
:
String
(
i
[
22
])
,
"november"
:
String
(
i
[
23
])
==
""
?
"0,0"
:
String
(
i
[
23
])
,
"december"
:
String
(
i
[
24
])
==
""
?
"0,0"
:
String
(
i
[
24
])
,
"total_current_year"
:
String
(
i
[
25
])
==
""
?
"0,0"
:
String
(
i
[
25
])
,
"total_next_year"
:
String
(
i
[
26
])
==
""
?
"0,0"
:
String
(
i
[
26
])
,
"total_more_year"
:
String
(
i
[
27
])
==
""
?
"0,0"
:
String
(
i
[
27
])
,
"strategic"
:
String
(
i
[
28
]),
"pic"
:
String
(
i
[
29
])
})
...
...
@@ -472,7 +472,7 @@ export default class CorporateAnnualTarget extends Component {
}
let
totalWeight
=
0
this
.
state
.
dataTable
.
map
((
items
,
indexs
)
=>
{
if
(
items
[
0
]
==
3
)
{
if
(
items
[
0
]
!==
1
||
items
[
0
]
!==
4
)
{
console
.
log
(
items
[
7
])
totalWeight
+=
Number
(
items
[
7
].
replace
(
'%'
,
''
))
}
...
...
@@ -503,29 +503,29 @@ export default class CorporateAnnualTarget extends Component {
// console.log(i[9] == null? "" : i[9].value)
data
.
push
({
"item_report_id"
:
i
[
1
],
"item_name"
:
i
[
1
]
!
==
""
?
null
:
String
(
i
[
6
]),
"parent"
:
i
[
1
]
!
==
""
?
null
:
i
[
2
],
"item_name"
:
i
[
1
]
==
""
?
null
:
String
(
i
[
6
]),
"parent"
:
i
[
1
]
==
""
?
null
:
i
[
2
],
"weight"
:
String
(
i
[
7
]),
"uom"
:
String
(
i
[
8
]),
"kpi_type"
:
i
[
9
]
==
null
?
""
:
i
[
9
].
value
,
"max_ach"
:
i
[
10
]
==
null
?
""
:
i
[
10
].
value
,
"formula"
:
i
[
11
]
==
null
?
""
:
i
[
11
].
value
,
"total_actual_before"
:
String
(
i
[
12
]),
"january"
:
String
(
i
[
13
]),
"february"
:
String
(
i
[
14
]),
"march"
:
String
(
i
[
15
]),
"april"
:
String
(
i
[
16
]),
"may"
:
String
(
i
[
17
]),
"june"
:
String
(
i
[
18
]),
"july"
:
String
(
i
[
19
]),
"august"
:
String
(
i
[
20
]),
"september"
:
String
(
i
[
21
]),
"october"
:
String
(
i
[
22
]),
"november"
:
String
(
i
[
23
]),
"december"
:
String
(
i
[
24
]),
"total_current_year"
:
String
(
i
[
25
]),
"total_next_year"
:
String
(
i
[
26
]),
"total_more_year"
:
String
(
i
[
27
]),
"total_actual_before"
:
String
(
i
[
12
])
==
""
?
"0,0"
:
String
(
i
(
12
))
,
"january"
:
String
(
i
[
13
])
==
""
?
"0,0"
:
String
(
i
[
13
])
,
"february"
:
String
(
i
[
14
])
==
""
?
"0,0"
:
String
(
i
[
14
])
,
"march"
:
String
(
i
[
15
])
==
""
?
"0,0"
:
String
(
i
[
15
])
,
"april"
:
String
(
i
[
16
])
==
""
?
"0,0"
:
String
(
i
[
16
])
,
"may"
:
String
(
i
[
17
])
==
""
?
"0,0"
:
String
(
i
[
17
])
,
"june"
:
String
(
i
[
18
])
==
""
?
"0,0"
:
String
(
i
[
18
])
,
"july"
:
String
(
i
[
19
])
==
""
?
"0,0"
:
String
(
i
[
19
])
,
"august"
:
String
(
i
[
20
])
==
""
?
"0,0"
:
String
(
i
[
20
])
,
"september"
:
String
(
i
[
21
])
==
""
?
"0,0"
:
String
(
i
[
21
])
,
"october"
:
String
(
i
[
22
])
==
""
?
"0,0"
:
String
(
i
[
22
])
,
"november"
:
String
(
i
[
23
])
==
""
?
"0,0"
:
String
(
i
[
23
])
,
"december"
:
String
(
i
[
24
])
==
""
?
"0,0"
:
String
(
i
[
24
])
,
"total_current_year"
:
String
(
i
[
25
])
==
""
?
"0,0"
:
String
(
i
[
25
])
,
"total_next_year"
:
String
(
i
[
26
])
==
""
?
"0,0"
:
String
(
i
[
26
])
,
"total_more_year"
:
String
(
i
[
27
])
==
""
?
"0,0"
:
String
(
i
[
27
])
,
"strategic"
:
String
(
i
[
28
]),
"pic"
:
String
(
i
[
29
])
})
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
63a2dfb5
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/TaxPlanning.js
View file @
63a2dfb5
This diff is collapsed.
Click to expand it.
src/container/DocumentManagement/CreateManagementDoc.js
View file @
63a2dfb5
...
...
@@ -55,7 +55,6 @@ export default class CreateManagementDoc extends Component {
this
.
getPeriode
()
this
.
getMonth
()
this
.
getFileSize
()
console
.
log
(
this
.
props
.
setting_id
)
console
.
log
(
this
.
props
.
name
)
}
...
...
@@ -69,9 +68,15 @@ export default class CreateManagementDoc extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
length
==
0
){
this
.
setState
({
sizeUpload
:
response
.
data
.
data
[
0
]
?
response
.
data
.
data
[
0
].
value
===
undefined
?
"1"
:
response
.
data
.
data
[
0
].
value
:
"1"
sizeUpload
:
"1"
})
}
else
this
.
setState
({
sizeUpload
:
response
.
data
.
data
[
0
].
value
})
console
.
log
(
this
.
state
.
sizeUpload
)
}
}
})
...
...
@@ -121,7 +126,7 @@ export default class CreateManagementDoc extends Component {
// }
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
...
...
@@ -155,7 +160,7 @@ export default class CreateManagementDoc extends Component {
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
console
.
log
(
dateNow
)
//
console.log(dateNow)
let
year
=
format
(
dateNow
,
'yyyy'
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -179,7 +184,6 @@ export default class CreateManagementDoc extends Component {
getMonth
(){
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
console
.
log
(
dateNow
)
// let bulan = format(dateNow, 'MMMM')
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -220,7 +224,7 @@ export default class CreateManagementDoc extends Component {
let
length
=
event
.
name
.
split
(
"."
).
length
let
fileType
=
event
.
name
.
split
(
"."
)[
length
-
1
]
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
fileType
)
//
console.log(fileType)
if
(
err
)
{
console
.
log
(
err
);
}
...
...
@@ -248,7 +252,7 @@ export default class CreateManagementDoc extends Component {
formData
.
append
(
"documentPeriode"
,
null
);
formData
.
append
(
"documentMonth"
,
null
);
this
.
setState
({
formData
},
()
=>
{
this
.
props
.
createDocument
(
this
.
state
.
formData
,
this
.
props
.
setting_id
)
this
.
props
.
createDocument
(
this
.
state
.
formData
,
this
.
props
.
setting_id
,
this
.
props
.
name
)
})
}
...
...
@@ -274,7 +278,7 @@ export default class CreateManagementDoc extends Component {
formData
.
append
(
"documentPeriode"
,
this
.
state
.
periode
.
periode
);
formData
.
append
(
"documentMonth"
,
this
.
state
.
monthId
.
month_id
);
this
.
setState
({
formData
},
()
=>
{
this
.
props
.
createDocument
(
this
.
state
.
formData
,
this
.
props
.
setting_id
)
this
.
props
.
createDocument
(
this
.
state
.
formData
,
this
.
props
.
setting_id
,
this
.
props
.
name
)
})
}
}
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
63a2dfb5
...
...
@@ -37,7 +37,7 @@ export default class DocumentManagement extends Component {
menu
:
"document management"
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -95,7 +95,7 @@ export default class DocumentManagement extends Component {
})
}
createDocument
(
payload
,
settingID
)
{
createDocument
(
payload
,
settingID
,
menuName
)
{
api
.
create
().
uploadDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -106,8 +106,8 @@ export default class DocumentManagement extends Component {
})
}
else
if
(
response
.
data
.
message
===
"Upload Document Success"
)
{
this
.
getDataDocument
(
settingID
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
settingID
,
visibleCreate
:
false
})
this
.
getDataDocument
(
settingID
,
menuName
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
settingID
,
menuName
,
visibleCreate
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -146,7 +146,7 @@ export default class DocumentManagement extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getDataDocument
(
this
.
state
.
settingID
)
this
.
getDataDocument
(
this
.
state
.
settingID
,
this
.
state
.
menuName
)
this
.
setState
({
konfirmasi
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visibleCreate
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
63a2dfb5
...
...
@@ -57,7 +57,6 @@ export default class EditManagementDoc extends Component {
this
.
getFileSize
()
if
(
this
.
props
.
type
===
'edit'
)
{
this
.
getDetailDoc
()
console
.
log
(
this
.
props
.
data
)
}
}
...
...
@@ -265,12 +264,11 @@ export default class EditManagementDoc extends Component {
}
fileHandler
=
(
event
)
=>
{
console
.
log
(
event
)
let
fileObj
=
event
let
length
=
event
.
name
.
split
(
"."
).
length
let
fileType
=
event
.
name
.
split
(
"."
)[
length
-
1
]
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
fileType
)
//
console.log(fileType)
if
(
err
)
{
console
.
log
(
err
);
}
...
...
@@ -321,12 +319,6 @@ export default class EditManagementDoc extends Component {
this
.
setState
({
formData
},
()
=>
{
this
.
props
.
updateDocument
(
this
.
state
.
formData
)
})
var
object
=
{};
formData
.
forEach
(
function
(
value
,
key
){
object
[
key
]
=
value
;
});
var
json
=
JSON
.
stringify
(
object
);
console
.
log
(
json
)
}
}
...
...
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