CLASSROOMIO-T-113: Settings for landing page

Merge-request: CLASSROOMIO-MR-23
Merged-by: Best Admin <[email protected]>

Co-authored-by: Ifeanyi Nwosu <[email protected]>
Co-authored-by: Rotimi Best <[email protected]>


Merge-request: CLASSROOMIO-MR-50
Merged-by: Best Admin <[email protected]>
This commit is contained in:
tunny17
2023-08-21 15:44:15 +00:00
committed by Space Cloud
co-authored by Ifeanyi Nwosu Rotimi Best
parent 2b36d0af67
commit 32d0198d3d
9 changed files with 618 additions and 36 deletions
+12 -6
View File
@@ -2,6 +2,7 @@
import { page } from '$app/stores';
import { Tabs, Tab, TabContent } from 'carbon-components-svelte';
import Profile from './Profile.svelte';
import LandingpageSettings from './LandingpageSettings.svelte';
// import Account from './Account.svelte';
import OrgSettings from './OrgSettings.svelte';
import { onMount } from 'svelte';
@@ -21,20 +22,22 @@
},
{
key: 1,
label: 'Organization Settings',
label: 'Organization',
tabKey: 'org',
href: `${$page.url.pathname}?tab=org`
},
{
key: 2,
label: 'LandingPage',
tabKey: 'landingpage',
href: `${$page.url.pathname}?tab=landingpage`
}
];
function getSelectedByTab(tabKey = '') {
const tab = tabs.find((t) => t.tabKey === tabKey);
console.log('tab', tab);
if (tab) {
return tab.key;
}
return 0;
return tab ? tab.key : 0;
}
function changeRouteOnTabChange(key = 0) {
const tab = tabs.find((t) => t.key === key);
@@ -69,5 +72,8 @@
<TabContent>
<OrgSettings />
</TabContent>
<TabContent>
<LandingpageSettings />
</TabContent>
</svelte:fragment>
</Tabs>