Reviewed-on: Pozomind/pozo-retail-app#318
This commit is contained in:
commit
6d9c132012
|
|
@ -56,12 +56,7 @@ const addAuthHeader = async (config) => {
|
||||||
let encryptedLoginType =
|
let encryptedLoginType =
|
||||||
getSession('LoginType')
|
getSession('LoginType')
|
||||||
|
|
||||||
console.log(
|
|
||||||
'encryptedLoginType',
|
|
||||||
encryptedLoginType,
|
|
||||||
TokendecryptedValuesFun(encryptedMobileno)
|
|
||||||
);
|
|
||||||
|
|
||||||
// let Mobileno = encryptedUserId && encryptedLoginType != "Kiosk" ? TokendecryptedValuesFun(encryptedMobileno) : '1000000001';
|
// let Mobileno = encryptedUserId && encryptedLoginType != "Kiosk" ? TokendecryptedValuesFun(encryptedMobileno) : '1000000001';
|
||||||
let Mobileno = encryptedUserId
|
let Mobileno = encryptedUserId
|
||||||
? encryptedMobileno
|
? encryptedMobileno
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,14 @@ function RedirectApps() {
|
||||||
const SessionId = encryptedValuesUrlFun(getSession('SessionId'));
|
const SessionId = encryptedValuesUrlFun(getSession('SessionId'));
|
||||||
// const AuthToken = sessionStorage.getItem('auth');
|
// const AuthToken = sessionStorage.getItem('auth');
|
||||||
|
|
||||||
if (sessionStorage.getItem('BranchId') !== null) {
|
if (getSession('BranchId') !== null) {
|
||||||
clearSession('BranchId');
|
clearSession('BranchId');
|
||||||
}
|
}
|
||||||
if (sessionStorage.getItem('AppId') !== null) {
|
if (getSession('AppId') !== null) {
|
||||||
clearSession('AppId');
|
clearSession('AppId');
|
||||||
}
|
}
|
||||||
if (sessionStorage.getItem('hasRefreshed') !== null) {
|
if (getSession('hasRefreshed') !== null) {
|
||||||
sessionStorage.removeItem('hasRefreshed');
|
clearSession('hasRefreshed');
|
||||||
}
|
}
|
||||||
const param = {
|
const param = {
|
||||||
MN: MobileNo,
|
MN: MobileNo,
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ const DateWiseReport = () => {
|
||||||
getSession('AppType')?.toLowerCase() == 'wholesale' ? true : false;
|
getSession('AppType')?.toLowerCase() == 'wholesale' ? true : false;
|
||||||
const [OrderFromDate, setOrderFromDate] = useState();
|
const [OrderFromDate, setOrderFromDate] = useState();
|
||||||
const [OrderToDate, setOrderToDate] = useState();
|
const [OrderToDate, setOrderToDate] = useState();
|
||||||
|
const sessionuserid = getSession('UserId')
|
||||||
const [UserId, setUserId] = useState(
|
const [UserId, setUserId] = useState(
|
||||||
UserRole != 'Employee' ? 0 : getSession('UserId')
|
UserRole != 'Employee' ? 0 : getSession('UserId')
|
||||||
);
|
);
|
||||||
|
|
@ -63,7 +64,7 @@ const DateWiseReport = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
|
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
console.log(MobileA4Print, 'MobileA4PrintMobileA4Print');
|
console.log(MobileA4Print,SettingDataSelector, 'MobileA4PrintMobileA4Print');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (dataSource?.length > 0) {
|
if (dataSource?.length > 0) {
|
||||||
|
|
@ -368,7 +369,7 @@ const DateWiseReport = () => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getPreference = async () => {
|
const getPreference = async () => {
|
||||||
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: UserId };
|
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: sessionuserid };
|
||||||
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
|
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
|
||||||
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
|
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
|
||||||
(setting) =>
|
(setting) =>
|
||||||
|
|
@ -545,12 +546,12 @@ const DateWiseReport = () => {
|
||||||
let TokenData = '';
|
let TokenData = '';
|
||||||
let FooterPrint = '';
|
let FooterPrint = '';
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
if (MobileA4Print) {
|
// if (MobileA4Print) {
|
||||||
ReportMobilePDFPrint({
|
// ReportMobilePDFPrint({
|
||||||
printId: 'RePrint',
|
// printId: 'RePrint',
|
||||||
printStyle: style,
|
// printStyle: style,
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
var textEncoded = encodeURI(receiptText);
|
var textEncoded = encodeURI(receiptText);
|
||||||
var TypeCheck = 'PrintReceipt';
|
var TypeCheck = 'PrintReceipt';
|
||||||
var scheme = 'pozoprinter';
|
var scheme = 'pozoprinter';
|
||||||
|
|
@ -578,7 +579,7 @@ const DateWiseReport = () => {
|
||||||
FooterPrint +
|
FooterPrint +
|
||||||
'HasFooterTextE' +
|
'HasFooterTextE' +
|
||||||
';end;';
|
';end;';
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
await printDiv('RePrint', style);
|
await printDiv('RePrint', style);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ const ItemWiseReport = () => {
|
||||||
const BranchId = getSession('BranchId');
|
const BranchId = getSession('BranchId');
|
||||||
const AppId = getSession('AppId');
|
const AppId = getSession('AppId');
|
||||||
const UserRole = getSession('UserType');
|
const UserRole = getSession('UserType');
|
||||||
|
const sessionuserid = getSession('UserId')
|
||||||
const [UserId, setUserId] = useState(
|
const [UserId, setUserId] = useState(
|
||||||
UserRole != 'Employee' ? 0 : getSession('UserId')
|
UserRole != 'Employee' ? 0 : getSession('UserId')
|
||||||
);
|
);
|
||||||
|
|
@ -79,7 +80,7 @@ const ItemWiseReport = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
|
setting?.SettingIdName?.toLowerCase() === 'mobilea4' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
console.log(MobileA4Print,SettingDataSelector, 'MobileA4PrintMobileA4Print')
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getPreference();
|
getPreference();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -210,7 +211,7 @@ const ItemWiseReport = () => {
|
||||||
}
|
}
|
||||||
}, [apiCall]);
|
}, [apiCall]);
|
||||||
const getPreference = async () => {
|
const getPreference = async () => {
|
||||||
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: UserId };
|
const data = { AppId: AppId, CompId: CompId, BranchId: BranchId,UserId: sessionuserid };
|
||||||
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
|
const { data: res } = await dispatch(getPreferenceData(data)).unwrap();
|
||||||
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
|
const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find(
|
||||||
(setting) =>
|
(setting) =>
|
||||||
|
|
@ -310,12 +311,12 @@ const ItemWiseReport = () => {
|
||||||
};
|
};
|
||||||
const Print = async () => {
|
const Print = async () => {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
if (MobileA4Print) {
|
// if (MobileA4Print) {
|
||||||
ReportMobilePDFPrint({
|
// ReportMobilePDFPrint({
|
||||||
printId: 'RePrint',
|
// printId: 'RePrint',
|
||||||
printStyle: style,
|
// printStyle: style,
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
let LogoImage = '';
|
let LogoImage = '';
|
||||||
let TokenData = '';
|
let TokenData = '';
|
||||||
let FooterPrint = '';
|
let FooterPrint = '';
|
||||||
|
|
@ -346,7 +347,7 @@ const ItemWiseReport = () => {
|
||||||
FooterPrint +
|
FooterPrint +
|
||||||
'HasFooterTextE' +
|
'HasFooterTextE' +
|
||||||
';end;';
|
';end;';
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
await printDiv('RePrint', style);
|
await printDiv('RePrint', style);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -705,7 +705,7 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
.optionnew:selection {
|
.optionnew::selection {
|
||||||
background-color: #ff4d4f;
|
background-color: #ff4d4f;
|
||||||
}
|
}
|
||||||
.ovrly-icos {
|
.ovrly-icos {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue