Add minimum ROAS functionality to product management; implement saving and display in product listing
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
<th scope="col">Konw.</th>
|
||||
<th scope="col">Wartość konw.</th>
|
||||
<th scope="col">ROAS</th>
|
||||
<th scope="col">Min. ROAS</th>
|
||||
<th scope="col">CL3</th>
|
||||
<th scope="col">CL4</th>
|
||||
</tr>
|
||||
@@ -79,12 +80,34 @@
|
||||
{ width: 'auto', name: 'conversions' },
|
||||
{ width: 'auto', name: 'conversions_value', className: "dt-type-numeric" },
|
||||
{ width: 'auto', name: 'roas' },
|
||||
{ width: '100px', name: 'min_roas' },
|
||||
{ width: 'auto', name: 'cl3', orderable: false },
|
||||
{ width: '200px', orderable: false }],
|
||||
order: [ [ 5, 'desc' ] ]
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'change', '.min_roas', function()
|
||||
{
|
||||
var input = $( this );
|
||||
var product_id = $( this ).attr( 'product_id' );
|
||||
var min_roas = $( this ).val();
|
||||
|
||||
input.addClass('saving');
|
||||
$.ajax({
|
||||
url: '/products/save_min_roas/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
product_id: product_id,
|
||||
min_roas: min_roas
|
||||
},
|
||||
success: function( response ) {
|
||||
},
|
||||
complete: function() {
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$( 'body' ).on( 'change', '.custom_label_4', function()
|
||||
{
|
||||
var input = $( this );
|
||||
|
||||
Reference in New Issue
Block a user