Ejemplo n.º 1
0
 /**
  * @author WN
  * @param string $template
  * @param integer $id
  * @return \Illuminate\View\View
  */
 private function renderForm($template, $id = null)
 {
     return view('locations.' . $template, ['location' => $id !== null ? $this->fetchLocationById($id) : null, 'installations' => $this->limitToActive($this->limitToMerchant(Installation::query()))->get()->pluck('name', 'id')->toArray()]);
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @author WN, MS
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $installations = Installation::query();
     $this->limitToMerchant($installations);
     return $this->standardIndexAction($installations, 'installations.index', 'installations', ['linked' => $this->fetchBooleanFilterValues($installations, 'linked', 'Unlinked', 'Linked'), 'active' => $this->fetchBooleanFilterValues($installations, 'active', 'Inactive', 'Active')]);
 }
 /**
  * @author EB
  */
 public function testGetDisclosureAsHtml()
 {
     $installation = Installation::query()->find(1);
     $installation->update(['disclosure' => '## Test Two']);
     $disclosure = Installation::findOrFail(1)->getDisclosureAsHtml();
     $this->assertEquals('<h2>Test Two</h2>', $disclosure);
 }
Ejemplo n.º 4
0
 public function pendingCancellations($installationId)
 {
     $installation = Installation::query()->findOrFail($installationId);
     $pendingCancellations = Application::query()->where('installation_id', '=', $installationId)->where('ext_current_status', '=', 'pending_cancellation')->get();
     return View('applications.pending-cancellation', ['applications' => $pendingCancellations, 'installation' => $installation]);
 }