Merge pull request 'preference-align' (#84) from preference-align into main

Reviewed-on: Pozomind/pozo-retail-app#84
This commit is contained in:
karthikalakshmi 2026-02-05 16:02:14 +05:30
commit 03c15cd9c6
5 changed files with 71 additions and 67 deletions

View File

@ -2,9 +2,7 @@ import React, { useState } from 'react';
import { List, Typography, Tooltip } from 'antd';
import { FaKeyboard } from 'react-icons/fa';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
const { Title, Text } = Typography;
const ShortcutKeyHelper = ({ }) => {
const [isModalOpen, setIsModalOpen] = useState(false);
@ -33,8 +31,7 @@ const ShortcutKeyHelper = ({}) => {
gap: '5px',
padding: '5px 10px',
borderRadius: '4px',
backgroundColor: '#f0f0f0',
fontSize: '14px',
fontSize: '18px',
}}
>
<FaKeyboard />

View File

@ -71,6 +71,7 @@ import { CgSearchLoading } from "react-icons/cg";
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
import MultipleSearch from '../../Components/UtillComponents/MultipleSearch.jsx';
import VerfiedProducts from '../../Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx';
import ShortcutKeyHelper from '../../Components/UtillComponents/ShortcutKeyHelper.jsx';
const subDirectory = import.meta.env.BASE_URL;
const commonDirectory = import.meta.env.COMMON_BASE_URL;
@ -103,6 +104,13 @@ export default function BSCombo1() {
preference?.PreferredSubCatName === 'SportsApp' &&
preference?.PreferredStatus == 'Y'
);
const preferenceshortcutkey = SettingDataSelector?.[0]?.[
'SettingDtlDetails'
]?.some(
(item) =>
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
const [popOverOpen, setPopOverOpen] = useState(false);
// const [AppExpDate, setAppExpDate] = useState(0);
@ -535,12 +543,10 @@ export default function BSCombo1() {
</div>
)}
</div>
<Tooltip title="KeyBoard Shortcut">
{preferenceshortcutkey && (
<div className="keyboardShortcut">
<FaRegKeyboard size={20} />
</div>
</Tooltip>
<ShortcutKeyHelper />
</div>)}
</div>
</div>
{/* </div> */}

View File

@ -85,13 +85,7 @@ const SalesCountComponent = React.memo(
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
type?.PreferredStatus === 'Y'
);
const preferenceshortcutkey = preferencedata?.[0]?.[
'SettingDtlDetails'
]?.some(
(item) =>
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
@ -1091,7 +1085,6 @@ const SalesCountComponent = React.memo(
)}
</Tooltip>
</div>
{preferenceshortcutkey && <ShortcutKeyHelper />}
<AllSalesPageSettings />
<ProductPriceChange />
<ReceivedStocksModal

View File

@ -471,10 +471,6 @@ const PreferenceList = () => {
'dashboard',
'Stay on the Dashboard when you open the app?'
)}
{renderCheckbox(
'shortcutkeys',
'Would you like to enable the shortcut keys?'
)}
{renderCheckbox(
'autoreceivestock',
'Items received from godown. Add to stock Automatically ?'
@ -483,44 +479,6 @@ const PreferenceList = () => {
'decimal',
'Display values with 2 decimal places throughout the app?'
)}
{((allSettingsMap['dinein'] !== undefined && dinePreference) ||
allSettingsMap['estimation'] !== undefined) && (
<Form.Item
name="enabledModules"
label="Select the modules you want to enable:"
>
<Checkbox.Group>
{allSettingsMap['dinein'] !== undefined &&
dinePreference && (
<Checkbox value="dinein">Dine-In</Checkbox>
)}
{allSettingsMap['estimation'] !== undefined && (
<Checkbox value="estimation">Estimation</Checkbox>
)}
</Checkbox.Group>
</Form.Item>
)}
{(allSettingsMap['onbilltime'] !== undefined ||
allSettingsMap['1daybefore'] !== undefined ||
allSettingsMap['1hourbefore'] !== undefined) && (
<Form.Item
name="notification"
label="Choose notification timing:"
>
<Checkbox.Group>
{allSettingsMap['onbilltime'] !== undefined && (
<Checkbox value="onbilltime">On Bill Time</Checkbox>
)}
{allSettingsMap['1daybefore'] !== undefined && (
<Checkbox value="1daybefore">1 Day Before</Checkbox>
)}
{allSettingsMap['1hourbefore'] !== undefined && (
<Checkbox value="1hourbefore">1 Hour Before</Checkbox>
)}
</Checkbox.Group>
</Form.Item>
)}
{(allSettingsMap['onlineindividualslots'] !== undefined ||
allSettingsMap['allow individual booking'] !== undefined ||
allSettingsMap['single booking only'] !== undefined) && (
@ -571,6 +529,26 @@ const PreferenceList = () => {
'notificationblink',
'Do you want to enable the low-stock blink notification?'
)}
{(allSettingsMap['onbilltime'] !== undefined ||
allSettingsMap['1daybefore'] !== undefined ||
allSettingsMap['1hourbefore'] !== undefined) && (
<Form.Item
name="notification"
label="Choose notification timing:"
>
<Checkbox.Group>
{allSettingsMap['onbilltime'] !== undefined && (
<Checkbox value="onbilltime">On Bill Time</Checkbox>
)}
{allSettingsMap['1daybefore'] !== undefined && (
<Checkbox value="1daybefore">1 Day Before</Checkbox>
)}
{allSettingsMap['1hourbefore'] !== undefined && (
<Checkbox value="1hourbefore">1 Hour Before</Checkbox>
)}
</Checkbox.Group>
</Form.Item>
)}
</div>
<div
@ -586,6 +564,10 @@ const PreferenceList = () => {
Sales Page
</div>
{renderCheckbox('searchfocus', 'Always focus the search bar?')}
{renderCheckbox(
'shortcutkeys',
'Would you like to enable the shortcut keys?'
)}
{renderCheckbox(
'addproductcard',
'Would you like to remove Add Product card from sales page ?'
@ -607,6 +589,23 @@ const PreferenceList = () => {
</Checkbox.Group>
</Form.Item>
)}
{((allSettingsMap['dinein'] !== undefined && dinePreference) ||
allSettingsMap['estimation'] !== undefined) && (
<Form.Item
name="enabledModules"
label="Select the modules you want to enable:"
>
<Checkbox.Group>
{allSettingsMap['dinein'] !== undefined &&
dinePreference && (
<Checkbox value="dinein">Dine-In</Checkbox>
)}
{allSettingsMap['estimation'] !== undefined && (
<Checkbox value="estimation">Estimation</Checkbox>
)}
</Checkbox.Group>
</Form.Item>
)}
{renderCheckbox('stockselection', 'Enable stock selection?')}
{renderCheckbox('weightasquantity', 'Use Weight as Quantity?')}
@ -628,6 +627,7 @@ const PreferenceList = () => {
'customisedbillnumber',
'Do you Want Customised Bill Number?'
)}
{renderCheckbox('scanlayout', 'Do you Want Scan Layout Page?')}
{renderCheckbox('upiqr', 'Do you want to show the UPI QR code?')}
{/* {renderCheckbox('editbill', 'Do you want to edit the previously created bill?')} */}
</div>
@ -750,7 +750,6 @@ const PreferenceList = () => {
'Do you want to include a header when printing Estimate bills?'
)}
{renderCheckbox('scanlayout', 'Do you Want Scan Layout Page?')}
</div>
<div className="PreferencesBTN">
<Buttons

View File

@ -109,15 +109,19 @@
gap: 0;
width: 80%;
}
.preferences-list {
max-height: 80vh;
width: 95%;
.preference-headers {
font-size: 1rem;
}
.ant-form-item-label>label {
font-size: 14px;
}
.ant-checkbox-wrapper {
font-size: 13px;
}
@ -149,12 +153,17 @@
}
}
}
.PreferencesBTN {
display: flex;
align-items: flex-start;
justify-content: flex-end;
width: 100%;
margin-top: 1rem;
position: fixed;
bottom: 1.3rem;
right: 2.5rem;
.primary_Button {
width: 200px !important;
}