コード例 #1
0
ファイル: home.blade.php プロジェクト: codeblues1516/godaddy
	<div class="col-md-6">
		<div class="dash-box" style="background-color:#a784ec;">
			<div class="col-md-offset-2" style="padding-top:20px;">
			<i class="fa fa-trophy fa-4x col-md-offset-1"></i>
		
			<a href="{{ route('top-performers') }}" style="color:white;"><i class="glyphicon glyphicon-circle-arrow-right"></i> View Top Performers</a>
			</div>

		</div>					
	</div>
	<div class="col-md-6">
		<div class="dash-box" style="background-color:#49feaf;">
			<div class="col-md-offset-2" style="padding-top:10px;">
				<i class="fa fa-cog fa-4x col-md-offset-1"></i>
				<?php 
$myProperties = count(PropertiesUser::where('user_id', Auth::id())->get());
?>

				<font size="6">{{ $myProperties  }} owned.</font><br>
				<a href="{{ route('my-properties', Auth::id()) }}" style="color:white; padding-left:100px;"><i class="glyphicon glyphicon-circle-arrow-right"></i> My Properties</a>
				
			</div>
		</div>	
	</div>



</div>
	@if(Auth::user()->hasRole('Employee MS Administrator'))
		<div class="row" style="padding-top:20px;">
			<div class="col-md-6">
コード例 #2
0
 public function getPropReportsPdf()
 {
     $dept = Session::get('deptpdf');
     $category = Session::get('categorypdf');
     $matchThese = array();
     if ($dept != "*") {
         //If true insert this to variable
         $matchThese = array_add($matchThese, 'dept_id', $dept);
         /***********Add Array*****************/
         //If user chooses from dropdown
         if ($category != "*") {
             //If true insert this to variable
             $matchThese = array_add($matchThese, 'cat_id', $category);
             $query = PropertiesUser::where($matchThese)->get();
         } else {
             //All Categoryy
             $query = PropertiesUser::where($matchThese)->get();
         }
         /***********End Add Array*****************/
     } else {
         //All Department
         /*************Add Array***************/
         if ($category != "*") {
             //If true insert this to variable
             $matchThese = array_add($matchThese, 'cat_id', $category);
             $query = PropertiesUser::where($matchThese)->get();
         } else {
             $query = PropertiesUser::all();
         }
         /************End Add Array****************/
     }
     //end of first if statement
     Fpdf::AddPage();
     Fpdf::Image('img/dap.jpg', 10, 5, 150);
     Fpdf::Ln(20.6);
     Fpdf::SetFont('Arial', 'B', 10);
     Fpdf::Cell(56, 27, 'List of Assigned Accountability', 0, 2, 'C', 0);
     Fpdf::SetFont('Arial', 'B', 6.5);
     Fpdf::Cell(24.5, 5, 'Property Id', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Property Name', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Category', 1, 0, 'C', 0);
     Fpdf::Cell(20, 5, 'Condition', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Assigned Employee', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'From Department', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'PAR', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Date Assigned', 1, 0, 'C', 0);
     Fpdf::Ln();
     foreach ($query as $property) {
         Fpdf::SetFont('Arial', '', 6.2);
         Fpdf::Cell(24.5, 5, $property->properties->id, 1, 0, 'C', 0);
         Fpdf::Cell(24.5, 5, $property->properties->propname, 1, 0, 'C', 0);
         $cat = PropertyCategory::find($property->cat_id);
         Fpdf::Cell(24.5, 5, $cat->catname, 1, 0, 'C', 0);
         Fpdf::Cell(20, 5, $property->properties->propcondition, 1, 0, 'C', 0);
         Fpdf::Cell(24.5, 5, $property->user->formatName(':fn :ln'), 1, 0, 'C', 0);
         $dept = Department::find($property->dept_id);
         Fpdf::Cell(24.5, 5, $dept->name, 1, 0, 'C', 0);
         Fpdf::Cell(24.5, 5, $property->properties->par, 1, 0, 'C', 0);
         Fpdf::Cell(24.5, 5, $property->formatTimeAssign(), 1, 0, 'C', 0);
         Fpdf::Ln();
     }
     //end of if else
     Fpdf::Output();
     exit;
     Session::forget('deptpdf');
     Session::forget('categorypdf');
 }
コード例 #3
0
			<tr>
				<th>Property Id</th>
				<th>Property</th>
				<th>From</th>
				<th>Transfer to</th>
				<th>Action</th>
			</tr>

		</thead>
		<tbody>
		@foreach (PropTransReq::all() as $request)
			<tr>
				<td>{{ $request->properties_id }}</td>
				<td>{{ $request->properties->propname}}</td>

				<?php 
$from = PropertiesUser::where('properties_id', $request->properties_id)->first();
?>
				<td>{{ $from->user->formatName(':fn :ln') }}</td>
				<td>{{ $request->user->formatName(':fn :ln') }}</td>
				<td>
					<a href="{{ route('approve-transfer', $request->properties_id) }}" class="btn btn-success">
					<i class="fa fa-thumbs-up"></i></a>
				</td>
			</tr>
		@endforeach
		</tbody>

	</table>
	
@stop
コード例 #4
0
 public function postRequestTransferProp()
 {
     $propertyid = Input::get('propertyid');
     $empid = Input::get('empid');
     if (!empty($propertyid)) {
         $property = PropTransReq::where('properties_id', $propertyid)->first();
         $propinfo = PropertiesUser::where('properties_id', $propertyid)->first();
         if (!empty($property)) {
             return Redirect::route('request-transfer-prop')->with('alert', 'danger|You can only request transfer this property once');
         }
     } else {
         return Redirect::route('request-transfer-prop')->with('alert', 'danger|Please choose a property');
     }
     $request = PropTransReq::create(['user_id' => $empid, 'properties_id' => $propertyid, 'cat_id' => $propinfo->cat_id, 'dept_id' => $propinfo->dept_id]);
     $user = User::find(Auth::id());
     if ($user->gender == 'Male') {
         $gender = 'his';
     } else {
         $gender = 'her';
     }
     $audit = AuditTrail::create(['user_id' => Auth::id(), 'role' => 'User', 'action' => 'requested for Property transfer to.']);
     return Redirect::route('request-transfer-prop')->with('alert', 'success|Transfer requested');
 }