From dba6162427b4215975d013921f423e1ed0f3601f Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Mon, 11 May 2026 20:44:42 +0330 Subject: [PATCH] remove required pwa in pos --- .../pos/components/splash.component.html | 8 ++-- .../pos/components/splash.component.ts | 40 +++++++++---------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/app/domains/pos/components/splash.component.html b/src/app/domains/pos/components/splash.component.html index 0dc2714..02e3a46 100644 --- a/src/app/domains/pos/components/splash.component.html +++ b/src/app/domains/pos/components/splash.component.html @@ -1,9 +1,7 @@
- {{ requireInstall }} - {{ pwaInstalled() }} - {{ canInstall() }} - @if (requireInstall && !pwaInstalled()) { + در حال بارگذاری ... +
diff --git a/src/app/domains/pos/components/splash.component.ts b/src/app/domains/pos/components/splash.component.ts index 6151c4e..6afa8ea 100644 --- a/src/app/domains/pos/components/splash.component.ts +++ b/src/app/domains/pos/components/splash.component.ts @@ -1,6 +1,6 @@ import { brandingConfig } from '@/branding/branding.config'; import { PwaInstallService } from '@/core/services'; -import { Component, effect, EventEmitter, inject, Output } from '@angular/core'; +import { Component, EventEmitter, inject, Output } from '@angular/core'; import { ButtonDirective } from 'primeng/button'; import { finalize, forkJoin } from 'rxjs'; import images from 'src/assets/images'; @@ -27,31 +27,31 @@ export class PosSplashComponent { canInstall = this.pwaInstallService.canInstall; private installPromptShown = false; - constructor() { - effect(() => { - if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) { - // this.getData(); - return; - } + // constructor() { + // effect(() => { + // if (!this.requireInstall || this.pwaInstalled() || this.installPromptShown) { + // // this.getData(); + // return; + // } - if (this.canInstall()) { - this.installPromptShown = true; - this.pwaInstallService.openInstallConfirm(); - } - }); - } + // if (this.canInstall()) { + // this.installPromptShown = true; + // this.pwaInstallService.openInstallConfirm(); + // } + // }); + // } async ngOnInit() { const data = await this.deviceInfoStore.getData(); - if (!this.requireInstall || this.pwaInstalled()) { - this.getData(); - } + this.getData(); + // if (!this.requireInstall || this.pwaInstalled()) { + // } - if (this.canInstall()) { - this.pwaInstallService.openInstallConfirm(); - this.installPromptShown = true; - } + // if (this.canInstall()) { + // this.pwaInstallService.openInstallConfirm(); + // this.installPromptShown = true; + // } } async getData() {