Merge pull request 'direct sale fix' (#137) from temp/direct-sales-feature into main
Reviewed-on: Pozomind/pozo-retail-app#137
This commit is contained in:
commit
05fbc3e2b7
|
|
@ -84,6 +84,13 @@ const DirectSale = ({ UomData = [], TaxData = [], ProductTypeData = [], ProdCatD
|
||||||
|
|
||||||
const handleDelete = async (record) => {
|
const handleDelete = async (record) => {
|
||||||
if (record?.prodId) {
|
if (record?.prodId) {
|
||||||
|
if (searchText != null && searchText !== '') {
|
||||||
|
setSearchText('')
|
||||||
|
setCurrentPage(1);
|
||||||
|
if (searchInputRef.current) {
|
||||||
|
searchInputRef.current.value = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
const deleteData = {
|
const deleteData = {
|
||||||
ProdId: record.prodId,
|
ProdId: record.prodId,
|
||||||
ActiveStatus: record.activeStatus === 'A' ? 'D' : 'A',
|
ActiveStatus: record.activeStatus === 'A' ? 'D' : 'A',
|
||||||
|
|
@ -814,7 +821,10 @@ const DirectSale = ({ UomData = [], TaxData = [], ProductTypeData = [], ProdCatD
|
||||||
ref={searchInputRef}
|
ref={searchInputRef}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search Product / Short Code..."
|
placeholder="Search Product / Short Code..."
|
||||||
onChange={(e) => setSearchText(e.target.value)}
|
onChange={(e) => {
|
||||||
|
setSearchText(e.target.value);
|
||||||
|
setCurrentPage(1)
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginBottom: '10px', color: '#666', fontSize: '14px', fontStyle: 'italic' }}>
|
<div style={{ marginBottom: '10px', color: '#666', fontSize: '14px', fontStyle: 'italic' }}>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue