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
303907e6
Commit
303907e6
authored
Feb 22, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
6ab465fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
SubHolding.js
src/container/Laporan/SubHolding.js
+3
-2
No files found.
src/container/Laporan/SubHolding.js
View file @
303907e6
...
@@ -192,7 +192,7 @@ export default class SubHolding extends Component {
...
@@ -192,7 +192,7 @@ export default class SubHolding extends Component {
getLastPeriod
()
{
getLastPeriod
()
{
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
...
@@ -229,7 +229,8 @@ export default class SubHolding extends Component {
...
@@ -229,7 +229,8 @@ export default class SubHolding extends Component {
options
:
periodeData
,
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
console
.
log
(
this
.
state
.
lastPeriod
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
))
:
this
.
state
.
latestPeriode
)
let
dateNow
=
new
Date
()
let
dateNow
=
new
Date
()
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
let
yearNow
=
dateNow
.
getFullYear
()
let
yearNow
=
dateNow
.
getFullYear
()
...
...
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