add: tracking load & clean code save load
This commit is contained in:
@@ -104,6 +104,18 @@ export const useLoadsStore = defineStore('load', () => {
|
||||
}
|
||||
}
|
||||
|
||||
const getLoad = async(filterQuery) => {
|
||||
try {
|
||||
const endpoint = `/loads/${filterQuery}`;
|
||||
const {data} = await api.get(endpoint);
|
||||
console.log(data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
openModalEdit,
|
||||
@@ -112,6 +124,7 @@ export const useLoadsStore = defineStore('load', () => {
|
||||
getProposalsOfLoads,
|
||||
getCompanyLoads,
|
||||
deleteLoad,
|
||||
getLoad,
|
||||
saveLoad,
|
||||
updateLoad,
|
||||
updateProposal,
|
||||
|
||||
Reference in New Issue
Block a user