Browse Source

new router and new andpoint

pull/1/head
farhantock 10 months ago
parent
commit
c29b728875
  1. 61
      src/const/ApiConst.js
  2. 11
      src/routes.js

61
src/const/ApiConst.js

@ -118,46 +118,15 @@ export const TOKEN_ADW =
// export let BASE_OSPRO = "https://ospro-api.ospro.id"; // export let BASE_OSPRO = "https://ospro-api.ospro.id";
// export let BASE_OSPRO = "https://project-api.ospro.id"; // export let BASE_OSPRO = "https://project-api.ospro.id";
export let BASE_OSPRO = "http://localhost:8444/generic-ospro-backend"; export let BASE_OSPRO = "http://localhost:8444/generic-ospro-backend";
// export let BASE_OSPRO = "http://103.73.125.81:8444"; // ip public adw
export let BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`; export let BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`;
export let BASE_SIMPRO_LUMEN_IMAGE = `${BASE_OSPRO}/assets/image`; export let BASE_SIMPRO_LUMEN_IMAGE = `${BASE_OSPRO}/assets/image`;
export let BASE_SIMPRO_LUMEN_FILE = `${BASE_OSPRO}/assets/file/project`; export let BASE_SIMPRO_LUMEN_FILE = `${BASE_OSPRO}/assets/file/project`;
export let BASE_SIMPRO_LUMEN_FILE_COMPANY = (file, company_name)=>{ export let BASE_SIMPRO_LUMEN_FILE_COMPANY = (file, company_name) => {
return `${BASE_OSPRO}/assets/${company_name}/file/project/${file}`; return `${BASE_OSPRO}/assets/${company_name}/file/project/${file}`;
} }
export let BASE_SIMPRO_LUMEN_IMAGE_COMPANY = (file, company_name)=>{ export let BASE_SIMPRO_LUMEN_IMAGE_COMPANY = (file, company_name) => {
return `${BASE_OSPRO}/assets/${company_name}/image/${file}`; return `${BASE_OSPRO}/assets/${company_name}/image/${file}`;
} }
// switch (APP_MODE) {
// case 'KIT':
// BASE_OSPRO = "https://kit-api.oslogdev.com"
// //for KIT server
// // BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`;
// // BASE_SIMPRO_LUMEN_IMAGE = `${BASE_SIMPRO_LUMEN}/assets/image`;
// // BASE_SIMPRO_LUMEN_FILE = `${BASE_SIMPRO_LUMEN}/assets/file/project`;
// break;
// case 'ADW':
// // BASE_OSPRO = "https://adw-api.ospro.id"
// BASE_OSPRO = "http://103.73.125.81:8444";
// BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`;
// BASE_SIMPRO_LUMEN_IMAGE = `${BASE_OSPRO}/assets/image`;
// BASE_SIMPRO_LUMEN_FILE = `${BASE_OSPRO}/assets/file/project`;
// break;
// case 'IU':
// BASE_OSPRO = "https://api-iu.ospro.id"
// BASE_SIMPRO_LUMEN = `${BASE_OSPRO}/api`;
// BASE_SIMPRO_LUMEN_IMAGE = `${BASE_OSPRO}/assets/image`;
// BASE_SIMPRO_LUMEN_FILE = `${BASE_OSPRO}/assets/file/project`;
// break;
// default:
// BASE_OSPRO = "https://ospro-api.ospro.id"
// }
export const USERROLE_ADD = `${BASE_SIMPRO}/user-role/add`; export const USERROLE_ADD = `${BASE_SIMPRO}/user-role/add`;
export const USERROLE_SEARCH = `${BASE_SIMPRO}/user-role/search`; export const USERROLE_SEARCH = `${BASE_SIMPRO}/user-role/search`;
@ -849,8 +818,6 @@ export const MENU_COMPANY_DELETE = (id) => {
return `${BASE_SIMPRO_LUMEN}/menu-company/delete/${id}`; return `${BASE_SIMPRO_LUMEN}/menu-company/delete/${id}`;
}; };
export const DEMO_MANAGEMENT_ADD = `${BASE_SIMPRO_LUMEN}/demo-management/add`; export const DEMO_MANAGEMENT_ADD = `${BASE_SIMPRO_LUMEN}/demo-management/add`;
export const DEMO_MANAGEMENT_SEARCH = `${BASE_SIMPRO_LUMEN}/demo-management/search`; export const DEMO_MANAGEMENT_SEARCH = `${BASE_SIMPRO_LUMEN}/demo-management/search`;
export const DEMO_MANAGEMENT_EDIT = (id) => { export const DEMO_MANAGEMENT_EDIT = (id) => {
@ -863,3 +830,27 @@ export const DEMO_MANAGEMENT_DELETE = (id) => {
return `${BASE_SIMPRO_LUMEN}/demo-management/delete/${id}`; return `${BASE_SIMPRO_LUMEN}/demo-management/delete/${id}`;
}; };
export const DEMO_MANAGEMENT_LIST = `${BASE_SIMPRO_LUMEN}/demo-management/list`; export const DEMO_MANAGEMENT_LIST = `${BASE_SIMPRO_LUMEN}/demo-management/list`;
export const REFERRAL_CODE_ADD = `${BASE_SIMPRO_LUMEN}/refferal-code/add`;
export const REFERRAL_CODE_SEARCH = `${BASE_SIMPRO_LUMEN}/refferal-code/search`;
export const REFERRAL_CODE_EDIT = (id) => {
return `${BASE_SIMPRO_LUMEN}/refferal-code/update/${id}`;
};
export const REFERRAL_CODE_GET_ID = (id) => {
return `${BASE_SIMPRO_LUMEN}/refferal-code/edit/${id}`;
};
export const REFERRAL_CODE_DELETE = (id) => {
return `${BASE_SIMPRO_LUMEN}/refferal-code/delete/${id}`;
};
export const SALES_CONTACT_ADD = `${BASE_SIMPRO_LUMEN}/sales-contact/add`;
export const SALES_CONTACT_SEARCH = `${BASE_SIMPRO_LUMEN}/sales-contact/search`;
export const SALES_CONTACT_EDIT = (id) => {
return `${BASE_SIMPRO_LUMEN}/sales-contact/update/${id}`;
};
export const SALES_CONTACT_GET_ID = (id) => {
return `${BASE_SIMPRO_LUMEN}/sales-contact/edit/${id}`;
};
export const SALES_CONTACT_DELETE = (id) => {
return `${BASE_SIMPRO_LUMEN}/sales-contact/delete/${id}`;
};

11
src/routes.js

@ -56,7 +56,9 @@ const DashboardProjectCarousell = React.lazy(() => import('./views/Dashboard/Das
const MapMonitoring = React.lazy(() => import('./views/MapMonitoring')); const MapMonitoring = React.lazy(() => import('./views/MapMonitoring'));
const Settings = React.lazy(() => import('./views/SimproV2/Settings/Desktop')); const Settings = React.lazy(() => import('./views/SimproV2/Settings/Desktop'));
const CompanyManagement = React.lazy(() => import('./views/Master/MasterCompany')) const CompanyManagement = React.lazy(() => import('./views/Master/MasterCompany'))
const DemoManagement = React.lazy(() => import('./views/SimproV2/Demo')) const DemoRequest = React.lazy(() => import('./views/SimproV2/DemoRequest'))
const ReferralCode = React.lazy(() => import('./views/SimproV2/ReferralCode'))
const SalesContact = React.lazy(() => import('./views/SimproV2/SalesContact'))
const routes = [ const routes = [
{ path: '/', exact: true, name: 'Home' }, { path: '/', exact: true, name: 'Home' },
{ path: '/dashboard', name: 'DashboardBOD', component: DashboardBOD }, { path: '/dashboard', name: 'DashboardBOD', component: DashboardBOD },
@ -119,8 +121,11 @@ const routes = [
{ path: '/map-monitoring', exact: true, name: 'Map Monitoring', component: MapMonitoring }, { path: '/map-monitoring', exact: true, name: 'Map Monitoring', component: MapMonitoring },
// { path: '/dashboard-project/:ID/:GANTTID', exact: true, name: 'Dashboard Project', component: DashboardProject }, // { path: '/dashboard-project/:ID/:GANTTID', exact: true, name: 'Dashboard Project', component: DashboardProject },
{ path: '/settings', exact: true, name: 'Settings', component: Settings }, { path: '/settings', exact: true, name: 'Settings', component: Settings },
{ path: '/company-management', exact: true, name: 'Company Management', component: CompanyManagement }, { path: '/register-management', exact: true, name: 'Register Management', component: CompanyManagement },
{ path: '/demo-management', exact: true, name: 'Demo Management', component: DemoManagement }, { path: '/demo-request', exact: true, name: 'Request Demo', component: DemoRequest },
{ path: '/referral-code-management', exact: true, name: 'Referral Code Management', component: ReferralCode },
{ path: '/sales-contact', exact: true, name: 'Sales Contact', component: SalesContact },
]; ];
export default routes; export default routes;

Loading…
Cancel
Save