fix duplicate code in Estimates
This commit is contained in:
parent
28c57c4ad0
commit
5150d82405
3 changed files with 13 additions and 4 deletions
|
|
@ -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