feat: update environment configuration and ngsw settings; refactor input handling and layout components for improved functionality

This commit is contained in:
2026-05-16 21:17:51 +03:30
parent 29c5c50d62
commit 5098c26c96
10 changed files with 40 additions and 28 deletions
+3
View File
@@ -1,2 +1,5 @@
TENANT=tis TENANT=tis
DIST_DIR=tis DIST_DIR=tis
# TIS_BUILD_DATE=
# TIS_APP_VERSION=
# TIS_BUILD_NUMBER=
+3 -8
View File
@@ -44,8 +44,7 @@
} }
], ],
"outputHashing": "all", "outputHashing": "all",
"outputPath": "dist/default", "outputPath": "dist/default"
"serviceWorker": "ngsw-config.json"
}, },
"development": { "development": {
"extractLicenses": false, "extractLicenses": false,
@@ -80,8 +79,7 @@
} }
], ],
"outputHashing": "all", "outputHashing": "all",
"outputPath": "dist/production", "outputPath": "dist/production"
"serviceWorker": "ngsw-config.json"
}, },
"staging": { "staging": {
"extractLicenses": true, "extractLicenses": true,
@@ -93,7 +91,6 @@
], ],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"serviceWorker": "ngsw-config.json",
"sourceMap": false "sourceMap": false
}, },
"tis": { "tis": {
@@ -138,8 +135,7 @@
} }
], ],
"outputHashing": "all", "outputHashing": "all",
"outputPath": "dist/tis", "outputPath": "dist/tis"
"serviceWorker": "ngsw-config.json"
}, },
"tis-development": { "tis-development": {
"assets": [ "assets": [
@@ -186,7 +182,6 @@
"optimization": false, "optimization": false,
"outputHashing": "all", "outputHashing": "all",
"outputPath": "dist/tis", "outputPath": "dist/tis",
"serviceWorker": "ngsw-config.json",
"sourceMap": true "sourceMap": true
} }
}, },
+4 -5
View File
@@ -1,9 +1,9 @@
{ {
"$schema": "./node_modules/@angular/service-worker/config/schema.json", "$schema": "./node_modules/@angular/service-worker/config/schema.json",
"appData": { "appData": {
"appVersion": "0.0.17", "appVersion": "0.0.22",
"buildDate": "2026-05-16T16:43:54.103Z", "buildDate": "2026-05-16T16:59:05.769Z",
"buildNumber": 17 "buildNumber": 22
}, },
"assetGroups": [ "assetGroups": [
{ {
@@ -11,8 +11,7 @@
"name": "app", "name": "app",
"resources": { "resources": {
"files": [ "files": [
"/favicon.ico", "/favicon.ico"
"/index.html"
] ]
}, },
"updateMode": "prefetch" "updateMode": "prefetch"
+5 -5
View File
@@ -19,7 +19,7 @@ import {
withEnabledBlockingInitialNavigation, withEnabledBlockingInitialNavigation,
withInMemoryScrolling, withInMemoryScrolling,
} from '@angular/router'; } from '@angular/router';
import { provideServiceWorker } from '@angular/service-worker'; // import { provideServiceWorker } from '@angular/service-worker';
// Use the consolidated preset that includes our custom variables // Use the consolidated preset that includes our custom variables
import { ConfirmationService, MessageService } from 'primeng/api'; import { ConfirmationService, MessageService } from 'primeng/api';
import { providePrimeNG } from 'primeng/config'; import { providePrimeNG } from 'primeng/config';
@@ -74,9 +74,9 @@ export const appConfig: ApplicationConfig = {
withInterceptors([loggingInterceptor, authInterceptor, errorInterceptor, dedupInterceptor]), withInterceptors([loggingInterceptor, authInterceptor, errorInterceptor, dedupInterceptor]),
withInterceptorsFromDi(), withInterceptorsFromDi(),
), ),
provideServiceWorker('ngsw-worker.js', { // provideServiceWorker('ngsw-worker.js', {
enabled: !isDevMode(), // enabled: !isDevMode(),
registrationStrategy: 'registerWhenStable:30000', // registrationStrategy: 'registerWhenStable:30000',
}), // }),
], ],
}; };
@@ -10,6 +10,7 @@ import { Card } from 'primeng/card';
import { Menu } from 'primeng/menu'; import { Menu } from 'primeng/menu';
import { finalize } from 'rxjs'; import { finalize } from 'rxjs';
import images from 'src/assets/images'; import images from 'src/assets/images';
import config from 'src/config';
import { PosInfoStore, PosProfileStore } from '../../store'; import { PosInfoStore, PosProfileStore } from '../../store';
import { DeviceInfoStore } from '../../store/device.store'; import { DeviceInfoStore } from '../../store/device.store';
import { PosMainMenuSidebarComponent } from '../mainMenuSidebar/main-menu-sidebar.component'; import { PosMainMenuSidebarComponent } from '../mainMenuSidebar/main-menu-sidebar.component';
@@ -83,7 +84,7 @@ export class PosPagesLayoutComponent {
now = new Date(); now = new Date();
homeRouteLink = '/pos'; homeRouteLink = config.isPosApplication ? '/' : '/pos';
async getData() { async getData() {
if (!this.posInfo() || !this.posProfile()) { if (!this.posInfo() || !this.posProfile()) {
@@ -17,7 +17,7 @@ export class PosPaymentBridgeService extends PosPaymentBridgeAbstract {
this.toastServices.error({ text: '@@@@@@@@@@@@@' }); this.toastServices.error({ text: '@@@@@@@@@@@@@' });
// @ts-ignore // @ts-ignore
window.webV = { window.WebV = {
onPaymentResult: () => { onPaymentResult: () => {
this.toastServices.error({ text: 'asdasdsadassadasdas' }); this.toastServices.error({ text: 'asdasdsadassadasdas' });
}, },
@@ -19,7 +19,7 @@
} }
</header> </header>
} }
<div class="p-4"> <div class="light-bottomsheet-body p-4">
<ng-content></ng-content> <ng-content></ng-content>
</div> </div>
</div> </div>
@@ -39,7 +39,9 @@ import { Button } from 'primeng/button';
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
max-height: 80svh; max-height: 90vh;
display: flex;
flex-direction: column;
background: var(--surface-card, #fff); background: var(--surface-card, #fff);
border-radius: 12px 12px 0 0; border-radius: 12px 12px 0 0;
box-shadow: none; box-shadow: none;
@@ -51,13 +53,21 @@ import { Button } from 'primeng/button';
} }
.light-bottomsheet-content { .light-bottomsheet-content {
max-height: 80svh; display: flex;
overflow: auto; flex-direction: column;
flex: 1;
min-height: 0;
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
overscroll-behavior: contain; overscroll-behavior: contain;
} }
.light-bottomsheet-body {
flex: 1;
min-height: 0;
overflow: auto;
}
.light-bottomsheet-header { .light-bottomsheet-header {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -116,7 +126,7 @@ export class SharedLightBottomsheetComponent implements OnInit, OnDestroy, OnCha
@Input() modal = true; @Input() modal = true;
@Input() closable = true; @Input() closable = true;
@Input() style: Record<string, string> | undefined; @Input() style: Record<string, string> | undefined;
@Input() mobileDrawerHeight = '80svh'; @Input() mobileDrawerHeight = '90vh';
@Input() transitionOptions = '130ms cubic-bezier(0.2, 0, 0, 1)'; @Input() transitionOptions = '130ms cubic-bezier(0.2, 0, 0, 1)';
@Output() onHide = new EventEmitter<any>(); @Output() onHide = new EventEmitter<any>();
@@ -243,6 +243,9 @@ export class InputComponent {
} }
onInput($event: Event, isPriceFormat?: boolean) { onInput($event: Event, isPriceFormat?: boolean) {
if ((this.inputMode !== 'numeric' && this.inputMode !== 'decimal') || !isPriceFormat) {
return;
}
const target = $event.target as HTMLInputElement | null; const target = $event.target as HTMLInputElement | null;
if (!target) return; if (!target) return;
@@ -280,7 +283,8 @@ export class InputComponent {
value = this.lastValidNumericValue; value = this.lastValidNumericValue;
numericValue = Number.isNaN(parseFloat(value)) ? 0 : parseFloat(value); 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; const restoredControlValue = isIdentifierField ? value : value === '' ? '' : numericValue;
this.control.setValue(restoredControlValue); this.control.setValue(restoredControlValue);
+2 -2
View File
@@ -2,8 +2,8 @@
export const environment = { export const environment = {
production: false, production: false,
// apiBaseUrl: 'http://194.59.214.243:5002', // apiBaseUrl: 'http://194.59.214.243:5002',
// apiBaseUrl: 'http://192.168.128.73:5002', apiBaseUrl: 'http://192.168.128.73:5002',
apiBaseUrl: 'http://localhost:5002', // apiBaseUrl: 'http://localhost:5002',
// host: 'http://194.59.214.243', // host: 'http://194.59.214.243',
host: 'localhost', host: 'localhost',
port: 5000, port: 5000,