From c14c926693c3150615725c9eac49bef90b00ee98 Mon Sep 17 00:00:00 2001 From: Sam Piper Date: Tue, 16 Apr 2024 12:08:21 +0100 Subject: [PATCH] feat: new pipeline actions (discord messages) + dashboard fix --- .github/workflows/deploy.yml | 12 ++++++++++++ apps/forge/src/components/signin/dashboard/index.tsx | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 463d7d4..11d1dbd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,12 @@ jobs: working-directory: /home/iforge/ignis/ run: git pull + - name: Notify Discord Maintenance Start + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ secrets.DISCORD_ANNOUCE_WEBHOOK_URL }} + content: "Sign In System (Ignis) Entering Maintenance Mode" + - name: Throw up the maintenance page run: touch /home/iforge/ignis-config/file_flags/maintenance_mode/enabled @@ -35,3 +41,9 @@ jobs: - name: Remove maintenance page run: rm /home/iforge/ignis-config/file_flags/maintenance_mode/enabled + + - name: Notify Discord Maintenance Start + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ secrets.DISCORD_ANNOUCE_WEBHOOK_URL }} + content: "Sign In System (Ignis) Exiting Maintenance Mode..." \ No newline at end of file diff --git a/apps/forge/src/components/signin/dashboard/index.tsx b/apps/forge/src/components/signin/dashboard/index.tsx index 191909e..4bdb1d8 100644 --- a/apps/forge/src/components/signin/dashboard/index.tsx +++ b/apps/forge/src/components/signin/dashboard/index.tsx @@ -11,7 +11,7 @@ import { Loader } from "@ui/components/ui/loader.tsx"; import { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { SignInDrawer } from "@/components/signin/dashboard/components/SignInDrawer.tsx"; -import { REP_ON_SHIFT } from "@/lib/constants"; +import { REP_OFF_SHIFT, REP_ON_SHIFT } from "@/lib/constants"; export default function SignInDashboard() { const queryClient = useQueryClient(); @@ -60,8 +60,10 @@ export default function SignInDashboard() { if (entry.user.teams !== undefined) { if (entry.reason.name === REP_ON_SHIFT) { repsSignedIn.push(entry); - } else { + } else if (entry.reason.name === REP_OFF_SHIFT) { offShiftRepsSignedIn.push(entry); + } else { + usersSignedIn.push(entry); } } else { usersSignedIn.push(entry);