@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | if ($problem->getGeneralByIdentifier('root-cause')) { |
12 | 12 | $root = $problem->getGeneralByIdentifier('root-cause')->value; |
13 | 13 | |
14 | - $delete_root_url = url('service-desk/general/' . $owner . '/root-cause/delete'); |
|
14 | + $delete_root_url = url('service-desk/general/'.$owner.'/root-cause/delete'); |
|
15 | 15 | $popid = "root-cause$problem->id"; |
16 | 16 | $title = "Delete Root Cause"; |
17 | 17 | $delete_root_popup = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($popid, $delete_root_url, $title, "fa fa-remove", " "); |
18 | 18 | } |
19 | 19 | if ($problem->getGeneralByIdentifier('symptoms')) { |
20 | 20 | $symptom = $problem->getGeneralByIdentifier('symptoms')->value; |
21 | - $delete_symptoms_url = url('service-desk/general/' . $owner . '/symptoms/delete'); |
|
21 | + $delete_symptoms_url = url('service-desk/general/'.$owner.'/symptoms/delete'); |
|
22 | 22 | $popid = "symptoms$problem->id"; |
23 | 23 | $title = "Delete symptoms"; |
24 | 24 | $delete_symptoms_popup = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($popid, $delete_symptoms_url, $title, "fa fa-remove", " "); |
@@ -29,14 +29,14 @@ discard block |
||
29 | 29 | } |
30 | 30 | if ($problem->getGeneralByIdentifier('solution')) { |
31 | 31 | $solution = $problem->getGeneralByIdentifier('solution')->value; |
32 | - $delete_solution_url = url('service-desk/general/' . $owner . '/solution/delete'); |
|
32 | + $delete_solution_url = url('service-desk/general/'.$owner.'/solution/delete'); |
|
33 | 33 | $popid = "solution$problem->id"; |
34 | 34 | $title = "Delete solution"; |
35 | 35 | $delete_solution_popup = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($popid, $delete_solution_url, $title, "fa fa-remove", " "); |
36 | 36 | } |
37 | 37 | if ($problem->getGeneralByIdentifier('impact')) { |
38 | 38 | $impact = $problem->getGeneralByIdentifier('impact')->value; |
39 | - $delete_impact_url = url('service-desk/general/' . $owner . '/impact/delete'); |
|
39 | + $delete_impact_url = url('service-desk/general/'.$owner.'/impact/delete'); |
|
40 | 40 | $popid = "impact$problem->id"; |
41 | 41 | $title = "Delete impact"; |
42 | 42 | $delete_impact_popup = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($popid, $delete_impact_url, $title, "fa fa-remove", " "); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | @foreach($problem->generalAttachments('root-cause') as $attachment) |
85 | 85 | <?php |
86 | 86 | $deleteid = $attachment->id; |
87 | - $deleteurl = url('service-desk/delete/' . $attachment->id . '/' . $attachment->owner . '/attachment'); |
|
87 | + $deleteurl = url('service-desk/delete/'.$attachment->id.'/'.$attachment->owner.'/attachment'); |
|
88 | 88 | ?> |
89 | 89 | @include('service::interface.agent.popup.delete') |
90 | 90 | <div class="col-md-3"> |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | @foreach($problem->generalAttachments('impact') as $attachment) |
150 | 150 | <?php |
151 | 151 | $deleteid = $attachment->id; |
152 | - $deleteurl = url('service-desk/delete/' . $attachment->id . '/' . $attachment->owner . '/attachment'); |
|
152 | + $deleteurl = url('service-desk/delete/'.$attachment->id.'/'.$attachment->owner.'/attachment'); |
|
153 | 153 | ?> |
154 | 154 | @include('service::interface.agent.popup.delete') |
155 | 155 | <div class="col-md-3"> |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | @foreach($problem->generalAttachments('symptom') as $attachment) |
213 | 213 | <?php |
214 | 214 | $deleteid = $attachment->id; |
215 | - $deleteurl = url('service-desk/delete/' . $attachment->id . '/' . $attachment->owner . '/attachment'); |
|
215 | + $deleteurl = url('service-desk/delete/'.$attachment->id.'/'.$attachment->owner.'/attachment'); |
|
216 | 216 | ?> |
217 | 217 | @include('service::interface.agent.popup.delete') |
218 | 218 | <div class="col-md-3"> |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | @foreach($problem->generalAttachments('solution') as $attachment) |
282 | 282 | <?php |
283 | 283 | $deleteid = $attachment->id; |
284 | - $deleteurl = url('service-desk/delete/' . $attachment->id . '/' . $attachment->owner . '/attachment'); |
|
284 | + $deleteurl = url('service-desk/delete/'.$attachment->id.'/'.$attachment->owner.'/attachment'); |
|
285 | 285 | ?> |
286 | 286 | @include('service::interface.agent.popup.delete') |
287 | 287 | <div class="col-md-3"> |
@@ -32,7 +32,7 @@ |
||
32 | 32 | <td>{{str_limit($ticket->title,20)}}</td> |
33 | 33 | <td><a href="{{url('thread/'.$ticket->id)}}" class="btn btn-info">View</a></td> |
34 | 34 | </tr> |
35 | - <?php $i++;?> |
|
35 | + <?php $i++; ?> |
|
36 | 36 | @empty |
37 | 37 | <tr><td>No Tickets Associated</td></tr> |
38 | 38 | @endforelse |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | //$info = $problem->general(); |
3 | -$title =""; |
|
3 | +$title = ""; |
|
4 | 4 | $solution = ""; |
5 | 5 | if ($problem->getGeneralByIdentifier('solution-title')) { |
6 | 6 | $title = $problem->getGeneralByIdentifier('solution-title')->value; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | //$info = $problem->general(); |
3 | -$root =""; |
|
3 | +$root = ""; |
|
4 | 4 | if ($problem->getGeneralByIdentifier('root-cause')) { |
5 | 5 | $root = $problem->getGeneralByIdentifier('root-cause')->value; |
6 | 6 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | //$info = $problem->general(); |
3 | -$symptom =""; |
|
3 | +$symptom = ""; |
|
4 | 4 | if ($problem->getGeneralByIdentifier('symptoms')) { |
5 | 5 | $symptom = $problem->getGeneralByIdentifier('symptoms')->value; |
6 | 6 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | //$info = $problem->general(); |
3 | -$impact =""; |
|
3 | +$impact = ""; |
|
4 | 4 | if ($problem->getGeneralByIdentifier('impact')) { |
5 | 5 | $impact = $problem->getGeneralByIdentifier('impact')->value; |
6 | 6 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function rules() { |
24 | 24 | $id = $this->segment(3); |
25 | 25 | return [ |
26 | - 'name' => 'required|unique:sd_location_categories,name,' . $id |
|
26 | + 'name' => 'required|unique:sd_location_categories,name,'.$id |
|
27 | 27 | ]; |
28 | 28 | } |
29 | 29 |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $form = $forms->where('asset_type_id', $id)->first(); |
114 | 114 | if ($form) { |
115 | 115 | $title = $form->title; |
116 | - $html = "<h1>$title</h1>" . $this->getFields($form->id, $assetid); |
|
116 | + $html = "<h1>$title</h1>".$this->getFields($form->id, $assetid); |
|
117 | 117 | } |
118 | 118 | if ($view == true) { |
119 | 119 | return view("service::form-builder.show", compact('html')); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | case "text": |
182 | 182 | return "<label>$label</label>" |
183 | 183 | //.\Form::text($name,null,['class'=>$class,'placeholder'=>$placeholder,'required'=>$is_required]); |
184 | - . "<input type='$type' class='$class' placeholder='$placeholder' name='$name' value=" . $this->value($fieldid, $assetid) . " $required>"; |
|
184 | + . "<input type='$type' class='$class' placeholder='$placeholder' name='$name' value=".$this->value($fieldid, $assetid)." $required>"; |
|
185 | 185 | case "date": |
186 | 186 | return "<label>$label</label>" |
187 | 187 | . "<input type='$type' class='$class' placeholder='$placeholder' name='$name' $required>"; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $html .= "<label>$label</label></br>"; |
216 | 216 | foreach ($values as $index => $value) { |
217 | 217 | //if ($json == false) { |
218 | - $html .= "<input type='checkbox' name='$name' class='$class' value='$value->value'>" . $value->option . "</br>"; |
|
218 | + $html .= "<input type='checkbox' name='$name' class='$class' value='$value->value'>".$value->option."</br>"; |
|
219 | 219 | // } else { |
220 | 220 | // $array[$index] = $values->lists('option','value')->toArray(); |
221 | 221 | // } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $html .= "<label>$label</label></br>"; |
226 | 226 | foreach ($values as $index => $value) { |
227 | 227 | //if ($json == false) { |
228 | - $html .= "<input type='radio' name='$name' class='$class' value='$value->value'>" . $value->option . "</br>"; |
|
228 | + $html .= "<input type='radio' name='$name' class='$class' value='$value->value'>".$value->option."</br>"; |
|
229 | 229 | // } else { |
230 | 230 | // $array[$index] = $value->lists('option','value')->toArray(); |
231 | 231 | // } |
@@ -235,12 +235,12 @@ discard block |
||
235 | 235 | $html .= "<label>$label</label><select class='$class' name='$name' placeholder='$placeholder' $required>"; |
236 | 236 | foreach ($values as $index => $value) { |
237 | 237 | //if ($json == false) { |
238 | - $html .= "<option value='$value->value'>" . $value->option . "</option>"; |
|
238 | + $html .= "<option value='$value->value'>".$value->option."</option>"; |
|
239 | 239 | //} else { |
240 | 240 | //$array[$index] = $value->lists('option','value')->toArray(); |
241 | 241 | //} |
242 | 242 | } |
243 | - $html .="</select>"; |
|
243 | + $html .= "</select>"; |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | if ($json == false) { |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $url = url('service-desk/form-builder/'.$model->id.'/delete'); |
285 | 285 | $title = "Delete $model->title"; |
286 | 286 | $delete = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($model->id, $url, $title); |
287 | - return "<a href=" . url('service-desk/form-builder/' . $model->id . '/edit') . " class='btn btn-sm btn-primary'>Edit</a> " |
|
287 | + return "<a href=".url('service-desk/form-builder/'.$model->id.'/edit')." class='btn btn-sm btn-primary'>Edit</a> " |
|
288 | 288 | . $preview.$delete; |
289 | 289 | }) |
290 | 290 | ->searchColumns('title') |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | } |
381 | 381 | switch ($render) { |
382 | 382 | case "view": |
383 | - $html = "<h1>$title</h1>" . $html; |
|
383 | + $html = "<h1>$title</h1>".$html; |
|
384 | 384 | return view("service::form-builder.show", compact('html')); |
385 | 385 | case "popup": |
386 | 386 | return $this->popUp($id, $title, $html); |
@@ -393,18 +393,18 @@ discard block |
||
393 | 393 | } |
394 | 394 | |
395 | 395 | public function popUp($id, $title, $html) { |
396 | - return '<a href="#form" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#form' . $id . '">Preview</a> |
|
397 | - <div class="modal fade" id="form' . $id . '"> |
|
396 | + return '<a href="#form" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#form'.$id.'">Preview</a> |
|
397 | + <div class="modal fade" id="form' . $id.'"> |
|
398 | 398 | <div class="modal-dialog"> |
399 | 399 | <div class="modal-content"> |
400 | 400 | <div class="modal-header"> |
401 | 401 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
402 | - <h4 class="modal-title">' . $title . '</h4> |
|
402 | + <h4 class="modal-title">' . $title.'</h4> |
|
403 | 403 | </div> |
404 | 404 | <div class="modal-body"> |
405 | 405 | <div class="row"> |
406 | 406 | <div class="col-md-12"> |
407 | - ' . $html . ' |
|
407 | + ' . $html.' |
|
408 | 408 | </div> |
409 | 409 | </div> |
410 | 410 | </div> |
@@ -416,8 +416,8 @@ discard block |
||
416 | 416 | </div>'; |
417 | 417 | } |
418 | 418 | |
419 | - public function delete($id){ |
|
420 | - try{ |
|
419 | + public function delete($id) { |
|
420 | + try { |
|
421 | 421 | $forms = new Form(); |
422 | 422 | $form = $forms->find($id); |
423 | 423 | if ($form) { |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | return \Datatable::Collection($contracts) |
28 | 28 | ->showColumns('name', 'cost') |
29 | 29 | ->addColumn('action', function($model) { |
30 | - $url = url('service-desk/contracts/' . $model->id . '/delete'); |
|
30 | + $url = url('service-desk/contracts/'.$model->id.'/delete'); |
|
31 | 31 | $delete = \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::deletePopUp($model->id, $url, "Delete $model->subject"); |
32 | 32 | |
33 | - return "<a href=" . url('service-desk/contracts/' . $model->id . '/edit') . " class='btn btn-info btn-sm'>Edit</a> " |
|
33 | + return "<a href=".url('service-desk/contracts/'.$model->id.'/edit')." class='btn btn-info btn-sm'>Edit</a> " |
|
34 | 34 | . $delete |
35 | - . " <a href=" . url('service-desk/contracts/' . $model->id . '/show') . " class='btn btn-primary btn-sm'>View</a>"; |
|
35 | + . " <a href=".url('service-desk/contracts/'.$model->id.'/show')." class='btn btn-primary btn-sm'>View</a>"; |
|
36 | 36 | }) |
37 | 37 | ->searchColumns('name') |
38 | 38 | ->orderColumns('name', 'description', 'cost', 'contract_type_id', 'vendor_id', 'license_type_id', 'licensce_count', 'product_id', 'notify_expiry', 'contract_start_date') |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $license_type_ids = License::lists('name', 'id')->toArray(); |
88 | 88 | $approvers = Cab::lists('name', 'id')->toArray(); |
89 | 89 | $vendor_ids = Vendors::lists('name', 'id')->toArray(); |
90 | - return view('service::contract.edit', compact('contract','contract_type_ids', 'approvers', 'product_ids', 'license_type_ids', 'vendor_ids')); |
|
90 | + return view('service::contract.edit', compact('contract', 'contract_type_ids', 'approvers', 'product_ids', 'license_type_ids', 'vendor_ids')); |
|
91 | 91 | } |
92 | 92 | |
93 | - public function handleEdit($id,CreateContractRequest $request) { |
|
93 | + public function handleEdit($id, CreateContractRequest $request) { |
|
94 | 94 | |
95 | 95 | $sd_contracts = SdContract::findOrFail($id); |
96 | 96 | $sd_contracts->name = $request->name; |
@@ -110,21 +110,21 @@ discard block |
||
110 | 110 | \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::attachment($sd_contracts->id, 'sd_contracts', $request->file('attachments')); |
111 | 111 | return \Redirect::route('service-desk.contract.index')->with('message', 'Contract successfully edit !!!'); |
112 | 112 | } |
113 | - public function sendCab($id,$cabid){ |
|
114 | - $activity='sd_contracts'; |
|
113 | + public function sendCab($id, $cabid) { |
|
114 | + $activity = 'sd_contracts'; |
|
115 | 115 | $owner = "$activity:$id"; |
116 | 116 | $url = url("service-desk/cabs/vote/$cabid/$owner"); |
117 | 117 | //dd($url); |
118 | 118 | \App\Plugins\ServiceDesk\Controllers\Library\UtilityController::cabMessage($cabid, $activity, $url); |
119 | 119 | |
120 | 120 | } |
121 | - public function show($id){ |
|
122 | - try{ |
|
121 | + public function show($id) { |
|
122 | + try { |
|
123 | 123 | $contracts = new SdContract(); |
124 | 124 | $contract = $contracts->find($id); |
125 | - if($contract){ |
|
126 | - return view('service::contract.show', compact('contract')); |
|
127 | - }else{ |
|
125 | + if ($contract) { |
|
126 | + return view('service::contract.show', compact('contract')); |
|
127 | + } else { |
|
128 | 128 | throw new \Exception('Sorry we can not find your request'); |
129 | 129 | } |
130 | 130 | } catch (Exception $ex) { |