fix(dashboard): fix public profile page links
This commit is contained in:
parent
e868b2c5d3
commit
98f7a39185
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
export let isPublic: boolean;
|
export let isPublic: boolean;
|
||||||
export let itemType: string;
|
export let itemType: string;
|
||||||
export let isMainDash: boolean;
|
|
||||||
export let itemsPerPage: number;
|
export let itemsPerPage: number;
|
||||||
export let currentPage: number;
|
export let currentPage: number;
|
||||||
export let fullLength: number;
|
export let fullLength: number;
|
||||||
@ -31,7 +30,7 @@
|
|||||||
function getItemLink(item: Member | Group): string {
|
function getItemLink(item: Member | Group): string {
|
||||||
let url: string;
|
let url: string;
|
||||||
|
|
||||||
if (isMainDash) url = "/dash/";
|
if (!isPublic) url = "/dash/";
|
||||||
else url = "/profile/";
|
else url = "/profile/";
|
||||||
|
|
||||||
if (itemType === "member") url += "m/";
|
if (itemType === "member") url += "m/";
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
$: slicedList = processedList.slice(indexOfFirstItem, indexOfLastItem);
|
$: slicedList = processedList.slice(indexOfFirstItem, indexOfLastItem);
|
||||||
|
|
||||||
export let isPublic: boolean;
|
export let isPublic: boolean;
|
||||||
export let isMainDash = true;
|
|
||||||
export let itemType: string;
|
export let itemType: string;
|
||||||
|
|
||||||
let searchValue: string = "";
|
let searchValue: string = "";
|
||||||
@ -132,6 +131,6 @@
|
|||||||
<NewGroup on:create={addItemToList} />
|
<NewGroup on:create={addItemToList} />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
<CardsList on:deletion bind:list={slicedList} bind:groups bind:members isMainDash={isMainDash} isPublic={isPublic} itemType={itemType} itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={list.length} />
|
<CardsList on:deletion bind:list={slicedList} bind:groups bind:members isPublic={isPublic} itemType={itemType} itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={list.length} />
|
||||||
<ListPagination bind:currentPage {pageAmount} />
|
<ListPagination bind:currentPage {pageAmount} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
</Card>
|
</Card>
|
||||||
<ListPagination bind:currentPage bind:pageAmount />
|
<ListPagination bind:currentPage bind:pageAmount />
|
||||||
<CardsList on:deletion={(e) => deleteMemberFromList(e)} bind:list={slicedMembers} isPublic={isPublic} isMainDash={false} itemType="member" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={members.length} />
|
<CardsList on:deletion={(e) => deleteMemberFromList(e)} bind:list={slicedMembers} isPublic={isPublic} itemType="member" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={members.length} />
|
||||||
<ListPagination bind:currentPage bind:pageAmount />
|
<ListPagination bind:currentPage bind:pageAmount />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -158,7 +158,7 @@
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
</Card>
|
</Card>
|
||||||
<ListPagination bind:currentPage bind:pageAmount />
|
<ListPagination bind:currentPage bind:pageAmount />
|
||||||
<CardsList on:deletion={(e) => deleteGroupFromList(e)} bind:list={slicedGroups} isPublic={isPublic} isMainDash={false} itemType="group" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={groups.length} />
|
<CardsList on:deletion={(e) => deleteGroupFromList(e)} bind:list={slicedGroups} isPublic={isPublic} itemType="group" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={groups.length} />
|
||||||
<ListPagination bind:currentPage bind:pageAmount />
|
<ListPagination bind:currentPage bind:pageAmount />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
{:else if err}
|
{:else if err}
|
||||||
<Alert color="danger">{err}</Alert>
|
<Alert color="danger">{err}</Alert>
|
||||||
{:else}
|
{:else}
|
||||||
<CardsList openByDefault={openByDefault} bind:list={randomList} isPublic={true} isMainDash={false} itemType={type} itemsPerPage={5} currentPage={rollCounter} fullLength={randomList.length} />
|
<CardsList openByDefault={openByDefault} bind:list={randomList} isPublic={true} itemType={type} itemsPerPage={5} currentPage={rollCounter} fullLength={randomList.length} />
|
||||||
{/if}
|
{/if}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
Loading…
Reference in New Issue
Block a user