bulk price change logic and Fix QR print issue - Gokul

This commit is contained in:
Vyshak Vasudevan Nair V 2026-01-28 15:59:11 +05:30
parent 81b3e4b84f
commit fa2b0bcabc
15 changed files with 11429 additions and 5126 deletions

11867
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,14 +39,14 @@
"history": "^5.3.0", "history": "^5.3.0",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"html2pdf": "^0.0.11", "html2pdf": "^0.0.11",
"html2pdf.js": "^0.10.3", "html2pdf.js": "^0.14.0",
"html5-qrcode": "^2.3.8", "html5-qrcode": "^2.3.8",
"jquery": "^3.7.1", "jquery": "^3.7.1",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"jsbarcode": "^3.11.6", "jsbarcode": "^3.11.6",
"jspdf": "^2.5.1", "jspdf": "^4.0.0",
"lucide-react": "^0.536.0", "lucide-react": "^0.536.0",
"material-ui": "^0.20.2", "material-ui": "^0.15.0",
"moment": "^2.30.1", "moment": "^2.30.1",
"mui-autocomplete": "^2.0.1", "mui-autocomplete": "^2.0.1",
"number-to-words": "^1.2.4", "number-to-words": "^1.2.4",
@ -58,7 +58,7 @@
"react-color": "^2.19.3", "react-color": "^2.19.3",
"react-countup": "^6.5.3", "react-countup": "^6.5.3",
"react-device-detect": "^2.2.3", "react-device-detect": "^2.2.3",
"react-devtools": "^5.2.0", "react-devtools": "^1.0.5",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-icons": "^4.12.0", "react-icons": "^4.12.0",
"react-image-crop": "^11.0.10", "react-image-crop": "^11.0.10",
@ -73,7 +73,7 @@
"recharts": "^3.5.0", "recharts": "^3.5.0",
"string-similarity": "^4.0.4", "string-similarity": "^4.0.4",
"tesseract.js": "^6.0.0", "tesseract.js": "^6.0.0",
"universal-cookie": "^6.1.3", "universal-cookie": "^8.0.1",
"webfontloader": "^1.6.28", "webfontloader": "^1.6.28",
"xlsx": "^0.18.5", "xlsx": "^0.18.5",
"zustand": "^5.0.8" "zustand": "^5.0.8"
@ -91,7 +91,7 @@
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"sass": "^1.77.2", "sass": "^1.77.2",
"terser": "^5.31.3", "terser": "^5.31.3",
"vite": "^4.5.3", "vite": "^7.3.1",
"vite-plugin-obfuscator": "^1.0.5", "vite-plugin-obfuscator": "^1.0.5",
"vite-plugin-remove-console": "^2.2.0" "vite-plugin-remove-console": "^2.2.0"
} }

Binary file not shown.

View File

