update: sheet routes
This commit is contained in:
parent
e9192c8607
commit
b1dd9de062
5 changed files with 144 additions and 15 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<script lang="ts">
|
||||
import RecipeModuleBtn from '$lib/assets/modules/recipe_btn.png';
|
||||
import MachineInspectBtn from '$lib/assets/modules/monitoring_btn.png';
|
||||
import SheetModuleBtn from '$lib/assets/modules/sheet_btn.png';
|
||||
import { animate, JSAnimation, remove as removeAnime, stagger } from 'animejs';
|
||||
import { goto } from '$app/navigation';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
|
|
@ -9,9 +10,11 @@
|
|||
import { permission as currentPermissions } from '$lib/core/stores/permissions';
|
||||
import { get } from 'svelte/store';
|
||||
import { onMount } from 'svelte';
|
||||
import { referenceFromPage} from '$lib/core/stores/recipeStore';
|
||||
|
||||
let recipeModBtn = $state<HTMLElement | null>(null);
|
||||
let monitorModBtn = $state<HTMLElement | null>(null);
|
||||
let sheetModBtn = $state<HTMLElement | null>(null);
|
||||
|
||||
let gotoDashboardBtn = $state<HTMLElement | null>(null);
|
||||
|
||||
|
|
@ -78,6 +81,36 @@
|
|||
>
|
||||
<img src={RecipeModuleBtn} alt="Recipes" loading="lazy" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="button"
|
||||
id="sheet_mod_btn"
|
||||
bind:this={sheetModBtn}
|
||||
onclick={() => {
|
||||
referenceFromPage.set('sheet');
|
||||
goto('/departments');
|
||||
}}
|
||||
onmouseenter={() => {
|
||||
if (sheetModBtn) {
|
||||
animate(sheetModBtn, {
|
||||
scale: 1.1,
|
||||
duration: 300,
|
||||
ease: 'inOutSine'
|
||||
});
|
||||
}
|
||||
}}
|
||||
onmouseleave={() => {
|
||||
if (sheetModBtn) {
|
||||
animate(sheetModBtn, {
|
||||
scale: 1.0,
|
||||
duration: 200,
|
||||
ease: 'inOutSine'
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<img src={SheetModuleBtn} alt="Sheets" loading="lazy" />
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<!-- need permission `tools` -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue