add: answer faqs

This commit is contained in:
Alexandro Uc Santos
2024-02-15 19:21:42 -06:00
parent e648c2ff53
commit 132c3f2a1a
8 changed files with 253 additions and 69 deletions

View File

@@ -5,6 +5,8 @@ export default function useDirectory() {
const companies = ref([]);
const loading = ref(false);
const users = ref([]);
const companiesTotal = ref(0);
const currentCompaniesPage = ref(1);
const getCompaniesData = async(filterQuery) => {
@@ -19,7 +21,14 @@ export default function useDirectory() {
loading.value = true;
const resp = await getCompanies(filterStr);
companies.value = resp;
if(resp !== null) {
companies.value = resp.data;
companiesTotal.value = resp.total;
console.log(companiesTotal.value)
} else {
companies.value = [];
companiesTotal.value = 0;
}
loading.value = false;
}
@@ -36,6 +45,8 @@ export default function useDirectory() {
getUsersData,
users,
loading,
companies
companies,
companiesTotal,
currentCompaniesPage
}
}