Added Qr scann on mobile Funtionalites
This commit is contained in:
parent
374c76540f
commit
03ff3e0218
|
|
@ -19,6 +19,8 @@ import Search from "../../../../Components/Forms/Search";
|
||||||
import VoiceToTextItemCard from "../../../VoiceToText/VoiceToTextItemCard";
|
import VoiceToTextItemCard from "../../../VoiceToText/VoiceToTextItemCard";
|
||||||
import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin";
|
import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin";
|
||||||
import { useDateStore } from "../../../../Features/BookingScreen/BookingData/DateStore";
|
import { useDateStore } from "../../../../Features/BookingScreen/BookingData/DateStore";
|
||||||
|
import BarCodeScan from "../../../../Services/BarCodeScan";
|
||||||
|
import { isMobile } from "react-device-detect";
|
||||||
|
|
||||||
const BSNavbarSearchStandard = ({ inputRef }) => {
|
const BSNavbarSearchStandard = ({ inputRef }) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
@ -147,6 +149,9 @@ const BSNavbarSearchStandard = ({ inputRef }) => {
|
||||||
const handleSearch = (e) => {
|
const handleSearch = (e) => {
|
||||||
dispatch(changeSearchedData(e?.target?.value));
|
dispatch(changeSearchedData(e?.target?.value));
|
||||||
};
|
};
|
||||||
|
const handleScan = (e) => {
|
||||||
|
dispatch(changeSearchedData(e));
|
||||||
|
};
|
||||||
const HandleVoiceSearch = () => {
|
const HandleVoiceSearch = () => {
|
||||||
setVoiceSearch(!voiceSearch);
|
setVoiceSearch(!voiceSearch);
|
||||||
};
|
};
|
||||||
|
|
@ -159,6 +164,13 @@ const BSNavbarSearchStandard = ({ inputRef }) => {
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
value={ProdName}
|
value={ProdName}
|
||||||
/>
|
/>
|
||||||
|
{isMobile && screenWidth <= 768 && (
|
||||||
|
<BarCodeScan
|
||||||
|
onScan={(value) => {
|
||||||
|
handleScan(value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue