From 810b733109ca537f72ca5a5832189221e41c45bb Mon Sep 17 00:00:00 2001 From: "Sams, Roland" Date: Wed, 27 Mar 2024 14:34:43 +0100 Subject: [PATCH] bump dev --- .github/workflows/build-deploy-gmr-master.yml | 9 ++++ .github/workflows/build-deploy-mkj-master.yml | 12 ++--- src/app/models/User-Notifications.ts | 1 + src/app/services/user-notification.service.ts | 3 +- .../mkj-user-notifications.component.html | 3 +- .../mkj-user-notifications.component.scss | 5 ++ .../mkj-user-notifications.component.ts | 8 +++- src/configurations/_CONFIG_MAP.ts | 47 ------------------- src/configurations/changeLogVersion.ts | 2 +- src/environments/environment.ts | 2 +- 10 files changed, 33 insertions(+), 59 deletions(-) delete mode 100644 src/configurations/_CONFIG_MAP.ts diff --git a/.github/workflows/build-deploy-gmr-master.yml b/.github/workflows/build-deploy-gmr-master.yml index d9d2479d..9d956ffb 100644 --- a/.github/workflows/build-deploy-gmr-master.yml +++ b/.github/workflows/build-deploy-gmr-master.yml @@ -18,6 +18,15 @@ jobs: node-version: 20 cache: "npm" + - name: Update environment file + run: | + sed -i 's+'production'+${{secrets.GMR_PRODUCTION}}+g' src/environments/environment.prod.ts + sed -i "s+'publictest'+${{secrets.GMR_PUBLICTEST}}+g" src/environments/environment.prod.ts + sed -i "s+'appTitle'+${{secrets.GMR_APPTITLE}}+g" src/environments/environment.prod.ts + sed -i "s+'apiUrl'+${{secrets.GMR_APIURL}}+g" src/environments/environment.prod.ts + sed -i "s+'wsHost'+${{secrets.GMR_WSHOST}}+g" src/environments/environment.prod.ts + sed -i "s+'wsAppKey'+${{secrets.GMR_WSAPPKEY}}+g" src/environments/environment.prod.ts + - name: Install dependencies run: npm ci diff --git a/.github/workflows/build-deploy-mkj-master.yml b/.github/workflows/build-deploy-mkj-master.yml index ccb40111..9749ecfc 100644 --- a/.github/workflows/build-deploy-mkj-master.yml +++ b/.github/workflows/build-deploy-mkj-master.yml @@ -20,12 +20,12 @@ jobs: - name: Update environment file run: | - sed -i 's+'production'+${{secrets.TEST_PRODUCTION}}+g' src/environments/environment.prod.ts - sed -i "s+'publictest'+${{secrets.TEST_PUBLICTEST}}+g" src/environments/environment.prod.ts - sed -i "s+'appTitle'+${{secrets.TEST_APPTITLE}}+g" src/environments/environment.prod.ts - sed -i "s+'apiUrl'+${{secrets.TEST_APIURL}}+g" src/environments/environment.prod.ts - sed -i "s+'wsHost'+${{secrets.TEST_WSHOST}}+g" src/environments/environment.prod.ts - sed -i "s+'wsAppKey'+${{secrets.TEST_WSAPPKEY}}+g" src/environments/environment.prod.ts + sed -i 's+'production'+${{secrets.MKJ_PRODUCTION}}+g' src/environments/environment.prod.ts + sed -i "s+'publictest'+${{secrets.MKJ_PUBLICTEST}}+g" src/environments/environment.prod.ts + sed -i "s+'appTitle'+${{secrets.MKJ_APPTITLE}}+g" src/environments/environment.prod.ts + sed -i "s+'apiUrl'+${{secrets.MKJ_APIURL}}+g" src/environments/environment.prod.ts + sed -i "s+'wsHost'+${{secrets.MKJ_WSHOST}}+g" src/environments/environment.prod.ts + sed -i "s+'wsAppKey'+${{secrets.MKJ_WSAPPKEY}}+g" src/environments/environment.prod.ts - name: Install dependencies run: npm ci diff --git a/src/app/models/User-Notifications.ts b/src/app/models/User-Notifications.ts index c38df67f..d51133fc 100644 --- a/src/app/models/User-Notifications.ts +++ b/src/app/models/User-Notifications.ts @@ -13,5 +13,6 @@ export interface UserNotification { export enum UserNotificationType { TerminCreated = 'App\\Notifications\\TerminCreatedNotification', TerminUpdated = 'App\\Notifications\\TerminUpdatedNotification', + TestSocket = 'App\\Notifications\\TestSocket', SwUpdate = 'SwUpdate', } diff --git a/src/app/services/user-notification.service.ts b/src/app/services/user-notification.service.ts index b69ee7f4..092799c2 100644 --- a/src/app/services/user-notification.service.ts +++ b/src/app/services/user-notification.service.ts @@ -65,7 +65,8 @@ export class UserNotificationService { } private markAsRead(notification: UserNotification): void { - if (notification.id === UserNotificationType.SwUpdate) { + console.log(notification); + if (notification.type === UserNotificationType.SwUpdate || notification.type === UserNotificationType.TestSocket) { this.removeNotification(notification); return; } diff --git a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.html b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.html index 41e501d7..a15a8a6e 100644 --- a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.html +++ b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.html @@ -1,9 +1,10 @@ diff --git a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.scss b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.scss index e69de29b..e0068673 100644 --- a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.scss +++ b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.scss @@ -0,0 +1,5 @@ +.hide-badge ::ng-deep { + .p-badge { + opacity: 0; + } +} diff --git a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.ts b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.ts index 57f50817..50567c7b 100644 --- a/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.ts +++ b/src/app/utilities/mkj-user-notifications/mkj-user-notifications.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy } from '@angular/core'; +import { ChangeDetectorRef, Component, OnDestroy } from '@angular/core'; import { MenuItem } from 'primeng/api'; import { UserNotificationService } from 'src/app/services/user-notification.service'; import { SubSink } from 'subsink'; @@ -13,10 +13,14 @@ export class MkjUserNotificationsComponent implements OnDestroy { private _subs = new SubSink(); - constructor(private userNotificationsService: UserNotificationService) { + constructor( + private userNotificationsService: UserNotificationService, + cd: ChangeDetectorRef + ) { this._subs.add( this.userNotificationsService.userNotifications.subscribe((notifications) => { this.menuItems = notifications; + cd.markForCheck(); }) ); } diff --git a/src/configurations/_CONFIG_MAP.ts b/src/configurations/_CONFIG_MAP.ts deleted file mode 100644 index 17318f35..00000000 --- a/src/configurations/_CONFIG_MAP.ts +++ /dev/null @@ -1,47 +0,0 @@ -export interface AppConfig { - [key: string]: { - appTitle: string; - production: boolean; - apiUrl: string; - publictest: boolean; - wsHost: string; - wsAppKey: string; - }; -} - -export const CONFIG_MAP: AppConfig = { - local: { - production: false, - publictest: true, - wsHost: 'localhost', - wsAppKey: 'akkq3uvoftnearumcyzb', - - apiUrl: 'http://localhost:8000/api/', - // apiUrl: 'https://api-test.mk-jainzen.at/api/', - appTitle: 'mkjLOCAL', - }, - publictest: { - appTitle: 'testAPP', - production: true, - apiUrl: 'https://api-test.mk-jainzen.at/api/', - wsHost: 'api-test.mk-jainzen.at', - publictest: true, - wsAppKey: 'akkq3uvoftnearumcyzb', - }, - mkj: { - appTitle: 'mkjAPP', - production: true, - apiUrl: 'https://api.mk-jainzen.at/api/', - wsHost: 'api.mk-jainzen.at', - publictest: false, - wsAppKey: 'akkq3uvoftnearumcyzb', - }, - gmr: { - appTitle: 'gulaschAPP', - production: true, - apiUrl: 'https://api.gulaschmusi.at/api/', - wsHost: 'api.gulaschmusi.at', - publictest: false, - wsAppKey: 'akkq3uvoftnearumcyzb', - }, -}; diff --git a/src/configurations/changeLogVersion.ts b/src/configurations/changeLogVersion.ts index 4eeb97b7..fca81dcc 100644 --- a/src/configurations/changeLogVersion.ts +++ b/src/configurations/changeLogVersion.ts @@ -8,7 +8,7 @@ export interface MkjAppChangeLog { export const MkjAppChangeLog: MkjAppChangeLog[] = [ { - date: '30.03.2024', + date: '27.03.2024', version: '0.9.8 - BETA', changes: { Benachrichtigungen: 'Implementierung von Echtzeit-Benachrichtigungen.', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 82be483c..8b99f888 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,7 +4,7 @@ // The list of which env maps to which file can be found in `.angular-cli.json`. export const environment = { - production: true, + production: false, publictest: true, appTitle: 'mkjLOCAL', apiUrl: 'http://localhost:8000/api/',