feat: 🚀 😃 convert repo into a monorepo 🚀 😃 (#51)

* Merge main into turbo-monrepo

* feat: rename apps

* feat: remove supbase videos and serve all from project

* feat: move supabase to root

* feat: update README

* docs: update link
This commit is contained in:
Rotimi Best
2023-11-25 21:56:02 +00:00
committed by GitHub
parent 03ca379094
commit 41e29014ef
806 changed files with 85853 additions and 5746 deletions
@@ -0,0 +1,47 @@
<script>
import {
DataTable,
Toolbar,
ToolbarContent,
ToolbarSearch,
Pagination,
DataTableSkeleton,
} from 'carbon-components-svelte';
import { orgAudience } from '$lib/utils/store/org';
export let isLoading = false;
const headers = [
{ key: 'name', value: 'Name' },
{ key: 'email', value: 'Email' },
{ key: 'date_joined', value: 'Date Joined' },
];
let pageSize = 5;
let page = 1;
let filteredRowIds = [];
let searchValue = '';
</script>
{#if isLoading}
<DataTableSkeleton {headers} rows={pageSize} />
{:else}
<DataTable size="tall" {headers} rows={$orgAudience} {pageSize} {page}>
<Toolbar>
<ToolbarContent>
<ToolbarSearch
persistent
value={searchValue}
shouldFilterRows
bind:filteredRowIds
/>
</ToolbarContent>
</Toolbar>
</DataTable>
{/if}
<Pagination
bind:pageSize
bind:page
totalItems={filteredRowIds.length}
pageSizeInputDisabled
/>
@@ -0,0 +1,33 @@
<script>
import Box from '$lib/components/Box/index.svelte';
import AudienceList from './AudienceList.svelte';
import AudienceEmptyIcon from '$lib/components/Icons/AudienceEmptyIcon.svelte';
import { getOrgAudience } from '$lib/utils/services/org';
import { orgAudience, currentOrg } from '$lib/utils/store/org';
let isLoading = false;
async function fetchInitData(orgId) {
if (!orgId) return;
isLoading = true;
await getOrgAudience(orgId);
isLoading = false;
}
$: fetchInitData($currentOrg.id);
</script>
<div class="flex items-center justify-center lg:justify-start flex-wrap my-4 m-auto">
{#if $orgAudience.length || isLoading}
<AudienceList {isLoading} />
{:else}
<Box>
<AudienceEmptyIcon />
<h3 class="dark:text-white text-2xl text-center my-5">No audience to manage!</h3>
<p class="dark:text-white w-1/3 text-center">
Manage all your students here and stay connected with them.
</p>
</Box>
{/if}
</div>