diff --git a/src/Components/Forms/main.scss b/src/Components/Forms/main.scss index c75a1ce..55fcee9 100644 --- a/src/Components/Forms/main.scss +++ b/src/Components/Forms/main.scss @@ -564,7 +564,7 @@ Button[disabled] { .ant-table-cell { background: #fafafa7a; //vicky - padding: 1px 8px !important; + padding: 6px 6px !important; border: 0.5px solid rgb(235, 235, 235); } diff --git a/src/Pages/Automated Reorder/AutomatedReorderList.jsx b/src/Pages/Automated Reorder/AutomatedReorderList.jsx index 49351a7..d574ead 100644 --- a/src/Pages/Automated Reorder/AutomatedReorderList.jsx +++ b/src/Pages/Automated Reorder/AutomatedReorderList.jsx @@ -20,6 +20,7 @@ import { DefaultModal } from "../../Components/Modal/DefaultModal"; import { FaRegEye } from "react-icons/fa"; import { render } from "react-dom"; import { useAuth } from "../../AuthContext"; +import "./AutomatedReorder.scss"; const subDirectory = import.meta.env.BASE_URL; diff --git a/src/Pages/BookingScreen/Components/PrintMainPage/SalesPrintSize.jsx b/src/Pages/BookingScreen/Components/PrintMainPage/SalesPrintSize.jsx index d60d19e..5e4a320 100644 --- a/src/Pages/BookingScreen/Components/PrintMainPage/SalesPrintSize.jsx +++ b/src/Pages/BookingScreen/Components/PrintMainPage/SalesPrintSize.jsx @@ -1,436 +1,488 @@ -import { Switch, Tooltip } from "antd" -import { useDispatch } from "react-redux"; -import { changeBillName, changeNotes, changeSelectedAmount, changeSelectedDiscount, changeSelectedHsnCode, changeSelectedItem, changeSelectedMRP, changeSelectedprintStyle, changeSelectedQrcode, changeSelectedQuantity, changeSelectedRate, changeSelectedSignature, changeSelectedSlNo, changeSelectedtermsAndConditions, changeSignatureImage, changethemeFormat, getPrintSelectionComponentData, putPrintSelectionComponentData, changeSelectedPrintdummyData } from "../../../../Features/ThemeChange/ThemeChange"; -import { useEffect, useState, useMemo, useCallback } from "react"; -import { InfoCircleOutlined, UploadOutlined, PlusOutlined, MinusCircleOutlined, ArrowRightOutlined, EditFilled, DeleteFilled } from '@ant-design/icons'; -import { getSession } from "../../../../Services/Others"; -import Buttons from "../../../../Components/Forms/Buttons"; -import { Messages } from "../../../../Components/Notifications/Messages"; - +import { Switch, Tooltip } from 'antd'; +import { useDispatch } from 'react-redux'; +import { + changeBillName, + changeNotes, + changeSelectedAmount, + changeSelectedDiscount, + changeSelectedHsnCode, + changeSelectedItem, + changeSelectedMRP, + changeSelectedprintStyle, + changeSelectedQrcode, + changeSelectedQuantity, + changeSelectedRate, + changeSelectedSignature, + changeSelectedSlNo, + changeSelectedtermsAndConditions, + changeSignatureImage, + changethemeFormat, + getPrintSelectionComponentData, + putPrintSelectionComponentData, + changeSelectedPrintdummyData, +} from '../../../../Features/ThemeChange/ThemeChange'; +import { useEffect, useState, useMemo, useCallback } from 'react'; +import { + InfoCircleOutlined, + UploadOutlined, + PlusOutlined, + MinusCircleOutlined, + ArrowRightOutlined, + EditFilled, + DeleteFilled, +} from '@ant-design/icons'; +import { getSession } from '../../../../Services/Others'; +import Buttons from '../../../../Components/Forms/Buttons'; +import { Messages } from '../../../../Components/Notifications/Messages'; const SalesPrintSize = ({ onSettingsChange, closeModel }) => { - const CompId = getSession("CompId") - const BranchId = getSession("BranchId") - const AppId = getSession("AppId") - const UserId = getSession('UserId'); - const dispatch = useDispatch() + const CompId = getSession('CompId'); + const BranchId = getSession('BranchId'); + const AppId = getSession('AppId'); + const UserId = getSession('UserId'); + const dispatch = useDispatch(); - const [PrintType, setPrintType] = useState(false); - const [PageSize, setPageSize] = useState(false); - // const [PrintTemplates, setPrintTemplates] = useState([]) - const [SizeOptionData, setSizeOptionData] = useState([]) - const [selectedTemplate, setSelectedTemplate] = useState(null) - const [messageType, setMessageType] = useState('') - const [messageData, setMessageData] = useState('') - console.log(selectedTemplate, 'selectedTemplate'); + const [PrintType, setPrintType] = useState(false); + const [PageSize, setPageSize] = useState(false); + // const [PrintTemplates, setPrintTemplates] = useState([]) + const [SizeOptionData, setSizeOptionData] = useState([]); + const [selectedTemplate, setSelectedTemplate] = useState(null); + const [messageType, setMessageType] = useState(''); + const [messageData, setMessageData] = useState(''); + console.log(selectedTemplate, 'selectedTemplate'); + // Memoized values for better performance + const currentPrintType = useMemo(() => { + if (selectedTemplate) { + return selectedTemplate.PrintType === 'S' ? true : false; + } + return PrintType; + }, [selectedTemplate, PrintType]); - // Memoized values for better performance - const currentPrintType = useMemo(() => { - if (selectedTemplate) { - return selectedTemplate.PrintType === 'S' ? true : false; - } - return PrintType; - }, [selectedTemplate, PrintType]); + const currentPageSize = useMemo(() => { + if (selectedTemplate) { + return selectedTemplate.PageSize === 'A5' ? true : false; + } + return PageSize; + }, [selectedTemplate, PageSize]); - const currentPageSize = useMemo(() => { - if (selectedTemplate) { - return selectedTemplate.PageSize === 'A5' ? true : false; - } - return PageSize; - }, [selectedTemplate, PageSize]); + // Get the actual values to pass to parent component + const getPrintTypeValue = () => { + if (selectedTemplate) { + return selectedTemplate.PrintType; + } + return PrintType ? 'S' : 'C'; + }; - // Get the actual values to pass to parent component - const getPrintTypeValue = () => { - if (selectedTemplate) { - return selectedTemplate.PrintType; - } - return PrintType ? 'S' : 'C'; - }; + const getPageSizeValue = () => { + if (selectedTemplate) { + return selectedTemplate.PageSize; + } + return PageSize ? 'A5' : 'A4'; + }; - const getPageSizeValue = () => { - if (selectedTemplate) { - return selectedTemplate.PageSize; - } - return PageSize ? 'A5' : 'A4'; - }; + useEffect(() => { + printsyleget(); + }, []); - useEffect(() => { - printsyleget() - }, []) + // Auto-select default template when data loads + useEffect(() => { + if (SizeOptionData.length > 0) { + const defaultTemplate = SizeOptionData.find( + (template) => template.SetasDefault === 'Y' + ); + if (defaultTemplate) { + handleTemplateSelect(defaultTemplate); + } + } + }, [SizeOptionData]); - // Auto-select default template when data loads - useEffect(() => { - if (SizeOptionData.length > 0) { - const defaultTemplate = SizeOptionData.find(template => template.SetasDefault === "Y"); - if (defaultTemplate) { - handleTemplateSelect(defaultTemplate); - } - } - }, [SizeOptionData]); + const handleTemplateSelect = (template) => { + setSelectedTemplate(template); + setPrintType(template.PrintType === 'S'); + setPageSize(template.PageSize === 'A5'); + stylePreview(template); - const handleTemplateSelect = (template) => { - setSelectedTemplate(template); - setPrintType(template.PrintType === 'S'); - setPageSize(template.PageSize === 'A5'); - stylePreview(template); + // Immediately pass the template settings + if (onSettingsChange && typeof onSettingsChange === 'function') { + const currentSettings = { + PrintType: template.PrintType, + PageSize: template.PageSize, + selectedTemplate: template, + }; + console.log('Template Selected - Settings:', currentSettings); + onSettingsChange(currentSettings); + } + }; - // Immediately pass the template settings - if (onSettingsChange && typeof onSettingsChange === 'function') { - const currentSettings = { - PrintType: template.PrintType, - PageSize: template.PageSize, - selectedTemplate: template - }; - console.log('Template Selected - Settings:', currentSettings); - onSettingsChange(currentSettings); - } - }; + const onChangeToggle = async (e) => { + setPrintType(e); + await dispatch(changethemeFormat(e)); - const onChangeToggle = async (e) => { - setPrintType(e); - await dispatch(changethemeFormat(e)); + // If a template is selected, update it + if (selectedTemplate) { + const updatedTemplate = { + ...selectedTemplate, + PrintType: e ? 'S' : 'C', + }; + setSelectedTemplate(updatedTemplate); - // If a template is selected, update it - if (selectedTemplate) { - const updatedTemplate = { - ...selectedTemplate, - PrintType: e ? 'S' : 'C' - }; - setSelectedTemplate(updatedTemplate); - - // Immediately pass updated settings - if (onSettingsChange && typeof onSettingsChange === 'function') { - const currentSettings = { - PrintType: updatedTemplate.PrintType, - PageSize: updatedTemplate.PageSize, - selectedTemplate: updatedTemplate - }; - onSettingsChange(currentSettings); - } - } - }; - - const onChangepageSize = async (e) => { - setPageSize(e); - - // If a template is selected, update it - if (selectedTemplate) { - const updatedTemplate = { - ...selectedTemplate, - PageSize: e ? 'A5' : 'A4' - }; - setSelectedTemplate(updatedTemplate); - if (onSettingsChange && typeof onSettingsChange === 'function') { - const currentSettings = { - PrintType: updatedTemplate.PrintType, - PageSize: updatedTemplate.PageSize, - selectedTemplate: updatedTemplate - }; - onSettingsChange(currentSettings); - } - } - }; - - const stylePreview = async (template) => { - if (!template) return; - - const { StyleId, StyleName, PrintType: printType, PageSize, Notes, PrintHdrName, Signature, TermsandConditions, OptionDetails } = template; - - const helperFunction = (param) => { - return OptionDetails.some( - (item) => item.ConfigName === param - ) - } - - dispatch(changeSelectedSlNo(helperFunction('Sl.No'))); - dispatch(changeSelectedItem(helperFunction('Item'))); - dispatch(changeSelectedMRP(helperFunction('MRP'))); - dispatch(changeSelectedDiscount(helperFunction('Discount'))); - dispatch(changeSelectedQuantity(helperFunction('Quantity'))); - dispatch(changeSelectedRate(helperFunction('Rate'))); - dispatch(changeSelectedAmount(helperFunction('Amount'))); - dispatch(changeSelectedHsnCode(helperFunction('HsnCode'))); - dispatch(changeSelectedQrcode(helperFunction('Qrcode'))); - dispatch(changeSelectedSignature(helperFunction('signature'))); - dispatch(changeSelectedtermsAndConditions(helperFunction('terms&conditions'))); - dispatch(changeNotes(helperFunction('Notes'))); - dispatch(changeSignatureImage(Signature)); - dispatch(changeBillName(PrintHdrName)); - dispatch(changeSelectedprintStyle({ - ConfigId: StyleId, - ConfigName: StyleName, - })); - }; - - const printsyleget = async () => { - try { - const Data = { AppId, CompId, BranchId }; - let response = await dispatch(getPrintSelectionComponentData(Data)).unwrap(); - - if (response?.data?.statusCode === 1) { - // const salesTemplates = response.data.data?.flatMap(template => - // (template.ComponentDetails || []).filter(comp => comp.PrintTypeName === "Sales" && comp.SetasDefault === "Y") - // ); - // setPrintTemplates(salesTemplates); - - let TableData = response?.data?.data?.[0]?.ComponentDetails.map( - (item) => ({ - ActiveStatus: 'A', - OptionDetails: item.FieldDetails, - StyleId: item.StyleId, - SetasDefault: item.SetasDefault, - SetasDefaultInvoice: item.SetasDefaultInvoice, - StyleName: item.StyleName, - Signature: item.Signature, - PrintType: item.PrintType, - PrintHdrName: item.PrintHdrName, - Notes: item?.Notes, - PageSize: item?.PageSize, - PrintTypeId: item?.PrintTypeId, - TermsandConditions: (item?.TermsandConditions - ? item?.TermsandConditions - : [] - )?.map((tc) => tc?.TermsandConditions), - }) - )?.sort((a, b) => { - if ((a.StyleName || '') === 'A4Standard') return 1; - if ((b.StyleName || '') === 'A4Standard') return -1; - const isA4orA5 = (name) => /A4|A5/i.test(name); - const nameA = a.StyleName || ''; - const nameB = b.StyleName || ''; - if (isA4orA5(nameA) && !isA4orA5(nameB)) return 1; - if (!isA4orA5(nameA) && isA4orA5(nameB)) return -1; - const numA = parseInt(nameA.match(/\d+/)?.[0]) || 0; - const numB = parseInt(nameB.match(/\d+/)?.[0]) || 0; - return numA - numB; - }); - setSizeOptionData(TableData); - } - } catch (error) { - console.error('Error fetching print styles:', error); - } - }; - - // Log current values for debugging - console.log('Current PrintType:', getPrintTypeValue()); - console.log('Current PageSize:', getPageSizeValue()); - console.log('Selected Template:', selectedTemplate); - - useEffect(() => { + // Immediately pass updated settings + if (onSettingsChange && typeof onSettingsChange === 'function') { const currentSettings = { - PrintType: getPrintTypeValue(), - PageSize: getPageSizeValue(), - selectedTemplate + PrintType: updatedTemplate.PrintType, + PageSize: updatedTemplate.PageSize, + selectedTemplate: updatedTemplate, }; - console.log('Current Print Settings:', currentSettings); + onSettingsChange(currentSettings); + } + } + }; - // Call the callback if provided - if (onSettingsChange && typeof onSettingsChange === 'function') { - onSettingsChange(currentSettings); - } - }, [selectedTemplate, PrintType, PageSize]); // Removed onSettingsChange from dependencies + const onChangepageSize = async (e) => { + setPageSize(e); - // Also pass data when component mounts and when selectedTemplate changes - useEffect(() => { - if (selectedTemplate && onSettingsChange && typeof onSettingsChange === 'function') { - const currentSettings = { - PrintType: selectedTemplate.PrintType, - PageSize: selectedTemplate.PageSize, - selectedTemplate - }; - console.log('Template-based Print Settings:', currentSettings); - onSettingsChange(currentSettings); - } - }, [selectedTemplate]); + // If a template is selected, update it + if (selectedTemplate) { + const updatedTemplate = { + ...selectedTemplate, + PageSize: e ? 'A5' : 'A4', + }; + setSelectedTemplate(updatedTemplate); + if (onSettingsChange && typeof onSettingsChange === 'function') { + const currentSettings = { + PrintType: updatedTemplate.PrintType, + PageSize: updatedTemplate.PageSize, + selectedTemplate: updatedTemplate, + }; + onSettingsChange(currentSettings); + } + } + }; - const onfinish = async (values) => { - try { - if (!SizeOptionData || SizeOptionData.length === 0) { - setMessageType('error'); - setMessageData('Please Setup the Screen'); - return; - } + const stylePreview = async (template) => { + if (!template) return; - if (!selectedTemplate) { - setMessageType('error'); - setMessageData('Please select a template first'); - return; - } + const { + StyleId, + StyleName, + PrintType: printType, + PageSize, + Notes, + PrintHdrName, + Signature, + TermsandConditions, + OptionDetails, + } = template; - - const currentPrintType = getPrintTypeValue(); // 'S' or 'C' - const currentPageSize = getPageSizeValue(); // 'A4' or 'A5' - - // Only one "Sales" style should have SetasDefault: "Y" - const updatedTemplates = SizeOptionData.map((item) => { - if ( - (item.PrintType === "Sales" || item.PrintType === "S") - ) { - return { - ...item, - SetasDefault: - item.StyleId === selectedTemplate.StyleId ? "Y" : "N", - }; - } - return item; - }); - - let TemplateDetails = updatedTemplates.map((item) => { - const isSelectedTemplate = item.StyleId === selectedTemplate.StyleId; - - return { - SizeId: null, - StyleId: item.StyleId, - SetasDefault: item.SetasDefault, - SetasDefaultInvoice: item.SetasDefaultInvoice, - PrintTypeId: item?.PrintTypeId, - SizeDetails: item.OptionDetails.map((opt) => ({ - OptionId: opt.ConfigId, - })), - ...(item?.TermsandConditions?.length > 0 - ? { - PrintTermsandConditions: (item?.TermsandConditions - ? item?.TermsandConditions - : [] - )?.map((tc) => ({ - TermsandConditions: tc, - })), - } - : {}), - ...(item?.Notes ? { Notes: item.Notes } : {}), - PageSize: isSelectedTemplate ? currentPageSize : item?.PageSize, - ...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}), - ...(item?.Signature ? { Signature: item?.Signature } : {}), - PrintType: isSelectedTemplate ? currentPrintType : item?.PrintType, - }; - }); - - const Data = { - CompId: CompId, - BranchId: BranchId, - AppId: AppId, - TemplateDetails: TemplateDetails, - CreatedBy: UserId, - }; - - // console.log('API Request Data:', Data); - - const response = await dispatch( - putPrintSelectionComponentData(Data) - ).unwrap(); - - if (response?.data?.statusCode === 1) { - dispatch(changeSelectedPrintdummyData(false)); - await printsyleget(); - setMessageType('success'); - setMessageData(response?.data?.response); - if (closeModel) { - closeModel(); - } - } - } catch (error) { - console.error('Error setting default template:', error); - setMessageType('error'); - setMessageData('Failed to set default template'); - } + const helperFunction = (param) => { + return OptionDetails.some((item) => item.ConfigName === param); }; - const onComplete = useCallback(() => { - setMessageData(null); - setMessageType(null); - }, []); + dispatch(changeSelectedSlNo(helperFunction('Sl.No'))); + dispatch(changeSelectedItem(helperFunction('Item'))); + dispatch(changeSelectedMRP(helperFunction('MRP'))); + dispatch(changeSelectedDiscount(helperFunction('Discount'))); + dispatch(changeSelectedQuantity(helperFunction('Quantity'))); + dispatch(changeSelectedRate(helperFunction('Rate'))); + dispatch(changeSelectedAmount(helperFunction('Amount'))); + dispatch(changeSelectedHsnCode(helperFunction('HsnCode'))); + dispatch(changeSelectedQrcode(helperFunction('Qrcode'))); + dispatch(changeSelectedSignature(helperFunction('signature'))); + dispatch( + changeSelectedtermsAndConditions(helperFunction('terms&conditions')) + ); + dispatch(changeNotes(helperFunction('Notes'))); + dispatch(changeSignatureImage(Signature)); + dispatch(changeBillName(PrintHdrName)); + dispatch( + changeSelectedprintStyle({ + ConfigId: StyleId, + ConfigName: StyleName, + }) + ); + }; - return ( -
- -
-

Print : {selectedTemplate?.StyleName}

-
-
-
- {( -
- - Customized - - - - - - - - Standard - - - - -
- )} -
- -
- {currentPrintType && ( -
- A4 - - A5 -
- )} -
-
- -
- } - htmlType={true} - handleSubmit={onfinish} - /> + const printsyleget = async () => { + try { + const Data = { AppId, CompId, BranchId }; + let response = await dispatch( + getPrintSelectionComponentData(Data) + ).unwrap(); + + if (response?.data?.statusCode === 1) { + // const salesTemplates = response.data.data?.flatMap(template => + // (template.ComponentDetails || []).filter(comp => comp.PrintTypeName === "Sales" && comp.SetasDefault === "Y") + // ); + // setPrintTemplates(salesTemplates); + + let TableData = response?.data?.data?.[0]?.ComponentDetails.map( + (item) => ({ + ActiveStatus: 'A', + OptionDetails: item.FieldDetails, + StyleId: item.StyleId, + SetasDefault: item.SetasDefault, + SetasDefaultInvoice: item.SetasDefaultInvoice, + StyleName: item.StyleName, + Signature: item.Signature, + PrintType: item.PrintType, + PrintHdrName: item.PrintHdrName, + Notes: item?.Notes, + PageSize: item?.PageSize, + PrintTypeId: item?.PrintTypeId, + TermsandConditions: (item?.TermsandConditions + ? item?.TermsandConditions + : [] + )?.map((tc) => tc?.TermsandConditions), + }) + )?.sort((a, b) => { + if ((a.StyleName || '') === 'A4Standard') return 1; + if ((b.StyleName || '') === 'A4Standard') return -1; + const isA4orA5 = (name) => /A4|A5/i.test(name); + const nameA = a.StyleName || ''; + const nameB = b.StyleName || ''; + if (isA4orA5(nameA) && !isA4orA5(nameB)) return 1; + if (!isA4orA5(nameA) && isA4orA5(nameB)) return -1; + const numA = parseInt(nameA.match(/\d+/)?.[0]) || 0; + const numB = parseInt(nameB.match(/\d+/)?.[0]) || 0; + return numA - numB; + }); + setSizeOptionData(TableData); + } + } catch (error) { + console.error('Error fetching print styles:', error); + } + }; + + // Log current values for debugging + console.log('Current PrintType:', getPrintTypeValue()); + console.log('Current PageSize:', getPageSizeValue()); + console.log('Selected Template:', selectedTemplate); + + useEffect(() => { + const currentSettings = { + PrintType: getPrintTypeValue(), + PageSize: getPageSizeValue(), + selectedTemplate, + }; + console.log('Current Print Settings:', currentSettings); + + // Call the callback if provided + if (onSettingsChange && typeof onSettingsChange === 'function') { + onSettingsChange(currentSettings); + } + }, [selectedTemplate, PrintType, PageSize]); // Removed onSettingsChange from dependencies + + // Also pass data when component mounts and when selectedTemplate changes + useEffect(() => { + if ( + selectedTemplate && + onSettingsChange && + typeof onSettingsChange === 'function' + ) { + const currentSettings = { + PrintType: selectedTemplate.PrintType, + PageSize: selectedTemplate.PageSize, + selectedTemplate, + }; + console.log('Template-based Print Settings:', currentSettings); + onSettingsChange(currentSettings); + } + }, [selectedTemplate]); + + const onfinish = async (values) => { + try { + if (!SizeOptionData || SizeOptionData.length === 0) { + setMessageType('error'); + setMessageData('Please Setup the Screen'); + return; + } + + if (!selectedTemplate) { + setMessageType('error'); + setMessageData('Please select a template first'); + return; + } + + const currentPrintType = getPrintTypeValue(); // 'S' or 'C' + const currentPageSize = getPageSizeValue(); // 'A4' or 'A5' + + // Only one "Sales" style should have SetasDefault: "Y" + const updatedTemplates = SizeOptionData.map((item) => { + if (item.PrintType === 'Sales' || item.PrintType === 'S') { + return { + ...item, + SetasDefault: item.StyleId === selectedTemplate.StyleId ? 'Y' : 'N', + }; + } + return item; + }); + + let TemplateDetails = updatedTemplates.map((item) => { + const isSelectedTemplate = item.StyleId === selectedTemplate.StyleId; + + return { + SizeId: null, + StyleId: item.StyleId, + SetasDefault: item.SetasDefault, + SetasDefaultInvoice: item.SetasDefaultInvoice, + PrintTypeId: item?.PrintTypeId, + SizeDetails: item.OptionDetails.map((opt) => ({ + OptionId: opt.ConfigId, + })), + ...(item?.TermsandConditions?.length > 0 + ? { + PrintTermsandConditions: (item?.TermsandConditions + ? item?.TermsandConditions + : [] + )?.map((tc) => ({ + TermsandConditions: tc, + })), + } + : {}), + ...(item?.Notes ? { Notes: item.Notes } : {}), + PageSize: isSelectedTemplate ? currentPageSize : item?.PageSize, + ...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}), + ...(item?.Signature ? { Signature: item?.Signature } : {}), + PrintType: isSelectedTemplate ? currentPrintType : item?.PrintType, + }; + }); + + const Data = { + CompId: CompId, + BranchId: BranchId, + AppId: AppId, + TemplateDetails: TemplateDetails, + CreatedBy: UserId, + }; + + // console.log('API Request Data:', Data); + + const response = await dispatch( + putPrintSelectionComponentData(Data) + ).unwrap(); + + if (response?.data?.statusCode === 1) { + dispatch(changeSelectedPrintdummyData(false)); + await printsyleget(); + setMessageType('success'); + setMessageData(response?.data?.response); + if (closeModel) { + closeModel(); + } + } + } catch (error) { + console.error('Error setting default template:', error); + setMessageType('error'); + setMessageData('Failed to set default template'); + } + }; + + const onComplete = useCallback(() => { + setMessageData(null); + setMessageType(null); + }, []); + + return ( +
+ +
+

Print : {selectedTemplate?.StyleName}

+
+
+
+ { +
+ + Customized + + + + + + + + Standard + + + +
+ }
- ) -} -export default SalesPrintSize \ No newline at end of file +
+ {currentPrintType && ( +
+ A4 + + A5 +
+ )} +
+
+ +
+ } + htmlType={true} + handleSubmit={onfinish} + /> +
+
+ ); +}; + +export default SalesPrintSize; diff --git a/src/Pages/BookingScreen/Components/PrintMainPage/SelectPrintMode.jsx b/src/Pages/BookingScreen/Components/PrintMainPage/SelectPrintMode.jsx index f01016d..6be8c8e 100644 --- a/src/Pages/BookingScreen/Components/PrintMainPage/SelectPrintMode.jsx +++ b/src/Pages/BookingScreen/Components/PrintMainPage/SelectPrintMode.jsx @@ -1,215 +1,215 @@ -import { ArrowRightOutlined } from "@ant-design/icons"; -import Buttons from "../../../../Components/Forms/Buttons"; -import { gettableData, postPreferenceAppNames } from "../../../../Features/PreferenceMaster/PreferenceMaster"; -import { getSession } from "../../../../Services/Others"; -import { useDispatch } from "react-redux"; -import { useEffect, useState } from "react"; -import { getPreferenceData } from "../../../../Features/BookingScreen/BookingData/BookingData"; -import { Messages } from "../../../../Components/Notifications/Messages"; -import { changeSelectedPrintdummyData } from "../../../../Features/ThemeChange/ThemeChange"; +import { ArrowRightOutlined } from '@ant-design/icons'; +import Buttons from '../../../../Components/Forms/Buttons'; +import { + gettableData, + postPreferenceAppNames, +} from '../../../../Features/PreferenceMaster/PreferenceMaster'; +import { getSession } from '../../../../Services/Others'; +import { useDispatch } from 'react-redux'; +import { useEffect, useState } from 'react'; +import { getPreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; +import { Messages } from '../../../../Components/Notifications/Messages'; +import { changeSelectedPrintdummyData } from '../../../../Features/ThemeChange/ThemeChange'; const SelectPrintMode = ({ closeModel }) => { - const CompId = getSession("CompId"); - const BranchId = getSession("BranchId"); - const AppId = getSession("AppId"); - const UserId = getSession("UserId"); - const dispatch = useDispatch(); + const CompId = getSession('CompId'); + const BranchId = getSession('BranchId'); + const AppId = getSession('AppId'); + const UserId = getSession('UserId'); + const dispatch = useDispatch(); - const [modes, setModes] = useState([]); - const [selected, setSelected] = useState({ - whatsapp: false, - sms: false, - print: false, - email: false + const [modes, setModes] = useState([]); + const [selected, setSelected] = useState({ + whatsapp: false, + sms: false, + print: false, + email: false, + }); + const [messageType, setMessageType] = useState(''); + const [messageData, setMessageData] = useState(''); + + console.log(selected, 'selected'); + + useEffect(() => { + fetchTableData(); + }, []); + + const fetchTableData = async () => { + const response = await dispatch( + gettableData({ CompId, BranchId, AppId }) + ).unwrap(); + + const data = response?.data?.data?.[0]?.SettingDtlDetails || []; + console.log(data, 'datadata'); + + setModes(data); + + // Pre-fill checkboxes from API data + setSelected({ + whatsapp: !!data.find( + (i) => + i.SettingIdName?.trim()?.toLowerCase() === 'whatsapp' && + i.SettingValue === 'Y' + ), + sms: !!data.find( + (i) => + i.SettingIdName?.trim()?.toLowerCase() === 'sms' && + i.SettingValue === 'Y' + ), + print: !!data.find( + (i) => + i.SettingIdName?.trim()?.toLowerCase() === 'print' && + i.SettingValue === 'Y' + ), + email: !!data.find( + (i) => + i.SettingIdName?.trim()?.toLowerCase() === 'email' && + i.SettingValue === 'Y' + ), }); - const [messageType, setMessageType] = useState(""); - const [messageData, setMessageData] = useState(""); + }; - console.log(selected, 'selected'); + const handleChange = (key) => { + setSelected((prev) => ({ + ...prev, + [key]: !prev[key], + })); + }; + const handleSave = async () => { + const allowed = ['whatsapp', 'sms', 'print', 'email']; - useEffect(() => { - fetchTableData(); - }, []); + const updatedSettings = modes.map((item) => { + const name = item.SettingIdName?.trim()?.toLowerCase(); - const fetchTableData = async () => { - - const response = await dispatch( - gettableData({ CompId, BranchId, AppId }) - ).unwrap(); - - const data = response?.data?.data?.[0]?.SettingDtlDetails || []; - console.log(data, 'datadata'); - - setModes(data); - - // Pre-fill checkboxes from API data - setSelected({ - whatsapp: !!data.find( - (i) => - i.SettingIdName?.trim()?.toLowerCase() === "whatsapp" && - i.SettingValue === "Y" - ), - sms: !!data.find( - (i) => - i.SettingIdName?.trim()?.toLowerCase() === "sms" && - i.SettingValue === "Y" - ), - print: !!data.find( - (i) => - i.SettingIdName?.trim()?.toLowerCase() === "print" && - i.SettingValue === "Y" - ), - email: !!data.find( - (i) => - i.SettingIdName?.trim()?.toLowerCase() === "email" && - i.SettingValue === "Y" - ) - }); - - }; - - const handleChange = (key) => { - setSelected((prev) => ({ - ...prev, - [key]: !prev[key] - })); - - - }; - - - const handleSave = async () => { - const allowed = ["whatsapp", "sms", "print", "email"]; - - const updatedSettings = modes.map((item) => { - const name = item.SettingIdName?.trim()?.toLowerCase(); - - if (allowed?.includes(name)) { - return { - ...item, - SettingValue: selected[name] ? "Y" : "N" - }; - } - - return item; - - }); - - const payload = { - CompId, - BranchId, - CreatedBy: UserId, - AppId, - SettingDtlDetails: updatedSettings + if (allowed?.includes(name)) { + return { + ...item, + SettingValue: selected[name] ? 'Y' : 'N', }; + } - console.log(payload, "payload to send"); + return item; + }); - try { - const response = await dispatch(postPreferenceAppNames(payload)).unwrap(); - - if (response?.data?.statusCode === 1) { - setMessageType("success"); - setMessageData("Printer settings saved successfully."); - dispatch(changeSelectedPrintdummyData(false)); - await updatePreference(); - closeModel() - } else { - setMessageType("error"); - setMessageData(response?.data?.message || "Failed to save printer settings."); - } - } catch (error) { - console.error("Error while saving:", error); - } + const payload = { + CompId, + BranchId, + CreatedBy: UserId, + AppId, + SettingDtlDetails: updatedSettings, }; - const updatePreference = async () => { - await dispatch(getPreferenceData({ CompId, BranchId, AppId })); + console.log(payload, 'payload to send'); + + try { + const response = await dispatch(postPreferenceAppNames(payload)).unwrap(); + + if (response?.data?.statusCode === 1) { + setMessageType('success'); + setMessageData('Printer settings saved successfully.'); + dispatch(changeSelectedPrintdummyData(false)); + await updatePreference(); + closeModel(); + } else { + setMessageType('error'); + setMessageData( + response?.data?.message || 'Failed to save printer settings.' + ); + } + } catch (error) { + console.error('Error while saving:', error); } + }; - return ( -
- { - setMessageData(null); - setMessageType(null); - }} - /> -

- Select Print Mode -

+ const updatePreference = async () => { + await dispatch(getPreferenceData({ CompId, BranchId, AppId })); + }; -
- + return ( +
+ { + setMessageData(null); + setMessageType(null); + }} + /> +

+ Select Print Mode +

- +
+ - + - -
+ + +
-
- } - htmlType={true} - handleSubmit={handleSave} - /> -
-
- ); +
+ } + htmlType={true} + handleSubmit={handleSave} + /> +
+
+ ); }; export default SelectPrintMode; diff --git a/src/Pages/DeliveryChallan/DeliveryChallan.scss b/src/Pages/DeliveryChallan/DeliveryChallan.scss index 7adb85d..0818c13 100644 --- a/src/Pages/DeliveryChallan/DeliveryChallan.scss +++ b/src/Pages/DeliveryChallan/DeliveryChallan.scss @@ -4,7 +4,7 @@ flex-wrap: wrap; gap: 1rem; - .ant-input-affix-wrapper>input.ant-input { + .ant-input-affix-wrapper > input.ant-input { padding: 4px 1px !important; padding-top: 1rem !important; } @@ -61,6 +61,10 @@ .DeliveryChallan-inputForm .ant-table-content { width: 70vw; } +.DeliveryChallan-inputForm .ant-table-thead tr { + background-color: #2c88ee !important; + + } .DeliveryChallan-inputForm { display: flex; @@ -107,8 +111,8 @@ // right: 100px; } -.ant-table-wrapper .ant-table-tbody>tr.ant-table-row:hover>td, -.ant-table-wrapper .ant-table-tbody>tr>th.ant-table-cell-row-hover>td.ant-table-cell-row-hover { +.ant-table-wrapper .ant-table-tbody > tr.ant-table-row:hover > td, +.ant-table-wrapper .ant-table-tbody > tr > th.ant-table-cell-row-hover > td.ant-table-cell-row-hover { background: rgb(224, 223, 223) !important; font-size: unset !important; transition-duration: 0.4s !important; @@ -129,7 +133,6 @@ } .Deliverychallan-table { - // width: 70px; .ant-table table { border-spacing: 0px; @@ -138,4 +141,8 @@ .ant-table-wrapper table { width: 84% !important; } +} +.product-scan .sales-quotation{ + display: flex; + } \ No newline at end of file diff --git a/src/Pages/DeliveryChallan/Deliverychallan.jsx b/src/Pages/DeliveryChallan/Deliverychallan.jsx index 20a8ac9..e851d21 100644 --- a/src/Pages/DeliveryChallan/Deliverychallan.jsx +++ b/src/Pages/DeliveryChallan/Deliverychallan.jsx @@ -61,6 +61,7 @@ import { useSelector } from 'react-redux'; import { getPrintSelectionComponentData } from '../../Features/ThemeChange/ThemeChange.js'; import { DCPDFMobilePrint } from './DCPDFMobilePrint.js'; import { isMobile } from 'react-device-detect'; + const DeliveryChellanForm = () => { const { SadminuserAccess } = useAuth(); diff --git a/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoice.scss b/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoice.scss index b023641..46669ca 100644 --- a/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoice.scss +++ b/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoice.scss @@ -24,6 +24,9 @@ vertical-align: middle; height: 35px; } + .ant-table-thead tr { + background-color: #2c88ee !important; + } } .dc-to-invoice-payment-mode { @@ -46,4 +49,16 @@ margin: 0px 2rem; gap: 10px; padding-top: 0; -} \ No newline at end of file +} + +.delivery-challan-to-invoice-form { + width: 100%; +} + +.DCformDivAnt { + display: flex; + align-items: flex-start; + gap: 1rem; + justify-content: flex-start; + flex-direction: column; +} diff --git a/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx b/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx index 59131d3..259458b 100644 --- a/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx +++ b/src/Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx @@ -342,7 +342,7 @@ const DeliveryChallanToInvoiceForm = () => {
{ /> } -
+ {
)} -
+ diff --git a/src/Pages/Offer/Offer/OfferList.scss b/src/Pages/Offer/Offer/OfferList.scss index 5751a44..90098fd 100644 --- a/src/Pages/Offer/Offer/OfferList.scss +++ b/src/Pages/Offer/Offer/OfferList.scss @@ -1,9 +1,9 @@ .OfferList-Master { - padding: 20px; + padding: 0; background: #fff; min-height: 100vh; width: 100%; - margin: 0 0 1rem 1rem; + margin: 0 0 0 0; overflow: auto; margin-bottom: 2rem; border-radius: 12px; @@ -477,6 +477,12 @@ font-size: 14px; color: #878787; } + .ant-input-affix-wrapper { + width: 250px !important; + } + .ant-input { + padding: 3px 14px 9px 11px !important; + } } // Table Styles diff --git a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx index aeff985..1135c62 100644 --- a/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx +++ b/src/Pages/Payment/PaymentDetails/PaymentDetailsList.jsx @@ -1156,6 +1156,7 @@ const PaymentDetailsList = () => { flexWrap: 'wrap', alignItems: 'flex-start', gap: '1rem', + display: 'flex', }} > td:nth-child(6) { -// display: flex; -// flex-direction: column; -// width: 100%; -// gap: 2rem; -// } -// >td:nth-child(7) { -// display: flex; -// flex-direction: column; -// width: 100%; -// gap: 2rem; -// } -// } - + .custom-table tbody tr td { text-align: left; @@ -138,11 +124,7 @@ } } -.summaryContent2 { - .centerDivList { - // width: 50%; - } -} + .custom-table { Button:disabled, diff --git a/src/Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.scss b/src/Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.scss index 7c3b3ce..a368e7b 100644 --- a/src/Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.scss +++ b/src/Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.scss @@ -4419,6 +4419,7 @@ } .CustomerForm-Master { + width: 100%; .inputForm { width: 50% !important; } diff --git a/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx b/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx index 421d012..46c1063 100644 --- a/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx +++ b/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx @@ -5,8 +5,9 @@ import { Modal } from "antd"; import { getProductStockDetails } from "../../../Features/PurchaseOrder/PurchaseOrder"; import { dateFormatChange, ExtractDateFormate, getSession } from "../../../Services/Others"; import { useDispatch } from "react-redux"; -import { changeBreadCrumb } from "../../../Features/AppPage/CenterPage"; -// import "./PurchaseOrderReport.css"; +import { changeBreadCrumb } from "../../../Features/AppPage/CenterPage"; +import "./PurchaseOrderReport.scss"; + const subDirectory = import.meta.env.BASE_URL; const PurchaseOrderReport = () => { const dispatch = useDispatch(); diff --git a/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.scss b/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.scss new file mode 100644 index 0000000..4f47d94 --- /dev/null +++ b/src/Pages/Reports/PurchaseReport/PurchaseOrderReport.scss @@ -0,0 +1,646 @@ +.ItemWiseReport-table .ant-table table { + // height:60vh; + // overflow:scroll; + overflow: scroll; + // height: clamp(30vh , 85vh,95vh); + border-spacing: 0 0.3rem; +} + +.ItemWiseReport-table .ant-table-thead { + position: sticky; + top: 0 !important; + background-color: #bad4f9; + z-index: 1; + border-spacing: 0 0 !important; +} + +.ItemWiseReport-table .ant-table-wrapper .ant-table-thead > tr > th, +.ant-table-wrapper .ant-table-thead > tr > td { + color: #000000; + font-size: 12px; + font-weight: 600; + border-spacing: 0 0.3rem; +} + +.ItemWiseReport-table .ant-table-row > td { + color: black !important; + font-weight: 500 !important; + font-size: 16px; +} + +.ItemWiseReport-search { + display: flex; + justify-content: end; + column-gap: 1rem; + margin-bottom: 10px; +} + +.ItemWiseReport-search-button { + border: none; + background-color: #e167ff; + padding: 1rem 1.5rem; + border-radius: 6px; +} + +.ItemWiseReport-Date-from-heading { + width: 7rem; +} + +.ItemWiseReport-container { + display: flex; + flex-direction: column; + row-gap: 0.5rem; + // padding: 10px 15px; + height: 88vh; + // overflow: hidden; + overflow: auto; + width: 100%; + flex-wrap: wrap; + background-color: #fff; + border-radius: 12px; +} + +.ItemWiseReport-table .ant-pagination { + position: sticky; + bottom: 0; + margin: 0 !important; + padding: 0.5rem; + background-color: #fafafa; +} + +.ItemWiseReport-header { + display: flex; + gap: 10px; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; + margin-top: 10px; +} + +.ItemWiseReport-heading { + font-size: 20px; + font-weight: 500; +} + +.search-purchase { + input, + .ant-input { + border-start-end-radius: 6px !important; + border-end-end-radius: 6px !important; + padding-top: 6px !important; + } + + .ant-input { + height: 40px; + } + + .searchDiv { + height: 42px; + } +} + +.ItemWiseReport-submit-btn-container { + display: flex; + flex-direction: column; + justify-content: center; + width: max-content; + margin-left: 20px; +} + +.ItemWiseReport-PrinttAndSubmit { + display: flex; + column-gap: 3vw; + align-items: center; + // width: 100%; + justify-content: space-between; + margin-left: 30px; +} + +.ItemWiseReport-dateaAnd-buttons { + display: flex; + column-gap: 2rem; + row-gap: 1rem; + // align-items: center; + // flex-wrap: wrap; +} + +.ItemWiseReport-Date-picker { + display: flex; + flex-wrap: wrap; + align-items: center; + column-gap: 2rem; + + // row-gap: 1rem; + .ant-form-item { + margin-bottom: 0 !important; + } +} + +.ItemWiseReport-Date .ant-picker { + width: 20rem; +} + +.ItemWiseReport-submit-btn { + padding: 0.6rem 1rem; + border: none; + background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important; + margin-bottom: 2px; + font-size: 16px; + font-family: "Gilroy"; + color: #ffffff; + border-radius: 5px; + cursor: pointer; +} + +// .ItemWiseReport-submit-btn:hover { +// background-color: #a8a8a8; +// } +.ItemWiseReport-PrinterIcon-Container { + cursor: pointer; + // position: absolute; + // top: 6rem; + // right: 5rem; +} + +.ItemWiseReport-printerIcon { + font-size: 25px; + cursor: pointer; +} + +.ItemWiseReport-printerIcon:hover { + color: #414141; +} + +.ItemWiseReport-Date { + display: flex; + column-gap: 1rem; + align-items: center; +} + +.ItemWiseReport-Details-container { + display: flex; + justify-content: space-between; + align-items: center; + margin-right: 2rem; + column-gap: 1rem; + flex-wrap: wrap; +} + +.ItemWiseReport-Details { + margin-left: 0.7rem; + display: flex; + column-gap: 1rem; + row-gap: 0.5rem; + flex-wrap: wrap; +} + +.ItemWiseReport-Details-buttons { + border: none; + padding: 0.6rem 1rem; + width: max-content; + background-color: #006aff; + border-radius: 5px; + color: #fff; + cursor: pointer; +} + +.ItemWiseReport-printerIcon { + font-size: 30px; +} + +.ItemWiseReport-table-container { + margin: 1rem 1rem; +} + +.ItemWiseReport-Date p { + font-size: 11px; + color: #5a5a5a; + margin-left: 5px; + margin-top: 2px; +} + +.ItemWiseReport-table { + overflow: auto; + height: clamp(50vh, 30vh, 95vh); + scrollbar-width: thin; + + tr:nth-child(even) { + background-color: #e9e8e8 !important; + border: none; + } + + //dhana + // height: clamp(30vh, 50vh, 95vh); +} + +// writed by sree +.ItemWiseReport-table1 { + overflow: auto; + height: clamp(40vh, 30vh, 95vh); + width: 79vw !important; +} + +.ItemWiseReport-table .ant-table-thead tr .ant-table-cell { + font-size: 25px; + font-weight: 800; +} + +.ItemWiseReport-Amount-Collected-table { + display: flex; + justify-content: flex-end; +} + +.ItemWiseReport-netAmount { + display: flex; + justify-content: flex-end; + padding-top: 10px; +} + +.ItemWiseReport-search .ant-input { + border-radius: 10px !important; + padding: 0.35rem 0.5rem !important; +} + +.BSitemwise-Search-icon { + font-size: 25px; + color: #1292ee; +} + +.dropDownandsumit { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + + .ant-form-item { + margin-bottom: 0 !important; + } +} + +.Submit_Print { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; +} + +@media only screen and (max-width: 950px) { + .ItemWiseReport-PrinttAndSubmit { + display: flex; + column-gap: 3vw; + align-items: center; + justify-content: space-between; + // margin-left: 30px; + // margin-bottom: 23px; + } + + .ItemWiseReport-PrinterIcon-Container { + margin-left: 30px; + + cursor: pointer; + // position: absolute; + // top: 5rem; + // right: 1rem; + } + + .ItemWiseReport-table { + overflow: scroll; + height: 40vh; + } + + .ItemWiseReport-container { + padding: 15px 15px; + } + + .ItemWiseReport-dateaAnd-buttons { + column-gap: 0.5rem; + } + + .ItemWiseReport-netAmount { + justify-content: flex-start !important; + padding-top: 10px; + } + + .dropdownUserid { + margin-top: 0 !important; + } + + // .ItemWiseReport-dateaAnd-buttons { + // // flex-wrap: wrap; + // } + + .ItemWiseReport-submit-btn-container { + margin-left: 4.5rem; + justify-content: flex-start !important; + flex-direction: row; + column-gap: 0.5rem; + margin-bottom: 24px; + width: 83px; + } + + .ItemWiseReport-Date p { + padding: 0; + } + + .ItemWiseReport-table .ant-table-wrapper .ant-table-thead > tr > th, + .ant-table-wrapper .ant-table-thead > tr > td { + font-size: 10px !important; + } +} + +@media only screen and (max-width: 768px) { + .ItemWiseReport-submit-btn-container { + margin-left: 5px; + } + + .ItemWiseReport-table { + width: 80vw; + } +} + +@media only screen and (max-width: 499px) { + .ItemWiseReport-submit-btn-container { + font-size: 12px !important; + } + + .centerPageSub { + margin: 0; + } + + .ItemWiseReport-table { + overflow-x: scroll; + height: 26vh; + } +} + +@media only screen and (max-width: 280px) { + // .ItemWiseReport-PrinttAndSubmit { + + // position: absolute !important; + // top: 18rem !important; + // } + .ItemWiseReport-PrinterIcon-Container { + position: absolute; + top: 290px !important; + left: 200px !important; + } + + .Submit_Print { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + margin-left: 20px; + } + + .ItemWiseReport-Date { + width: 3rem !important; + } + + .ItemWiseReport-Date p { + font-size: 12px !important; + } + + .dropDownandsumit { + margin-top: 30px !important; + height: 160px; + } + + .ItemWiseReport-search { + display: flex; + justify-content: start; + column-gap: 1rem; + width: 4rem !important; + } + + .ItemWiseReport-heading { + font-size: 13px; + font-weight: 500; + } + + .ItemWiseReport-submit-btn-container { + margin-top: 20px; + } + + .ItemWiseReport-dateaAnd-buttons { + column-gap: 0.5rem; + width: 75vw !important; + overflow: auto !important; + } + + .ItemWiseReport-table { + overflow: scroll; + height: 30vh; + } +} + +.ItemWiseReport-table .ant-table-thead th.ant-table-column-has-sorters:hover { + background-color: #bad4f9; +} + +.ItemWiseReport-table .ant-table-wrapper .ant-table-thead > tr > th, +.ant-table-wrapper .ant-table-thead > tr > td { + background-color: #bad4f9; +} + +.ItemWiseReport-printerIcon-disabled { + opacity: 0.5; + /* You can adjust the opacity to visually indicate it's disabled */ + pointer-events: none; + /* Disable pointer events so it won't respond to clicks */ + cursor: not-allowed; + /* Change cursor to indicate it's not clickable */ + font-size: 30px; +} + +.dropdownUserid { + margin-top: 10px; +} + +.itemwiseDropdown { + width: 9rem !important; +} + +.ItemWiseReport-Date { + width: 8rem; +} + +.ItemWiseReport-table .ant-table-content table { + table-layout: unset !important; +} + +.toggle { + display: flex; + width: inherit; + height: 2vw; + flex-direction: row-reverse; + z-index: 1; + // padding-right: 93px; + padding-bottom: 25px; +} + +// .ant-switch:hover:not(.ant-switch-disabled) { +// background:var(--SELECTED_COLOR) ; +// } +//nk +@media only screen and (max-width: 499px) { + .ItemWiseReport-Amount-Collected-table tr { + justify-content: flex-start; + column-gap: 5rem; + } + + .ItemWiseReport-border-dashed { + width: 10rem; + } + + .ItemWiseReport-Amount-Collected-table { + justify-content: flex-start; + } + + .centerPageSub { + margin: 0 !important; + } + + .ItemWiseReport-border-dashed { + font-size: 15px; + } + + .ItemWiseReport-border-dashed { + width: 10rem; + } +} + +@media only screen and (max-width: 768px) { + .overalTotal { + width: 7rem; + font-size: 20px; + } +} + +.ItemWiseReport-Amount-Collected-table { + display: flex; + justify-content: flex-end; +} + +.ItemWiseReport-Amount-Collected-table tr { + display: flex; + // width: 15rem; + justify-content: space-between; +} + +.ItemWiseReport-border-dashed { + border-bottom: 1px dashed rgb(46, 46, 46); + width: 17rem; +} + +.ItemWiseReport-border-dashed { + font-size: 23px; + font-weight: 600; +} + +.custom-table { + width: 100%; + border-collapse: collapse; + border: 1px solid #909090; + font-family: "Poppins", sans-serif; + + > thead { + position: sticky; + top: -1px; + } +} + +.custom-table th { + background-color: #a4c5f4; + color: #1e1e1e; + padding: 6px; + text-align: left; + border: 1px solid #909090; + -webkit-text-stroke-width: 0.2px; + font-size: 12px; + font-weight: 500; + font-family: VAR(--HEADING_FONT_FAMILY); + // text-transform: uppercase; + text-transform: capitalize; + letter-spacing: 0.2px; +} + +.centerDivList { + display: flex; + flex-direction: column; + gap: 4px; + // width: 100%; + // height: 43vh; + overflow: scroll; + padding-bottom: 2rem; +} + +.custom-table td { + padding: 4px 6px; + border: 1px solid #909090; + text-align: left; + font-size: 12px !important; +} + +.custom-table tbody tr td { + text-align: left; + + .ant-select.ant-select-in-form-item { + width: 190px !important; + } +} + +.custom-table tbody tr td[colspan="7"] { + padding: 20px; +} + +.custom-table tbody tr.additionalCharges-selected { + background-color: #dddddd; +} + +.custom-table tbody tr.setAsDefault-selected { + background-color: #cceaf0; +} + +.custom-table { + .ant-form-item { + margin-bottom: 0 !important; + } + + .float-label { + margin-bottom: 8px !important; + } +} + +.ChargesAddAndCancel { + display: flex; + justify-content: flex-end; + gap: 1rem; + + > div { + border-radius: 6px; + padding: 5px 10px; + color: #fff; + font-weight: 600 !important; + cursor: pointer; + } + + > div:nth-child(1) { + background-color: #28aa3a; + } + + > div:nth-child(2) { + background-color: #ff0000; + } +} + +.custom-table { + Button:disabled, + Button[disabled] { + width: unset !important; + height: unset !important; + border-radius: 50px !important; + } +} diff --git a/src/Pages/ShiftMaster/ShiftMasterForm.jsx b/src/Pages/ShiftMaster/ShiftMasterForm.jsx index 0b4b9e8..38af509 100644 --- a/src/Pages/ShiftMaster/ShiftMasterForm.jsx +++ b/src/Pages/ShiftMaster/ShiftMasterForm.jsx @@ -21,7 +21,8 @@ import { getSession, validateSafeInput } from '../../Services/Others'; import { postshift, putshift } from '../../Features/ShiftMaster/ShiftMaster.js'; import './ShiftMaster.scss'; import { FaPlus } from 'react-icons/fa6'; - +import "../../Styles/OverAllStyle/OverAllStyle.scss"; + const subDirectory = import.meta.env.BASE_URL; const ShiftForm = ({ formType }) => { diff --git a/src/Pages/StockAdjustment/StockAdjustment.scss b/src/Pages/StockAdjustment/StockAdjustment.scss index dc303bf..df48eb1 100644 --- a/src/Pages/StockAdjustment/StockAdjustment.scss +++ b/src/Pages/StockAdjustment/StockAdjustment.scss @@ -254,8 +254,128 @@ -.stockAdjustListMaster { - .primary_Button { - width: 290px !important; +.custom-table { + width: 100%; + border-collapse: collapse; + border: 1px solid #909090; + font-family: 'Poppins', sans-serif; + + > thead { + position: sticky; + top: -1px; } } + +.custom-table th { + background-color: #a4c5f4; + color: #1e1e1e; + padding: 6px; + text-align: left; + border: 1px solid #909090; + -webkit-text-stroke-width: 0.2px; + font-size: 12px; + font-weight: 500; + font-family: VAR(--HEADING_FONT_FAMILY); + // text-transform: uppercase; + text-transform: capitalize; + letter-spacing: 0.2px; +} + +.centerDivList { + display: flex; + flex-direction: column; + gap: 4px; + // width: 100%; + // height: 43vh; + overflow: scroll; + padding-bottom: 2rem; +} + +.custom-table td { + padding: 4px 6px; + border: 1px solid #909090; + text-align: left; + font-size: 12px !important; +} + + +.custom-table tbody tr td { + text-align: left; + + .ant-select.ant-select-in-form-item { + width: 190px !important; + } +} + +.custom-table tbody tr td[colspan='7'] { + padding: 20px; +} + +.custom-table tbody tr.additionalCharges-selected { + background-color: #dddddd; +} + +.custom-table tbody tr.setAsDefault-selected { + background-color: #cceaf0; +} + +.custom-table { + .ant-form-item { + margin-bottom: 0 !important; + } + + .float-label { + margin-bottom: 8px !important; + } +} + +.ChargesAddAndCancel { + display: flex; + justify-content: flex-end; + gap: 1rem; + + > div { + border-radius: 6px; + padding: 5px 10px; + color: #fff; + font-weight: 600 !important; + cursor: pointer; + } + + > div:nth-child(1) { + background-color: #28aa3a; + } + + > div:nth-child(2) { + background-color: #ff0000; + } +} + + + +.custom-table { + Button:disabled, + Button[disabled] { + width: unset !important; + height: unset !important; + border-radius: 50px !important; + } +} + + + +.openingStock-ignoreProductBTN { + width: max-content; + white-space: nowrap; + height: max-content; + padding: 10px 16px; + color: #fff; + border-radius: 8px; + cursor: pointer; + border: none; + background-color: #e42006; + font-size: 14px; + font-weight: 400; + font-family: "Poppins"; + margin-left: 6px; +} diff --git a/src/Pages/StockAdjustment/StockAdjustmentList.jsx b/src/Pages/StockAdjustment/StockAdjustmentList.jsx index 9891084..ca6f471 100644 --- a/src/Pages/StockAdjustment/StockAdjustmentList.jsx +++ b/src/Pages/StockAdjustment/StockAdjustmentList.jsx @@ -203,7 +203,7 @@ const StockadjustmentList = () => {
-
+
{ onSearchChange={onSearchChange} />
-
+ handelAddButton()} diff --git a/src/Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx b/src/Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx index e368d5f..2cf7413 100644 --- a/src/Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx +++ b/src/Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx @@ -106,7 +106,7 @@ const KitechenFinishform = ({ formType }) => { useEffect(() => { Proddatas(); dispatch(changeBreadCrumb({ items: items })); - getPreference() + getPreference(); }, []); const Empchanges = async (e) => { @@ -982,12 +982,16 @@ const KitechenFinishform = ({ formType }) => { const getPreference = async () => { const data = { AppId: AppId, CompId: CompId, BranchId: BranchId }; - const { data: res } = await dispatch(getPreferenceData(data)).unwrap() - const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find((setting) => setting?.SettingIdName?.toLowerCase() === "decimal" && setting?.SettingValue === 'Y'); + const { data: res } = await dispatch(getPreferenceData(data)).unwrap(); + const decimalSetting = res?.data?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'decimal' && + setting?.SettingValue === 'Y' + ); if (decimalSetting) { - setAllowDecimal(true) + setAllowDecimal(true); } - } + }; function safeRound(amountStr) { if (amountStr == null) return allowDecimal ? '0.00' : '0'; diff --git a/src/Pages/openingStock/openingStockForm.scss b/src/Pages/openingStock/openingStockForm.scss index fa0cdff..93fb1e4 100644 --- a/src/Pages/openingStock/openingStockForm.scss +++ b/src/Pages/openingStock/openingStockForm.scss @@ -274,4 +274,27 @@ margin-bottom: 10px; color: #1292ee; text-decoration: underline; -} \ No newline at end of file +} + +.purchase-entry-fh { + @media (max-width: 600px) { + padding-top: 0; + } + + .formName { + display: flex; + } + + // .formHeader { + // width: -webkit-fill-available; + // } + + .header-buttons { + display: flex; + align-items: center; + justify-content: flex-end; + flex-direction: row; + width: 100%; + gap: 10px; + } +} diff --git a/src/Styles/AppPage/AppPage.scss b/src/Styles/AppPage/AppPage.scss index 7000a0d..cb15c6e 100644 --- a/src/Styles/AppPage/AppPage.scss +++ b/src/Styles/AppPage/AppPage.scss @@ -168,6 +168,7 @@ flex-direction: row; row-gap: 0.5rem; gap: 2rem; + padding-bottom: 4px; // flex-wrap: wrap; @media (max-width: 768px) { flex-wrap: wrap; @@ -458,3 +459,8 @@ background-color: #2c88ee1c !important; font-weight: unset; } + + + .ant-table-thead tr { + background-color: #2c88ee !important; + } \ No newline at end of file diff --git a/src/Styles/BookingScreen/Components/OtherConponents/Reprint/BSReprint.scss b/src/Styles/BookingScreen/Components/OtherConponents/Reprint/BSReprint.scss index 609f45c..5382c6a 100644 --- a/src/Styles/BookingScreen/Components/OtherConponents/Reprint/BSReprint.scss +++ b/src/Styles/BookingScreen/Components/OtherConponents/Reprint/BSReprint.scss @@ -46,7 +46,7 @@ padding: 5px; gap: 5px; align-items: center; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; float: right; background-color: #000; font-size: x-small; @@ -178,6 +178,9 @@ height: 70vh; overflow: scroll; scrollbar-width: thin; + .ant-table-thead tr { + background-color: #2c88ee !important; + } .ant-table-cell { padding: 8px 8px !important; @@ -190,8 +193,8 @@ padding: 0.5rem; background-color: #fafafa; } - .ant-table-content{ - font-family: 'Poppins'; + .ant-table-content { + font-family: "Poppins"; } } @@ -208,7 +211,7 @@ } .bsreprintmodaltable-search input { - font-family: 'Poppins'; + font-family: "Poppins"; width: 250px; padding: 4px 14px; border: 1px solid #ccc; diff --git a/src/Styles/BookingScreen/Components/OtherConponents/Reprint/CreditCustomerReprint.scss b/src/Styles/BookingScreen/Components/OtherConponents/Reprint/CreditCustomerReprint.scss index 5643868..63c501a 100644 --- a/src/Styles/BookingScreen/Components/OtherConponents/Reprint/CreditCustomerReprint.scss +++ b/src/Styles/BookingScreen/Components/OtherConponents/Reprint/CreditCustomerReprint.scss @@ -1,9 +1,8 @@ .receipt-reprint { - - font-family: 'Poppins'; + font-family: "Poppins"; .ant-table { - font-family: 'Poppins', sans-serif !important; + font-family: "Poppins", sans-serif !important; font-weight: 400 !important; } @@ -12,24 +11,27 @@ align-items: center; // justify-content: space-between; gap: 10px; - margin-bottom: 16px; + margin-bottom: 16px; } .receipt-reprint-body { height: 70vh; + .ant-table-thead tr { + background-color: #2c88ee !important; + } table { tbody { - >tr { + > tr { box-shadow: unset !important; border-bottom: unset !important; } - >tr:nth-child(even) { + > tr:nth-child(even) { background-color: #4b4b4b49 !important; } - >tr:nth-child(odd) { + > tr:nth-child(odd) { background-color: #ffffff00 !important; } } @@ -38,29 +40,23 @@ .search-input { width: 280px !important; - padding: 4px 12px; + padding: 5px 12px; border: 1px solid rgb(204, 204, 204) !important; border-radius: 6px; font-size: 14px; outline: none; transition: 0.2s; - font-family: 'Poppins'; + font-family: "Poppins"; &:focus { border: 1px solid #1677ff !important; } - } - - .reprint-reason-header { font-size: 3rem !important; } - - - @media (max-width: 567px) { .search-input { width: unset !important; @@ -73,20 +69,18 @@ scrollbar-width: thin; } } - } .reprint-reason-modal { - font-family: 'Poppins' !important; + font-family: "Poppins" !important; .ant-table-cell { font-weight: 400 !important; - font-family: 'Poppins' !important; + font-family: "Poppins" !important; font-size: 14px !important; - >div { - font-family: 'Poppins' !important; - + > div { + font-family: "Poppins" !important; } } @@ -96,10 +90,9 @@ } .original-duplicate-switch { - .ant-switch-inner-checked, .ant-switch-inner-unchecked { - font-family: 'Poppins'; + font-family: "Poppins"; font-weight: 500; } @@ -118,7 +111,6 @@ .ant-select-arrow { top: 75%; } - } .action-icons-reprint { @@ -151,12 +143,10 @@ } .icon-email { - background-color: #f59e0b; } .icon-whatsapp { - background-color: #076e26ff; } -} \ No newline at end of file +} diff --git a/src/Styles/Employee/EmpMaster.scss b/src/Styles/Employee/EmpMaster.scss index 61ab1c1..6a5c36b 100644 --- a/src/Styles/Employee/EmpMaster.scss +++ b/src/Styles/Employee/EmpMaster.scss @@ -158,3 +158,9 @@ flex-wrap: wrap; margin-bottom: 10px; } + +.stockAdjustListMaster { + .primary_Button { + width: max-content !important; + } +} diff --git a/src/Styles/OverAllStyle/OverAllStyle.scss b/src/Styles/OverAllStyle/OverAllStyle.scss index 6e9c64b..c0c4cf6 100644 --- a/src/Styles/OverAllStyle/OverAllStyle.scss +++ b/src/Styles/OverAllStyle/OverAllStyle.scss @@ -10,7 +10,7 @@ .productListBrowseImageButton2 { width: 65px; background-color: #dbd1d1; - border: 0.5px solid gray; + border: 0.5px solid #808080; border-radius: 3px; font-size: 10px; font-weight: 600; @@ -74,7 +74,7 @@ .samplereportTableButton { justify-content: flex-end; - margin: 1rem 0; + margin: 10px 0; align-items: center; display: flex; width: 100%; @@ -754,6 +754,7 @@ .StorekitchenlistTable { scrollbar-width: thin; padding-right: 8px; + margin-top: 10px; @media (max-width: 600px) { } @@ -1538,6 +1539,9 @@ table { padding: 3px 14px 4px 11px !important; text-align: center; } + .ant-table-thead tr { + background-color: #2c88ee !important; + } } .PriChangeUpper { display: flex; @@ -1561,3 +1565,44 @@ table { } } } + +.pruchaseCatBTN { + display: flex; + align-items: center; + gap: 7px; + padding: 8px 16px; + background-color: #0bad77; + border-radius: 7px; + color: white; + cursor: pointer; + font-family: "Poppins"; + font-weight: 400; + white-space: nowrap; + font-size: 13.5px; + transition: all 0.2s; + &:hover { + background-color: #069666; + } +} + +.scan-receipt-btn { + display: flex; + align-items: center; + gap: 7px; + padding: 8px 16px; + background-color: #1292ee; + border-radius: 7px; + color: white; + cursor: pointer; + font-family: "Poppins"; + font-weight: 400; + white-space: nowrap; + font-size: 13.5px; + transition: all 0.2s; + &:hover { + background-color: #0985be; + } +} +.CustomerForm-Master { + width: 100%; +} diff --git a/src/Styles/PurchaseQuotation/PurchaseQuotation.scss b/src/Styles/PurchaseQuotation/PurchaseQuotation.scss index 74f7629..514238c 100644 --- a/src/Styles/PurchaseQuotation/PurchaseQuotation.scss +++ b/src/Styles/PurchaseQuotation/PurchaseQuotation.scss @@ -4,7 +4,7 @@ flex-wrap: wrap; gap: 1rem; - .ant-input-affix-wrapper>input.ant-input { + .ant-input-affix-wrapper > input.ant-input { padding-top: 1.7rem; } } @@ -18,6 +18,9 @@ overflow: auto !important; scrollbar-width: thin; } + .ant-table-thead tr { + background-color: #2c88ee !important; + } } .purchaseQuoaDetails { @@ -86,8 +89,8 @@ // right: 100px; } -.ant-table-wrapper .ant-table-tbody>tr.ant-table-row:hover>td, -.ant-table-wrapper .ant-table-tbody>tr>th.ant-table-cell-row-hover>td.ant-table-cell-row-hover { +.ant-table-wrapper .ant-table-tbody > tr.ant-table-row:hover > td, +.ant-table-wrapper .ant-table-tbody > tr > th.ant-table-cell-row-hover > td.ant-table-cell-row-hover { background: rgb(224, 223, 223) !important; font-size: unset !important; transition-duration: 0.4s !important; @@ -102,7 +105,6 @@ } .Quotation-table { - // width: 70px; .ant-table table { border-spacing: 0px; @@ -122,7 +124,7 @@ border-radius: 8px; font-size: 14px; font-weight: 500; - font-family: 'Poppins', sans-serif; + font-family: "Poppins", sans-serif; padding: 6px 12px; border: 1px solid #d1d1d1; } @@ -146,4 +148,4 @@ input { padding: 6px 25px 6px 12px !important; } -} \ No newline at end of file +} diff --git a/src/Styles/Reports/ItemWiseReport/ItemWiseReport.scss b/src/Styles/Reports/ItemWiseReport/ItemWiseReport.scss index 17627da..e680394 100644 --- a/src/Styles/Reports/ItemWiseReport/ItemWiseReport.scss +++ b/src/Styles/Reports/ItemWiseReport/ItemWiseReport.scss @@ -146,7 +146,7 @@ background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important; margin-bottom: 2px; font-size: 16px; - font-family: 'Gilroy'; + font-family: "Gilroy"; color: #ffffff; border-radius: 5px; cursor: pointer; @@ -436,51 +436,6 @@ } } -// @media screen and (max-width: 620px) { -// .ItemWiseReport-table{ -// height: 41vh !important; -// } -// .ItemWiseReport-dateaAnd-buttons{ -// display: flex; -// flex-direction: column; -// column-gap: 0.5rem; -// row-gap: 0.5rem; -// // align-items: center; -// flex-wrap: wrap; -// } -// .ItemWiseReport-Date-picker { -// display: flex; -// // flex-wrap: wrap; - -// column-gap: 0.3rem; -// row-gap: 0rem; -// } -// .dropdownUserid{ -// .ant-select-single:not(.ant-select-customize-input) .ant-select-selector -// { -// width: 10rem; -// } -// } -// .ItemWiseReport-netAmount { -// display: flex; -// justify-content: flex-start; -// } - -// } -// @media only screen and (min-width: 450px) and (max-width: 640px){ -// .ItemWiseReport-table{ -// width: 500px; - -// } -// .ItemWiseReport-dateaAnd-buttons{ -// display: flex; -// column-gap: 1rem; -// row-gap: 1rem; -// align-items: center; -// flex-wrap: wrap; -// justify-content: space-between; -// } -// } .ItemWiseReport-table .ant-table-thead th.ant-table-column-has-sorters:hover { background-color: #bad4f9; } @@ -585,29 +540,107 @@ font-weight: 600; } -// .ItemWiseReport-table { -// overflow-y: auto; -// scrollbar-width: unset; -// scrollbar-color: #c1c1c1 transparent; -// } +.custom-table { + width: 100%; + border-collapse: collapse; + border: 1px solid #909090; + font-family: "Poppins", sans-serif; -// .ItemWiseReport-table::-webkit-scrollbar { -// width: 25px; -// } + > thead { + position: sticky; + top: -1px; + } +} -// .ItemWiseReport-table::-webkit-scrollbar-track { -// background: #f0f0f0; -// border-radius: 10px; -// } +.custom-table th { + background-color: #a4c5f4; + color: #1e1e1e; + padding: 6px; + text-align: left; + border: 1px solid #909090; + -webkit-text-stroke-width: 0.2px; + font-size: 12px; + font-weight: 500; + font-family: VAR(--HEADING_FONT_FAMILY); + // text-transform: uppercase; + text-transform: capitalize; + letter-spacing: 0.2px; +} -// .ItemWiseReport-table::-webkit-scrollbar-thumb { -// background-color: #c1c1c1; -// border-radius: 10px; -// border: 6px solid transparent; -// background-clip: content-box; -// transition: background-color 0.3s ease; -// } +.centerDivList { + display: flex; + flex-direction: column; + gap: 4px; + // width: 100%; + // height: 43vh; + overflow: scroll; + padding-bottom: 2rem; +} -// .ItemWiseReport-table::-webkit-scrollbar-thumb:hover { -// background-color: #a0a0a0; -// } +.custom-table td { + padding: 4px 6px; + border: 1px solid #909090; + text-align: left; + font-size: 12px !important; +} + +.custom-table tbody tr td { + text-align: left; + + .ant-select.ant-select-in-form-item { + width: 190px !important; + } +} + +.custom-table tbody tr td[colspan="7"] { + padding: 20px; +} + +.custom-table tbody tr.additionalCharges-selected { + background-color: #dddddd; +} + +.custom-table tbody tr.setAsDefault-selected { + background-color: #cceaf0; +} + +.custom-table { + .ant-form-item { + margin-bottom: 0 !important; + } + + .float-label { + margin-bottom: 8px !important; + } +} + +.ChargesAddAndCancel { + display: flex; + justify-content: flex-end; + gap: 1rem; + + > div { + border-radius: 6px; + padding: 5px 10px; + color: #fff; + font-weight: 600 !important; + cursor: pointer; + } + + > div:nth-child(1) { + background-color: #28aa3a; + } + + > div:nth-child(2) { + background-color: #ff0000; + } +} + +.custom-table { + Button:disabled, + Button[disabled] { + width: unset !important; + height: unset !important; + border-radius: 50px !important; + } +} diff --git a/src/index.css b/src/index.css index 66e4cf2..36850ea 100644 --- a/src/index.css +++ b/src/index.css @@ -101,11 +101,6 @@ a { background: #999999; } -/* Handle on hover */ -::-webkit-scrollbar-thumb:hover { - /* background: #8F1E78; */ -} - .samplereportTable { overflow: auto; width: 80vw; @@ -178,8 +173,6 @@ a { /* Position the tooltip */ position: absolute; z-index: 1; - - } .navbar-top { @@ -331,3 +324,7 @@ a { .ant-table table { border-spacing: 0 0 !important; } + +.ant-table-tbody .ant-table-cell { + font-family: 'Poppins' !important; +}