fix condition
This commit is contained in:
parent
efee15eb97
commit
a35e5fca50
1 changed files with 14 additions and 16 deletions
|
|
@ -310,13 +310,13 @@ export class ReportController extends Controller {
|
|||
if(!education && !educationLevel && !field) {
|
||||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) => i.isEducation === true
|
||||
(i: any) => i.isEducation == true
|
||||
)
|
||||
: []
|
||||
if(_educations.length == 0) {
|
||||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) => i.isHigh === true
|
||||
(i: any) => i.isHigh == true
|
||||
)
|
||||
: []
|
||||
// if(_educations.length == 0) {
|
||||
|
|
@ -330,9 +330,12 @@ export class ReportController extends Controller {
|
|||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) =>
|
||||
i.degree === education ||
|
||||
i.educationLevel === educationLevel ||
|
||||
i.field === field
|
||||
// i.degree === education ||
|
||||
// i.educationLevel === educationLevel ||
|
||||
// i.field === field
|
||||
(education ? i.degree?.toString().includes(education) : false) ||
|
||||
(educationLevel ? i.educationLevel?.toString().includes(educationLevel) : false) ||
|
||||
(field ? i.field?.toString().includes(field) : false)
|
||||
)
|
||||
: []
|
||||
}
|
||||
|
|
@ -593,30 +596,25 @@ export class ReportController extends Controller {
|
|||
if(!education && !educationLevel && !field) {
|
||||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) => i.isEducation === true
|
||||
(i: any) => i.isEducation == true
|
||||
)
|
||||
: []
|
||||
if(_educations.length == 0) {
|
||||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) => i.isHigh === true
|
||||
(i: any) => i.isHigh == true
|
||||
)
|
||||
: []
|
||||
// if(_educations.length == 0) {
|
||||
// _educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
// ? (x.Educations as any[])[0]
|
||||
// : []
|
||||
// }
|
||||
}
|
||||
}
|
||||
else {
|
||||
_educations = Array.isArray(x.Educations) && x.Educations != null
|
||||
? (x.Educations as any[]).filter(
|
||||
(i: any) =>
|
||||
i.degree === education ||
|
||||
i.educationLevel === educationLevel ||
|
||||
i.field === field
|
||||
)
|
||||
(education ? i.degree?.toString().includes(education) : false) ||
|
||||
(educationLevel ? i.educationLevel?.toString().includes(educationLevel) : false) ||
|
||||
(field ? i.field?.toString().includes(field) : false)
|
||||
)
|
||||
: []
|
||||
}
|
||||
mapData.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue