fix duplicate code in Estimates
This commit is contained in:
parent
28c57c4ad0
commit
5150d82405
3 changed files with 13 additions and 4 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue