From c29b72887570da29d1a3b94efca8ff85a82f51ca Mon Sep 17 00:00:00 2001 From: farhantock Date: Wed, 28 Feb 2024 10:19:17 +0700 Subject: [PATCH] new router and new andpoint --- src/const/ApiConst.js | 61 ++++++++++++++++++------------------------- src/routes.js | 11 +++++--- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/src/const/ApiConst.js b/src/const/ApiConst.js index 9c07bd7..7bdc817 100644 --- a/src/const/ApiConst.js +++ b/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://project-api.ospro.id"; 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_IMAGE = `${BASE_OSPRO}/assets/image`; 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}`; } -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}`; } -// 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_SEARCH = `${BASE_SIMPRO}/user-role/search`; @@ -849,8 +818,6 @@ export const 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_SEARCH = `${BASE_SIMPRO_LUMEN}/demo-management/search`; export const DEMO_MANAGEMENT_EDIT = (id) => { @@ -863,3 +830,27 @@ export const 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 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}`; +}; \ No newline at end of file diff --git a/src/routes.js b/src/routes.js index 6fafb24..ebe60fe 100644 --- a/src/routes.js +++ b/src/routes.js @@ -56,7 +56,9 @@ const DashboardProjectCarousell = React.lazy(() => import('./views/Dashboard/Das const MapMonitoring = React.lazy(() => import('./views/MapMonitoring')); const Settings = React.lazy(() => import('./views/SimproV2/Settings/Desktop')); 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 = [ { path: '/', exact: true, name: 'Home' }, { path: '/dashboard', name: 'DashboardBOD', component: DashboardBOD }, @@ -119,8 +121,11 @@ const routes = [ { path: '/map-monitoring', exact: true, name: 'Map Monitoring', component: MapMonitoring }, // { path: '/dashboard-project/:ID/:GANTTID', exact: true, name: 'Dashboard Project', component: DashboardProject }, { path: '/settings', exact: true, name: 'Settings', component: Settings }, - { path: '/company-management', exact: true, name: 'Company Management', component: CompanyManagement }, - { path: '/demo-management', exact: true, name: 'Demo Management', component: DemoManagement }, + { path: '/register-management', exact: true, name: 'Register Management', component: CompanyManagement }, + { 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;