diff --git a/src/Components/Menu/PozoMenu.scss b/src/Components/Menu/PozoMenu.scss index 3c51ca5..cc4a096 100644 --- a/src/Components/Menu/PozoMenu.scss +++ b/src/Components/Menu/PozoMenu.scss @@ -42,7 +42,7 @@ cursor: pointer; transition: background 0.2s, - color 0.2s; + color 0.2s ease-in-out; border-radius: 8px; margin: 1px 3px; font-size: 13px; @@ -54,6 +54,10 @@ &:hover:not(.selected):not(.active-path) { background: #394588; + .pozo-menu-label, + .pozo-menu-icon { + color: #fff; + } } &.selected { @@ -80,9 +84,14 @@ &.open { background: #050d36 !important; color: #23bbff; - border-right: 2px solid #23bbff; + // border-right: 2px solid #23bbff; font-weight: 600; width: 95%; + .pozo-menu-label, + .pozo-menu-icon { + color: #fff; + font-weight: 500; + } } &.active-path { @@ -90,13 +99,15 @@ color: #ffffff !important; font-weight: 600; border-radius: 6px; + border-right: 2px solid #23bbff; .pozo-menu-icon { - color: #23bbff !important; + color: #ffffff !important; } .pozo-menu-label { color: #ffffff !important; + font-weight: 500; } .pozo-menu-arrow { @@ -141,6 +152,7 @@ display: flex; justify-content: center; align-items: center; + color: #ffffffb4; @media (max-width: 500px) { font-size: 1rem !important; margin-right: 0; @@ -149,9 +161,9 @@ .pozo-menu-label { flex: 1; - color: #ffffff; + color: #ffffffb4; font-size: 12px; - font-weight: 500; + font-weight: 400; word-break: break-word; line-height: 1.2; font-family: "Poppins", sans-serif !important; diff --git a/src/Pages/AdminTax/AdminTaxForm.jsx b/src/Pages/AdminTax/AdminTaxForm.jsx index 517ca55..2878062 100644 --- a/src/Pages/AdminTax/AdminTaxForm.jsx +++ b/src/Pages/AdminTax/AdminTaxForm.jsx @@ -182,77 +182,85 @@ const AdminTaxForm = () => { setpage(current); }; - const columns = useMemo(() => [ - { - title: 'Sl.NO', - key: 'sno', - align: 'center', - width: '100px', - render: (text, object, index) => ( - {(page - 1) * 10 + index + 1} - ), - }, - - { - title: 'Tax Name', - dataIndex: 'TaxIdName', - key: 'TaxIdName', - columnKey: 'TaxIdName', - width: '100px', - render: (text) => ( - {text} - ), - filteredValue: searchedText ? [searchedText] : null, - onFilter: (value, record) => { - const val = value?.toLowerCase(); - return ( - String(record.TaxIdName)?.toLowerCase()?.includes(val) || - String(record.TaxPercentage)?.toLowerCase()?.includes(val) || - String(record.EffectiveFrom)?.toLowerCase()?.includes(val) || - String(record.Reference)?.toLowerCase()?.includes(val) - ); + const columns = useMemo( + () => [ + { + title: 'Sl.NO', + key: 'sno', + align: 'center', + width: '100px', + render: (text, object, index) => ( + {(page - 1) * 10 + index + 1} + ), }, - sorter: (a, b) => a?.TaxIdName?.localeCompare(b?.TaxIdName), - sortOrder: sortedInfo.columnKey === 'TaxIdName' ? sortedInfo.order : null, - ellipsis: true, - }, - { - title: 'Tax Percentage', - dataIndex: 'TaxPercentage', - key: 'TaxPercentage', - width: '100px', - align: 'right', - render: (text) => {text}, - sorter: (a, b) => parseFloat(a.TaxPercentage) - parseFloat(b.TaxPercentage), - sortOrder: sortedInfo.columnKey === 'TaxPercentage' ? sortedInfo.order : null, - ellipsis: true, - }, - { - title: 'Effective From', - dataIndex: 'EffectiveFrom', - key: 'EffectiveFrom', - width: '100px', - align: 'right', - render: (text) => ( - {ExtractDateFormate(text)} - ), - sorter: (a, b) => new Date(a.EffectiveFrom) - new Date(b.EffectiveFrom), - sortOrder: sortedInfo.columnKey === 'EffectiveFrom' ? sortedInfo.order : null, - ellipsis: true, - }, - { - title: 'Reference No', - dataIndex: 'Reference', - key: 'Reference', - width: '100px', - align: 'right', - render: (text) => {text}, - sorter: (a, b) => a?.Reference?.localeCompare(b?.Reference), - sortOrder: sortedInfo.columnKey === 'Reference' ? sortedInfo.order : null, - ellipsis: true, - }, - ], [searchedText, sortedInfo, page]); + { + title: 'Tax Name', + dataIndex: 'TaxIdName', + key: 'TaxIdName', + columnKey: 'TaxIdName', + width: '100px', + render: (text) => ( + {text} + ), + filteredValue: searchedText ? [searchedText] : null, + onFilter: (value, record) => { + const val = value?.toLowerCase(); + return ( + String(record.TaxIdName)?.toLowerCase()?.includes(val) || + String(record.TaxPercentage)?.toLowerCase()?.includes(val) || + String(record.EffectiveFrom)?.toLowerCase()?.includes(val) || + String(record.Reference)?.toLowerCase()?.includes(val) + ); + }, + sorter: (a, b) => a?.TaxIdName?.localeCompare(b?.TaxIdName), + sortOrder: + sortedInfo.columnKey === 'TaxIdName' ? sortedInfo.order : null, + ellipsis: true, + }, + { + title: 'Tax Percentage', + dataIndex: 'TaxPercentage', + key: 'TaxPercentage', + width: '100px', + align: 'right', + render: (text) => {text}, + sorter: (a, b) => + parseFloat(a.TaxPercentage) - parseFloat(b.TaxPercentage), + sortOrder: + sortedInfo.columnKey === 'TaxPercentage' ? sortedInfo.order : null, + ellipsis: true, + }, + + { + title: 'Effective From', + dataIndex: 'EffectiveFrom', + key: 'EffectiveFrom', + width: '100px', + align: 'right', + render: (text) => ( + {ExtractDateFormate(text)} + ), + sorter: (a, b) => new Date(a.EffectiveFrom) - new Date(b.EffectiveFrom), + sortOrder: + sortedInfo.columnKey === 'EffectiveFrom' ? sortedInfo.order : null, + ellipsis: true, + }, + { + title: 'Reference No', + dataIndex: 'Reference', + key: 'Reference', + width: '100px', + align: 'right', + render: (text) => {text}, + sorter: (a, b) => a?.Reference?.localeCompare(b?.Reference), + sortOrder: + sortedInfo.columnKey === 'Reference' ? sortedInfo.order : null, + ellipsis: true, + }, + ], + [searchedText, sortedInfo, page] + ); const onComplete = useCallback(() => { setMessageData(null); @@ -272,7 +280,7 @@ const AdminTaxForm = () => { } }; return ( -
+
{
-
-
+
@@ -319,10 +326,10 @@ const AdminTaxForm = () => { placement={placement} title="Add Tax" children={ -
+
-
-
+
+
{ }, ]} > - +
+ + - * + + * + + - - - } - /> + } + /> +
{ }, { max: 20, - message: 'Reference cannot be more than 20 characters', + message: + 'Reference cannot be more than 20 characters', }, { validator: async (_, value) => { @@ -455,4 +472,4 @@ const AdminTaxForm = () => { ); }; -export default AdminTaxForm; \ No newline at end of file +export default AdminTaxForm; diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.scss b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.scss index 1c8509d..7e11ef7 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.scss +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTable.scss @@ -47,7 +47,7 @@ height: 2rem; font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important; - >th { + > th { font-size: 10px !important; font-weight: 400 !important; -webkit-text-stroke-width: 0.2px; @@ -1119,13 +1119,13 @@ gap: 1rem; white-space: nowrap; - >div { + > div { font-size: 1rem; font-weight: 500; font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important; } - >p { + > p { background-color: #fff3; font-size: 10px; padding: 1px 6px; @@ -1165,13 +1165,13 @@ gap: 1rem; white-space: nowrap; - >div { + > div { font-size: 1.125rem; font-weight: 500; font-family: "Inter", ui-sans-serif, system-ui, sans-serif !important; } - >p { + > p { background-color: #fff3; font-size: small; padding: 1px 6px; @@ -1187,11 +1187,11 @@ padding: 12px 16px; .ShoppingCartMain-left { - >div { + > div { font-size: 1rem; } - >p { + > p { font-size: 0.75rem; } } @@ -1202,11 +1202,11 @@ align-items: flex-start; .ShoppingCartMain-left { - >div { + > div { font-size: 0.875rem; } - >p { + > p { font-size: 0.7rem; } } @@ -1531,7 +1531,7 @@ .paybutton { padding: 10px 12px; - >svg { + > svg { display: none !important; } } @@ -1587,7 +1587,7 @@ .standard-pay-btns { flex: 1; - >button { + > button { width: 100%; } } @@ -1641,4 +1641,4 @@ @media (max-width: 768px) { display: flex; } -} \ No newline at end of file +} diff --git a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx index fc8448c..3deda70 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/BSNavbar3.jsx @@ -718,6 +718,16 @@ const BSNavbar3 = ({ optionNames }) => {
)} + + {verifyproduct && ( +
+ +
+ +
+
+
+ )}
{isMobile && (
{
)} - {verifyproduct && ( -
- -
- -
-
-
- )} +
diff --git a/src/Pages/BookingScreen/Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx b/src/Pages/BookingScreen/Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx index a085c96..21cdd4b 100644 --- a/src/Pages/BookingScreen/Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx +++ b/src/Pages/BookingScreen/Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx @@ -195,10 +195,11 @@ const VerfiedProducts = () => { <>
setisOpenModal((p) => !p)} - size={25} + size={22} color="#fff" + className="RiVerifiedBadgeFill" />
diff --git a/src/Pages/BookingScreen/PreviewComponents/PCBilltable/PCStandardTable.scss b/src/Pages/BookingScreen/PreviewComponents/PCBilltable/PCStandardTable.scss index 82d0859..67188cc 100644 --- a/src/Pages/BookingScreen/PreviewComponents/PCBilltable/PCStandardTable.scss +++ b/src/Pages/BookingScreen/PreviewComponents/PCBilltable/PCStandardTable.scss @@ -10,6 +10,14 @@ height: 100%; display: flex; flex-direction: column; + .billing-table-header:nth-child(5){ + text-align: right !important; + } + .Table3-item-price, + .Table-3_qty, + .Table3-items { + padding: 10px 6px !important; + } } // Shopping Cart Header @@ -50,9 +58,9 @@ border-radius: 8px; transition: background-color 0.2s; - @media (max-width: 500px) { - padding: 0.2rem; - } + @media (max-width: 500px) { + padding: 0.2rem; + } div { display: flex; @@ -139,7 +147,7 @@ font-weight: 700; color: #059669; text-align: right; - font-family: 'Inter', sans-serif; + font-family: "Inter", sans-serif; } .delete-action { @@ -153,7 +161,7 @@ padding: 0.25rem; border-radius: 4px; transition: all 0.2s; - } + } } .del-all-btn { @@ -162,7 +170,6 @@ border-radius: 4px; transition: background-color 0.2s; - svg { color: #ef4444; font-size: 1.125rem; @@ -194,7 +201,6 @@ cursor: pointer; transition: all 0.2s; - svg { font-size: 1.25rem; color: #6b7280; @@ -216,7 +222,6 @@ cursor: pointer; transition: all 0.2s; - svg { font-size: 1.125rem; } @@ -259,13 +264,11 @@ &.card-button { background: #8b5cf6; color: white; - } &.upi-button { background: #0ea5e9; color: white; - } } @@ -290,7 +293,7 @@ font-weight: 700; cursor: pointer; transition: all 0.2s; - font-family: 'Inter', sans-serif; + font-family: "Inter", sans-serif; svg { font-size: 1.5rem; @@ -299,7 +302,6 @@ // Responsive Design @media (max-width: 768px) { - .standatdTableBill3 { border-radius: 8px; } @@ -307,12 +309,12 @@ .ShoppingCartStandard1 { padding: 0.75rem 1rem; flex-direction: column; - gap: 4px; + gap: 4px; text-align: center; - @media (max-width: 500px) { - flex-direction: row; - } + @media (max-width: 500px) { + flex-direction: row; + } } .cart-title { @@ -440,4 +442,4 @@ .text-white { color: white; -} \ No newline at end of file +} diff --git a/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx b/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx index ed9e486..0212c43 100644 --- a/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx +++ b/src/Pages/BookingScreen/Template/SalesCountForStandard.jsx @@ -356,9 +356,11 @@ const SalesCountForStandard = ({ )}
} - onClick={() =>OverAllOrderCount || 0 >0 && setIsModalOpen(true)} + onClick={() => + OverAllOrderCount || (0 > 0 && setIsModalOpen(true)) + } > - +
{isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
@@ -372,9 +374,11 @@ const SalesCountForStandard = ({ fontSize: '0.9rem', cursor: 'pointer', }} - onClick={() => OverAllOrderCount || 0 >0 && setIsModalOpen(true)} + onClick={() => + OverAllOrderCount || (0 > 0 && setIsModalOpen(true)) + } > - +
{isMobile ? 'Count' : 'Sales Count'} : {OverAllOrderCount}
@@ -472,7 +476,7 @@ const SalesCountForStandard = ({ onClick={() => netAmount > 0 && setIsNetAmtModalOpen(true)} style={{ cursor: 'pointer' }} > - +
{isMobile ? 'NA' : 'Net Amount'} : ₹ {safeRound(netAmount)}
@@ -532,8 +536,6 @@ const SalesCountForStandard = ({ cursor: 'pointer', }} /> - {/* */}
) : ( diff --git a/src/Pages/EmpAccess/EmpAccessForm.jsx b/src/Pages/EmpAccess/EmpAccessForm.jsx index 7c56f4a..4c7cb05 100644 --- a/src/Pages/EmpAccess/EmpAccessForm.jsx +++ b/src/Pages/EmpAccess/EmpAccessForm.jsx @@ -699,7 +699,7 @@ const EmpAccessForm = ({ formType }) => {
-
+
{ const [branchData, setBranchData] = useState([]); const [page, setPage] = useState(1); - const [isPreviewModalOpen, setIsPreviewModalOpen] = useState(false); - const [pdfPreviewUrl, setPdfPreviewUrl] = useState(''); const qrCodeRef = useRef(null); + const printContentRef = useRef(null); const CompId = getSession('CompId'); const BranchId = getSession('BranchId'); const AppId = getSession('AppId'); @@ -296,7 +295,7 @@ const PublicQrCode = () => { if (res?.data?.statusCode == 1) { const QrUrl = `${subDirectory}selfBooking/${res?.data?.ReferenceNo}`; setQrCodeUrl(QrUrl); - generatePDF(true, QrUrl); + setTimeout(() => window.print(), 500); } } catch (error) { console.error('HandleSubmit Error:', error); @@ -305,187 +304,7 @@ const PublicQrCode = () => { } }; - // Function to generate PDF - const generatePDF = async (isPreview = false, encrypted) => { - console.log('generatePDF called with:', { isPreview, encrypted }); - if (!encrypted) { - setMessageType('error'); - setMessageData('Please generate QR code first'); - return; - } - - try { - // Get booking type name and table name for display - const bookingTypeName = - filtered?.find((item) => item.ConfigId === configId)?.ConfigName || - 'Both'; - const tableName = - Tabledata?.find((item) => item.TableId === TableId)?.TableName || ''; - - // Get branch details - const branch = branchData?.[0] || {}; - const branchName = branch.BrName || branch.CompName || ''; - const branchMobile = branch.BrMobile || ''; - const companyLogo = branch.CompLogo || ''; - const branchAddress = - [ - branch.Address1, - branch.Address2, - branch.City, - branch.State, - branch.Zip, - ] - .filter(Boolean) - .join(', ') || ''; - - // Create a temporary div for PDF content - const tempDiv = document.createElement('div'); - tempDiv.style.padding = '40px'; - tempDiv.style.backgroundColor = 'white'; - tempDiv.style.fontFamily = 'Arial, sans-serif'; - tempDiv.style.textAlign = 'center'; - tempDiv.style.width = '600px'; - tempDiv.style.margin = '0 auto'; - - // Add content to the temporary div - tempDiv.innerHTML = ` -
- ${companyLogo ? `
` : ''} -

${branchName ? branchName : ''}

-

${branchAddress ? branchAddress : ''}

-

Mobile: ${branchMobile ? branchMobile : ''}

-
-
-

Self Booking QR Code

-
-
-
-
-
-
-
-

URL: ${encrypted}

-
- `; - - // Add the temporary div to the document - document.body.appendChild(tempDiv); - - // Create QR code in the container - const qrContainer = tempDiv.querySelector('#qr-code-container'); - const qrCodeSvg = document.createElementNS( - 'http://www.w3.org/2000/svg', - 'svg' - ); - qrCodeSvg.setAttribute('width', '200'); - qrCodeSvg.setAttribute('height', '200'); - qrCodeSvg.setAttribute('viewBox', '0 0 256 256'); - - // Use the QRCode library to generate SVG content - const QRCodeLib = await import('qrcode'); - const qrDataUrl = await QRCodeLib.toDataURL(encrypted, { - width: 200, - margin: 2, - }); - - // Create an image element for the QR code - const qrImage = document.createElement('img'); - qrImage.src = qrDataUrl; - qrImage.style.width = '200px'; - qrImage.style.height = '200px'; - qrContainer.appendChild(qrImage); - - // Wait for all images to load (QR code and company logo if present) - const imagesToLoad = [qrImage]; - const companyLogoImg = tempDiv.querySelector('#company-logo'); - if (companyLogoImg) { - imagesToLoad.push(companyLogoImg); - } - - await Promise.all( - imagesToLoad.map( - (img) => - new Promise((resolve) => { - if (img.complete) { - resolve(); - } else { - img.onload = resolve; - img.onerror = resolve; // Continue even if logo fails to load - } - }) - ) - ); - - // Generate PDF using html2canvas and jsPDF - const canvas = await html2canvas(tempDiv, { - scale: 2, - useCORS: true, - allowTaint: true, - backgroundColor: '#ffffff', - }); - - const imgData = canvas.toDataURL('image/png'); - const pdf = new jsPDF('p', 'mm', 'a4'); - - const imgWidth = 190; - const pageHeight = 295; - const imgHeight = (canvas.height * imgWidth) / canvas.width; - let heightLeft = imgHeight; - let position = 10; - - pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); - heightLeft -= pageHeight; - - while (heightLeft >= 0) { - position = heightLeft - imgHeight; - pdf.addPage(); - pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); - heightLeft -= pageHeight; - } - - // Clean up - document.body.removeChild(tempDiv); - - if (isPreview) { - // Generate blob URL for preview - console.log('Generating PDF preview...'); - const pdfBlob = pdf.output('blob'); - const pdfUrl = URL.createObjectURL(pdfBlob); - console.log('PDF preview URL created:', pdfUrl); - setPdfPreviewUrl(pdfUrl); - setIsPreviewModalOpen(true); - } else { - // Download the PDF - console.log('Downloading PDF...'); - const branch = branchData?.[0] || {}; - const branchName = ( - branch.BrName || - branch.CompName || - 'Branch' - ).replace(/[^a-zA-Z0-9]/g, '_'); - const fileName = `QR_Code_${branchName}_${bookingTypeName}_${tableName}_${new Date().toISOString().split('T')[0]}.pdf`; - console.log('PDF filename:', fileName); - pdf.save(fileName); - console.log('PDF download initiated'); - setMessageType('success'); - setMessageData('PDF downloaded successfully!'); - } - } catch (error) { - console.error('Error generating PDF:', error); - console.error('Error details:', { - message: error.message, - stack: error.stack, - encrypted: encrypted, - configId: configId, - TableId: TableId, - }); - setMessageType('error'); - setMessageData( - `Error generating PDF: ${error.message}. Please try again.` - ); - } - }; const onComplete = useCallback(() => { setMessageData(null); @@ -571,7 +390,7 @@ const PublicQrCode = () => {
-
+
{
{qrCodeUrl && ( <> +
+ window.print()} + icon={} + > + PRINT + +
{ setTableId(null); setWaiterId(null); setTabledata([]); - setPdfPreviewUrl(''); - setIsPreviewModalOpen(false); }} > CLEAR @@ -696,7 +524,7 @@ const PublicQrCode = () => {
-
+
{qrCodeUrl && (
{ )}
-
- - {/* PDF Preview Modal */} - { - setIsPreviewModalOpen(false); - if (pdfPreviewUrl) { - URL.revokeObjectURL(pdfPreviewUrl); - setPdfPreviewUrl(''); - } - }} - footer={false} - // footer={[ - // { - // generatePDF(false, qrCodeUrl); - // setIsPreviewModalOpen(false); - // if (pdfPreviewUrl) { - // URL.revokeObjectURL(pdfPreviewUrl); - // setPdfPreviewUrl(''); - // } - // }} - // icon={} - // > - // DOWNLOAD - // , - // { - // setIsPreviewModalOpen(false); - // if (pdfPreviewUrl) { - // URL.revokeObjectURL(pdfPreviewUrl); - // setPdfPreviewUrl(''); - // } - // }} - // > - // CLOSE - // - // ]} - width={1000} - style={{ top: 20 }} - > - {pdfPreviewUrl && ( -
-