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
DIST_DIR=tis
# TIS_BUILD_DATE=
# TIS_APP_VERSION=
# TIS_BUILD_NUMBER=
+3 -8
View File
@@ -44,8 +44,7 @@
}
],
"outputHashing": "all",
"outputPath": "dist/default",
"serviceWorker": "ngsw-config.json"
"outputPath": "dist/default"
},
"development": {
"extractLicenses": false,
@@ -80,8 +79,7 @@
}
],
"outputHashing": "all",
"outputPath": "dist/production",
"serviceWorker": "ngsw-config.json"
"outputPath": "dist/production"
},
"staging": {
"extractLicenses": true,
@@ -93,7 +91,6 @@
],
"optimization": true,
"outputHashing": "all",
"serviceWorker": "ngsw-config.json",
"sourceMap": false
},
"tis": {
@@ -138,8 +135,7 @@
}
],
"outputHashing": "all",
"outputPath": "dist/tis",
"serviceWorker": "ngsw-config.json"
"outputPath": "dist/tis"
},
"tis-development": {
"assets": [
@@ -186,7 +182,6 @@
"optimization": false,
"outputHashing": "all",
"outputPath": "dist/tis",
"serviceWorker": "ngsw-config.json",
"sourceMap": true
}
},
+4 -5
View File
@@ -1,9 +1,9 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"appData": {
"appVersion": "0.0.17",
"buildDate": "2026-05-16T16:43:54.103Z",
"buildNumber": 17
"appVersion": "0.0.22",
"buildDate": "2026-05-16T16:59:05.769Z",
"buildNumber": 22
},
"assetGroups": [
{
@@ -11,8 +11,7 @@
"name": "app",
"resources": {
"files": [
"/favicon.ico",
"/index.html"
"/favicon.ico"
]
},
"updateMode": "prefetch"
+5 -5
View File
@@ -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 -2
View File
@@ -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,