@ -297,7 +297,7 @@ height: 149mm;
padding: 4px 4px; padding: 4px 4px;
border-radius: 6px; border-radius: 6px;
} }
.Qrcodeimage, // .Qrcodeimage,
// .Barcodeimage { // .Barcodeimage {
// display: flex; // display: flex;
// gap: 6px; // gap: 6px;
@ -341,61 +341,13 @@ height: 149mm;
// width: 100%; // width: 100%;
// justify-content: space-evenly; // justify-content: space-evenly;
// } // }
#25X502cross{
margin: 0 !important;
padding: 0 !important;
width: 101.6mm;
}
.Cross25X50container{
display: grid;
grid-template-columns: repeat(2, 50mm);
column-gap: 0.5mm;
width: 101.6mm;
}
#15X156cross{
margin: 0 !important;
padding: 0 !important;
}
#StickerPrints0{ #StickerPrints0{
width: 90mm; width: 90mm;
} }
.labelGrid15 {
width: 92mm;
}
@media print {
body {
margin: 0 !important;
padding: 0 !important;
}
}
.label15 {
width: 15mm;
height: 15mm;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.BarQrprint2details {
display: flex;
flex-direction: column;
align-items: center;
gap: 1mm;
font-size: 6px;
font-weight: 600;
text-align: center;
padding : 3px;
.productNameBQ,
.MRPBQ {
line-height: 1;
}
}
.Sticker1 { .Sticker1 {
width: 35mm; width: 35mm;
height: 22mm; height: 22mm;
@ -432,14 +384,6 @@ height: 149mm;
// 25x25 4 Cross Dummy // 25x25 4 Cross Dummy
.text-ellipsis {
width: 90%;
white-space: nowrap;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
}
@media print { @media print {
body { body {
margin: 0 !important; margin: 0 !important;
@ -579,6 +523,7 @@ height: 149mm;
height: auto; height: auto;
object-fit: contain; object-fit: contain;
} }
.product-id2 { .product-id2 {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -657,6 +602,205 @@ height: 149mm;
} }
// 22x35 3cross Dummy
#StickerPrints1 {
width: 105mm;
margin: 0;
padding: 0;
}
.label-wrapper-22x35 {
width: 35mm;
height: 22mm;
box-sizing: border-box;
padding: 1mm;
display: flex;
align-items: center;
justify-content: center;
gap : 0;
background: #fff;
}
.label-wrapper-22x35 p {
margin: 0;
padding: 0;
font-size: 10px;
font-weight: 600;
line-height: 1.1;
}
.label-wrapper-22x35 p:last-child {
margin-top: 2px;
font-size: 8px;
font-weight: 600;
}
.label-wrapper-22x35 img {
width: 14mm;
height: 14mm;
object-fit: contain;
}
// 25x50 2 Cross
#25X502cross {
margin: 0 !important;
padding: 0 !important;
width: 100mm;
}
.grid25x50_2cross {
display: grid;
grid-template-columns: repeat(2, 50mm);
width: 100mm;
column-gap: 0;
padding: 0;
}
.label25x50-wrapper {
width: 50mm;
height: 25mm;
box-sizing: border-box;
padding: 1.5mm;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.label25x50-name {
font-size: 10px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
.label25x50-mrp {
font-size: 9px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
.label25x50-container {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.label25x50-container img {
width: 16mm;
height: 16mm;
object-fit: contain;
}
// 25x50 2 Cross Dummy
#StickerPrints3 {
width: 100mm;
margin: 0;
padding: 0;
}
.label-25x50-content {
width: 50mm;
height: 25mm;
box-sizing: border-box;
padding: 1.5mm;
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
}
.label-25x50-content > div {
width: 60%;
display: flex;
flex-direction: column;
justify-content: center;
gap: 1mm;
font-weight: 600;
}
.label-25x50-content p {
margin: 0;
padding: 0;
font-size: 10px;
line-height: 1;
}
.label-25x50-content p:last-child {
font-size: 9px;
white-space: nowrap;
}
.label-25x50-content img {
width: 20mm; /* QR SAFE SIZE */
height: 20mm;
object-fit: contain;
}
// 15x15 6 Cross
#label-15X156cross {
width: 92mm;
margin: 0 !important;
padding: 0 !important;
}
.label-15x15-container {
display: grid;
grid-template-columns: repeat(6, 15mm);
width: 100%;
column-gap: 0.5mm;
row-gap: 0;
align-items: flex-start;
}
.label-15x15-wrapper {
width: 15mm;
height: 15mm;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.label-15x15-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
text-align: center;
}
.label-15x15-name,
.label-15x15-mrp {
font-size: 6px;
white-space: nowrap;
}
.label-15x15-wrapper img {
width: 7.5mm;
height: 7.5mm;
object-fit: contain;
}
.text-ellipsis { .text-ellipsis {
width: 90%; width: 90%;
white-space: nowrap; white-space: nowrap;
@ -664,6 +808,15 @@ height: 149mm;
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.text-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.1;
max-height: 2.8em;
}
</style>`; </style>`;
export const getPageStyle = (width) => ` export const getPageStyle = (width) => `

View File

@ -1951,8 +1951,8 @@ const ProductList = () => {
switch (dropdownValue) { switch (dropdownValue) {
case '15X15 6cross': // COMPLETE case '15X15 6cross': // COMPLETE
await printDiv( await printDiv(
templateAvailable ? '15X156cross' : 'StickerPrints0', templateAvailable ? 'label-15X156cross' : 'StickerPrints0',
style + getPageStyle(92) (style + getPageStyle(92))
); );
handleQRStickerPrinterModelCancel(); handleQRStickerPrinterModelCancel();
break; break;
@ -1973,7 +1973,7 @@ const ProductList = () => {
case '25X50 2cross': //Need to check case '25X50 2cross': //Need to check
await printDiv( await printDiv(
templateAvailable ? '25X502cross' : 'StickerPrints3', templateAvailable ? '25X502cross' : 'StickerPrints3',
style style + getPageStyle(100)
); );
handleQRStickerPrinterModelCancel(); handleQRStickerPrinterModelCancel();
break; break;
@ -4036,12 +4036,12 @@ const ProductList = () => {
const copyCount = generateQRCodeCopy(record?.QRCode); const copyCount = generateQRCodeCopy(record?.QRCode);
return Array?.from({ length: copyCount })?.map((_, copyIndex) => ( return Array?.from({ length: copyCount })?.map((_, copyIndex) => (
<div <div
className="Sticker1" className="label-wrapper-22x35"
key={`sticker1-${recordIndex}-${copyIndex}`} key={`sticker1-${recordIndex}-${copyIndex}`}
> >
<div style={{ width: '60%' }}> <div style={{ width: '60%' }}>
<p <p
className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 8 ? 'text-ellipsis' : ''}`} className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 8 ? 'text-clamp-2' : ''}`}
> >
{record.ProdName} ({record.Size} {record.ProdName} ({record.Size}
{record.UomName}) {record.UomName})
@ -4055,15 +4055,14 @@ const ProductList = () => {
templateOptions?.codeType templateOptions?.codeType
) || base64Image ) || base64Image
} }
style={{ width: '52px', height: '52px' }}
/> />
</div> </div>
)) ))
} }
) )
: Array?.from({ length: copies })?.map((_, index) => ( : Array?.from({ length: copies })?.map((_, index) => (
<div className="Sticker1" key={`sticker1-${index}`}> <div className="label-wrapper-22x35" key={`sticker1-${index}`}>
<div style={{ width: '60%' }}> <div style={{ width: '19mm' }}>
<p <p
className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 8 ? 'text-ellipsis' : ''}`} className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 8 ? 'text-ellipsis' : ''}`}
> >
@ -4073,7 +4072,6 @@ const ProductList = () => {
</div> </div>
<img <img
src={base64Image} src={base64Image}
style={{ width: '16mm', height: '16mm' }}
/> />
</div> </div>
))} ))}
@ -4191,19 +4189,19 @@ const ProductList = () => {
</div> </div>
</div> </div>
<div id="StickerPrints3"> <div id="StickerPrints3">
<div className="container"> <div className="grid25x50_2cross">
{selectedRecords?.length > 0 {selectedRecords?.length > 0
? selectedRecords?.map((record, recordIndex) => { ? selectedRecords?.map((record, recordIndex) => {
const copyCount = generateQRCodeCopy(record?.QRCode); const copyCount = generateQRCodeCopy(record?.QRCode);
console.log(copyCount, 'copyCount3') console.log(copyCount, 'copyCount3')
return Array.from({ length: copyCount })?.map((_, copyIndex) => ( return Array.from({ length: copyCount })?.map((_, copyIndex) => (
<div <div
className="Sticker3" className="label-25x50-content"
key={`sticker3-${recordIndex}-${copyIndex}`} key={`sticker3-${recordIndex}-${copyIndex}`}
> >
<div> <div>
<p <p
className={`${nickName ? '' : ((record?.NickName || record?.ProdName) + ' (' + record?.Size + ')')?.length > 12 ? 'text-ellipsis' : ''}`} className={`${nickName ? '' : ((record?.NickName || record?.ProdName) + ' (' + record?.Size + ')')?.length > 12 ? 'text-clamp-2' : ''}`}
> >
{record?.NickName || record?.ProdName} ({record?.Size} {record?.NickName || record?.ProdName} ({record?.Size}
{record?.UomName}) {record?.UomName})
@ -4223,10 +4221,10 @@ const ProductList = () => {
)) ))
}) })
: Array.from({ length: copies })?.map((_, index) => ( : Array.from({ length: copies })?.map((_, index) => (
<div className="Sticker3" key={`sticker3-${index}`}> <div className="label-25x50-content" key={`sticker3-${index}`}>
<div> <div>
<p <p
className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 12 ? 'text-ellipsis' : ''}`} className={`${nickName ? '' : (proName + ' (' + size + ')')?.length > 12 ? 'text-clamp-2' : ''}`}
> >
{proName} ({size}) {proName} ({size})
</p> </p>
@ -4234,7 +4232,6 @@ const ProductList = () => {
</div> </div>
<img <img
src={base64Image} src={base64Image}
style={{ width: '75px', height: '75px' }}
/> />
</div> </div>
))} ))}
@ -4896,31 +4893,30 @@ const ProductList = () => {
</div> </div>
<div id="25X502cross"> <div id="25X502cross">
<div className="Cross25X50container"> <div className="grid25x50_2cross">
{selectedRecords?.length > 0 {selectedRecords?.length > 0
? selectedRecords?.map((record, recordIndex) => { ? selectedRecords?.map((record, recordIndex) => {
const copyCount = generateQRCodeCopy(record?.QRCode); const copyCount = generateQRCodeCopy(record?.QRCode);
return Array.from({ length: copyCount })?.map((_, copyIndex) => ( return Array.from({ length: copyCount })?.map((_, copyIndex) => (
<div <div
className="BarQrprint8" className="label25x50-wrapper"
key={`Barcode2-${recordIndex}-${copyIndex}`} key={`Barcode2-${recordIndex}-${copyIndex}`}
style={{ width: '100%' }}
> >
<div className="Barcodeimage" style={valueStyleColumn}> <div className="label25x50-container" style={valueStyleColumn}>
{imageTagBarcodeAndQR( {imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '90%' : '35%', templateOptions.codeType === 'B' ? '45mm' : '16mm',
'6px', '6px',
record?.QRCode || record?.ProdId record?.QRCode || record?.ProdId
)} )}
{templateOptions.productName && ( {templateOptions.productName && (
<div <div
className={`productNameBQ ${record?.NickName ? '' : record?.ProdName?.length > 12 ? 'text-ellipsis' : ''}`} className={`label25x50-name ${record?.NickName ? '' : record?.ProdName?.length > 12 ? 'text-ellipsis' : ''}`}
> >
{record?.NickName || record?.ProdName} {record?.NickName || record?.ProdName}
</div> </div>
)} )}
{templateOptions.mrp && ( {templateOptions.mrp && (
<div className="MRPBQ">{'MRP : ' + record?.MRP}</div> <div className="label25x50-mrp">{'MRP : ' + record?.MRP}</div>
)} )}
</div> </div>
</div> </div>
@ -4930,23 +4926,22 @@ const ProductList = () => {
) )
: Array.from({ length: copies })?.map((_, index) => ( : Array.from({ length: copies })?.map((_, index) => (
<div <div
className="BarQrprint8" className="label25x50-wrapper"
key={`Barcode2-${index}`} key={`Barcode2-${index}`}
style={{ width: '100%' }}
> >
<div className="Barcodeimage" style={valueStyleColumn}> <div className="label25x50-container" style={valueStyleColumn}>
{imageTagBarcodeAndQR( {imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '90%' : '35%' templateOptions.codeType === 'B' ? '45mm' : '16mm'
)} )}
{templateOptions.productName && ( {templateOptions.productName && (
<div <div
className={`productNameBQ ${nickName ? '' : proName?.length > 12 ? 'text-ellipsis' : ''}`} className={`label25x50-name ${nickName ? '' : proName?.length > 12 ? 'text-ellipsis' : ''}`}
> >
{proName} {proName}
</div> </div>
)} )}
{templateOptions.mrp && ( {templateOptions.mrp && (
<div className="MRPBQ">{'MRP : ' + detail?.MRP}</div> <div className="label25x50-mrp">{'MRP : ' + detail?.MRP}</div>
)} )}
</div> </div>
</div> </div>
@ -5433,107 +5428,29 @@ const ProductList = () => {
</div> </div>
</div> </div>
<div id="15X156cross"> <div id="label-15X156cross">
<div <div
className="labelGrid15" className="label-15x15-container"
style={{
display: 'grid',
gridTemplateColumns: '1fr 1fr 1fr 1fr 1fr 1fr',
width: '100%',
}}
> >
{selectedRecords?.length > 0 {selectedRecords?.length > 0
? selectedRecords?.map((record, recordIndex) => { ? selectedRecords?.map((record, recordIndex) => {
const copyCount = generateQRCodeCopy(record?.QRCode); const copyCount = generateQRCodeCopy(record?.QRCode);
return Array.from({ length: copyCount })?.map((_, copyIndex) => ( return Array.from({ length: copyCount })?.map((_, copyIndex) => (
<div <div className="label-15x15-content" key={`Barcode8-${recordIndex}-${copyIndex}`}>
className="label15"
key={`Barcode8-${recordIndex}-${copyIndex}`}
>
<div className="BarQrprint2details alignCenterFlexDirectionColumn">
{templateOptions.value === 'T' &&
imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '50%',
'6px',
record?.QRCode || record?.ProdId
)}
{templateOptions.productName && (
<div
style={{
textAlign: 'center',
fontSize: '6px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
width: '90%',
}}
className="productNameBQ"
>
{record?.NickName
? record?.NickName
: record?.ProdName}
</div>
)}
{templateOptions.value === 'C' &&
imageTagBarcodeAndQR(
templateOptions.codeType === 'B'
? '80%'
: !templateOptions.productName &&
!templateOptions.mrp
? '80%'
: '35%',
'6px',
record?.QRCode || record?.ProdId
)}
{templateOptions.mrp && (
<div
style={{
width: '100%',
textAlign: 'center',
fontSize: '6px',
}}
className="MRPBQ"
>
{'₹:' + record?.MRP}
</div>
)}
{templateOptions.value === 'B' &&
imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '50%',
'6px',
record?.QRCode || record?.ProdId
)}
</div>
</div>
))
}
)
: Array.from({ length: copies })?.map((_, index) => (
<div className="label15" key={`Barcode8-${index}`}>
<div className="BarQrprint2details alignCenterFlexDirectionColumn">
{templateOptions.value === 'T' && {templateOptions.value === 'T' &&
imageTagBarcodeAndQR( imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '50%' templateOptions.codeType === 'B' ? '100%' : '6mm',
'6px',
record?.QRCode || record?.ProdId
)} )}
{templateOptions.productName && ( {templateOptions.productName && (
<div <div
style={{ className={`label-15x15-name ${record?.NickName ? '' : (record?.ProdName)?.length > 12 ? 'text-ellipsis' : ''}`}
textAlign: 'center',
fontSize: '6px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
width: '90%',
}}
className={`productNameBQ ${nickName ? '' : proName?.length > 12 ? 'text-ellipsis' : ''}`}
> >
{nickName {record?.NickName
? nickName ? record?.NickName
: proName : record?.ProdName}
? proName
: 'Product Name'}
</div> </div>
)} )}
{templateOptions.value === 'C' && {templateOptions.value === 'C' &&
@ -5543,7 +5460,9 @@ const ProductList = () => {
: !templateOptions.productName && : !templateOptions.productName &&
!templateOptions.mrp !templateOptions.mrp
? '80%' ? '80%'
: '35%' : '35%',
'6px',
record?.QRCode || record?.ProdId
)} )}
{templateOptions.mrp && ( {templateOptions.mrp && (
<div <div
@ -5554,14 +5473,54 @@ const ProductList = () => {
}} }}
className="MRPBQ" className="MRPBQ"
> >
{'₹:' + (detail?.MRP ? detail?.MRP : 10.0)} {'₹:' + record?.MRP}
</div> </div>
)} )}
{templateOptions.value === 'B' && {templateOptions.value === 'B' &&
imageTagBarcodeAndQR( imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '50%' templateOptions.codeType === 'B' ? '100%' : '50%',
'6px',
record?.QRCode || record?.ProdId
)} )}
</div> </div>))
})
: Array.from({ length: copies })?.map((_, index) => (
<div className="label-15x15-content" key={`Barcode8-${index}`}>
{templateOptions.value === 'T' &&
imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '6mm'
)}
{templateOptions.productName && (
<div
className={`label-15x15-name ${nickName ? '' : proName?.length > 12 ? 'text-ellipsis' : ''}`}
>
{nickName
? nickName
: proName
? proName
: 'Product Name'}
</div>
)}
{templateOptions.value === 'C' &&
imageTagBarcodeAndQR(
(templateOptions.codeType === 'B'
? '80%'
: (!templateOptions.productName &&
!templateOptions.mrp)
? '80%'
: '7.5mm'), '5px'
)}
{templateOptions.mrp && (
<div
className="label-15x15-mrp"
>
{'₹:' + (detail?.MRP ? detail?.MRP : 10.0)}
</div>
)}
{templateOptions.value === 'B' &&
imageTagBarcodeAndQR(
templateOptions.codeType === 'B' ? '100%' : '7.5mm'
)}
</div> </div>
))} ))}
</div> </div>
@ -5630,7 +5589,6 @@ const ProductList = () => {
</div> </div>
)) ))
} }
) )
: Array.from({ length: copies })?.map((_, index) => ( : Array.from({ length: copies })?.map((_, index) => (
<div <div
@ -5689,7 +5647,7 @@ const ProductList = () => {
))} ))}
</div> </div>
</div> </div>
</div > </div>
<DefaultModal <DefaultModal
open={openExcel} open={openExcel}
title="Bulk Upload" title="Bulk Upload"
@ -6032,7 +5990,7 @@ const ProductList = () => {
isVisible={isOCRProcessing.Loader} isVisible={isOCRProcessing.Loader}
imageCount={isOCRProcessing.Length || 1} imageCount={isOCRProcessing.Length || 1}
/> />
</div > </div>
); );
}; };

View File

@ -35,6 +35,7 @@ import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx';
import { Tables } from '../../Components/Tables/Table.jsx'; import { Tables } from '../../Components/Tables/Table.jsx';
import { InputField } from '../../Components/Forms/InputField.jsx'; import { InputField } from '../../Components/Forms/InputField.jsx';
import TextAreaInput from '../../Components/Forms/TextArea.jsx'; import TextAreaInput from '../../Components/Forms/TextArea.jsx';
import { uploadImage } from '../../Features/upload/upload.js';
const { Option } = Select; const { Option } = Select;
const { Column } = Table; const { Column } = Table;
@ -43,7 +44,7 @@ const CameraModal = ({
visible, visible,
onClose, onClose,
onCapture, onCapture,
setCameraModalVisible = () => {}, setCameraModalVisible = () => { },
}) => { }) => {
const videoRef = useRef(null); const videoRef = useRef(null);
const canvasRef = useRef(null); const canvasRef = useRef(null);
@ -250,12 +251,12 @@ const CameraModal = ({
const ScanModal = ({ const ScanModal = ({
visible = false, visible = false,
onClose = () => {}, onClose = () => { },
onSubmit = () => {}, onSubmit = () => { },
handleUpload = () => {}, handleUpload = () => { },
processingStep = null, processingStep = null,
ocrLoading = false, ocrLoading = false,
handleClearImage = () => {}, handleClearImage = () => { },
uploadedImage = null, uploadedImage = null,
selectedFile = null, selectedFile = null,
}) => { }) => {
@ -487,7 +488,7 @@ const InvoiceImageExtractorModal = ({
productData = [], productData = [],
supplierData = [], supplierData = [],
uomData = [], uomData = [],
setVisible = () => {}, setVisible = () => { },
}) => { }) => {
const extractedTableRef = useRef(null); const extractedTableRef = useRef(null);
const [form] = Form.useForm(); const [form] = Form.useForm();
@ -641,7 +642,7 @@ const InvoiceImageExtractorModal = ({
if (uploadedImage) { if (uploadedImage) {
try { try {
URL.revokeObjectURL(uploadedImage); URL.revokeObjectURL(uploadedImage);
} catch {} } catch { }
setUploadedImage(null); setUploadedImage(null);
} }
}; };
@ -723,6 +724,7 @@ const InvoiceImageExtractorModal = ({
const data = response.data[0]; const data = response.data[0];
setExtractedText(JSON.stringify(data, null, 2)); setExtractedText(JSON.stringify(data, null, 2));
setParsedData(data); setParsedData(data);
const uploadImgData = await dispatch(uploadImage(fileToProcess)).unwrap();
const supplierInfo = { const supplierInfo = {
name: form.getFieldValue('supplierName') || data?.supplier || '', name: form.getFieldValue('supplierName') || data?.supplier || '',
@ -770,7 +772,7 @@ const InvoiceImageExtractorModal = ({
mergedProducts?.map((item, index) => ({ mergedProducts?.map((item, index) => ({
...item, ...item,
srNo: index + 1, srNo: index + 1,
image: item?.image ? item?.image : response?.file, image: item?.image ? item?.image : (uploadImgData?.data?.status ? uploadImgData?.data?.image : null),
})) }))
); );
SetTotalAmtData( SetTotalAmtData(

View File

@ -2,7 +2,7 @@ import { useState, useEffect, useCallback } from 'react';
import { useNavigate, useLocation } from 'react-router-dom'; import { useNavigate, useLocation } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
import { PlusOutlined, EyeOutlined } from '@ant-design/icons'; import { PlusOutlined, EyeOutlined } from '@ant-design/icons';
import { Table } from 'antd'; import { Image, Table } from 'antd';
import { import {
changeBreadCrumb, changeBreadCrumb,
getEmpAccess, getEmpAccess,
@ -95,6 +95,9 @@ const StockList = () => {
const [ImeiSerialModal, setImeiSerialModal] = useState(false); const [ImeiSerialModal, setImeiSerialModal] = useState(false);
const [allowDecimal, setAllowDecimal] = useState(false); const [allowDecimal, setAllowDecimal] = useState(false);
const [PurcProddetail, setPrucProddetail] = useState([]); const [PurcProddetail, setPrucProddetail] = useState([]);
const [productImageDetails, setProductImageDetails] = useState([]);
const [imageModal, setImageModal] = useState(false);
const [currentImageIndex, setCurrentImageIndex] = useState(0);
const [IMEISeriandata, setIMEISeriandata] = useState([]); const [IMEISeriandata, setIMEISeriandata] = useState([]);
useEffect(() => { useEffect(() => {
try { try {
@ -189,6 +192,21 @@ const StockList = () => {
setPrucProddetail(proddetails); setPrucProddetail(proddetails);
setProddtlModal(true); setProddtlModal(true);
}; };
const viewImages = (imageDetails) => {
setProductImageDetails(imageDetails);
setCurrentImageIndex(0);
setImageModal(true);
};
const handlePrevImage = () => {
setCurrentImageIndex(prev => prev > 0 ? prev - 1 : productImageDetails.length - 1);
};
const handleNextImage = () => {
setCurrentImageIndex(prev => prev < productImageDetails.length - 1 ? prev + 1 : 0);
};
const handleProductmodalCancel = () => { const handleProductmodalCancel = () => {
setPrucProddetail([]); setPrucProddetail([]);
setProddtlModal(false); setProddtlModal(false);
@ -196,6 +214,11 @@ const StockList = () => {
const handleIMEISerialmodalCancel = () => { const handleIMEISerialmodalCancel = () => {
setImeiSerialModal(false); setImeiSerialModal(false);
}; };
const handleImageClose = () => {
setImageModal(false);
setProductImageDetails([]);
setCurrentImageIndex(0);
}
// WRITED BY SREE // WRITED BY SREE
function safeRound(amountStr) { function safeRound(amountStr) {
if (amountStr == null) return allowDecimal ? '0.00' : '0'; if (amountStr == null) return allowDecimal ? '0.00' : '0';
@ -293,6 +316,24 @@ const StockList = () => {
/> />
), ),
}, },
{
title: 'Image',
key: 'ImageDetails',
dataIndex: 'ImageDetails',
align: 'center',
render: (data, record) => {
if (data?.length > 0) {
return <IoEye
style={{ color: '#1292EE', fontSize: '25px', cursor: 'pointer' }}
onClick={() => viewImages(data)}
/>
} else {
return <p>-</p>
}
}
,
}
]; ];
const Proddetailcolumns = [ const Proddetailcolumns = [
{ {
@ -856,6 +897,52 @@ const StockList = () => {
</div> </div>
} }
/> />
<DefaultModal
open={imageModal}
title="Uploaded Image"
handleCancel={handleImageClose}
footer={false}
width={600}
className={'padding-less-modal'}
children={
<div >
{productImageDetails?.length > 0 && (
<div className='image-preview'>
{productImageDetails.length > 1 && (
<>
<button
onClick={handlePrevImage}
className='image-preview__nav-btn'
>
<FaAngleLeft />
</button>
</>
)}
<div className='image-preview__content'>
<Image
src={productImageDetails[currentImageIndex]?.ImageUrl}
alt="Preview"
style={{ maxWidth: '100%', maxHeight: '400px', objectFit: 'contain' }}
/>
</div>
{productImageDetails.length > 1 && (
<>
<button
onClick={handleNextImage}
className='image-preview__nav-btn'
>
<FaAngleRight />
</button>
</>
)}
</div>
)}
<div style={{ marginTop: '10px', color: '#666', textAlign: 'center', fontFamily: 'Poppins' }}>
{currentImageIndex + 1} of {productImageDetails.length}
</div>
</div>
}
/>
</div> </div>
); );
}; };

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
border: none; border: none;
} }
.subinputForm .ant-input-affix-wrapper > input.ant-input { .subinputForm .ant-input-affix-wrapper>input.ant-input {
font-size: inherit; font-size: inherit;
border: none; border: none;
padding: 18px 14px 6px 1px !important; padding: 18px 14px 6px 1px !important;
@ -87,6 +87,7 @@
letter-spacing: -0.3px; letter-spacing: -0.3px;
} }
} }
.EmpDOJMain { .EmpDOJMain {
.ant-picker-input { .ant-picker-input {
input::placeholder { input::placeholder {
@ -94,3 +95,61 @@
} }
} }
} }
.image-preview__content {
background-color: #f5f5f5;
margin: 1rem;
border: 2px solid #dfdfdf;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 1rem;
border-radius: 4px;
img {
width: 100%;
height: 90%;
}
}
.image-preview {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.image-preview__nav-btn {
border: none;
outline: none;
width: 40px;
height: 40px;
display: flex;
align-items: center;
cursor: pointer;
justify-content: center;
border-radius: 10pc;
background-color: #acacac;
color: #fff;
font-size: 18px;
transition: all 0.3s;
&:hover {
background-color: #979797;
transform: scale(1.05);
}
&:active {
background-color: #5e5e5e;
}
}
.padding-less-modal {
.ant-modal-content {
padding: 34px !important;
}
}

View File

@ -811,6 +811,11 @@
} }
.pricechangeTable { .pricechangeTable {
width: 83vw;
scrollbar-width: thin;
overflow-x: auto;
overflow-y: auto;
.ant-input { .ant-input {
padding: 4px 11px 4px 11px !important; padding: 4px 11px 4px 11px !important;
width: 80px !important; width: 80px !important;
@ -1337,6 +1342,12 @@ table {
width: 100%; width: 100%;
} }
.pricechangedata {
width: 100%;
overflow: auto;
scrollbar-width: thin;
}
.ProductList-pwiseQrcode { .ProductList-pwiseQrcode {
height: max-content !important; height: max-content !important;
max-height: 70vh; max-height: 70vh;

View File

@ -30,51 +30,70 @@
border-radius: 4px; border-radius: 4px;
font-family: 'Poppins'; font-family: 'Poppins';
font-size: 16px; font-size: 16px;
svg { svg {
margin-top: -2px; margin-top: -2px;
font-size: 20px; font-size: 20px;
display: flex; display: flex;
} }
&.is-loading {
cursor: not-allowed;
opacity: 0.7;
pointer-events: none;
background-color: #9ca3af;
}
} }
.tableExcelUpload { .tableExcelUpload {
.ant-table-cell { .ant-table-cell {
padding: 0 8px !important; padding: 0 8px !important;
} }
.ant-select-selection-placeholder { .ant-select-selection-placeholder {
padding-inline-end: 16px !important; padding-inline-end: 16px !important;
} }
.ant-table-thead { .ant-table-thead {
th { th {
text-align: left; text-align: left;
vertical-align: baseline; vertical-align: baseline;
} }
} }
thead { thead {
height: 100px !important; height: 100px !important;
} }
th { th {
height: 100px !important; height: 100px !important;
} }
.ant-select { .ant-select {
width: 150px !important; width: 150px !important;
} }
.ant-select-selection-item { .ant-select-selection-item {
padding-inline-end: 14px !important; padding-inline-end: 14px !important;
} }
.ant-select-selector { .ant-select-selector {
height: 40px !important; height: 40px !important;
} }
.ant-select-selection-item { .ant-select-selection-item {
font-size: 12px !important; font-size: 12px !important;
} }
.ant-upload-select { .ant-upload-select {
height: 50px !important; height: 50px !important;
width: 85px !important; width: 85px !important;
} }
.uploadText { .uploadText {
margin-top: 0 !important; margin-top: 0 !important;
} }
.ant-upload-picture-card-wrapper { .ant-upload-picture-card-wrapper {
border-spacing: 0 !important; border-spacing: 0 !important;
} }

View File

@ -1,136 +1,829 @@
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; export const style = `<style>
import { axiosRetailInstanceData } from '../../AuthenicationToken/AuthenticationToken'; .heading
{
color: #1292EE;
}
.container
{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.barcode
{
font-family:'Libre Barcode 39';
font-size: 4px;
}
.Sticker0
{
padding: 1px 5px 0px 7px;
width:15mm;
height:15mm;
text-align: center;
font-size: 6px;
//border:1px solid black;
font-weight: bold;
}
// .Sticker1
// {
// padding:0px 5px 0px 5px ;
// width:35mm;
// height:22mm;
// text-align: center;
// font-size: 9px;
// display:flex;
// flex-direction:row;
// font-weight: bold;
// }
.Sticker2
{
padding: 0px 5px 0px 5px;
width:80px;
height:80px;
text-align: center;
font-size: 10px;
margin-top:-3px;
}
export const getAddCustomerDetails = createAsyncThunk(
'addCustomer/getAddCustomerDetails',
async (data) => { .Sticker3
if ( {
data?.MobileNo != null && padding: 5px;
data?.MobileNo != undefined && width:170px;
data?.AppId != null && height:86px;
data?.AppId != undefined && text-align: center;
data?.CompId != null && font-size: 12px;
data?.CompId != undefined && display:flex;
data?.BranchId != null && flex-direction:row;
data?.BranchId != undefined font-weight: bold;
) { }
return await axiosRetailInstanceData.get( .Sticker4{
`/customer?MobileNo=${data?.MobileNo}&AppId=${data?.AppId}&CompId=${data?.CompId}&BranchId=${data?.BranchId}` padding: 0px 5px 0px 5px;
); width:180px;
height:86px;
text-align: center;
font-size: 12px;
display:flex;
flex-direction:row;
font-weight: bold;
}
.Sticker5{
padding: 0px 5px 0px 5px;
width:180px;
height:86px;
text-align: center;
font-size: 12px;
display:flex;
flex-direction:row;
font-weight: bold;
}
.Sticker6 {
display: flex;
align-items: center;
justify-content: space-between;
width: 55mm;
height: auto;
// padding: 5px;
font-size: 8px;
font-weight: bold;
}
.text-section6 {
flex: 1;
text-align: left;
}
.Sticker7 {
display: flex;
align-items: center;
justify-content: space-between;
width: 70mm;
height: auto;
font-size: 8px;
font-weight: bold;
}
.text-section7 {
flex: 1;
text-align: left;
}
.OverAllSticker8{
height: 149mm;
}
.Sticker8 {
display: flex;
justify-content: space-between;
width: 100mm;
height: 149mm;
font-size: 16px;
font-weight: bold;
}
.text-section8 {
flex: 1;
text-align: left;
width: 50%;
}
.StikerBr8{
text-align: center;
font-size: 16px;
font-weight: bold;
display: flex;
justify-content:center;
align-items: center;
width:100%;
}
.text-section8 .field-value {
flex: 1;
text-align: right;
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
}
.BarQrprint5 {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
gap: 6px;
width: 56.692896px;
height: 56.692896px;
background-color: #fff;
padding: 1px 4px;
border-radius: 6px;
flex-direction: row-reverse;
>img{
width:80%;
height:50px;
} }
} }
);
export const postAddCustomerDetails = createAsyncThunk( .BarQrprint4 {
'addCustomer/postAddCustomerDetails', width: 35mm;
async (postData) => { height: 22mm;
return await axiosRetailInstanceData.post(`/customer`, postData);
}
);
export const postRePrintReason = createAsyncThunk( box-sizing: border-box;
'rePrint/postRePrintReason', padding: 1mm;
async (postData) => {
return await axiosRetailInstanceData.post(`/rePrint`, postData);
}
);
export const postDefaultReprintReason = createAsyncThunk(
'rePrint/postDefaultReprintReason',
async (postData) => {
return await axiosRetailInstanceData.post(`/DefaultStatusReprint`, postData);
}
);
export const getRePrintDefault = createAsyncThunk(
'rePrint/getRePrintDefault',
async (data) => {
return await axiosRetailInstanceData.get(`/ReprintHistoryStatus?compId=${data.CompId}&branchId=${data.BranchId}&appId=${data.AppId}&Type=${data?.Type ? data?.Type : 'Reprint'}`);
}
);
export const getDefaultPaymentOptions = createAsyncThunk( display: flex;
'rePrint/getDefaultPaymentOptions', align-items: center;
async (data) => { justify-content: center;
return await axiosRetailInstanceData.get(`/ReprintHistoryStatus?compId=${data.CompId}&branchId=${data.BranchId}&appId=${data.AppId}&Type=PaymentOptions`);
}
);
export const getRePrintReason = createAsyncThunk( background: #fff;
'rePrint/getRePrintReason', border-radius: 0; /* IMPORTANT for printers */
async (data) => {
if ( .productNameBQSmall{
data?.orderFromDate != null && font-size: 9px;
data?.orderFromDate != undefined && }
data?.orderToDate != null && }
data?.orderToDate != undefined &&
data?.appId != null && // .BarQrprint3 {
data?.appId != undefined && // display: flex;
data?.compId != null && // align-items: center;
data?.compId != undefined && // justify-content: center;
data?.branchId != null && // gap: 6px;
data?.branchId != undefined // width: 80px;
) { // height: 80px;
return await axiosRetailInstanceData.get( // background-color: #fff;
`/ReprintHistory?compId=${data.compId}&branchId=${data.branchId}&appId=${data.appId}&fromDate=${data.orderFromDate}&toDate=${data.orderToDate}` // padding: 0px 4px;
); // border-radius: 6px;
// flex-direction: row-reverse;
// }
.BarQrprint8 {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: 50mm;
height: 25mm;
background-color: #fff;
padding: 0px 4px;
border-radius: 6px;
}
.Barcodeimage {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
img {
width: 50%;
object-fit: contain;
} }
}
);
export const ReprintDetails = createAsyncThunk( .MRPBQ{
"addCustomer/ReprintDetails", font-size: 10px;
async (data) => {
const { AppId, CompId, BranchId, OrderFromDate, OrderToDate, OrderId } = data || {};
if (OrderId && !OrderFromDate && !OrderToDate) {
return await axiosRetailInstanceData.get(
`/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&OrderId=${OrderId}&pageNumber=${data.PageNumber}`
);
} }
if (OrderFromDate && OrderToDate) { }
return await axiosRetailInstanceData.get(
`/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&orderFromDate=${OrderFromDate}&orderToDate=${OrderToDate} &pageNumber=${data.PageNumber}` .BarQrprint6 {
); display: flex;
} else { align-items: center;
return await axiosRetailInstanceData.get( justify-content: center;
`/reprint?CompId=${CompId}&BranchId=${BranchId}&AppId=${AppId}&pageNumber=${data.PageNumber}` gap: 6px;
); width: 100%;
height: 86px;
background-color: #fff;
padding: 0px 2px;
border-radius: 6px;
.MandateBQ,
.ExpdateBQ{
font-size: 10px;
}
.MRPBQ{
font-size: 12px;
}
}
.BarQrprint2 {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: 180px;
height: 86px;
background-color: #fff;
padding: 0px 4px;
border-radius: 6px;
flex-direction: row-reverse;
.productNameBQ,
.MandateBQ{
font-size: 10px;
} }
}
);
.BarQrprint1details{
gap: 6px;
const initialState = { }
AddCustomerDetails: [], }
refreshTrigger: 0, .BarQrprint9 {
}; .BarQrprint1details1 {
display: flex;
const addCustomer = createSlice({ flex-direction: column;
name: 'addCustomer', gap: 2px;
initialState, font-size: 10px;
reducers: { text-transform: capitalize;
changeCustomerdetails: (state, action) => { font-weight: 600;
state.AddCustomerDetails = action?.payload; align-items: center;
}, width: 100%;
triggerCustomerRefresh: (state) => {
state.refreshTrigger += 1;
},
},
extraReducers: (builder) => {
builder.addCase(getAddCustomerDetails.fulfilled, (state, action) => {
if (action?.payload?.status) {
state.AddCustomerDetails = action?.payload?.data?.data;
} else {
state.AddCustomerDetails = [];
} }
}); }
}, .BarQrprint1 {
}); display: flex;
export const { changeCustomerdetails, triggerCustomerRefresh } = addCustomer.actions; align-items: center;
justify-content: space-between;
gap: 6px;
width: 70mm;
background-color: #fff;
padding: 2px 4px;
border-radius: 6px;
export const GlobalAddCustomerDetails = (state) => }
state.addCustomer?.AddCustomerDetails; .BarQrprint7 {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
width: 100mm;
height: 149mm;
background-color: #fff;
padding: 4px 4px;
border-radius: 6px;
}
// .Qrcodeimage,
// .Barcodeimage {
// display: flex;
// gap: 6px;
// align-items: center;
export const GlobalCustomerRefreshTrigger = (state) => // >img {
state.addCustomer?.refreshTrigger; // width:50%;
// object-fit: cover;
// }
// }
.BarQrprint1details {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
font-size: 12px;
text-transform: capitalize;
font-weight: 600;
width: 100%;
}
.flexDirection {
flex-direction: column
}
export default addCustomer.reducer; .printingstickermain{
display: flex;
align-items: flex-start;
gap: 6px;
flex-wrap: wrap;
width: 100%;
flex-direction: row;
}
// .container{
// display: flex;
// gap: 6px;
// align-items: flex-start;
// flex-wrap: wrap;
// width: 100%;
// justify-content: space-evenly;
// }
#StickerPrints0{
width: 90mm;
}
.Sticker1 {
width: 35mm;
height: 22mm;
padding-left: 2mm;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 9px;
font-weight: bold;
}
.grid15x15_6cross {
display: grid;
grid-template-columns: repeat(6, 15mm);
width: 90mm;
column-gap: 0.5mm;
}
.BarQrprint3 {
width: 25mm;
height: 25mm;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
border-radius: 0; /* IMPORTANT for thermal printers */
}
// 25x25 4 Cross Dummy
@media print {
body {
margin: 0 !important;
padding: 0 !important;
}
img {
display: block !important;
visibility: visible !important;
}
}
// 25x25 4Cross
#25X254cross {
width: 100mm;
margin: 0 !important;
padding: 0 !important;
}
.grid25x25_4cross {
display: grid;
grid-template-columns: repeat(4, 25mm);
width: 100mm;
column-gap: 0;
}
.barcode-wrapper-25x25 {
width: 25mm;
height: 25mm;
box-sizing: border-box;
padding: 1mm;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.barcode-container-25x25 {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1mm;
text-align: center;
.productNameBQ {
font-size: 9px;
line-height: 1;
white-space: nowrap;
text-align: center;
max-width: 100%;
font-weight: 600;
}
.MRPBQ {
font-size: 9px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
.MandateBQ,
.ExpdateBQ {
font-size: 8px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
}
.barcode-wrapper img {
height: auto;
object-fit: contain;
}
// 25x25 4Cross Dummy
#StickerPrints2 {
width: 100mm;
margin: 0 !important;
padding: 0 !important;
}
.sticker25x25{
width: 25mm;
height: 25mm;
box-sizing: border-box;
padding: 1mm;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: #fff;
}
.sticker25x25-name {
margin: 0;
padding: 0;
text-align: center;
line-height: 1;
}
.product-name2 {
font-size: 10px;
white-space: nowrap;
font-weight: bold;
}
.product-nameSmall2 {
font-size: 8px;
white-space: nowrap;
font-weight: bold;
}
.product-size2 {
font-size: 10px;
font-weight: bold;
}
.product-sizeSmall2 {
font-size: 8px;
font-weight: bold;
}
.sticker25-img {
width: 16mm;
height: auto;
object-fit: contain;
}
.product-id2 {
margin: 0;
padding: 0;
font-size: 6px;
line-height: 1;
text-align: center;
word-break: break-word;
}
// 22x35 3cross
#22X353cross {
width: 105mm;
margin: 0;
padding: 0;
}
.grid22x35_3cross {
display: grid;
grid-template-columns: repeat(3, 35mm);
width: 105mm;
column-gap: 0;
padding: 0;
}
.barcode-wrapper-22x35 {
width: 35mm;
height: 22mm;
box-sizing: border-box;
padding: 1.2mm;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.barcode-wrapper-22x35 img {
height: auto;
object-fit: contain;
}
.barcode-container-22x35 {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 1mm;
text-align: center;
.productNameBQ {
font-weight: 600;
font-size: 9px;
line-height: 1;
white-space: nowrap;
text-align: center;
max-width: 100%;
}
.productNameBQSmall {
font-size: 7px;
font-weight: 600;
}
.MRPBQ {
font-size: 8px;
font-weight: 600;
line-height: 1;
white-space: nowrap;
}
}
// 22x35 3cross Dummy
#StickerPrints1 {
width: 105mm;
margin: 0;
padding: 0;
}
.label-wrapper-22x35 {
width: 35mm;
height: 22mm;
box-sizing: border-box;
padding: 1mm;
display: flex;
align-items: center;
justify-content: center;
gap : 0;
background: #fff;
}
.label-wrapper-22x35 p {
margin: 0;
padding: 0;
font-size: 10px;
font-weight: 600;
line-height: 1.1;
}
.label-wrapper-22x35 p:last-child {
margin-top: 2px;
font-size: 8px;
font-weight: 600;
}
.label-wrapper-22x35 img {
width: 14mm;
height: 14mm;
object-fit: contain;
}
// 25x50 2 Cross
#25X502cross {
margin: 0 !important;
padding: 0 !important;
width: 100mm;
}
.grid25x50_2cross {
display: grid;
grid-template-columns: repeat(2, 50mm);
width: 100mm;
column-gap: 0;
padding: 0;
}
.label25x50-wrapper {
width: 50mm;
height: 25mm;
box-sizing: border-box;
padding: 1.5mm;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.label25x50-name {
font-size: 10px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
.label25x50-mrp {
font-size: 9px;
line-height: 1;
white-space: nowrap;
font-weight: 600;
}
.label25x50-container {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.label25x50-container img {
width: 16mm;
height: 16mm;
object-fit: contain;
}
// 25x50 2 Cross Dummy
#StickerPrints3 {
width: 100mm;
margin: 0;
padding: 0;
}
.label-25x50-content {
width: 50mm;
height: 25mm;
box-sizing: border-box;
padding: 1.5mm;
display: flex;
align-items: center;
justify-content: space-between;
background: #fff;
}
.label-25x50-content > div {
width: 60%;
display: flex;
flex-direction: column;
justify-content: center;
gap: 1mm;
font-weight: 600;
}
.label-25x50-content p {
margin: 0;
padding: 0;
font-size: 10px;
line-height: 1;
}
.label-25x50-content p:last-child {
font-size: 9px;
white-space: nowrap;
}
.label-25x50-content img {
width: 20mm; /* QR SAFE SIZE */
height: 20mm;
object-fit: contain;
}
// 15x15 6 Cross
#label-15X156cross {
width: 92mm;
margin: 0 !important;
padding: 0 !important;
}
.label-15x15-container {
display: grid;
grid-template-columns: repeat(6, 15mm);
width: 100%;
column-gap: 0.5mm;
row-gap: 0;
align-items: flex-start;
}
.label-15x15-wrapper {
width: 15mm;
height: 15mm;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
}
.label-15x15-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
text-align: center;
}
.label-15x15-name,
.label-15x15-mrp {
font-size: 6px;
white-space: nowrap;
}
.label-15x15-wrapper img {
width: 7.5mm;
height: 7.5mm;
object-fit: contain;
}
.text-ellipsis {
width: 90%;
white-space: nowrap;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
}
.text-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.1;
max-height: 2.8em;
}
</style>`;
export const getPageStyle = (width) => `
<style>
@media print {
@page {
size: ${width}mm auto;
margin: 0;
}
}
</style>
`;

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
// vite.config.js
import { defineConfig } from "file:///D:/KarthigaLakshmi/A.Dec/retail%20dec%201/node_modules/vite/dist/node/index.js";
import react from "file:///D:/KarthigaLakshmi/A.Dec/retail%20dec%201/node_modules/@vitejs/plugin-react/dist/index.js";
import { terser } from "file:///D:/KarthigaLakshmi/A.Dec/retail%20dec%201/node_modules/rollup-plugin-terser/rollup-plugin-terser.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
if (mode === "production") {
return {
plugins: [
react()
// terser({ // Add terser plugin for production
// compress: {
// drop_console: true, // This removes all console.* statements
// },
// }),
],
base: "/apps/retail/",
envDir: "src",
envPrefix: "ENV_"
};
} else {
return {
plugins: [react()],
envDir: "src",
envPrefix: "ENV_",
server: {
host: "192.168.1.22",
port: process.env.PORT || 3015
},
optimizeDeps: {
exclude: ["console.log"]
}
};
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxLYXJ0aGlnYUxha3NobWlcXFxcQS5EZWNcXFxccmV0YWlsIGRlYyAxXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFxLYXJ0aGlnYUxha3NobWlcXFxcQS5EZWNcXFxccmV0YWlsIGRlYyAxXFxcXHZpdGUuY29uZmlnLmpzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi9LYXJ0aGlnYUxha3NobWkvQS5EZWMvcmV0YWlsJTIwZGVjJTIwMS92aXRlLmNvbmZpZy5qc1wiO2ltcG9ydCB7IGRlZmluZUNvbmZpZyB9IGZyb20gXCJ2aXRlXCI7XG5pbXBvcnQgcmVhY3QgZnJvbSBcIkB2aXRlanMvcGx1Z2luLXJlYWN0XCI7XG5pbXBvcnQgeyB0ZXJzZXIgfSBmcm9tIFwicm9sbHVwLXBsdWdpbi10ZXJzZXJcIjtcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKCh7IGNvbW1hbmQsIG1vZGUgfSkgPT4ge1xuICBpZiAobW9kZSA9PT0gXCJwcm9kdWN0aW9uXCIpIHtcbiAgICByZXR1cm4ge1xuICAgICAgcGx1Z2luczogW1xuICAgICAgICByZWFjdCgpLFxuICAgICAgICAvLyB0ZXJzZXIoeyAgLy8gQWRkIHRlcnNlciBwbHVnaW4gZm9yIHByb2R1Y3Rpb25cbiAgICAgICAgLy8gICBjb21wcmVzczoge1xuICAgICAgICAvLyAgICAgZHJvcF9jb25zb2xlOiB0cnVlLCAgLy8gVGhpcyByZW1vdmVzIGFsbCBjb25zb2xlLiogc3RhdGVtZW50c1xuICAgICAgICAvLyAgIH0sXG4gICAgICAgIC8vIH0pLFxuICAgICAgXSxcbiAgICAgIGJhc2U6IFwiL2FwcHMvcmV0YWlsL1wiLFxuICAgICAgZW52RGlyOiBcInNyY1wiLFxuICAgICAgZW52UHJlZml4OiBcIkVOVl9cIixcbiAgICB9O1xuICB9IGVsc2UgeyBcbiAgICByZXR1cm4ge1xuICAgICAgcGx1Z2luczogW3JlYWN0KCldLFxuICAgICAgZW52RGlyOiBcInNyY1wiLFxuICAgICAgZW52UHJlZml4OiBcIkVOVl9cIixcbiAgICAgIHNlcnZlcjoge1xuICAgICAgICBob3N0OiBcIjE5Mi4xNjguMS4yMlwiLFxuICAgICAgICBwb3J0OiBwcm9jZXNzLmVudi5QT1JUIHx8IDMwMTUsXG4gICAgICB9LFxuICAgICAgb3B0aW1pemVEZXBzOiB7XG4gICAgICAgIGV4Y2x1ZGU6IFtcImNvbnNvbGUubG9nXCJdLFxuICAgICAgfSxcbiAgICB9O1xuICB9XG59KTtcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBNlMsU0FBUyxvQkFBb0I7QUFDMVUsT0FBTyxXQUFXO0FBQ2xCLFNBQVMsY0FBYztBQUV2QixJQUFPLHNCQUFRLGFBQWEsQ0FBQyxFQUFFLFNBQVMsS0FBSyxNQUFNO0FBQ2pELE1BQUksU0FBUyxjQUFjO0FBQ3pCLFdBQU87QUFBQSxNQUNMLFNBQVM7QUFBQSxRQUNQLE1BQU07QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEsTUFNUjtBQUFBLE1BQ0EsTUFBTTtBQUFBLE1BQ04sUUFBUTtBQUFBLE1BQ1IsV0FBVztBQUFBLElBQ2I7QUFBQSxFQUNGLE9BQU87QUFDTCxXQUFPO0FBQUEsTUFDTCxTQUFTLENBQUMsTUFBTSxDQUFDO0FBQUEsTUFDakIsUUFBUTtBQUFBLE1BQ1IsV0FBVztBQUFBLE1BQ1gsUUFBUTtBQUFBLFFBQ04sTUFBTTtBQUFBLFFBQ04sTUFBTSxRQUFRLElBQUksUUFBUTtBQUFBLE1BQzVCO0FBQUEsTUFDQSxjQUFjO0FBQUEsUUFDWixTQUFTLENBQUMsYUFBYTtBQUFBLE1BQ3pCO0FBQUEsSUFDRjtBQUFBLEVBQ0Y7QUFDRixDQUFDOyIsCiAgIm5hbWVzIjogW10KfQo=