const is_production = false const base_url = is_production ? 'https://crewdible.com/public/' : 'http://localhost:8080/webs/public/'; const fs_host = is_production ? 'https://fs.crewdible.id/' : 'https://fs.crew.id/'; function fetchData(formData){ let headers = new Headers(); headers.append('Content-Type', 'application/json'); headers.append('Accept', 'application/json'); headers.append('Origin','http://localhost:8080'); fetch(base_url + "warehouse/searchWarehouse", { method: 'POST', body: formData, mode: 'cors', headers: headers }) .then((data) => data.json()) .then(response => { $('.warehouse-lists').empty() var res_data = response.data $.each(res_data.items, function(key, val){ $('.warehouse-lists').append( '
Active
' +'