Add createdby on servicereport lists
This commit is contained in:
@@ -851,6 +851,7 @@ function serviceEvents ($messages,$page){
|
||||
<th>'.$equipment_label8.'</th>
|
||||
<th>'.$equipment_label9.'</th>
|
||||
<th>'.$equipment_label3.'</th>
|
||||
<th>'.$general_createdby.'</th>
|
||||
<th>'.$view_asset_actions.'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -896,6 +897,7 @@ function serviceEvents ($messages,$page){
|
||||
<td>'.$service_date.'</td>
|
||||
<td>'.$service_renewal_date.'</td>
|
||||
<td>'.$service_status.'</td>
|
||||
<td>'.$message->createdby.'</td>
|
||||
<td><a href="index.php?page=servicereport&equipmentID='.$message->equipmentID.'&historyID='.$message->historyID.'" class="btn_link">'.$general_view.'</a></td>
|
||||
<td><a href="index.php?page=render_service_report&historyID='.$message->historyID.'" class="btn_link">PDF</a></td>
|
||||
</tr>';
|
||||
@@ -1929,7 +1931,7 @@ function geolocationUpdate($token){
|
||||
$warranty = json_decode($message['description']);
|
||||
|
||||
//API URL OSM
|
||||
$api_url = 'https://nominatim.openstreetmap.org/search?format=json&city='.$warranty->city.'&country='.$warranty->country;
|
||||
$api_url = 'https://nominatim.openstreetmap.org/search?format=json&city='.urlencode($warranty->city).'&country='.urlencode($warranty->country);
|
||||
$api_url = str_replace(' ','%20',$api_url);
|
||||
|
||||
//BUILD UP FILESTREAM
|
||||
@@ -1948,7 +1950,7 @@ function geolocationUpdate($token){
|
||||
|
||||
if ($lat == 0){
|
||||
//CHECK FOR COUNTRY
|
||||
$api_url = 'https://nominatim.openstreetmap.org/search?format=json&country='.$warranty->country;
|
||||
$api_url = 'https://nominatim.openstreetmap.org/search?format=json&country='.urlencode($warranty->country);
|
||||
$api_url = str_replace(' ','%20',$api_url);
|
||||
$streamContext = stream_context_create($httpOptions);
|
||||
$geo_feedback = file_get_contents($api_url, false, $streamContext);
|
||||
@@ -1970,4 +1972,72 @@ function geolocationUpdate($token){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// getQuestions
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
function getQuestions($type){
|
||||
|
||||
switch ($type) {
|
||||
case 'cartest':
|
||||
include './settings/systemcartest.php';
|
||||
$arrayQuestions = $arrayQuestions_cartest;
|
||||
break;
|
||||
|
||||
default:
|
||||
$arrayQuestions = '';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($arrayQuestions !=''){
|
||||
foreach($arrayQuestions as $group){
|
||||
|
||||
//CREATE GROUP_ID
|
||||
$group_id = 'group'.$group['Group_sequence'];
|
||||
|
||||
$view .= '<h4 onClick="showDetails(\''.$group_id.'\')">'.$group['Group'].' ▽</h4>
|
||||
<div id="'.$group_id.'" style="'.$style.'">';
|
||||
|
||||
foreach($group['Questions_in_group'] as $question){
|
||||
|
||||
$view .= '<label for="" id="'.$question['QuestionID'].'" class="form-label">'.$question['Question'].'</label>';
|
||||
|
||||
switch ($question['Type']) {
|
||||
case 'Dropdown':
|
||||
$view .= '<select id="" name="'.$question['QuestionID'].'">';
|
||||
foreach ($question['Response'] as $response){
|
||||
$view .= '<option value="'.$response['response_value'].'">'.$response['response_text'].'</option>';
|
||||
}
|
||||
$view .= '</select>';
|
||||
break;
|
||||
|
||||
case 'Checkbox':
|
||||
$view .= '<ul>';
|
||||
|
||||
foreach ($question['Response'] as $response){
|
||||
//ADD ARRAY OPTION '.$question['QuestionID'].'[]
|
||||
$view .= '<li style="list-style:none;">
|
||||
<input type="checkbox" id="" name="" value="'.$response['response_value'].'" />
|
||||
<label for="">'.$response['response_text'].'</label>
|
||||
</li>';
|
||||
}
|
||||
$view .= '</ul>';
|
||||
break;
|
||||
|
||||
case 'slider':
|
||||
//CREATE SLIDER FOR DISTANCE
|
||||
$view .= '
|
||||
<input type="text" id="city" placeholder="'.$city.'" value="">
|
||||
<input type="text" id="country" placeholder="'.$country.'" value="" onchange="findLocation();">
|
||||
<input type="hidden" name="lat" id="lat" value="0">
|
||||
<input type="hidden" name="lng" id="lng" value="0">
|
||||
<input type="range" name="range" id="distanceId" value="'.$question['Response'][1].'" min="'.$question['Response'][0].'" max="'.$question['Response'][2].'" oninput="distanceOutputId.value = distanceId.value"><output id="distanceOutputId">'.$question['Response'][1].'</output>';
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
$view .= '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user