add notifiaction handling, error handling
This commit is contained in:
parent
ce708f5209
commit
1af288aa62
21 changed files with 4864 additions and 224 deletions
|
|
@ -11,24 +11,21 @@ import {
|
|||
PathArrowSolid,
|
||||
Clock,
|
||||
HistoricShield,
|
||||
Developer,
|
||||
} from "@iconoir/vue";
|
||||
import SpeedDial from "primevue/speeddial";
|
||||
|
||||
const router = useRouter();
|
||||
const modalStore = useModalStore();
|
||||
const categories = [
|
||||
{ name: "Home", icon: Home, url: "/" },
|
||||
{ name: "Calendar", icon: Calendar, url: "/calendar" },
|
||||
{ name: "Clients", icon: Community, url: "/clients" },
|
||||
{ name: "Jobs", icon: Hammer, url: "/jobs" },
|
||||
{ name: "Routes", icon: PathArrowSolid, url: "/routes" },
|
||||
{ name: "Time Sheets", icon: Clock, url: "/timesheets" },
|
||||
{ name: "Warranties", icon: HistoricShield, url: "/warranties" },
|
||||
|
||||
const developmentButtons = ref([
|
||||
{
|
||||
name: "Create New",
|
||||
icon: MultiplePagesPlus,
|
||||
label: "Error Handling Demo",
|
||||
command: () => {
|
||||
router.push("/dev/error-handling-demo");
|
||||
},
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
const createButtons = ref([
|
||||
{
|
||||
|
|
@ -70,6 +67,22 @@ const createButtons = ref([
|
|||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const categories = ref([
|
||||
{ name: "Home", icon: Home, url: "/" },
|
||||
{ name: "Calendar", icon: Calendar, url: "/calendar" },
|
||||
{ name: "Clients", icon: Community, url: "/clients" },
|
||||
{ name: "Jobs", icon: Hammer, url: "/jobs" },
|
||||
{ name: "Routes", icon: PathArrowSolid, url: "/routes" },
|
||||
{ name: "Time Sheets", icon: Clock, url: "/timesheets" },
|
||||
{ name: "Warranties", icon: HistoricShield, url: "/warranties" },
|
||||
{
|
||||
name: "Create New",
|
||||
icon: MultiplePagesPlus,
|
||||
buttons: createButtons,
|
||||
},
|
||||
{ name: "Development", icon: Developer, buttons: developmentButtons },
|
||||
]);
|
||||
const handleCategoryClick = (category) => {
|
||||
router.push(category.url);
|
||||
};
|
||||
|
|
@ -94,7 +107,7 @@ const handleCategoryClick = (category) => {
|
|||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<SpeedDial :model="createButtons" direction="down" type="linear" radius="50">
|
||||
<SpeedDial :model="category.buttons" direction="down" type="linear" radius="50">
|
||||
<template #button="{ toggleCallback }">
|
||||
<button
|
||||
class="sidebar-button"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue