แก้ sort report2
This commit is contained in:
parent
313ef6ec51
commit
5c9e50ce36
2 changed files with 165 additions and 23 deletions
|
|
@ -955,7 +955,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -968,7 +970,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -1275,7 +1279,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -1288,7 +1294,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -1597,7 +1605,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -1610,7 +1620,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -1928,7 +1940,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -1941,7 +1955,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -2259,7 +2275,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -2272,7 +2290,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -2739,7 +2759,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -2752,7 +2774,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -2909,7 +2933,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -2922,7 +2948,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -3081,7 +3109,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -3094,7 +3124,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -3253,7 +3285,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
(b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -3266,7 +3300,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
@ -3426,7 +3462,11 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileEducations.length > 0
|
||||
) {
|
||||
let _education: any = posMaster.next_holder.profileEducations.sort(
|
||||
(a, b) => b.finishDate.getTime() - a.finishDate.getTime(),
|
||||
(a, b) =>
|
||||
b.finishDate == null
|
||||
? 0
|
||||
: (b.finishDate == null ? 0 : b.finishDate.getTime()) -
|
||||
(a.finishDate == null ? 0 : a.finishDate.getTime()),
|
||||
);
|
||||
if (_education.length > 0) {
|
||||
education = _education[0];
|
||||
|
|
@ -3439,7 +3479,9 @@ export class ReportController extends Controller {
|
|||
posMaster.next_holder.profileSalary.length > 0
|
||||
) {
|
||||
let _salary: any = posMaster.next_holder.profileSalary.sort(
|
||||
(a, b) => b.date.getTime() - a.date.getTime(),
|
||||
(a, b) =>
|
||||
(b.date == null ? 0 : b.date.getTime()) -
|
||||
(a.date == null ? 0 : a.date.getTime()),
|
||||
);
|
||||
if (_salary.length > 0) {
|
||||
salary = _salary[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue