added user csv data

This commit is contained in:
2021-08-23 18:07:50 +05:30
parent 0fd911a113
commit 9d42d68aeb
44 changed files with 212 additions and 6 deletions

View File

@ -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;
});