mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Git pull made- changes made on list order
This commit is contained in:
@@ -108,7 +108,6 @@ export class AuthService {
|
||||
localStorage.setItem('Meteor.userId',responseChat['data'].userId);
|
||||
this.cookieService.set('rc_token', responseChat['data'].authToken);
|
||||
this.cookieService.set('rc_uid', responseChat['data'].userId);
|
||||
alert(this.cookieService.get('rc_uid'));
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SortService } from './sort.service';
|
||||
|
||||
describe('SortService', () => {
|
||||
let service: SortService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(SortService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SortService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
sortArrayISODate(myArray: any) {
|
||||
return myArray.sort(function (a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
sortArrayByDate(myArray: any) {
|
||||
console.log(myArray[0].taskStartDate);
|
||||
return myArray.sort(function (a, b) {
|
||||
return (new Date(a.workflowInstanceDataFields.StartDate) < new Date(b.workflowInstanceDataFields.StartDate)) ? -1 : ((new Date(a.workflowInstanceDataFields.StartDate) > new Date(b.workflowInstanceDataFields.StartDate)) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user