Merge pull request 'Fix barcode and product master issues' (#87) from temp/barcode-and-product-master-fix into main

Reviewed-on: Pozomind/pozo-retail-app#87
This commit is contained in:
karthikalakshmi 2026-02-06 10:37:07 +05:30
commit 1d7944d28c
2 changed files with 1192 additions and 1165 deletions

View File

@ -1,4 +1,15 @@
export const style = `<style> export const style = `<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
margin: 0 !important;
padding: 0 !important;
height: auto;
}
.heading .heading
{ {
color: #1292EE; color: #1292EE;
@ -367,6 +378,8 @@ height: 149mm;
grid-template-columns: repeat(6, 15mm); grid-template-columns: repeat(6, 15mm);
width: 90mm; width: 90mm;
column-gap: 0.5mm; column-gap: 0.5mm;
align-items: center;
justify-content: center;
} }
.BarQrprint3 { .BarQrprint3 {
@ -546,7 +559,9 @@ height: 149mm;
grid-template-columns: repeat(3, 35mm); grid-template-columns: repeat(3, 35mm);
width: 105mm; width: 105mm;
column-gap: 0; column-gap: 0;
row-gap: 0;
padding: 0; padding: 0;
margin: 0;
} }
.barcode-wrapper-22x35 { .barcode-wrapper-22x35 {
@ -607,6 +622,7 @@ height: 149mm;
width: 105mm; width: 105mm;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.label-wrapper-22x35 { .label-wrapper-22x35 {
@ -761,9 +777,10 @@ height: 149mm;
display: grid; display: grid;
grid-template-columns: repeat(6, 15mm); grid-template-columns: repeat(6, 15mm);
width: 100%; width: 100%;
column-gap: 0.5mm; column-gap: 0;
row-gap: 0; row-gap: 0;
align-items: flex-start; align-items: center;
justify-content: center;
} }
.label-15x15-wrapper { .label-15x15-wrapper {
@ -778,12 +795,12 @@ height: 149mm;
} }
.label-15x15-content { .label-15x15-content {
width: 100%; width: 15mm;
height: 100%; height: 15mm;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: center;
text-align: center; text-align: center;
} }
@ -826,6 +843,11 @@ export const getPageStyle = (width) => `
size: ${width}mm auto; size: ${width}mm auto;
margin: 0; margin: 0;
} }
html, body {
margin: 0 !important;
padding: 0 !important;
}
} }
</style> </style>
`; `;

View File

@ -536,9 +536,15 @@ const ProductForm = ({ formType }) => {
}, [imageopen]); }, [imageopen]);
useEffect(() => { useEffect(() => {
if (
AppId !== undefined && AppId !== null &&
CompId !== undefined && CompId !== null &&
BranchId !== undefined && BranchId !== null
) {
productFetchData(); productFetchData();
fetchRackData(); fetchRackData();
}, []); }
}, [AppId, CompId, BranchId]);
useEffect(() => { useEffect(() => {
if (imageUrl == '') { if (imageUrl == '') {
@ -683,7 +689,7 @@ const ProductForm = ({ formType }) => {
// sree // sree
const productFetchData = async () => { const productFetchData = async () => {
const response = await dispatch( const response = await dispatch(
getProductData(AppId, BranchId, CompId) getProductData({ AppId, BranchId, CompId })
).unwrap(); ).unwrap();
setProductData(response?.data?.data); setProductData(response?.data?.data);
console.log(response, 'responseresponse'); console.log(response, 'responseresponse');
@ -2623,8 +2629,7 @@ const ProductForm = ({ formType }) => {
<div className="productonlineImg"> <div className="productonlineImg">
{imagedata?.map((item, index) => ( {imagedata?.map((item, index) => (
<div <div
className={`singleimg ${ className={`singleimg ${selectedImage === item ? 'selected' : ''
selectedImage === item ? 'selected' : ''
}`} }`}
key={index} key={index}
onClick={() => setSelectedImage(item)} onClick={() => setSelectedImage(item)}