feat: update environment configuration and ngsw settings; refactor input handling and layout components for improved functionality
This commit is contained in:
+5
-5
@@ -19,7 +19,7 @@ import {
|
||||
withEnabledBlockingInitialNavigation,
|
||||
withInMemoryScrolling,
|
||||
} from '@angular/router';
|
||||
import { provideServiceWorker } from '@angular/service-worker';
|
||||
// import { provideServiceWorker } from '@angular/service-worker';
|
||||
// Use the consolidated preset that includes our custom variables
|
||||
import { ConfirmationService, MessageService } from 'primeng/api';
|
||||
import { providePrimeNG } from 'primeng/config';
|
||||
@@ -74,9 +74,9 @@ export const appConfig: ApplicationConfig = {
|
||||
withInterceptors([loggingInterceptor, authInterceptor, errorInterceptor, dedupInterceptor]),
|
||||
withInterceptorsFromDi(),
|
||||
),
|
||||
provideServiceWorker('ngsw-worker.js', {
|
||||
enabled: !isDevMode(),
|
||||
registrationStrategy: 'registerWhenStable:30000',
|
||||
}),
|
||||
// provideServiceWorker('ngsw-worker.js', {
|
||||
// enabled: !isDevMode(),
|
||||
// registrationStrategy: 'registerWhenStable:30000',
|
||||
// }),
|
||||
],
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Card } from 'primeng/card';
|
||||
import { Menu } from 'primeng/menu';
|
||||
import { finalize } from 'rxjs';
|
||||
import images from 'src/assets/images';
|
||||
import config from 'src/config';
|
||||
import { PosInfoStore, PosProfileStore } from '../../store';
|
||||
import { DeviceInfoStore } from '../../store/device.store';
|
||||
import { PosMainMenuSidebarComponent } from '../mainMenuSidebar/main-menu-sidebar.component';
|
||||
@@ -83,7 +84,7 @@ export class PosPagesLayoutComponent {
|
||||
|
||||
now = new Date();
|
||||
|
||||
homeRouteLink = '/pos';
|
||||
homeRouteLink = config.isPosApplication ? '/' : '/pos';
|
||||
|
||||
async getData() {
|
||||
if (!this.posInfo() || !this.posProfile()) {
|
||||
|
||||
@@ -17,7 +17,7 @@ export class PosPaymentBridgeService extends PosPaymentBridgeAbstract {
|
||||
this.toastServices.error({ text: '@@@@@@@@@@@@@' });
|
||||
|
||||
// @ts-ignore
|
||||
window.webV = {
|
||||
window.WebV = {
|
||||
onPaymentResult: () => {
|
||||
this.toastServices.error({ text: 'asdasdsadassadasdas' });
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
</header>
|
||||
}
|
||||
<div class="p-4">
|
||||
<div class="light-bottomsheet-body p-4">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,9 @@ import { Button } from 'primeng/button';
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
max-height: 80svh;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--surface-card, #fff);
|
||||
border-radius: 12px 12px 0 0;
|
||||
box-shadow: none;
|
||||
@@ -51,13 +53,21 @@ import { Button } from 'primeng/button';
|
||||
}
|
||||
|
||||
.light-bottomsheet-content {
|
||||
max-height: 80svh;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.light-bottomsheet-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.light-bottomsheet-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -116,7 +126,7 @@ export class SharedLightBottomsheetComponent implements OnInit, OnDestroy, OnCha
|
||||
@Input() modal = true;
|
||||
@Input() closable = true;
|
||||
@Input() style: Record<string, string> | undefined;
|
||||
@Input() mobileDrawerHeight = '80svh';
|
||||
@Input() mobileDrawerHeight = '90vh';
|
||||
@Input() transitionOptions = '130ms cubic-bezier(0.2, 0, 0, 1)';
|
||||
|
||||
@Output() onHide = new EventEmitter<any>();
|
||||
|
||||
@@ -243,6 +243,9 @@ export class InputComponent {
|
||||
}
|
||||
|
||||
onInput($event: Event, isPriceFormat?: boolean) {
|
||||
if ((this.inputMode !== 'numeric' && this.inputMode !== 'decimal') || !isPriceFormat) {
|
||||
return;
|
||||
}
|
||||
const target = $event.target as HTMLInputElement | null;
|
||||
if (!target) return;
|
||||
|
||||
@@ -280,7 +283,8 @@ export class InputComponent {
|
||||
value = this.lastValidNumericValue;
|
||||
numericValue = Number.isNaN(parseFloat(value)) ? 0 : parseFloat(value);
|
||||
|
||||
const isIdentifierField = ['mobile', 'phone', 'postalCode', 'nationalId'].includes(this.type);
|
||||
// const isIdentifierField = ['mobile', 'phone', 'postalCode', 'nationalId'].includes(this.type);
|
||||
const isIdentifierField = !this.numericValue;
|
||||
const restoredControlValue = isIdentifierField ? value : value === '' ? '' : numericValue;
|
||||
|
||||
this.control.setValue(restoredControlValue);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
// apiBaseUrl: 'http://194.59.214.243:5002',
|
||||
// apiBaseUrl: 'http://192.168.128.73:5002',
|
||||
apiBaseUrl: 'http://localhost:5002',
|
||||
apiBaseUrl: 'http://192.168.128.73:5002',
|
||||
// apiBaseUrl: 'http://localhost:5002',
|
||||
// host: 'http://194.59.214.243',
|
||||
host: 'localhost',
|
||||
port: 5000,
|
||||
|
||||
Reference in New Issue
Block a user