Merge pull request 'preference-align' (#84) from preference-align into main
Reviewed-on: Pozomind/pozo-retail-app#84
This commit is contained in:
commit
03c15cd9c6
|
|
@ -2,10 +2,8 @@ import React, { useState } from 'react';
|
||||||
import { List, Typography, Tooltip } from 'antd';
|
import { List, Typography, Tooltip } from 'antd';
|
||||||
import { FaKeyboard } from 'react-icons/fa';
|
import { FaKeyboard } from 'react-icons/fa';
|
||||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
|
import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
|
||||||
|
|
||||||
const { Title, Text } = Typography;
|
const { Title, Text } = Typography;
|
||||||
|
const ShortcutKeyHelper = ({ }) => {
|
||||||
const ShortcutKeyHelper = ({}) => {
|
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
|
|
@ -33,8 +31,7 @@ const ShortcutKeyHelper = ({}) => {
|
||||||
gap: '5px',
|
gap: '5px',
|
||||||
padding: '5px 10px',
|
padding: '5px 10px',
|
||||||
borderRadius: '4px',
|
borderRadius: '4px',
|
||||||
backgroundColor: '#f0f0f0',
|
fontSize: '18px',
|
||||||
fontSize: '14px',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FaKeyboard />
|
<FaKeyboard />
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ import { CgSearchLoading } from "react-icons/cg";
|
||||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import MultipleSearch from '../../Components/UtillComponents/MultipleSearch.jsx';
|
import MultipleSearch from '../../Components/UtillComponents/MultipleSearch.jsx';
|
||||||
import VerfiedProducts from '../../Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx';
|
import VerfiedProducts from '../../Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx';
|
||||||
|
import ShortcutKeyHelper from '../../Components/UtillComponents/ShortcutKeyHelper.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.BASE_URL;
|
const subDirectory = import.meta.env.BASE_URL;
|
||||||
const commonDirectory = import.meta.env.COMMON_BASE_URL;
|
const commonDirectory = import.meta.env.COMMON_BASE_URL;
|
||||||
|
|
@ -103,6 +104,13 @@ export default function BSCombo1() {
|
||||||
preference?.PreferredSubCatName === 'SportsApp' &&
|
preference?.PreferredSubCatName === 'SportsApp' &&
|
||||||
preference?.PreferredStatus == 'Y'
|
preference?.PreferredStatus == 'Y'
|
||||||
);
|
);
|
||||||
|
const preferenceshortcutkey = SettingDataSelector?.[0]?.[
|
||||||
|
'SettingDtlDetails'
|
||||||
|
]?.some(
|
||||||
|
(item) =>
|
||||||
|
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
|
||||||
|
item.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const [popOverOpen, setPopOverOpen] = useState(false);
|
const [popOverOpen, setPopOverOpen] = useState(false);
|
||||||
|
|
||||||
// const [AppExpDate, setAppExpDate] = useState(0);
|
// const [AppExpDate, setAppExpDate] = useState(0);
|
||||||
|
|
@ -535,12 +543,10 @@ export default function BSCombo1() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{preferenceshortcutkey && (
|
||||||
<Tooltip title="KeyBoard Shortcut">
|
|
||||||
<div className="keyboardShortcut">
|
<div className="keyboardShortcut">
|
||||||
<FaRegKeyboard size={20} />
|
<ShortcutKeyHelper />
|
||||||
</div>
|
</div>)}
|
||||||
</Tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* </div> */}
|
{/* </div> */}
|
||||||
|
|
|
||||||
|
|
@ -85,13 +85,7 @@ const SalesCountComponent = React.memo(
|
||||||
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
|
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
|
||||||
type?.PreferredStatus === 'Y'
|
type?.PreferredStatus === 'Y'
|
||||||
);
|
);
|
||||||
const preferenceshortcutkey = preferencedata?.[0]?.[
|
|
||||||
'SettingDtlDetails'
|
|
||||||
]?.some(
|
|
||||||
(item) =>
|
|
||||||
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
|
|
||||||
item.SettingValue === 'Y'
|
|
||||||
);
|
|
||||||
|
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
|
@ -1091,7 +1085,6 @@ const SalesCountComponent = React.memo(
|
||||||
)}
|
)}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
{preferenceshortcutkey && <ShortcutKeyHelper />}
|
|
||||||
<AllSalesPageSettings />
|
<AllSalesPageSettings />
|
||||||
<ProductPriceChange />
|
<ProductPriceChange />
|
||||||
<ReceivedStocksModal
|
<ReceivedStocksModal
|
||||||
|
|
|
||||||
|
|
@ -471,10 +471,6 @@ const PreferenceList = () => {
|
||||||
'dashboard',
|
'dashboard',
|
||||||
'Stay on the Dashboard when you open the app?'
|
'Stay on the Dashboard when you open the app?'
|
||||||
)}
|
)}
|
||||||
{renderCheckbox(
|
|
||||||
'shortcutkeys',
|
|
||||||
'Would you like to enable the shortcut keys?'
|
|
||||||
)}
|
|
||||||
{renderCheckbox(
|
{renderCheckbox(
|
||||||
'autoreceivestock',
|
'autoreceivestock',
|
||||||
'Items received from godown. Add to stock Automatically ?'
|
'Items received from godown. Add to stock Automatically ?'
|
||||||
|
|
@ -483,44 +479,6 @@ const PreferenceList = () => {
|
||||||
'decimal',
|
'decimal',
|
||||||
'Display values with 2 decimal places throughout the app?'
|
'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['onlineindividualslots'] !== undefined ||
|
||||||
allSettingsMap['allow individual booking'] !== undefined ||
|
allSettingsMap['allow individual booking'] !== undefined ||
|
||||||
allSettingsMap['single booking only'] !== undefined) && (
|
allSettingsMap['single booking only'] !== undefined) && (
|
||||||
|
|
@ -571,6 +529,26 @@ const PreferenceList = () => {
|
||||||
'notificationblink',
|
'notificationblink',
|
||||||
'Do you want to enable the low-stock blink notification?'
|
'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>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
@ -586,6 +564,10 @@ const PreferenceList = () => {
|
||||||
Sales Page
|
Sales Page
|
||||||
</div>
|
</div>
|
||||||
{renderCheckbox('searchfocus', 'Always focus the search bar?')}
|
{renderCheckbox('searchfocus', 'Always focus the search bar?')}
|
||||||
|
{renderCheckbox(
|
||||||
|
'shortcutkeys',
|
||||||
|
'Would you like to enable the shortcut keys?'
|
||||||
|
)}
|
||||||
{renderCheckbox(
|
{renderCheckbox(
|
||||||
'addproductcard',
|
'addproductcard',
|
||||||
'Would you like to remove Add Product card from sales page ?'
|
'Would you like to remove Add Product card from sales page ?'
|
||||||
|
|
@ -607,6 +589,23 @@ const PreferenceList = () => {
|
||||||
</Checkbox.Group>
|
</Checkbox.Group>
|
||||||
</Form.Item>
|
</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('stockselection', 'Enable stock selection?')}
|
||||||
{renderCheckbox('weightasquantity', 'Use Weight as Quantity?')}
|
{renderCheckbox('weightasquantity', 'Use Weight as Quantity?')}
|
||||||
|
|
@ -628,6 +627,7 @@ const PreferenceList = () => {
|
||||||
'customisedbillnumber',
|
'customisedbillnumber',
|
||||||
'Do you Want Customised Bill Number?'
|
'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('upiqr', 'Do you want to show the UPI QR code?')}
|
||||||
{/* {renderCheckbox('editbill', 'Do you want to edit the previously created bill?')} */}
|
{/* {renderCheckbox('editbill', 'Do you want to edit the previously created bill?')} */}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -750,7 +750,6 @@ const PreferenceList = () => {
|
||||||
'Do you want to include a header when printing Estimate bills?'
|
'Do you want to include a header when printing Estimate bills?'
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{renderCheckbox('scanlayout', 'Do you Want Scan Layout Page?')}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="PreferencesBTN">
|
<div className="PreferencesBTN">
|
||||||
<Buttons
|
<Buttons
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
color: #1890ff; // Ant Design blue
|
color: #1890ff; // Ant Design blue
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-form-item-label > label {
|
.ant-form-item-label>label {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
.submitButton {
|
.submitButton {
|
||||||
position: unset;
|
position: unset;
|
||||||
|
|
||||||
> button {
|
>button {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
.menu-section {
|
.menu-section {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
|
|
||||||
> div {
|
>div {
|
||||||
font-family: "Poppins";
|
font-family: "Poppins";
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
@ -109,15 +109,19 @@
|
||||||
gap: 0;
|
gap: 0;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preferences-list {
|
.preferences-list {
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
|
|
||||||
.preference-headers {
|
.preference-headers {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
.ant-form-item-label > label {
|
|
||||||
|
.ant-form-item-label>label {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-checkbox-wrapper {
|
.ant-checkbox-wrapper {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +141,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
||||||
> div {
|
>div {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
|
|
@ -149,12 +153,17 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.PreferencesBTN {
|
.PreferencesBTN {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 1.3rem;
|
||||||
|
right: 2.5rem;
|
||||||
|
|
||||||
.primary_Button {
|
.primary_Button {
|
||||||
width: 200px !important;
|
width: 200px !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue