File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,15 @@ class BuyLinkFilterForm extends React.Component {
126126
127127 handleProductChange = async ( event , value ) => {
128128 let newFilterParams = this . state . filterParams ;
129- newFilterParams [ 'product_id' ] = value . id
129+ newFilterParams [ 'product_id' ] = value ? value . id : ''
130130 this . setState ( prevState => ( {
131131 filterParams : newFilterParams
132132 } ) ) ;
133133 }
134134
135135 handleUserChange = async ( event , value ) => {
136136 let newFilterParams = this . state . filterParams ;
137- newFilterParams [ 'user_id' ] = value . id
137+ newFilterParams [ 'user_id' ] = value ? value . id : ''
138138 this . setState ( prevState => ( {
139139 filterParams : newFilterParams
140140 } ) ) ;
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ class BuyLinksTable extends React.Component {
159159 { buyLink . use_credits ? 'Applicable' : 'Not Applicable' }
160160 </ TableCell >
161161 < TableCell align = "center" >
162- { buyLink . created_by }
162+ { buyLink . buyLink_creator . firstname } { buyLink . buyLink_creator . lastname }
163163 </ TableCell >
164164
165165 </ TableRow >
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ const handleAddBuyLink = (data) => {
1010}
1111
1212const searchBuyLinks = ( queryParams , pagination ) => {
13+
14+ if ( ! queryParams . product_id )
15+ delete queryParams . product_id
16+
17+ if ( ! queryParams . user_id )
18+ delete queryParams . user_id
19+
1320 let query = querystring . stringify ( queryParams ) ;
1421 return axios . get ( `/api/v2/admin/buy_links?page=` + pagination . currentPage + `&limit=` + pagination . rowsPerPage + `&` + query )
1522}
You can’t perform that action at this time.
0 commit comments