2022-07-18 13:26:45 +03:00

30 lines
950 B
JavaScript

import getAddProductTypes from './get-addproduct-types-data';
import getBrands from './get-brands';
import getDealers from './get-dealers';
import getInsuranceData from './get-insurance-data';
import getMainData from './get-main-data';
export default function getData(apolloClient, store) {
getMainData(apolloClient).then(({ options }) => {
store.$calculation.$options.setManyOptions(options);
});
getBrands(apolloClient).then(({ options }) => {
store.$calculation.$options.setManyOptions(options);
});
getDealers(apolloClient).then(({ options }) => {
store.$calculation.$options.setManyOptions(options);
});
getAddProductTypes(apolloClient).then(({ options }) => {
store.$calculation.$options.setManyOptions(options);
});
getInsuranceData(apolloClient).then(({ tables }) => {
store.$tables.insurance.setManyRowOptions(tables.insurance);
});
}
export { default as getOwnerData } from './get-owner-data';