jQuery( document ).ready( function( $ ) {
	jQuery( '#vendor-dashboard-from-date' ).val( elexMvVendorDashboardParams.from_date );
} );

jQuery( '#apply_filter_vendor_dashboard_btn' ).click( function() {
	var formdata = new FormData( document.getElementById( 'apply_filter_vendor_dashboard_form' ) );
	formdata.append( '_ajax_nonce', elexMvVendorDashboardParams.nonce );

	var link_dash = elexMvVendorDashboardParams.ajax_url;
	link_dash += '?action=elex_mv_vendor_dashboard_page';

	jQuery.ajax( {
		url: link_dash,
		type: 'POST',
		processData: false,
		contentType: false,
		data: formdata,
		success: function( result ) {
			var data = result.data;
			map_vendor_dashboard_details( data );
		},
	} );
} );
