added user csv data
This commit is contained in:
@ -79,9 +79,14 @@ const TheContent = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
function userPathname(){
|
||||
const location = useLocation();
|
||||
return location.pathname;
|
||||
function isCSVPath(){
|
||||
const url =window.location.href;
|
||||
if(url.includes('dashboard')) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function get_token_from_storage_or_cookie() {
|
||||
@ -99,9 +104,9 @@ const TheContent = () => {
|
||||
const _empcode = UserData.employee_code;
|
||||
const json_str = '[{"firstname": "' + _firstname + '", "lastname":"' +_lastname+ '", "email":" ' + _email + '", "empcode": "' + _empcode + '"}]';
|
||||
if(_empcode !== null && _empcode !== undefined){
|
||||
console.log(userPathname());
|
||||
|
||||
postUserData(json_str);
|
||||
if(isCSVPath()){
|
||||
postUserData(json_str);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user