diff --git a/custom_ui/events/estimate.py b/custom_ui/events/estimate.py
index 7f004bc..185c3d5 100644
--- a/custom_ui/events/estimate.py
+++ b/custom_ui/events/estimate.py
@@ -3,19 +3,13 @@ import frappe
def after_insert(doc, method):
try:
print("DEBUG: after_insert hook triggered for Quotation:", doc.name)
- print("DEBUG: custom_installation_address:", doc.custom_installation_address)
-
if not doc.custom_installation_address:
print("ERROR: custom_installation_address is empty")
return
-
address_doc = frappe.get_doc("Address", doc.custom_installation_address)
- print("DEBUG: Retrieved address document:", address_doc.name)
-
address_doc.custom_estimate_sent_status = "In Progress"
address_doc.save()
print("DEBUG: Address status updated successfully")
-
except Exception as e:
print("ERROR in after_insert hook:", str(e))
frappe.log_error(f"Error in estimate after_insert: {str(e)}", "Estimate Hook Error")
\ No newline at end of file
diff --git a/custom_ui/events/onsite_meeting.py b/custom_ui/events/onsite_meeting.py
index 839a7e4..296a3e6 100644
--- a/custom_ui/events/onsite_meeting.py
+++ b/custom_ui/events/onsite_meeting.py
@@ -1,7 +1,8 @@
import frappe
def after_insert(doc, method):
- print(doc.address)
+ print("DEBUG: After Insert Triggered for On-Site Meeting")
+ print("DEBUG: Updating on-site meeting status in Address")
if doc.address and not doc.end_time and not doc.start_time:
address_doc = frappe.get_doc("Address", doc.address)
address_doc.custom_onsite_meeting_scheduled = "In Progress"
diff --git a/custom_ui/install.py b/custom_ui/install.py
index c814eba..1c7e98e 100644
--- a/custom_ui/install.py
+++ b/custom_ui/install.py
@@ -6,6 +6,15 @@ from .utils import create_module
def after_install():
create_module()
add_custom_fields()
+ update_onsite_meeting_fields()
+ frappe.db.commit()
+
+ # Proper way to refresh metadata
+ frappe.clear_cache(doctype="Address")
+ frappe.reload_doctype("Address")
+ frappe.clear_cache(doctype="On-Site Meeting")
+ frappe.reload_doctype("On-Site Meeting")
+ update_address_fields()
build_frontend()
def after_migrate():
diff --git a/frontend/src/components/SideBar.vue b/frontend/src/components/SideBar.vue
index 08750a5..d2bbdb1 100644
--- a/frontend/src/components/SideBar.vue
+++ b/frontend/src/components/SideBar.vue
@@ -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);
};
diff --git a/frontend/src/components/pages/Calendar.vue b/frontend/src/components/pages/Calendar.vue
index 2b7e3a7..4970158 100644
--- a/frontend/src/components/pages/Calendar.vue
+++ b/frontend/src/components/pages/Calendar.vue
@@ -307,6 +307,9 @@