Vehicle Map hozzáadva

This commit is contained in:
Vincze József 2023-10-31 13:37:26 +01:00
parent 3fa433f2f1
commit e877c63e93
4 changed files with 58 additions and 10 deletions

View File

@ -0,0 +1,43 @@
//link(rel='stylesheet', type='text/css', href='https://unpkg.com/lightpick@latest/css/lightpick.css')
#mapModal.modal(tabindex='-1',
role='dialog',
aria-labelledby='mapModalLabel',
aria-hidden='true',
)
//-form(method='GET',id='holidayForm' action='/employee/holidays_byperson/')
.modal-dialog(role='document', style='width:720px')
.modal-content
.modal-header#oilChangeHeader.bg-primary(style="background: Primary")
h4#vehicleId.modal-title A
.modal-body(style='background-color:#4f5b69')
.container(style='width:100%;')
#darktable.container
iframe(src='https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d116862.54554679655!2d90.40409584970706!3d23.749000170125925!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sbd!4v1550040341458' width='100%' height='450' frameborder='0' style='border:0' allowfullscreen='')
.modal-footer(style="background-color: #2C3446")
button.btn.btn-primary(type='button', data-dismiss='modal')
i.fa.fa-arrow-left
| | Bezár
//script(type='text/javascript', src='/bower_components/moment/min/moment.min.js')
//script(src='https://unpkg.com/lightpick@latest/lightpick.js')
script.
//- Olajcsere modal
$('#mapModal').on('show.bs.modal', function () {
$(this).find('form').trigger('reset');
var getIdFromRow = $(event)[0].currentTarget.activeElement.getAttribute('data-id')//$(event.target).closest('tr').data('id');
var getVidFromRow = $(event)[0].currentTarget.activeElement.getAttribute('data-vid');//$(event.target).closest('tr').data('vid');
var getVnameFromRow = $(event)[0].currentTarget.activeElement.getAttribute('data-name');//$(event.target).closest('tr').data('name');
$('#vehicleId').val(getIdFromRow);
//-$("#fuelingHeader").html(getIdFromRow);
$(this).find('#vehicleId').html($('<b> Olaj csere: '+ getVnameFromRow + '</b> <b style="float:right">'+getVidFromRow+'</b>' ))
$.get('/vehicles/api/getVehicle/'+getIdFromRow,function(data)
{
console.log(data.name)
})
})

View File

@ -87,7 +87,7 @@ html
//script(src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js') script(src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js')
script(type='text/javascript', src='/bower_components/moment/min/moment.min.js') script(type='text/javascript', src='/bower_components/moment/min/moment.min.js')
script(src='/bower_components/moment/min/moment-with-locales.js') script(src='/bower_components/moment/min/moment-with-locales.js')
//script(type='text/javascript', src='/bower_components/bootstrap/dist/js/bootstrap.min.js') //script(type='text/javascript', src='/bower_components/bootstrap/dist/js/bootstrap.min.js')

View File

@ -17,10 +17,12 @@ block content
link(href='https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@1.1.0/css/bootstrap-switch-button.min.css' rel='stylesheet') link(href='https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@1.1.0/css/bootstrap-switch-button.min.css' rel='stylesheet')
//-link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css') //-link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css')
include Modals/modal_settings include Modals/modal_settings
include Modals/modal_fuelingInfo include Modals/modal_fuelingInfo
include Modals/modal_oilChange include Modals/modal_oilChange
include Modals/modal_oilChangeNew include Modals/modal_oilChangeNew
include Modals/modal_map
#vehicleModal.modal(tabindex='-1', role='dialog', aria-labelledby='vehicleModalLabel', aria-hidden='true') #vehicleModal.modal(tabindex='-1', role='dialog', aria-labelledby='vehicleModalLabel', aria-hidden='true')
//-form(method='GET',id='holidayForm' action='/employee/holidays_byperson/') //-form(method='GET',id='holidayForm' action='/employee/holidays_byperson/')
.modal-dialog(role='document', style='width:720px') .modal-dialog(role='document', style='width:720px')
@ -29,10 +31,13 @@ block content
h4#vehicleId.modal-title A h4#vehicleId.modal-title A
.modal-body .modal-body
#calendar(style="background-color: white") #calendar(style="background-color: white")
//iframe(src='https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d116862.54554679655!2d90.40409584970706!3d23.749000170125925!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sbd!4v1550040341458' width='100%' height='450' frameborder='0' style='border:0' allowfullscreen='') //-iframe(width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?width=100%25&amp;height=600&amp;hl=en&amp;q=47.5121667,21.6454722+(My%20Business%20Name)&amp;t=k&amp;z=18&amp;ie=UTF8&amp;iwloc=B&amp;output=embed")
//-iframe(src='https://www.google.com/maps/embed?pb=!1d90.40409584970706!2d23.749000170125925' width='100%' height='450' frameborder='0' style='border:0' allowfullscreen='')
br br
.modal-footer .modal-footer
button.btn.btn-primary(type='button', data-dismiss='modal') Bezár button.btn.btn-primary(type='button', data-dismiss='modal') Bezár
button.btn.btn-primary(data-toggle='modal', data-target='#mapModal',style='width:40px;',type='button')
span.glyphicon.glyphicon-map-marker(aria-hidden='true')
//-button.btn.btn-primary(type='submit') Rendben //-button.btn.btn-primary(type='submit') Rendben
#vehicleEditModal.modal(tabindex='-1', role='dialog', aria-labelledby='vehicleEditModalLabel', aria-hidden='true') #vehicleEditModal.modal(tabindex='-1', role='dialog', aria-labelledby='vehicleEditModalLabel', aria-hidden='true')
@ -150,8 +155,8 @@ block content
td(style='text-align:center') td(style='text-align:center')
button.btn.btn-success(data-id=vehicle._id, data-vid=vehicle.vehicle_id,data-name=vehicle.name,data-toggle='modal', data-target='#vehicleEditModal',style='width:40px;',type='button') button.btn.btn-success(data-id=vehicle._id, data-vid=vehicle.vehicle_id,data-name=vehicle.name,data-toggle='modal', data-target='#vehicleEditModal',style='width:40px;',type='button')
i.fa.fa-edit i.fa.fa-edit
script(type='text/javascript', src='/bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js') //űscript(type='text/javascript', src='/bower_components/bootstrap-toggle/js/bootstrap-toggle.min.js')
script(src='https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@1.1.0/dist/bootstrap-switch-button.min.js') //script(src='https://cdn.jsdelivr.net/gh/gitbrent/bootstrap-switch-button@1.1.0/dist/bootstrap-switch-button.min.js')
script. script.
// $(document).ready(function () { // $(document).ready(function () {
@ -331,9 +336,9 @@ block content
weekNumbers: true, weekNumbers: true,
themeSystem: 'default', themeSystem: 'default',
eventClick: function(info) { eventClick: function(info) {
alert('Event: ' + info.event.title+info.event.id+' '+info.event.extendedProps.lat+' '+info.event.extendedProps.lon); //alert('Event: ' + info.event.title+info.event.id+' '+info.event.extendedProps.lat+' '+info.event.extendedProps.lon);
window.open("https://www.google.com/maps/search/?api=1&query="+info.event.extendedProps.lat+","+info.event.extendedProps.lon);//+" target=\"_blank\" rel=\"noopener noreferrer\">"+loc.arriveLoc+"</a>"+" - ";')
//$('#mapModal').modal('show');
// change the border color just for fun // change the border color just for fun
info.el.style.borderColor = 'red'; info.el.style.borderColor = 'red';
} }