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
a1defd95
Commit
a1defd95
authored
Nov 10, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-' into 'master'
OTW Bandara See merge request
!633
parents
5e3c5933
3fdd3412
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
5 deletions
+48
-5
index.js
src/api/index.js
+2
-2
MonthlyReport.js
src/container/MonthlyReport.js
+45
-2
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+1
-1
No files found.
src/api/index.js
View file @
a1defd95
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
const
uploadAttachment
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/upload_attachment'
,
body
)
const
uploadAttachment
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/upload_attachment'
,
body
)
const
getRevision
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_revision'
,
body
)
const
getRevision
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_revision'
,
body
)
const
getPeriodeTransaction
=
()
=>
api
.
get
(
'transaction/get_periode'
)
const
getPeriodeTransaction
=
()
=>
api
.
get
(
'transaction/get_periode'
)
const
getMonthTransaction
=
()
=>
api
.
get
(
'transaction/get_default_month'
)
const
deleteAttachment
=
(
id
)
=>
api
.
post
(
`transaction/master_budget/delete_attachment/
${
id
}
`
)
const
deleteAttachment
=
(
id
)
=>
api
.
post
(
`transaction/master_budget/delete_attachment/
${
id
}
`
)
const
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
...
@@ -197,7 +198,6 @@ const create = (type = "") => {
...
@@ -197,7 +198,6 @@ const create = (type = "") => {
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
body
)
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
body
)
const
uploadMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/import_master_budget'
,
body
)
const
uploadMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/import_master_budget'
,
body
)
const
validateSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/validate_save'
,
body
)
const
validateSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/validate_save'
,
body
)
const
getMonthTransaction
=
()
=>
api
.
get
(
'transaction/get_default_month'
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
checkIsSubmit
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/is_can_submit'
,
body
)
const
checkIsSubmit
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/is_can_submit'
,
body
)
...
@@ -437,7 +437,7 @@ const create = (type = "") => {
...
@@ -437,7 +437,7 @@ const create = (type = "") => {
getHierarkiMontlyReport
,
getHierarkiMontlyReport
,
getDetailReportCF
,
getDetailReportCF
,
getReportHierarkiPL
,
getReportHierarkiPL
,
getMonthlyReportID
,
getMonthlyReportID
}
}
}
}
...
...
src/container/MonthlyReport.js
View file @
a1defd95
...
@@ -27,6 +27,8 @@ export default class MonthlyReport extends Component {
...
@@ -27,6 +27,8 @@ export default class MonthlyReport extends Component {
visibleBS
:
false
,
visibleBS
:
false
,
listPeriode
:
null
,
listPeriode
:
null
,
periode
:
null
,
periode
:
null
,
listMonth
:
null
,
month
:
null
,
listCompany
:
null
,
listCompany
:
null
,
company
:
null
,
company
:
null
,
report_id
:
null
,
report_id
:
null
,
...
@@ -103,7 +105,7 @@ export default class MonthlyReport extends Component {
...
@@ -103,7 +105,7 @@ export default class MonthlyReport extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
this
.
get
Periode
()
this
.
get
Month
()
})
})
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
...
@@ -111,6 +113,35 @@ export default class MonthlyReport extends Component {
...
@@ -111,6 +113,35 @@ export default class MonthlyReport extends Component {
})
})
}
}
getMonth
(){
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
month
=
format
(
dateNow
,
'MMMM'
)
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
);
let
data
=
response
.
data
.
data
let
monthData
=
data
.
map
((
item
)
=>
{
return
{
month_id
:
item
.
id
,
month_value
:
String
(
item
.
month_name
).
substr
(
0
,
3
)
}
})
let
defaultProps
=
{
options
:
monthData
,
getOptionLabel
:
(
option
)
=>
option
.
month_value
,
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
.
month_name
==
month
)
console
.
log
(
index
);
this
.
setState
({
listMonth
:
defaultProps
,
month
:
index
==
-
1
?
monthData
[
0
]
:
monthData
[
index
]},
()
=>
{
this
.
getPeriode
()
})
}
}
})
}
getPeriode
()
{
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
dateNow
=
new
Date
...
@@ -414,7 +445,19 @@ export default class MonthlyReport extends Component {
...
@@ -414,7 +445,19 @@ export default class MonthlyReport extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Autocomplete
{...
this
.
state
.
listMonth
}
id
=
"month"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
month
:
newInputValue
},
()
=>
{
this
.
getMonthlyReportID
()
})}
disableClearable
style
=
{{
width
:
250
,
marginRight
:
20
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Month"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
month
}
/
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
a1defd95
...
@@ -47,7 +47,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -47,7 +47,7 @@ export default class BalanceSheetMR extends Component {
async
getItemHierarki
()
{
async
getItemHierarki
()
{
let
payload
=
{
let
payload
=
{
"report_id"
:
2
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
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