瀏覽代碼

Merge branch 'master' of https://git.swopt.com/swopt/fisapp-ui into swopt-eLeave

tigger 4 月之前
父節點
當前提交
832f07bd27

+ 1 - 1
build/all.cmd

@@ -1 +1 @@
-npm run build && "./build/lv.p" && "./build/qt.p" && "./build/maf.qt.p"
+npm run build && "./build/swopt-eLeave" && "./build/swopt-spts" && "./build/maf-spts"

+ 1 - 0
build/maf-spts.cmd

@@ -0,0 +1 @@
+npm run build:maf:quot:prod && xcopy /s /i /e /y ".\dist\maf\quotation\browser" ".\dist\maf\quotation\fisapp-ui" && 7z a -tzip ./dist/maf/quotation/fisapp-ui-maf-spts.zip ./dist/maf/quotation/fisapp-ui -pfisapp### && rmdir /s /q ".\dist\maf\quotation\fisapp-ui"

+ 0 - 1
build/maf.qt.p.cmd

@@ -1 +0,0 @@
-npm run build:maf:quot:prod && xcopy /s /i /e /y ".\dist\maf\quotation\browser" ".\dist\maf\quotation\fisapp-ui" && 7z a -tzip ./dist/maf/quotation/mafrica-fisapp-ui-19-1.1.2-SPTS.zip ./dist/maf/quotation/fisapp-ui -pfisapp### && rmdir /s /q ".\dist\maf\quotation\fisapp-ui"

+ 0 - 0
build/lv.p.cmd → build/swopt-eLeave.cmd


+ 0 - 0
build/qt.p.cmd → build/swopt-spts.cmd


+ 7 - 0
src/app/app.component.html

@@ -33,6 +33,7 @@
   @for (item of [
       {id:'home',icon:'home',link:'/',title:'Home',key:'home_page'},
       {id:'notifs',icon:'notifications',title:'Notifications',key:'notifs',menu:notifications},
+      {id:'chat'},
       {id:'user',icon:'account_circle',menu:userMenu,title:'User & Settings',key:'#{user} & #{settings}'}
     ]; track $index) {
       @switch (true) {
@@ -62,6 +63,12 @@
             }
           </div>
         }
+        @case (item.id === 'chat') {
+          <div id="{{item.id}}" class="toolbar-item" (click)="mobile.toggleChat()">
+            <mat-icon>chat</mat-icon>
+            <mat-label>{{('fis_ai_chat'|tr:'FIS A.I. Chat')}}</mat-label>
+          </div>
+        }
         @default {
           <div id="{{item.id}}" class="toolbar-item">
             <mat-icon>{{item.icon}}</mat-icon>

+ 15 - 0
src/app/app.component.ts

@@ -131,6 +131,7 @@ export class AppComponent extends BaseComponent implements OnInit {
       if (user) this.timeout.pipe(untilDestroy(this),takeUntil(this.loginService.loggedOut)).subscribe();
       this.subscribePushNotifications();
     });
+    if (this.cs.isMobileClient) this.mobile.init();
   }
 
   /**
@@ -192,4 +193,18 @@ export class AppComponent extends BaseComponent implements OnInit {
       this.leavePushNotif$ = undefined;
     }
   }
+
+  /**mobile controls */
+  protected mobile = {
+    /**init mobile controls */
+    init: () => {
+      const chatButton = document.getElementById('chat-toggle-button') as HTMLElement;
+      if (chatButton) chatButton.style.display = 'none';
+    },
+    /**toggle chat window */
+    toggleChat: () => {
+      const chat = document.getElementById('chat-panel') as HTMLElement;
+      if (chat) chat.style.display = chat.style.display === 'none' ? 'flex' : 'none';
+    }
+  }
 }

+ 1 - 1
src/app/menu/menu.ts

@@ -3,4 +3,4 @@ export const masterMenu = {
         {"label":{"key":"new_leave","default":"New Leave"},"route":"/leave","queryParams":{"type":"new"}},
         {"label":{"key":"applied_leave","default":"Applied Leave"},"route":"/leave","queryParams":{"type":"view"}},
         {"label":{"key":"leave_approval","default":"Leave Approval"},"route":"/leave/approval"}],
- };
+ };

+ 1 - 1
src/dependencies/angularlib

@@ -1 +1 @@
-Subproject commit 2f393379dacb52ba56c57b6d5d744e00cbb51e48
+Subproject commit e58b111fcf97b6b514f0fc525d225a84b31d109b

+ 1 - 1
src/dependencies/fis

@@ -1 +1 @@
-Subproject commit 7cbd7721b7191138697ba85d191e93acd104f5b3
+Subproject commit 5edb1fe051214a11aac856134dffa6efd327c009