Skip to content

Commit

Permalink
Trying to Move Dynamic Models
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Lesko committed May 11, 2019
1 parent 8dbfa26 commit 8f58ea8
Show file tree
Hide file tree
Showing 96 changed files with 246 additions and 246 deletions.
Binary file added .DS_Store
Binary file not shown.
14 changes: 7 additions & 7 deletions src/Controllers/DepartmentScores.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

use DB;
use Auth;
use App\Models\User;
use App\Models\OPDepartments;
use App\Models\OPOversight;
use App\Models\OPzComplaintReviews;
use App\Models\OPZeditDepartments;
use App\Models\OPZeditOversight;
use Storage\App\Models\User;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPOversight;
use Storage\App\Models\OPzComplaintReviews;
use Storage\App\Models\OPZeditDepartments;
use Storage\App\Models\OPZeditOversight;

use App\Models\OPOversightModels;
use Storage\App\Models\OPOversightModels;

class DepartmentScores
{
Expand Down
6 changes: 3 additions & 3 deletions src/Controllers/OpenAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
use DB;
use Auth;
use Illuminate\Http\Request;
use App\Models\User;
use App\Models\OPDepartments;
use App\Models\SLZips;
use Storage\App\Models\User;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\SLZips;
use OpenPolice\Controllers\OpenComplaintSaves;

class OpenAjax extends OpenComplaintSaves
Expand Down
10 changes: 7 additions & 3 deletions src/Controllers/OpenComplaintConditions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use DB;
use Auth;
use App\Models\OPPartners;
use App\Models\SLEmailed;
use Storage\App\Models\OPPartners;
use Storage\App\Models\SLEmailed;
use OpenPolice\Controllers\OpenSessDataOverride;

class OpenComplaintConditions extends OpenSessDataOverride
Expand Down Expand Up @@ -141,7 +141,7 @@ protected function checkNodeConditionsCustom($nID, $condition = '')
} elseif ($condition == '#HasUploads') {
return $this->complaintHasUploads();
} elseif ($condition == '#ShowUploads') {
if ($this->complaintHasUploads() == 0 || !isset($this->sessData->dataSets["Complaints"][0]->ComPrivacy)) {
if ($this->complaintHasUploads() == 0) {
return 0;
}
if ($this->v["isAdmin"] || $this->v["isOwner"]) {
Expand All @@ -155,6 +155,10 @@ protected function checkNodeConditionsCustom($nID, $condition = '')
return 0;
} // else Full Transparency, but check status first...
return $this->complaintHasPublishedStatus();
} elseif ($condition == '#CanEditUploads') {
if ($this->v["isAdmin"]) {
return 1;
}
} elseif ($condition == '#PrintAnonOnly') {
if (isset($GLOBALS["SL"]->x["pageView"]) && in_array($GLOBALS["SL"]->x["pageView"], ['public', 'pdf'])
&& isset($this->sessData->dataSets["Complaints"][0]->ComStatus)
Expand Down
6 changes: 3 additions & 3 deletions src/Controllers/OpenComplaintEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use DB;
use Auth;
use App\Models\OPAllegSilver;
use App\Models\OPDepartments;
use App\Models\OPOversight;
use Storage\App\Models\OPAllegSilver;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPOversight;
use OpenPolice\Controllers\OpenPoliceUtils;

class OpenComplaintEmails extends OpenPoliceUtils
Expand Down
5 changes: 2 additions & 3 deletions src/Controllers/OpenComplaintPrints.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use DB;
use Auth;
use App\Models\OPAllegations;
use App\Models\OPAllegSilver;
use Storage\App\Models\OPAllegations;
use Storage\App\Models\OPAllegSilver;
use OpenPolice\Controllers\OpenComplaintEmails;

class OpenComplaintPrints extends OpenComplaintEmails
Expand Down Expand Up @@ -167,7 +167,6 @@ protected function customLabels($nIDtxt = '', $str = '')

protected function getLoopItemLabelCustom($loop, $itemRow = null, $itemInd = -3)
{
//echo '<br /><br /><br />getLoopItemLabelCustom(' . $loop . '<br /><pre>'; print_r($itemRow); echo '</pre>';
//if ($itemIndex < 0) return '';
if (!$itemRow) {
return '';
Expand Down
10 changes: 5 additions & 5 deletions src/Controllers/OpenComplaintSaves.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use DB;
use Auth;
use App\Models\OPStops;
use App\Models\OPInjuries;
use App\Models\OPLinksCivilianEvents;
use App\Models\OPLinksCivilianVehicles;
use App\Models\OPLinksOfficerVehicles;
use Storage\App\Models\OPStops;
use Storage\App\Models\OPInjuries;
use Storage\App\Models\OPLinksCivilianEvents;
use Storage\App\Models\OPLinksCivilianVehicles;
use Storage\App\Models\OPLinksOfficerVehicles;
use OpenPolice\Controllers\OpenComplaintConditions;

class OpenComplaintSaves extends OpenComplaintConditions
Expand Down
14 changes: 7 additions & 7 deletions src/Controllers/OpenDashAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
namespace OpenPolice\Controllers;

use DB;
use App\Models\User;
use App\Models\OPComplaints;
use App\Models\OPLinksComplaintOversight;
use App\Models\OPDepartments;
use App\Models\OPZeditDepartments;
use App\Models\OPZeditOversight;
use App\Models\OPzVolunStatDays;
use Storage\App\Models\User;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPLinksComplaintOversight;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPZeditDepartments;
use Storage\App\Models\OPZeditOversight;
use Storage\App\Models\OPzVolunStatDays;
use SurvLoop\Controllers\Stats\SurvTrends;

class OpenDashAdmin
Expand Down
12 changes: 6 additions & 6 deletions src/Controllers/OpenDepts.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
use Auth;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Models\OPDepartments;
use App\Models\OPZeditDepartments;
use App\Models\OPZeditOversight;
use App\Models\OPzVolunTmp;
use App\Models\OPOversight;
use App\Models\OPLinksComplaintOversight;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPZeditDepartments;
use Storage\App\Models\OPZeditOversight;
use Storage\App\Models\OPzVolunTmp;
use Storage\App\Models\OPOversight;
use Storage\App\Models\OPLinksComplaintOversight;
use OpenPolice\Controllers\DepartmentScores;
use OpenPolice\Controllers\OpenListing;

Expand Down
14 changes: 7 additions & 7 deletions src/Controllers/OpenInitExtras.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

use DB;
use Illuminate\Http\Request;
use App\Models\User;
use App\Models\OPComplaints;
use App\Models\OPDepartments;
use App\Models\OPLinksComplaintDept;
use App\Models\OPLinksComplimentDept;
use App\Models\OPPersonContact;
use App\Models\OPzVolunUserInfo;
use Storage\App\Models\User;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPLinksComplimentDept;
use Storage\App\Models\OPPersonContact;
use Storage\App\Models\OPzVolunUserInfo;
use OpenPolice\Controllers\OpenPartners;

class OpenInitExtras extends OpenPartners
Expand Down
10 changes: 5 additions & 5 deletions src/Controllers/OpenListing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
namespace OpenPolice\Controllers;

use DB;
use App\Models\OPComplaints;
use App\Models\OPCompliments;
use App\Models\SLNode;
use App\Models\OPTesterBeta;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPCompliments;
use Storage\App\Models\SLNode;
use Storage\App\Models\OPTesterBeta;
use OpenPolice\Controllers\OpenAjax;

class OpenListing extends OpenAjax
Expand Down Expand Up @@ -57,7 +57,7 @@ protected function printComplaintListing($view = 'all')
}
$this->v["fltStatus"] = (($GLOBALS["SL"]->REQ->has('fltStatus')) ? $GLOBALS["SL"]->REQ->fltStatus : 0);
$sort = "date";
$qman = "SELECT c.*, p.`PrsnNameFirst`, p.`PrsnNameLast`, i.*
$qman = "SELECT c.*, p.`PrsnNameFirst`, p.`PrsnNameLast`, p.`PrsnEmail`, i.*
FROM `OP_Complaints` c
JOIN `OP_Incidents` i ON c.`ComIncidentID` LIKE i.`IncID`
LEFT OUTER JOIN `OP_Civilians` civ ON c.`ComID` LIKE civ.`CivComplaintID`
Expand Down
10 changes: 5 additions & 5 deletions src/Controllers/OpenPartners.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use DB;
use Illuminate\Http\Request;
use App\Models\OPPartners;
use App\Models\OPOversight;
use App\Models\OPLinksComplaintDept;
use App\Models\OPPartnerCaseTypes;
use App\Models\OPPartnerCapac;
use Storage\App\Models\OPPartners;
use Storage\App\Models\OPOversight;
use Storage\App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPPartnerCaseTypes;
use Storage\App\Models\OPPartnerCapac;
use OpenPolice\Controllers\VolunteerLeaderboard;
use OpenPolice\Controllers\OpenVolunteers;

Expand Down
18 changes: 9 additions & 9 deletions src/Controllers/OpenPolice.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
use Auth;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Models\User;
use App\Models\OPComplaints;
use App\Models\OPDepartments;
use App\Models\OPLinksComplaintDept;
use App\Models\OPPersonContact;
use App\Models\OPPhysicalDesc;
use App\Models\OPzVolunUserInfo;
use Storage\App\Models\User;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPPersonContact;
use Storage\App\Models\OPPhysicalDesc;
use Storage\App\Models\OPzVolunUserInfo;
use OpenPolice\Controllers\OpenDashAdmin;
use OpenPolice\Controllers\OpenInitExtras;

Expand Down Expand Up @@ -83,7 +83,7 @@ protected function customNodePrint($nID = -3, $tmpSubTier = [], $nIDtxt = '', $n
return $this->reportAllegsWhy($nID);
} elseif ($nID == 1373) {
return $this->reportStory($nID);
} elseif (in_array($nID, [1466, 1728])) {
} elseif (in_array($nID, [2330, 2332])) {
return $this->chkGetReportDept($this->sessData->getLatestDataBranchID());
} elseif (in_array($nID, [1382, 1734])) {
return $this->getReportDept($this->sessData->getLatestDataBranchID());
Expand All @@ -99,7 +99,7 @@ protected function customNodePrint($nID = -3, $tmpSubTier = [], $nIDtxt = '', $n
return $this->getCivReportNameHeader($nID);
} elseif ($nID == 1476) {
return $this->getOffReportNameHeader($nID);
} elseif (in_array($nID, [1795, 2266])) {
} elseif (in_array($nID, [1795, 2266, 2335])) {
$uploads = $this->getUploadsMultNodes($this->cmplntUpNodes, $this->v["isAdmin"], $this->v["isOwner"]);
return '<h3 class="mT0 slBlueDark">' . (($uploads && sizeof($uploads) > 1) ? 'Uploads' : 'Upload') . '</h3>'
. view('vendor.survloop.reports.inc-uploads', [ "uploads" => $uploads ])->render();
Expand Down
38 changes: 19 additions & 19 deletions src/Controllers/OpenPoliceAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
use DB;
use Auth;
use Illuminate\Http\Request;
use App\Models\User;
use App\Models\SLDefinitions;
use App\Models\SLNode;
use App\Models\OPComplaints;
use App\Models\OPAllegations;
use App\Models\OPOfficers;
use App\Models\OPPersonContact;
use App\Models\OPDepartments;
use App\Models\OPOversight;
use App\Models\OPLinksComplaintDept;
use App\Models\OPCustomers;
use App\Models\OPZeditDepartments;
use App\Models\OPZeditOversight;
use App\Models\OPzVolunStatDays;
use App\Models\OPzVolunUserInfo;
use App\Models\SLEmails;
use App\Models\SLEmailed;
use App\Models\OPzComplaintEmailed;
use App\Models\OPzComplaintReviews;
use Storage\App\Models\User;
use Storage\App\Models\SLDefinitions;
use Storage\App\Models\SLNode;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPAllegations;
use Storage\App\Models\OPOfficers;
use Storage\App\Models\OPPersonContact;
use Storage\App\Models\OPDepartments;
use Storage\App\Models\OPOversight;
use Storage\App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPCustomers;
use Storage\App\Models\OPZeditDepartments;
use Storage\App\Models\OPZeditOversight;
use Storage\App\Models\OPzVolunStatDays;
use Storage\App\Models\OPzVolunUserInfo;
use Storage\App\Models\SLEmails;
use Storage\App\Models\SLEmailed;
use Storage\App\Models\OPzComplaintEmailed;
use Storage\App\Models\OPzComplaintReviews;
use OpenPolice\Controllers\OpenPolice;
use OpenPolice\Controllers\VolunteerLeaderboard;
use SurvLoop\Controllers\Admin\AdminController;
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/OpenPoliceSearcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
namespace OpenPolice\Controllers;

use App\Models\OPComplaints;
use App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPLinksComplaintDept;
use SurvLoop\Controllers\Searcher;

class OpenPoliceSearcher extends Searcher
Expand Down
30 changes: 15 additions & 15 deletions src/Controllers/OpenPoliceUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

use DB;
use Auth;
use App\Models\User;
use App\Models\OPComplaints;
use App\Models\OPCompliments;
use App\Models\OPIncidents;
use App\Models\OPEventSequence;
use App\Models\OPStops;
use App\Models\OPSearches;
use App\Models\OPArrests;
use App\Models\OPForce;
use App\Models\OPOversight;
use App\Models\OPLinksComplaintDept;
use App\Models\OPLinksOfficerEvents;
use App\Models\OPLinksCivilianEvents;
use App\Models\OPPersonContact;
use App\Models\OPzVolunUserInfo;
use Storage\App\Models\User;
use Storage\App\Models\OPComplaints;
use Storage\App\Models\OPCompliments;
use Storage\App\Models\OPIncidents;
use Storage\App\Models\OPEventSequence;
use Storage\App\Models\OPStops;
use Storage\App\Models\OPSearches;
use Storage\App\Models\OPArrests;
use Storage\App\Models\OPForce;
use Storage\App\Models\OPOversight;
use Storage\App\Models\OPLinksComplaintDept;
use Storage\App\Models\OPLinksOfficerEvents;
use Storage\App\Models\OPLinksCivilianEvents;
use Storage\App\Models\OPPersonContact;
use Storage\App\Models\OPzVolunUserInfo;
use SurvLoop\Controllers\Tree\TreeSurvForm;

class OpenPoliceUtils extends TreeSurvForm
Expand Down
Loading

0 comments on commit 8f58ea8

Please sign in to comment.