Merge pull request 'Fix #104 Master Form (Product Master , Price Change)' (#106) from Feb09 into main

Reviewed-on: Pozomind/pozo-retail-app#106
This commit is contained in:
karthikalakshmi 2026-02-09 12:44:56 +05:30
commit 8cef0cc788
4 changed files with 281 additions and 244 deletions

View File

@ -4035,7 +4035,7 @@ const ProductForm = ({ formType }) => {
</div> </div>
)} )}
<div className="submitButton"> <div className="ProductSubBTN">
<Buttons <Buttons
buttonText="SUBMIT" buttonText="SUBMIT"
color="901D77" color="901D77"

View File

@ -152,7 +152,7 @@ const StockPriceUpdate = () => {
const handleRemoveRecord = (index) => { const handleRemoveRecord = (index) => {
setUploadedData((prev) => prev.filter((_, i) => i !== index)); setUploadedData((prev) => prev.filter((_, i) => i !== index));
}; };
console.log(uploadedData, "uploadedData") console.log(uploadedData, 'uploadedData');
const columns = [ const columns = [
{ {
title: 'Product Name', title: 'Product Name',
@ -897,7 +897,6 @@ const StockPriceUpdate = () => {
newData?.splice(index, 1, { newData?.splice(index, 1, {
...item, ...item,
...row, ...row,
}); });
setBulkProductData(newData); setBulkProductData(newData);
} else { } else {
@ -1056,7 +1055,7 @@ const StockPriceUpdate = () => {
title: 'Name', title: 'Name',
dataIndex: 'ProdName', dataIndex: 'ProdName',
key: 'ProdName', key: 'ProdName',
width: '20%', width: 150,
filteredValue: [BulksearchedText], filteredValue: [BulksearchedText],
onFilter: (value, record) => { onFilter: (value, record) => {
return String(record.ProdName) return String(record.ProdName)
@ -1078,14 +1077,14 @@ const StockPriceUpdate = () => {
dataIndex: 'ProdVariantName', dataIndex: 'ProdVariantName',
key: 'ProdVariantName', key: 'ProdVariantName',
align: 'left', align: 'left',
width: '120px', width: 120,
}, },
{ {
title: 'Batch No', title: 'Batch No',
dataIndex: 'BatchRef', dataIndex: 'BatchRef',
key: 'BatchRef', key: 'BatchRef',
align: 'left', align: 'left',
width: '120px', width: 120,
}, },
...(hasField('Stock Date') ...(hasField('Stock Date')
? [ ? [
@ -1094,7 +1093,7 @@ const StockPriceUpdate = () => {
dataIndex: 'InwardDate', dataIndex: 'InwardDate',
key: 'InwardDate', key: 'InwardDate',
align: 'center', align: 'center',
width: '100px', width: 120,
render: (InwardDate) => render: (InwardDate) =>
InwardDate !== null ? ExtractDateFormate(InwardDate) : '-', InwardDate !== null ? ExtractDateFormate(InwardDate) : '-',
}, },
@ -1107,7 +1106,7 @@ const StockPriceUpdate = () => {
dataIndex: 'ExpDate', dataIndex: 'ExpDate',
key: 'ExpDate', key: 'ExpDate',
align: 'center', align: 'center',
width: '100px', width: 100,
render: (ExpDate) => render: (ExpDate) =>
ExpDate !== null ? ExtractDateFormate(ExpDate) : '-', ExpDate !== null ? ExtractDateFormate(ExpDate) : '-',
}, },
@ -1965,13 +1964,11 @@ const StockPriceUpdate = () => {
const hasWholesale = !!data?.NewWholeSalePrice; const hasWholesale = !!data?.NewWholeSalePrice;
const isModified = data?.isModified === true; const isModified = data?.isModified === true;
// valid cases // valid cases
if (hasMRP && hasSell && isModified) return true; if (hasMRP && hasSell && isModified) return true;
// ✅ Case 2: Only Wholesale changed // ✅ Case 2: Only Wholesale changed
if (!hasMRP && !hasSell && hasWholesale && isModified) return true;; if (!hasMRP && !hasSell && hasWholesale && isModified) return true;
return false; return false;
}) })
@ -1999,7 +1996,6 @@ const StockPriceUpdate = () => {
return; return;
} }
const res = await dispatch(bulkPriceUpdate(putData))?.unwrap(); const res = await dispatch(bulkPriceUpdate(putData))?.unwrap();
if (res?.data?.statusCode === 1) { if (res?.data?.statusCode === 1) {
@ -2092,7 +2088,7 @@ const StockPriceUpdate = () => {
onComplete={onComplete} onComplete={onComplete}
/> />
<div className="formAddNew"> <div className="formAddNew" style={{ justifyContent: 'space-between' }}>
<div> <div>
<FormHeader title={'Price Change'} /> <FormHeader title={'Price Change'} />
</div> </div>
@ -2104,16 +2100,7 @@ const StockPriceUpdate = () => {
}} }}
> >
{RadioSelection == 'Bulk' && ( {RadioSelection == 'Bulk' && (
<div <div className="PriChangeUpper">
className="toolbar"
style={{
display: 'flex',
gap: '1rem',
alignItems: 'center',
justifyContent: 'space-between',
width: '100%',
}}
>
<div className="formSearch"> <div className="formSearch">
<Search <Search
value={BulksearchedText} value={BulksearchedText}
@ -2132,7 +2119,7 @@ const StockPriceUpdate = () => {
/> />
</div> </div>
<Tooltip title="Field Setup"> <Tooltip title="Field Setup">
<div className="btn btn--info" onClick={handleFieldSetup}> <div className="btnbtninfo" onClick={handleFieldSetup}>
<MdOutlineAppRegistration size={19} /> <MdOutlineAppRegistration size={19} />
</div> </div>
</Tooltip> </Tooltip>
@ -2252,10 +2239,7 @@ const StockPriceUpdate = () => {
</div> </div>
)} )}
{RadioSelection == 'Bulk' && ( {RadioSelection == 'Bulk' && (
<div <div className="bulkChangePriceTable">
className="samplereportTable reportTable pricechangeTable"
style={{ height: '65vh !important' }}
>
<Table <Table
columns={BulkPriceColumns} columns={BulkPriceColumns}
components={BulkComponents} components={BulkComponents}

View File

@ -21,13 +21,9 @@
color: #fff; color: #fff;
padding: 15px; padding: 15px;
border: 1px solid; border: 1px solid;
overflow: hidden; overflow: hidden;
width: 170px; width: 170px;
height: 45px; height: 45px;
background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important; background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important;
@ -42,10 +38,6 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
z-index: 2; z-index: 2;
} }
.Counter-Category-mapping { .Counter-Category-mapping {
@ -198,7 +190,7 @@
.edit-btn, .edit-btn,
.remove-btn { .remove-btn {
border: none; border: none;
font-family: 'Poppins'; font-family: "Poppins";
padding: 4px 10px; padding: 4px 10px;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
@ -223,7 +215,6 @@
} }
.address-type-section { .address-type-section {
// padding: 12px; // padding: 12px;
// background-color: #f8fafc; // background-color: #f8fafc;
// border-radius: 8px; // border-radius: 8px;
@ -584,7 +575,7 @@
button { button {
padding: 14px 18px; padding: 14px 18px;
border: none; border: none;
font-family: 'Poppins', sans-serif; font-family: "Poppins", sans-serif;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
@ -718,7 +709,7 @@
.add-slot-header { .add-slot-header {
font-size: 25px; font-size: 25px;
font-weight: 600; font-weight: 600;
font-family: 'Gilroy'; font-family: "Gilroy";
padding-bottom: 6px; padding-bottom: 6px;
} }
@ -744,7 +735,7 @@
.swicthCardScanToggle { .swicthCardScanToggle {
button { button {
background-color: #1292ee !important; background-color: #1292ee !important;
font-family: 'Poppins'; font-family: "Poppins";
font-weight: 500; font-weight: 500;
} }
} }
@ -756,7 +747,7 @@
} }
.searched-value { .searched-value {
font-family: 'Poppins'; font-family: "Poppins";
font-weight: 500; font-weight: 500;
} }
@ -764,7 +755,8 @@
scrollbar-width: thin; scrollbar-width: thin;
padding-right: 8px; padding-right: 8px;
@media (max-width: 600px) {} @media (max-width: 600px) {
}
.ant-table-thead { .ant-table-thead {
&:hover { &:hover {
@ -915,14 +907,14 @@
} }
.table-notes { .table-notes {
font-family: 'Poppins'; font-family: "Poppins";
font-style: italic; font-style: italic;
margin-bottom: 10px; margin-bottom: 10px;
} }
.ant-table table { .ant-table table {
border-spacing: 0 !important; border-spacing: 0 !important;
font-family: 'Poppins'; font-family: "Poppins";
} }
} }
@ -956,13 +948,13 @@
table { table {
thead { thead {
th { th {
font-family: 'Gilroy' !important; font-family: "Gilroy" !important;
} }
} }
tbody { tbody {
td { td {
font-family: 'Poppins' !important; font-family: "Poppins" !important;
font-weight: 500; font-weight: 500;
font-size: 13px; font-size: 13px;
} }
@ -1416,8 +1408,7 @@ table {
p { p {
width: 15px; width: 15px;
height: 15px; height: 15px;
background-color: #C00000; background-color: #c00000;
} }
span { span {
@ -1433,7 +1424,7 @@ table {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
background-color: #1292EE; background-color: #1292ee;
color: #fff; color: #fff;
font-family: "Poppins"; font-family: "Poppins";
font-weight: 500; font-weight: 500;
@ -1487,14 +1478,14 @@ table {
.tab-item:hover { .tab-item:hover {
background: #f5f5f5; background: #f5f5f5;
color: #901D77; color: #901d77;
} }
.tab-item.active { .tab-item.active {
display: flex; display: flex;
background: #fff; background: #fff;
color: #901D77; color: #901d77;
border-color: #901D77; border-color: #901d77;
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
margin-bottom: -2px; margin-bottom: -2px;
z-index: 1; z-index: 1;
@ -1503,7 +1494,7 @@ table {
} }
.tab-item.active::after { .tab-item.active::after {
content: ''; content: "";
position: absolute; position: absolute;
bottom: -2px; bottom: -2px;
left: 0; left: 0;
@ -1528,5 +1519,45 @@ table {
color: #c00000; color: #c00000;
font-weight: 500; font-weight: 500;
} }
}
.bulkChangePriceTable {
width: 83vw;
overflow: auto;
height: 60vh;
scrollbar-width: thin;
position: relative;
.ant-table-cell {
padding: 2px 6px !important;
}
.ant-table-tbody {
height: 60vh !important;
}
.ant-input {
padding: 3px 14px 4px 11px !important;
text-align: center;
}
}
.PriChangeUpper {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
.btnbtninfo {
background: #8f1e78;
color: #fff;
vertical-align: top;
display: flex;
align-items: center;
justify-content: center;
width: 42px;
border-radius: 4px;
height: 42px;
&:hover {
background: #d333b3;
}
}
} }

View File

@ -1,9 +1,16 @@
.cropUploadFieldSmall { .cropUploadFieldSmall {
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container, .ant-upload-list.ant-upload-list-picture-card
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container, .ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container, :where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container { .ant-upload-list.ant-upload-list-picture-card
.ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
.ant-upload-list.ant-upload-list-picture-circle
.ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
.ant-upload-list.ant-upload-list-picture-circle
.ant-upload-list-item-container {
width: 65px; width: 65px;
height: 65px; height: 65px;
} }
@ -45,7 +52,7 @@
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
background-color: 'rgba(0, 0, 0, 0.02)'; background-color: "rgba(0, 0, 0, 0.02)";
& .ant-form-item .ant-form-item-explain-error { & .ant-form-item .ant-form-item-explain-error {
font-weight: 400 !important; font-weight: 400 !important;
@ -290,7 +297,7 @@
color: #23378a; color: #23378a;
padding: 12px 24px; padding: 12px 24px;
border: none; border: none;
font-family: 'Poppins', sans-serif; font-family: "Poppins", sans-serif;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
cursor: pointer; cursor: pointer;
@ -412,7 +419,7 @@
border: none; border: none;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
font-family: 'Poppins', sans-serif; font-family: "Poppins", sans-serif;
color: #fff; color: #fff;
background-color: #1677ff; background-color: #1677ff;
border-radius: 6px; border-radius: 6px;
@ -446,7 +453,7 @@
background-color: #d4e7ff; background-color: #d4e7ff;
font-weight: 500; font-weight: 500;
font-size: 13px; font-size: 13px;
font-family: 'Poppins'; font-family: "Poppins";
border: none; border: none;
cursor: pointer; cursor: pointer;
border-radius: 6px; border-radius: 6px;
@ -473,8 +480,12 @@
.ant-form-item { .ant-form-item {
margin-bottom: 0; margin-bottom: 0;
} }
.ant-input {
padding: 4px 14px 6px 11px !important;
text-decoration: underline;
text-decoration-color: #b8b8b8;
}
} }
.productFormproductImg { .productFormproductImg {
width: 350px; width: 350px;
@ -483,8 +494,19 @@
.Customized_QuickAdd { .Customized_QuickAdd {
margin-bottom: 10px; margin-bottom: 10px;
font-family: 'Poppins', sans-serif; font-family: "Poppins", sans-serif;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
} }
.ProductSubBTN {
width: 100%;
display: flex;
justify-content: flex-end;
@media (max-width: 500px) {
position: fixed;
right: 10px;
bottom: 8px;
}
}