fix duplicate code in Estimates

This commit is contained in:
Casey 2026-01-25 07:38:10 -06:00
parent 28c57c4ad0
commit 5150d82405
3 changed files with 13 additions and 4 deletions

View file

@ -64,7 +64,18 @@ def get_bid_meetings(fields=["*"], filters={}, company=None):
frappe.log_error(message=str(e), title="Get On-Site Meetings Failed")
return build_error_response(str(e), 500)
@frappe.whitelist()
def get_bid_meeting_note(name):
"""Get a specific Bid Meeting Note by name."""
try:
note = frappe.get_doc("Bid Meeting Note", name)
return build_success_response(note.as_dict())
except frappe.DoesNotExistError:
return build_error_response(f"Bid Meeting Note '{name}' does not exist.", 404)
except Exception as e:
frappe.log_error(message=str(e), title="Get Bid Meeting Note Failed")
return build_error_response(str(e), 500)
@frappe.whitelist()
def get_unscheduled_bid_meetings(company):
"""Get On-Site Meetings that are unscheduled."""

View file

@ -227,7 +227,7 @@ const fetchDoctypeData = async (field, itemId) => {
try {
// Use the getDetailedDoc method from the API
const data = await Api.getDetailedDoc(field.valueDoctype, itemId);
const data = await Api.getDocsList(field.valueDoctype, ["*"], { "item_group": "SWN-S" });
// Cache the result
doctypeCache.value[cacheKey] = data;

View file

@ -129,7 +129,6 @@ import DataTable from "../common/DataTable.vue";
import TodoChart from "../common/TodoChart.vue";
import { Edit, ChatBubbleQuestion, CreditCard, Hammer } from "@iconoir/vue";
import { ref, onMounted, watch } from "vue";
import { ref, onMounted, watch } from "vue";
import Api from "../../api";
import { useLoadingStore } from "../../stores/loading";
import { usePaginationStore } from "../../stores/pagination";
@ -142,7 +141,6 @@ const companyStore = useCompanyStore();
const loadingStore = useLoadingStore();
const paginationStore = usePaginationStore();
const filtersStore = useFiltersStore();
const companyStore = useCompanyStore();
const router = useRouter();
const tableData = ref([]);