From e2800061fc530ce96fee6f8625d889c56bf0c07e Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Thu, 9 Jul 2026 21:51:11 +0200 Subject: [PATCH] Implemented settings --- .../Components/Pages/Settings.razor | 348 +++++++++++++++++- Tmt.SaqaTravel/wwwroot/app.min.css | 14 + 2 files changed, 361 insertions(+), 1 deletion(-) diff --git a/Tmt.SaqaTravel/Components/Pages/Settings.razor b/Tmt.SaqaTravel/Components/Pages/Settings.razor index 49bf067..2a92ef4 100644 --- a/Tmt.SaqaTravel/Components/Pages/Settings.razor +++ b/Tmt.SaqaTravel/Components/Pages/Settings.razor @@ -1,7 +1,353 @@ @page "/settings" +@rendermode InteractiveServer +@using System +@using System.Collections.Generic +@using System.Linq +@using System.Threading.Tasks -

Settings

+Enterprise Suite Settings + +
+ +
+
+

Corporate Suite Settings

+

Configure global travel policies, Lodge Card reconciliation parameters, and GDS sync configurations

+
+
+ +
+
+ + @* Alert / Feedback Notification *@ + @if (!string.IsNullOrEmpty(_alertFeedback)) + { +
+ + + + @_alertFeedback +
+ } + + +
+ + + + +
+ +
+ + +
+ @if (_activeTab == "policy") + { +
+
+

Corporate Travel Policies

+

Control grade limits, pre-approval workflows, and travel guidelines.

+
+ +
+
+ + + Rates exceeding this trigger manager audit warnings. +
+
+ + +
+
+ +
+ +
+
+ Executive (Grade 1-2) + +
+
+ Director & Senior Manager (Grade 3-4) + +
+
+ Standard Operational Staff (Grade 5-8) + +
+
+
+ +
+

Workflow Pre-Approvals

+
+
+ Auto-approve compliant bookings + Domestic bookings within price limit bypass manual manager check. +
+ +
+
+
+ Mandate travel reasons + Force travellers to write business motivations for each reservation. +
+ +
+
+
+ } + else if (_activeTab == "financial") + { +
+
+

Corporate Lodge Card & Financial Rules

+

Manage virtual cards, merchant limits, and global Lodge Card billing.

+
+ +
+
+ + +
+
+ + +
+
+ +
+ +

Check categories the Lodge Card and single-use Virtual Cards are authorized to clear.

+
+ + + + +
+
+ +
+ + +

Any single travel service booking exceeding this triggers a strict secondary audit trail.

+
+
+ } + else if (_activeTab == "gds") + { +
+
+

GDS Sync Network & API Configuration

+

Control connections to Sabre, Amadeus, Travelport, and internal databases.

+
+ +
+
+ + +
+ +
+
+ + +
+
+ + +
+
+ +
+

+ + Enterprise NDC Optimization Active +

+

New Distribution Capability (NDC) routes are prioritized to grab negotiated private corporate fares directly bypassing standard GDS markup.

+
+
+
+ } + else if (_activeTab == "safety") + { +
+
+

Duty of Care & Crisis Response Settings

+

Control GPS tracking rules, automatic alert response and emergency contacts.

+
+ +
+
+
+ Real-time mobile tracking + Ping location coordinates from traveller devices during international transits. +
+ +
+ +
+
+ Automatic SOS consultant dispatch + Instantly dial and loop in standby crisis response agencies on SOS beacon trigger. +
+ +
+ +
+ + +
+ +
+ + +
+
+
+ } +
+ + +
+
+

Suite Policy Audit

+

A high-level summary of active rules and financial checks running on this deployment.

+ +
+
+
+ Hotel Rate Caps + R @_maxHotelRateDom/night dom · R @_maxHotelRateInt/night int +
+ Active +
+ +
+
+ Approved Air Cabins + Exec: @_cabinExec · Staff: @_cabinStaff +
+ Active +
+ +
+
+ Lodge Card Limit + R @_lodgeCardLimit.ToString("N0") monthly +
+ Active +
+ +
+
+ Pre-Approvals + @(_autoApproveCompliant ? "Bypass manual checks" : "All bookings manual") +
+ Configured +
+ +
+
+ Duty of Care Partner + @_evacuationPartner +
+ Linked +
+
+
+
+ +
+
@code { + private string _activeTab = "policy"; + private string _alertFeedback = string.Empty; + // Travel Policy bindings + private int _maxHotelRateDom = 2500; + private int _maxHotelRateInt = 5500; + private string _cabinExec = "Business"; + private string _cabinDirector = "Premium Economy"; + private string _cabinStaff = "Economy"; + private bool _autoApproveCompliant = true; + private bool _forceMotivations = false; + + // Financial bindings + private string _lodgeCardNumber = "4002 8332 9110 5410"; + private double _lodgeCardLimit = 1500000; + private bool _mccAirlines = true; + private bool _mccHotels = true; + private bool _mccCarRental = true; + private bool _mccRailroads = false; + private int _auditTriggerAmount = 25000; + + // GDS bindings + private string _primaryGds = "Sabre"; + private string _gdsClientId = "SABRE-ENT-99238-PROD"; + private int _syncInterval = 15; + + // Safety bindings + private bool _enableGpsTracking = true; + private bool _enableConsultantSosDispatch = true; + private string _emergencyPhone = "+27 11 911 2000"; + private string _evacuationPartner = "International SOS"; + + private void SaveAllSettings() + { + _alertFeedback = "Corporate travel configurations successfully updated! Global GDS policies re-audited and synced across all enterprise endpoints."; + StateHasChanged(); + } } diff --git a/Tmt.SaqaTravel/wwwroot/app.min.css b/Tmt.SaqaTravel/wwwroot/app.min.css index b6cf37f..6a2413e 100644 --- a/Tmt.SaqaTravel/wwwroot/app.min.css +++ b/Tmt.SaqaTravel/wwwroot/app.min.css @@ -46,6 +46,8 @@ --color-blue-700: oklch(48.8% 0.243 264.376); --color-blue-800: oklch(42.4% 0.199 265.638); --color-blue-950: oklch(28.2% 0.091 267.935); + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-700: oklch(45.7% 0.24 277.023); --color-slate-50: oklch(98.4% 0.003 247.858); --color-slate-100: oklch(96.8% 0.007 247.896); --color-slate-200: oklch(92.9% 0.013 255.508); @@ -1362,6 +1364,9 @@ .bg-green-600 { background-color: var(--color-green-600); } + .bg-indigo-50 { + background-color: var(--color-indigo-50); + } .bg-red-50 { background-color: var(--color-red-50); } @@ -1567,6 +1572,9 @@ .px-\[14px\] { padding-inline: 14px; } + .px-\[16px\] { + padding-inline: 16px; + } .px-\[18px\] { padding-inline: 18px; } @@ -1999,6 +2007,9 @@ .text-green-700 { color: var(--color-green-700); } + .text-indigo-700 { + color: var(--color-indigo-700); + } .text-red-400 { color: var(--color-red-400); } @@ -2054,6 +2065,9 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } + .accent-\[\#0066b3\] { + accent-color: #0066b3; + } .opacity-0 { opacity: 0%; }