SUPORTE
Por favor, inscreva-se
function wpsc_get_ticket_list(is_humbargar=!1){
supportcandy.current_section='ticket-list';
if(is_humbargar)wpsc_toggle_humbargar();
if(wpsc_is_description_text()){if(!confirm(supportcandy.translations.warning_message)){return}else{var is_tinymce=(typeof tinyMCE!="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden();if(is_tinymce&&tinymce.get('description')){var description=tinyMCE.get('description').setContent('')}else{var description=jQuery('#description').val('')} ticket_id=jQuery('#wpsc-current-ticket').val();wpsc_clear_saved_draft_reply(ticket_id)}}
var id=supportcandy.current_ticket_id;if(id){delete supportcandy.current_ticket_id;wpsc_get_individual_ticket(id);return}
supportcandy.ticketListIsIndividual=!1;
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.ticket-list, .wpsc-humbargar-menu-item.ticket-list').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.ticket_list);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','ticket-list');search_params.delete('ticket-id');url.search=search_params.toString();window.history.replaceState({},null,url.toString());
jQuery('.wpsc-body').html(supportcandy.loader_html);
var data={action:'wpsc_get_ticket_list',_ajax_nonce:supportcandy.nonce,is_frontend:supportcandy.is_frontend};search_params.forEach(function(value,key){data[key]=value});if(typeof supportcandy.ticketList!='undefined'&&typeof supportcandy.ticketList.filters!='undefined'){data.filters=supportcandy.ticketList.filters} jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style()});wpsc_delete_auto_draft()}
function wpsc_get_individual_ticket(id){
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.ticket-list, .wpsc-humbargar-menu-item.ticket-list').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.ticket_list);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','ticket-list');search_params.set('ticket-id',id);url.search=search_params.toString();window.history.replaceState({},null,url.toString());
jQuery('.wpsc-body').html(supportcandy.loader_html);
supportcandy.ticketListIsIndividual=!0;
var data={action:'wpsc_get_individual_ticket',ticket_id:id,};search_params.forEach(function(value,key){data[key]=value});jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style()})}
function wpsc_get_ticket_form(is_humbargar=!1){
supportcandy.current_section='new-ticket';
if(is_humbargar)wpsc_toggle_humbargar();
if(wpsc_is_description_text()){if(confirm(supportcandy.translations.warning_message)){current_ticket=jQuery('#wpsc-current-ticket').val();wpsc_clear_saved_draft_reply(current_ticket)}else{return}}
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.new-ticket, .wpsc-humbargar-menu-item.new-ticket').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.new_ticket);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','new-ticket');search_params.delete('ticket-id');url.search=search_params.toString();window.history.replaceState({},null,url.toString());
jQuery('.wpsc-body').html(supportcandy.loader_html);
var data={action:'wpsc_get_ticket_form',_ajax_nonce:supportcandy.nonce};search_params.forEach(function(value,key){data[key]=value});jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style()})}
function wpsc_get_user_profile(is_humbargar=!1){
supportcandy.current_section='my-profile';
if(is_humbargar)wpsc_toggle_humbargar();
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.my-profile, .wpsc-humbargar-menu-item.my-profile').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.my_profile);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','my-profile');search_params.delete('ticket-id');url.search=search_params.toString();window.history.replaceState({},null,url.toString());
jQuery('.wpsc-body').html(supportcandy.loader_html);
var data={action:'wpsc_get_user_profile'};search_params.forEach(function(value,key){data[key]=value});jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style()})}
function wpsc_get_agent_profile(is_humbargar=!1){
supportcandy.current_section='agent-profile';
if(is_humbargar)wpsc_toggle_humbargar();
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.agent-profile, .wpsc-humbargar-menu-item.agent-profile').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.agent_profile);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','agent-profile');search_params.delete('ticket-id');url.search=search_params.toString();window.history.replaceState({},null,url.toString());
jQuery('.wpsc-body').html(supportcandy.loader_html);
var data={action:'wpsc_get_agent_profile'};search_params.forEach(function(value,key){data[key]=value});jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style();jQuery('.wpsc-ap-nav.general').trigger('click')})}
function wpsc_get_agent_dashboard(is_humbargar=!1){
supportcandy.current_section='dashboard';
if(is_humbargar){wpsc_toggle_humbargar()}
jQuery('.wpsc-tickets-nav, .wpsc-humbargar-menu-item').removeClass('active');jQuery('.wpsc-tickets-nav.dashboard, .wpsc-humbargar-menu-item.dashboard').addClass('active');jQuery('.wpsc-humbargar-title').html(supportcandy.humbargar_titles.dashboard);
var url=new URL(window.location.href);var search_params=url.searchParams;search_params.set('wpsc-section','dashboard');search_params.delete('ticket-id');url.search=search_params.toString();window.history.replaceState({},null,url.toString());jQuery('.wpsc-body').html(supportcandy.loader_html);
var data={action:'wpsc_get_agent_dashboard'};search_params.forEach(function(value,key){data[key]=value});
jQuery.post(supportcandy.ajax_url,data,function(response){jQuery('.wpsc-body').html(response);wpsc_reset_responsive_style();jQuery('.wpsc-ap-nav.general').trigger('click')})}
function wpsc_get_guest_ticket_form(){
jQuery('.wpsc-shortcode-container').html('
');wpsc_get_ticket_form()}