diff --git a/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts b/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts index 5c27aae40..f839885fd 100644 --- a/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts +++ b/uniquely/flight-finder-pwa/src/component/page-flight-finder.ts @@ -52,7 +52,7 @@ export class PageFlightFinder extends AlwatrElement { ]; private __jobList: Array = []; - private __relativeTime: string = ''; + private __relativeTime = ''; static jobDataSignal = new SignalInterface('job-data'); static jobAddSignal = new SignalInterface('job-add'); @@ -72,8 +72,8 @@ export class PageFlightFinder extends AlwatrElement { const relativeTimeObject = getHumanTime(now - (jobList.meta?.lastUpdated ?? now)); this.__relativeTime = PageFlightFinder.relativeTimeFormatter.format( - -Math.floor(relativeTimeObject.humanTime), - relativeTimeObject.units + -Math.floor(relativeTimeObject.humanTime), + relativeTimeObject.units, ); this.requestUpdate(); }); diff --git a/uniquely/flight-finder-pwa/src/director/job-data.ts b/uniquely/flight-finder-pwa/src/director/job-data.ts index a66b4f332..36b18978d 100644 --- a/uniquely/flight-finder-pwa/src/director/job-data.ts +++ b/uniquely/flight-finder-pwa/src/director/job-data.ts @@ -1,5 +1,5 @@ -import {createLogger} from '@alwatr/logger'; import {fetch} from '@alwatr/fetch'; +import {createLogger} from '@alwatr/logger'; import {SignalInterface} from '@alwatr/signal'; import {showToastSignal} from './toast.js'; @@ -43,7 +43,8 @@ jobDataSignal.setProvider(async () => { }); await _dispatchJobList(response); - } catch (error) { + } + catch (error) { logger.error('jobListProvider', 'fetch_failed', error); showToastSignal.dispatch({ diff --git a/uniquely/flight-finder-pwa/src/util/human-time.ts b/uniquely/flight-finder-pwa/src/util/human-time.ts index a33f1f581..24faf2fa0 100644 --- a/uniquely/flight-finder-pwa/src/util/human-time.ts +++ b/uniquely/flight-finder-pwa/src/util/human-time.ts @@ -9,7 +9,8 @@ export function getHumanTime(timestamp: number): { if (time > 1000 * 60 * 60) { humanTime = time / (1000 * 60 * 60); units = 'hours'; - } else if (time > 1000 * 60) { + } + else if (time > 1000 * 60) { humanTime = time / (1000 * 60); units = 'minutes'; }