import axios from "axios"; import { BASE_URL } from "../core/env"; import { consoleLogger } from "../core/logger"; export const getAppealsTypes = () => { return axios .get(BASE_URL + "/api/endpoint/getappealtypes_api") .then((res) => res.data) .catch((error) => { consoleLogger(error); let ErrResponse = { value: [], errorCode: error.response.status, errorMsg: error.response.statusText }; return ErrResponse; }); }; export const getProjectTypes = () => { return axios .get(BASE_URL + "/api/endpoint/getprojecttypes_api") .then((res) => res.data) .catch((error) => { consoleLogger(error); let ErrResponse = { value: [], errorCode: error.response.status, errorMsg: error.response.statusText }; return ErrResponse; }); }; export const getAppealsTypesForNewAppeal = () => { return axios .get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api") .then((res) => res.data) .catch((error) => { consoleLogger(error); let ErrResponse = { value: [], errorCode: error.response.status, errorMsg: error.response.statusText }; return ErrResponse; }); }; export const getLPA = () => { return axios .get(BASE_URL + "/api/endpoint/getlpa_api") .then((res) => { return res.data; }) .catch((error) => { consoleLogger(error); let ErrResponse = { value: [], errorCode: error.response.status, errorMsg: error.response.statusText }; return ErrResponse; }); }; export const getFormData = (whichForm) => { return axios .get(BASE_URL + "/api/endpoint/getformdata_api?whichForm=" + whichForm) .then((res) => res.data) .catch((error) => { consoleLogger(error); }); }; export const getMandatoryFields = (whichForm) => { return axios .get( BASE_URL + "/api/endpoint/getmandatoryfields_api?whichForm=" + whichForm ) .then((res) => res.data) .catch((error) => { consoleLogger(error); }); }; export const getPickLists = (whichForm) => { return axios .get(BASE_URL + "/api/endpoint/getpicklists_api?whichForm=" + whichForm) .then((res) => res.data) .catch((error) => { consoleLogger(error); }); }; export const getNotice = () => { return axios .get(BASE_URL + "/api/notices") .then((res) => { return res.data; }) .catch((error) => { consoleLogger(error); }); };