CIM37 -Allow geolocation update in equipment_manage
This commit is contained in:
@@ -143,9 +143,9 @@ switch ($action) {
|
|||||||
case 'geolocation':
|
case 'geolocation':
|
||||||
|
|
||||||
if ($whereclause == ''){
|
if ($whereclause == ''){
|
||||||
$whereclause = 'WHERE geolocation is not null';
|
$whereclause = 'WHERE geolocation is not null OR geolocation != "["",""]"';
|
||||||
} else {
|
} else {
|
||||||
$whereclause .= ' AND geolocation is not null';
|
$whereclause .= ' AND geolocation is not null OR geolocation != "["",""]';
|
||||||
}
|
}
|
||||||
$sql = 'SELECT distinct(geolocation) FROM equipment e '.$whereclause.'';
|
$sql = 'SELECT distinct(geolocation) FROM equipment e '.$whereclause.'';
|
||||||
|
|
||||||
|
|||||||
@@ -216,6 +216,16 @@ $view .= '
|
|||||||
|
|
||||||
$changelog = showlog('equipment',$equipment_ID)?? '';
|
$changelog = showlog('equipment',$equipment_ID)?? '';
|
||||||
|
|
||||||
|
//GEOLOCATION
|
||||||
|
$geo_details = $equipment['geolocation'] ?? '';
|
||||||
|
if (is_array($geo_details)) {
|
||||||
|
$geodetails_lat = $geo_details[0];
|
||||||
|
$geodetails_lon = $geo_details[1];
|
||||||
|
} else{
|
||||||
|
$geodetails_lat = '';
|
||||||
|
$geodetails_lon = '';
|
||||||
|
}
|
||||||
|
|
||||||
$view .= '<div class="content-block tab-content">
|
$view .= '<div class="content-block tab-content">
|
||||||
<div class="form responsive-width-100">
|
<div class="form responsive-width-100">
|
||||||
<label for="productcode">'.$general_created.'</label>
|
<label for="productcode">'.$general_created.'</label>
|
||||||
@@ -225,7 +235,8 @@ $view .= '<div class="content-block tab-content">
|
|||||||
<label for="productcode">'.$equipment_label11.'</label>
|
<label for="productcode">'.$equipment_label11.'</label>
|
||||||
<input id="name" type="text" name="order_ref" placeholder="'.$equipment_label11.'" value="'.$equipment['order_ref'].'">
|
<input id="name" type="text" name="order_ref" placeholder="'.$equipment_label11.'" value="'.$equipment['order_ref'].'">
|
||||||
<label for="productcode">'.$equipment_label12.'</label>
|
<label for="productcode">'.$equipment_label12.'</label>
|
||||||
<input id="name" type="text" name="geolocation" placeholder="'.$equipment_label12.'" value="'.$equipment['geolocation'].'">
|
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lat.'">
|
||||||
|
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lon.'">
|
||||||
'.($update_allowed_special==1? $changelog:'').'
|
'.($update_allowed_special==1? $changelog:'').'
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|||||||
Reference in New Issue
Block a user