Added Warehouse condition
This commit is contained in:
parent
289e4744d3
commit
770a65945a
|
|
@ -36,6 +36,7 @@ import {
|
|||
encryptedValuesUrlFun,
|
||||
ExtractDateFormate,
|
||||
getSession,
|
||||
sessionStore,
|
||||
} from '../../Services/Others';
|
||||
|
||||
import {
|
||||
|
|
@ -46,6 +47,7 @@ import {
|
|||
} from '../../Features/ProductPage/ProductPage.js';
|
||||
import {
|
||||
ApplicationPreferences,
|
||||
changeWarehouse,
|
||||
checkSession,
|
||||
GenerateLogout,
|
||||
getCompBranchData,
|
||||
|
|
@ -308,6 +310,23 @@ const RetailDashboard = () => {
|
|||
isMountedRef.current = false;
|
||||
};
|
||||
}, []);
|
||||
//sri checkin warehouse condition
|
||||
useEffect(() => {
|
||||
const checkWarehouseorNot = async (e) => {
|
||||
let data = CompBranchData?.find((a) => a?.BrId == e);
|
||||
if (data?.LocationType == 'W') {
|
||||
sessionStore("Warhouse", true)
|
||||
await dispatch(changeWarehouse(true));
|
||||
}
|
||||
else {
|
||||
sessionStore("Warehouse", false)
|
||||
await dispatch(changeWarehouse(false));
|
||||
}
|
||||
}
|
||||
if (CompBranchData?.length > 0 && BranchId) {
|
||||
checkWarehouseorNot(BranchId)
|
||||
}
|
||||
}, [CompBranchData, BranchId])
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
|
|
@ -2183,24 +2202,24 @@ const RetailDashboard = () => {
|
|||
>
|
||||
{preorderData?.[0]?.BranchDtl
|
||||
? preorderData?.[0]?.BranchDtl?.map(
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.TotalOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.TotalOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
)
|
||||
: 'No Data'}
|
||||
</div>
|
||||
}
|
||||
|
|
@ -2223,24 +2242,24 @@ const RetailDashboard = () => {
|
|||
>
|
||||
{preorderData?.[0]?.BranchDtl
|
||||
? preorderData?.[0]?.BranchDtl?.map(
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.PendingOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.PendingOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
)
|
||||
: 'No Data'}
|
||||
</div>
|
||||
}
|
||||
|
|
@ -2263,24 +2282,24 @@ const RetailDashboard = () => {
|
|||
>
|
||||
{preorderData?.[0]?.BranchDtl
|
||||
? preorderData?.[0]?.BranchDtl?.map(
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.CompletedOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
(item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
style={{
|
||||
marginBottom: 8,
|
||||
paddingBottom: 8,
|
||||
borderBottom: '1px solid #f0f0f0',
|
||||
}}
|
||||
>
|
||||
<strong>
|
||||
{item.BranchName || 'N/A'}
|
||||
</strong>
|
||||
<br />
|
||||
Total Orders: {item.CompletedOrders || 0}
|
||||
<br />
|
||||
</div>
|
||||
)
|
||||
)
|
||||
: 'No Data'}
|
||||
</div>
|
||||
}
|
||||
|
|
@ -2440,14 +2459,12 @@ const RetailDashboard = () => {
|
|||
{SelectTypeName === 'OTP'
|
||||
? !FirstTimeOtp
|
||||
? `send ${SelectTypeName.toLocaleLowerCase()}`
|
||||
: `resend ${SelectTypeName.toLocaleLowerCase()}${
|
||||
seconds > 0 ? ` in ${seconds}s` : ''
|
||||
}`
|
||||
: `resend ${SelectTypeName.toLocaleLowerCase()}${seconds > 0 ? ` in ${seconds}s` : ''
|
||||
}`
|
||||
: !FirstTimePin
|
||||
? `send ${SelectTypeName.toLocaleLowerCase()}`
|
||||
: `resend ${SelectTypeName.toLocaleLowerCase()}${
|
||||
seconds > 0 ? ` in ${seconds}s` : ''
|
||||
}`}
|
||||
: `resend ${SelectTypeName.toLocaleLowerCase()}${seconds > 0 ? ` in ${seconds}s` : ''
|
||||
}`}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue