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>
|
||||
|
|
|
|||
|
|
@ -307,6 +307,9 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import Api from "../../api";
|
||||
import { useNotificationStore } from "../../stores/notifications-primevue";
|
||||
|
||||
const notifications = useNotificationStore();
|
||||
|
||||
// Reactive data
|
||||
const services = ref([]);
|
||||
|
|
@ -788,6 +791,7 @@ const handleUnscheduledDrop = (event) => {
|
|||
|
||||
// Lifecycle
|
||||
onMounted(async () => {
|
||||
notifications.addWarning("Calendar is currently in development. Many features are placeholders. UPDATES COMING SOON!");
|
||||
try {
|
||||
const data = await Api.getServiceData();
|
||||
services.value = data;
|
||||
|
|
|
|||
|
|
@ -206,19 +206,21 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { ref, computed, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Card from "primevue/card";
|
||||
import Button from "primevue/button";
|
||||
import Tag from "primevue/tag";
|
||||
import { Calendar, Community, Hammer, PathArrowSolid, Clock, HistoricShield } from "@iconoir/vue";
|
||||
import DataUtils from "../../utils.js";
|
||||
import { useNotificationStore } from "../../stores/notifications-primevue";
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
// Dummy data from utils
|
||||
const clientData = ref(DataUtils.dummyClientData);
|
||||
const jobData = ref(DataUtils.dummyJobData);
|
||||
const notifications = useNotificationStore();
|
||||
|
||||
// Computed values for dashboard metrics
|
||||
const totalRevenue = computed(() => "$47,250");
|
||||
|
|
@ -231,6 +233,9 @@ const avgResponseTime = computed(() => 2.3);
|
|||
const navigateTo = (path) => {
|
||||
router.push(path);
|
||||
};
|
||||
onMounted(() => {
|
||||
notifications.addWarning("Dashboard metrics are based on dummy data for demonstration purposes. UPDATES COMING SOON!");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
|
|
@ -379,7 +379,9 @@ import { FilterMatchMode } from "@primevue/core";
|
|||
import { useLoadingStore } from "../../stores/loading";
|
||||
import { usePaginationStore } from "../../stores/pagination";
|
||||
import { useFiltersStore } from "../../stores/filters";
|
||||
import { useNotificationStore } from "../../stores/notifications-primevue";
|
||||
|
||||
const notifications = useNotificationStore();
|
||||
const loadingStore = useLoadingStore();
|
||||
const paginationStore = usePaginationStore();
|
||||
const filtersStore = useFiltersStore();
|
||||
|
|
@ -754,6 +756,7 @@ const formatDate = (dateString) => {
|
|||
|
||||
// Load data on component mount
|
||||
onMounted(async () => {
|
||||
notifications.addWarning("Timesheets page coming soon!");
|
||||
try {
|
||||
// Initialize pagination and filters
|
||||
paginationStore.initializeTablePagination("timesheets", { rows: 10 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue