switch non-working features to have notifications
This commit is contained in:
parent
0bad4dbc95
commit
77fce34c05
@ -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")
|
||||
@ -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"
|
||||
|
||||
@ -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():
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user