Add dynamic margin if alerts bar is displayed on staffLDB page
This commit is contained in:
parent
ba09910ff3
commit
eaa8c192a2
@ -41,6 +41,12 @@
|
|||||||
errorDetail.message = data.obMsg || "An unknown error occoured";
|
errorDetail.message = data.obMsg || "An unknown error occoured";
|
||||||
throw new Error("Unable to Fetch Data");
|
throw new Error("Unable to Fetch Data");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add additional margin if AlertBox is displayed
|
||||||
|
let generatedMarginTop = "10px";
|
||||||
|
$: if (nrcc.length) {
|
||||||
|
generatedMarginTop = "50px";
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#key detail}
|
{#key detail}
|
||||||
@ -53,7 +59,7 @@
|
|||||||
<Loading />
|
<Loading />
|
||||||
{:then data}
|
{:then data}
|
||||||
{#if data}
|
{#if data}
|
||||||
<p class="generatedTime">Updated: {new Date(data.generatedAt).toLocaleTimeString()}</p>
|
<p class="generatedTime" style="margin-top: {generatedMarginTop};">Updated: {new Date(data.generatedAt).toLocaleTimeString()}</p>
|
||||||
{#if data.trainServices?.length}
|
{#if data.trainServices?.length}
|
||||||
<TableGenerator services={data.trainServices} click={showDetail} />
|
<TableGenerator services={data.trainServices} click={showDetail} />
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user