add: Form create load
This commit is contained in:
@@ -76,7 +76,7 @@ export const getUsersCompany = async(filter) => {
|
||||
|
||||
export const getSettingsQuery = async(filter) => {
|
||||
try {
|
||||
const endpoint = "/meta-data/find?regex=" + filter.query;
|
||||
const endpoint = "/v1/meta-data/find?regex=" + filter.query;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
@@ -96,6 +96,17 @@ export const searchcategories = async(query) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const searchProducts = async(query) => {
|
||||
try {
|
||||
const endpoint = "/products/?name[$regex]=" + query + "&name[$options]=i";
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export const searchstates = async(query) => {
|
||||
try {
|
||||
const endpoint = "/v1/states/find?regex=" + query;
|
||||
@@ -110,7 +121,7 @@ export const searchstates = async(query) => {
|
||||
export const searchcities = async(query) => {
|
||||
try {
|
||||
// const endpoint = "/cities/?city_name[$regex]=" + query + "&city_name[$options]=i";
|
||||
const endpoint = "/cities/find?regex=" + query;
|
||||
const endpoint = "/v1/cities/find?regex=" + query;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user