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
e2721966
Commit
e2721966
authored
Nov 10, 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
28e04b4b
a1defd95
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 @
e2721966
...
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
const
uploadAttachment
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/upload_attachment'
,
body
)
const
getRevision
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_revision'
,
body
)
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
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
...
...
@@ -197,7 +198,6 @@ const create = (type = "") => {
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
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
getMonthTransaction
=
()
=>
api
.
get
(
'transaction/get_default_month'
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
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
)
...
...
@@ -437,7 +437,7 @@ const create = (type = "") => {
getHierarkiMontlyReport
,
getDetailReportCF
,
getReportHierarkiPL
,
getMonthlyReportID
,
getMonthlyReportID
}
}
...
...
src/container/MonthlyReport.js
View file @
e2721966
...
...
@@ -27,6 +27,8 @@ export default class MonthlyReport extends Component {
visibleBS
:
false
,
listPeriode
:
null
,
periode
:
null
,
listMonth
:
null
,
month
:
null
,
listCompany
:
null
,
company
:
null
,
report_id
:
null
,
...
...
@@ -103,7 +105,7 @@ export default class MonthlyReport extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
this
.
get
Periode
()
this
.
get
Month
()
})
}
else
{
alert
(
response
.
data
.
message
)
...
...
@@ -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
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
...
...
@@ -414,7 +445,19 @@ export default class MonthlyReport extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
<
/Typography
>
<
/div
>
<
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
{...
this
.
state
.
listPeriode
}
id
=
"periode"
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
e2721966
...
...
@@ -47,7 +47,7 @@ export default class BalanceSheetMR extends Component {
async
getItemHierarki
()
{
let
payload
=
{
"report_id"
:
2
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"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