Faserplanung/Zeiterfassung

* Zeiterfassung
 * Faserplanung Koordinatenanzeige bei Rohrverzeichnis bearbeiten hinzugefügt
 * Migrations
This commit is contained in:
Spitzer Daniel
2024-04-23 20:30:08 +02:00
parent 6310e2446e
commit 1ab898fbce
7 changed files with 109 additions and 58 deletions

View File

@@ -230,9 +230,8 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
<?php endforeach; ?>
</select>
</div>
<div class="col-lg-2" id="<?= $randid ?>_end-point-building">
</div>
<div class="col-lg-3" id="<?= $randid ?>_end-point-building"></div>
<div class="col-lg-2 endpoint_coordinates"></div>
</div>
<?php
endif;
@@ -307,12 +306,20 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
<div class="col-lg-6"><h4>Legende:</h4></div>
</div>
<div class="row justify-content-center">
<div class="col-lg-5"><img src="<?= self::getResourcePath() ?>img/markers/marker-pop.png "> <label class="font-16"> ... Pop</label></div>
<div class="col-lg-5"><img src="<?= self::getResourcePath() ?>img/markers/marker-home.png "> <label class="font-16"> ... Building</label></div>
<div class="col-lg-5"><img
src="<?= self::getResourcePath() ?>img/markers/marker-pop.png ">
<label class="font-16"> ... Pop</label></div>
<div class="col-lg-5"><img
src="<?= self::getResourcePath() ?>img/markers/marker-home.png ">
<label class="font-16"> ... Building</label></div>
</div>
<div class="row justify-content-center">
<div class="col-lg-5 justify-content-center"><img src="<?= self::getResourcePath() ?>img/markers/marker-dispatcher.png "> <label class="font-16"> ... Schacht/Verteiler</label></div>
<div class="col-lg-5"><img src="<?= self::getResourcePath() ?>img/markers/marker-greenfield.png "> <label class="font-16"> ... Greenfield</label></div>
<div class="col-lg-5 justify-content-center"><img
src="<?= self::getResourcePath() ?>img/markers/marker-dispatcher.png ">
<label class="font-16"> ... Schacht/Verteiler</label></div>
<div class="col-lg-5"><img
src="<?= self::getResourcePath() ?>img/markers/marker-greenfield.png ">
<label class="font-16"> ... Greenfield</label></div>
</div>
</div>
</div>
@@ -422,41 +429,6 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
addMarkers();
});
$("body").on("change", "#startpoint_type,#network_id", function () {
var options;
if ($.trim($("#network_id").val()) != "" && $.trim($("#startpoint_type").val())) {
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id").val()) + "&bdtype=" + $.trim($("#startpoint_type").val()), {})
.done(function (data) {
$.each(data, function (k, val) {
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
});
$('#starting-point-building').empty();
$('#starting-point-building').append('<select id="startpoint" required="required" name="startpoint" class="select2 form-control">' + options + '</select>');
$(".select2").select2({placeholder: ""});
});
}
});
$("body").on("change", "#entpoint_type,#network_id2", function () {
var options;
if ($.trim($("#network_id2").val()) != "" && $.trim($("#entpoint_type").val())) {
$.getJSON("<?= self::getUrl("FiberPlanPipe", "api", ['do' => 'getBuildingInfo']) ?>&network_id=" + $.trim($("#network_id2").val()) + "&bdtype=" + $.trim($("#entpoint_type").val()), {})
.done(function (data) {
$.each(data, function (k, val) {
options = options + '<option value="' + val.id + '">' + val.name + '</option>';
});
$('#end-point-building').empty();
$('#end-point-building').append('<select id="endpoint" name="endpoint" required="required" class="select2 form-control">' + options + '</select><input type="hidden" name="endpointid[]" value="">');
$(".select2").select2({placeholder: ""});
});
}
});
$("body").on("change", "#type", function () {
if ($(this).val() < 3) {
$('#dimesion-div').show();
@@ -500,7 +472,7 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
removePolyline();
var oldlat;
var oldlong;
var gpsconter=0;
var gpsconter = 0;
$.each($('.endpoint_endpoint'), function (index, value) {
if ($(this).find('option:selected').data('gpslat')) {
var lat = $(this).find('option:selected').data('gpslat');
@@ -547,7 +519,15 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
oldlat = $(this).find('option:selected').data('gpslat');
oldlong = $(this).find('option:selected').data('gpslong');
gpsconter++;
lat=String(lat);
lng=String(lng);
$(this).closest('.endpoint-maindiv').find('.endpoint_coordinates').html(`<label class="col-form-label"><a title="Google-Maps: ` + $(this).find('option:selected').data('gpslat') + ` , ` + $(this).find('option:selected').data('gpslong') + `"
class="mapsLink"
href="http://maps.google.com/?q=` + $(this).find('option:selected').data('gpslat') + ` , ` + $(this).find('option:selected').data('gpslong') + `"
target="_blank">` + lat.substring(0, 8) + `
, ` + lng.substring(0, 8) + `</a></label>`);
} else {
$(this).closest('.endpoint-maindiv').find('.endpoint_coordinates').html(`<label class="col-form-label">Keine Koordinaten</label>`);
oldlat = "";
oldlong = "";
}
@@ -596,9 +576,8 @@ if (isset($_GET['returnto']) && $_GET['returnto'] == "fiberplanpipe-detail") {
` + $('#endpoints').find('.endpoint_type').html() + `
</select>
</div>
<div class="col-lg-3" id="` + randid + `_end-point-building">
</div>
<div class="col-lg-3" id="` + randid + `_end-point-building"></div>
<div class="col-lg-2 endpoint_coordinates"></div>
</div>`);
$('#' + randid + '_endpoint_network_id').val($('#endpoints').find('.endpoint_network_id').eq(endpointcounter - 2).val());
$('#' + randid + '_endpoint_type').val('');