Compare commits

...

3 Commits

Author SHA1 Message Date
victorAnumudu 29878e3ddf fix location reload error 2025-06-25 13:06:32 +01:00
CHIEFSOFT\ameye 80a40da9df dev .env 2025-06-24 15:57:41 -04:00
ameye 9f7f1b706b Merge branch 'product-endpoint' of MERMS/MermsPanelReactJS into master 2025-06-24 16:18:58 +00:00
5 changed files with 27 additions and 29 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_NODE_ENV="development"
REACT_APP_SOCKET_URL="https://dev-socket.mermsemr.com"
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
+1 -1
View File
@@ -1,6 +1,6 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_NODE_ENV="development"
REACT_APP_SOCKET_URL="https://dev-socket.mermsemr.com"
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
+2 -1
View File
@@ -11,7 +11,8 @@ export default function BearerToken() {
return userToken(fields)
},
onError: (error) => {
location.reload();
console.log(error)
// window.location.reload(true)
},
onSuccess: (res) => {
if(res?.data?.resultCode != '0'){
-1
View File
@@ -10,7 +10,6 @@ export default function TopBar() {
},
onError: (error) => {
console.log(error)
location.reload();
},
onSuccess: (res) => {
if(res?.data?.resultCode != '0'){
+23 -25
View File
@@ -43,7 +43,7 @@ const getAuxEnd = (path, reqData= null) => {
})
}
// FUNCTION TO LOGIN USER IN
// FUNCTION TO AUTHORIZE USER IN
export const userToken = (reqData) => {
let postData = {
...reqData
@@ -67,6 +67,23 @@ export const userInfo = (reqData) => {
return postAuxEnd('/panel/account', postData, false)
}
// FUNCTION TO GET DASHBOARD TOP BAR SECTION
export const topBar = (reqData) => {
let postData = {
...reqData,
}
return postAuxEnd(`/panel/account/bar`, postData, false)
}
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
export const recentActions = (reqData) => {
let postData = {
...reqData,
}
//return getAuxEnd(`/panel/account/actions`)
return postAuxEnd(`/panel/account/actions`, postData, false)
}
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
export const productData = () => {
let postData = {
@@ -76,6 +93,11 @@ export const productData = () => {
return postAuxEnd(`/panel/account/products`, postData, false)
}
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
export const productsURL = () => {
return getAuxEnd(`/panel/account/products/url`)
}
@@ -121,16 +143,6 @@ export const recoverPWD = (reqData) => {
return postAuxEnd('/panel/auth/reset', postData, false)
}
// FUNCTION TO GET DASHBOARD TOP BAR SECTION
export const topBar = (reqData) => {
let postData = {
...reqData,
// "token":"there-will-be-token",
// "uid": "there-will-be-uid"
}
return postAuxEnd(`/panel/account/bar`, postData, false)
}
// FUNCTION TO GET CALENDAR EVENTS
export const getCalendarEvents = () => {
// return getAuxEnd(`/panel/account/calendar`)
@@ -140,15 +152,6 @@ export const getCalendarEvents = () => {
return postAuxEnd(`/panel/account/calendar`, postData, false)
}
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
export const recentActions = () => {
//return getAuxEnd(`/panel/account/actions`)
let postData = {
"a":"b"
}
return postAuxEnd(`/panel/account/actions`, postData, false)
}
// FUNCTION TO GET MY PRODUCT PROVISION DATA
export const productProvision = (reqData) => {
const postData = { ...reqData }
@@ -160,11 +163,6 @@ export const contactData = () => {
return getAuxEnd(`/panel/contacts`)
}
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
export const productsURL = () => {
return getAuxEnd(`/panel/account/products/url`)
}
export const MyProductData = (productID) => {
const reqData = { product_id : productID}
//console.log(reqData)