@extends('BaseSistemaWeb')
@section('CSS')
@stop
@section('Contenido')
Soporte Plus (Videollamadas de soporte)
@stop
@section('JS')
{{ HTML::script('DataTables/jquery.dataTables.min.js') }}
{{ HTML::script('DataTables/dataTables.bootstrap.min.js') }}
{{ HTML::script('DataTables/dataTables.responsive.min.js') }}
{{ HTML::script('jquery-browser-plugin/jquery.browser.min.js') }}
@stop
@section('JSOr')
let eventosDelUsuario = [] ;
let fechaInicioPlan = null;
let fechaFinPlan = null;
$.isLoading({ text: "Cargando..." });
cargarIframe();
$("#calendario").fullCalendar({
height: 650,
width: 550,
themeSystem: "bootstrap3",
defaultView: "month",
locale: "es",
weekends: false,
header: {
left: "prev,next today",
center: "title",
right: "month"
},
validRange: {
start: fechaInicioPlan,
end: fechaFinPlan
},
events: eventosDelUsuario,
timeFormat: "h(:mm)t",
eventRender: function(eventObj, $el) {
let eventFinishTime = new Date(eventObj.start._i);
eventFinishTime.setMinutes(eventFinishTime.getMinutes() + 30);
let contenido = `${formatearFecha(eventObj.start._i)}
\
Ir a la llamada\
`;
let contenido2 = "Este evento ya finalizó, puedes solicitar la grabación por medio del chat de soporte.
";
if(isPast8AMInElSalvador() && isToday(eventObj.start._i)){
contenido = `${formatearFecha(eventObj.start._i)}
\
Ir a la llamada\
`;
}
$el.webuiPopover({
title: eventObj.title,
content: fechaYhoraActual().getTime() < eventFinishTime.getTime() ? contenido : contenido2,
trigger: "click",
width: "auto",
height: "auto",
placement: "top",
container: "body",
closeable: true,
animation: "pop",
});
$(document).on("submit", "#eliminarEvento", function(e) {
e.preventDefault();
var formData = $(this).serialize();
$.post(
"{{route('SysWebSoporteAgendarLlamadaCalendly')}}",
{data: formData}
);
});
}
});
@stop