AW-3441 fix oopsie
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
519b81d1fd
commit
33f322424e
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "1.1.8",
|
"version": "1.1.9",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
|
@ -27,11 +27,7 @@ export class PackageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasPackage(id: string): boolean {
|
hasPackage(id: string): boolean {
|
||||||
if (!this.packages[id]) {
|
return id in this.packages;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.packages[id].enabled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
postItemPackageTask(item: IItem, task: IItemTask): Observable<IItemTask> {
|
postItemPackageTask(item: IItem, task: IItemTask): Observable<IItemTask> {
|
||||||
@ -41,6 +37,6 @@ export class PackageService {
|
|||||||
|
|
||||||
export function isValidPackage(pack: IPackage): boolean {
|
export function isValidPackage(pack: IPackage): boolean {
|
||||||
const today = new Date(new Date(Date.now()).toUTCString()).setHours(0, 0, 0, 0);
|
const today = new Date(new Date(Date.now()).toUTCString()).setHours(0, 0, 0, 0);
|
||||||
return pack !== null && pack.dataDate.getTime() <= today
|
return pack !== null && new Date(pack.dataDate).getTime() <= today
|
||||||
&& (!pack.dataEndDate || pack.dataEndDate.getTime() >= today);
|
&& (!pack.dataEndDate || new Date(pack.dataEndDate).getTime() >= today);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user