switch non-working features to have notifications
This commit is contained in:
parent
0bad4dbc95
commit
77fce34c05
7 changed files with 35 additions and 20 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useNotificationStore } from "@/stores/notifications-primevue"
|
||||
import {
|
||||
Home,
|
||||
Community,
|
||||
|
|
@ -22,21 +23,13 @@ import SpeedDial from "primevue/speeddial";
|
|||
|
||||
const router = useRouter();
|
||||
const modalStore = useModalStore();
|
||||
const notifications = useNotificationStore();
|
||||
const isCollapsed = ref(false);
|
||||
|
||||
const toggleSidebar = () => {
|
||||
isCollapsed.value = !isCollapsed.value;
|
||||
};
|
||||
|
||||
const developmentButtons = ref([
|
||||
{
|
||||
label: "Error Handling Demo",
|
||||
command: () => {
|
||||
router.push("/dev/error-handling-demo");
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const createButtons = ref([
|
||||
{
|
||||
label: "Client",
|
||||
|
|
@ -61,19 +54,22 @@ const createButtons = ref([
|
|||
label: "Job",
|
||||
command: () => {
|
||||
//frappe.new_doc("Job");
|
||||
modalStore.openModal("createJob");
|
||||
// modalStore.openModal("createJob");
|
||||
notifications.addWarning("Job creation coming soon!");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Invoice",
|
||||
command: () => {
|
||||
modalStore.openModal("createInvoice");
|
||||
// modalStore.openModal("createInvoice");
|
||||
notifications.addWarning("Invoice creation coming soon!");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Warranty Claim",
|
||||
command: () => {
|
||||
modalStore.openModal("createWarranty");
|
||||
// modalStore.openModal("createWarranty");
|
||||
notifications.addWarning("Warranty Claim creation coming soon!");
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
|
@ -97,6 +93,9 @@ const categories = ref([
|
|||
// { name: "Development", icon: Developer, buttons: developmentButtons },
|
||||
]);
|
||||
const handleCategoryClick = (category) => {
|
||||
if (category.url === "/invoices") {
|
||||
notifications.addWarning("Invoices data table view coming soon!");
|
||||
}
|
||||
router.push(category.url);
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue