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
a1d9abc9
Commit
a1d9abc9
authored
Mar 23, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4f6f300a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
OutlookPA.js
src/container/OutlookPA.js
+7
-6
No files found.
src/container/OutlookPA.js
View file @
a1d9abc9
...
@@ -99,7 +99,7 @@ export default class OutlookPA extends Component {
...
@@ -99,7 +99,7 @@ export default class OutlookPA extends Component {
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
}
}
api
.
create
().
getCompanySubmittedOLPA
(
body
).
then
(
response
=>
{
api
.
create
().
getCompanySubmittedOLPA
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
...
@@ -233,7 +233,7 @@ export default class OutlookPA extends Component {
...
@@ -233,7 +233,7 @@ export default class OutlookPA extends Component {
getCompanyActive
()
{
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
...
@@ -291,8 +291,9 @@ export default class OutlookPA extends Component {
...
@@ -291,8 +291,9 @@ export default class OutlookPA extends Component {
getLastPeriod
()
{
getLastPeriod
()
{
api
.
create
().
getLastPeriodOLPA
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
api
.
create
().
getLastPeriodOLPA
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
// console.log(response);
// console.log(response);
let
currentYear
=
new
Date
().
getFullYear
()
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
:
Number
(
response
.
data
.
data
.
last_periode
)
<
Number
(
currentYear
)?
String
(
currentYear
)
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
})
})
}
}
...
@@ -310,11 +311,11 @@ export default class OutlookPA extends Component {
...
@@ -310,11 +311,11 @@ export default class OutlookPA extends Component {
let
data
=
[]
let
data
=
[]
response
.
data
.
data
.
map
((
item
)
=>
{
response
.
data
.
data
.
map
((
item
)
=>
{
if
(
this
.
state
.
isApprover
)
{
if
(
this
.
state
.
isApprover
)
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)))
{
data
.
push
(
item
)
data
.
push
(
item
)
}
}
}
else
{
}
else
{
if
((
item
>=
2000
)
&&
(
item
==
Number
(
this
.
state
.
lastPeriod
)
+
1
||
item
<
Number
(
this
.
state
.
lastPeriod
)
+
1
))
{
if
((
item
>=
2000
)
&&
(
item
==
Number
(
this
.
state
.
lastPeriod
)
||
item
<
Number
(
this
.
state
.
lastPeriod
)
))
{
data
.
push
(
item
)
data
.
push
(
item
)
}
}
}
}
...
@@ -328,7 +329,7 @@ export default class OutlookPA extends Component {
...
@@ -328,7 +329,7 @@ export default class OutlookPA extends Component {
options
:
periodeData
,
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
Number
(
this
.
state
.
lastPeriod
)
+
1
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
)
:
Number
(
this
.
state
.
lastPeriod
)
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
periode
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
periode
)
// console.log(data)
// console.log(data)
// console.log(this.state.lastPeriod)
// console.log(this.state.lastPeriod)
...
...
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