diff --git a/app-modules/portal/src/Http/Controllers/KnowledgeManagementPortal/KnowledgeManagementPortalController.php b/app-modules/portal/src/Http/Controllers/KnowledgeManagementPortal/KnowledgeManagementPortalController.php index 3a9498c1a..413570bb9 100644 --- a/app-modules/portal/src/Http/Controllers/KnowledgeManagementPortal/KnowledgeManagementPortalController.php +++ b/app-modules/portal/src/Http/Controllers/KnowledgeManagementPortal/KnowledgeManagementPortalController.php @@ -36,6 +36,7 @@ namespace AidingApp\Portal\Http\Controllers\KnowledgeManagementPortal; +use App\Models\SettingsProperty; use Illuminate\Http\JsonResponse; use Filament\Support\Colors\Color; use Illuminate\Support\Facades\URL; @@ -48,9 +49,16 @@ class KnowledgeManagementPortalController extends Controller public function show(): JsonResponse { $settings = resolve(PortalSettings::class); + $settingsProperty = SettingsProperty::getInstance('portal.logo'); + $logo = $settingsProperty->getFirstMedia('logo'); return response()->json([ 'layout' => $settings->knowledge_management_portal_layout ?? PortalLayout::Full, + 'header_logo' => $logo ? $logo->getTemporaryUrl( + expiration: now()->addMinutes(5), + conversionName: 'logo-height-250px', + ) : null, + 'app_name' => config('app.name'), 'primary_color' => Color::all()[$settings->knowledge_management_portal_primary_color ?? 'blue'], 'rounding' => $settings->knowledge_management_portal_rounding, 'requires_authentication' => $settings->knowledge_management_portal_requires_authentication, diff --git a/portals/knowledge-management/src/App.vue b/portals/knowledge-management/src/App.vue index 211522b2c..c8f406b01 100644 --- a/portals/knowledge-management/src/App.vue +++ b/portals/knowledge-management/src/App.vue @@ -36,6 +36,7 @@ import AppLoading from './Components/AppLoading.vue'; import MobileSidebar from './Components/MobileSidebar.vue'; import DesktopSidebar from './Components/DesktopSidebar.vue'; + import Header from './Components/Header.vue'; import determineIfUserIsAuthenticated from './Services/DetermineIfUserIsAuthenticated.js'; import getAppContext from './Services/GetAppContext.js'; import axios from './Globals/Axios.js'; @@ -85,7 +86,9 @@ const portalRounding = ref(''); const categories = ref({}); const serviceRequests = ref({}); + const headerLogo = ref(''); const tags = ref({}); + const appName = ref(''); const authentication = ref({ code: null, @@ -156,6 +159,10 @@ portalLayout.value = response.data.layout; + headerLogo.value = response.data.header_logo; + + appName.value = response.data.app_name; + setRequiresAuthentication(response.data.requires_authentication).then(() => { requiresAuthentication.value = response.data.requires_authentication; }); @@ -432,6 +439,8 @@
Please try again later
diff --git a/portals/knowledge-management/src/Components/Header.vue b/portals/knowledge-management/src/Components/Header.vue new file mode 100644 index 000000000..7631e8b46 --- /dev/null +++ b/portals/knowledge-management/src/Components/Header.vue @@ -0,0 +1,98 @@ + + + + +