WIP
This commit is contained in:
parent
d7f6bde3a5
commit
c7e2a6866e
@ -28,4 +28,12 @@ class Account extends Authenticatable
|
||||
];
|
||||
|
||||
protected $table = 'account';
|
||||
|
||||
/**
|
||||
* Check if the user is an admin user
|
||||
*/
|
||||
public function isAdministrator()
|
||||
{
|
||||
return TRUE; //@todo
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,11 @@ namespace App\Http\Controllers\Auth;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Login Controller
|
||||
@ -40,6 +42,11 @@ class LoginController extends Controller
|
||||
$this->middleware('guest', ['except' => 'logout']);
|
||||
}
|
||||
|
||||
protected function guard()
|
||||
{
|
||||
return Auth::guard('web');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns field name to use at login.
|
||||
*
|
||||
|
@ -50,6 +50,7 @@ class Kernel extends HttpKernel
|
||||
'acl' => \Kodeine\Acl\Middleware\HasPermission::class,
|
||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'admin' => \App\Http\Middleware\CheckAdmin::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
|
58
app/Http/Middleware/CheckAdmin.php
Normal file
58
app/Http/Middleware/CheckAdmin.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: deon
|
||||
* Date: 4/8/17
|
||||
* Time: 9:33 PM
|
||||
*/
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
|
||||
class CheckAdmin {
|
||||
|
||||
/**
|
||||
* The Guard implementation.
|
||||
*
|
||||
* @var Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ( ! $this->auth->user()->isAdministrator())
|
||||
{
|
||||
if ($request->ajax())
|
||||
{
|
||||
return response('Forbbiden.', 403);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AccessDeniedHttpException;
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ return [
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'B2C2B'),
|
||||
'copyright' => env('APP_COPYRIGHT', '© Copywright'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -57,6 +57,12 @@ return [
|
||||
|
||||
'themes' => [
|
||||
|
||||
'adminlte-be' => [
|
||||
'extends' => null,
|
||||
'views-path' => 'backend/adminlte',
|
||||
'asset-path' => 'theme/backend/adminlte',
|
||||
],
|
||||
|
||||
'metronic-fe' => [
|
||||
'extends' => null,
|
||||
'views-path' => 'frontend/metronic',
|
||||
@ -69,6 +75,12 @@ return [
|
||||
'asset-path' => 'theme/backend/metronic',
|
||||
],
|
||||
|
||||
'sbadmin-be' => [
|
||||
'extends' => null,
|
||||
'views-path' => 'backend/sbadmin',
|
||||
'asset-path' => 'theme/backend/sbadmin',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
|
23629
public/theme/backend/adminlte/css/all.css
vendored
Normal file
23629
public/theme/backend/adminlte/css/all.css
vendored
Normal file
File diff suppressed because one or more lines are too long
44775
public/theme/backend/adminlte/js/app.js
Normal file
44775
public/theme/backend/adminlte/js/app.js
Normal file
File diff suppressed because one or more lines are too long
45
resources/theme/backend/adminlte/account.blade.php
Normal file
45
resources/theme/backend/adminlte/account.blade.php
Normal file
@ -0,0 +1,45 @@
|
||||
<style>
|
||||
#favourite.selected {
|
||||
color: orange;
|
||||
}
|
||||
</style>
|
||||
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ $co->name }}|{{ $name }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
<span id="favourite" class="@if(Auth::user()->accounts->contains($ao->id)) selected @endif"><i class="fa fa-star" ></i></span> Detail for {{$ao->name}}
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@include('widgets.account')
|
||||
@yield('account')
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#favourite").click(function() {
|
||||
var item = this;
|
||||
//alert('{{csrf_token()}}');
|
||||
$.ajax({
|
||||
'type':'POST',
|
||||
'data':'id={{$ao->id}}&_token={{csrf_token()}}',
|
||||
'success':function() {
|
||||
$(item).toggleClass('selected');
|
||||
},
|
||||
'error':function(){ alert('That didnt work? Please try again....') },
|
||||
'url':'{{ url('favourite') }}',
|
||||
'cache':false
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
@ -0,0 +1,46 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Reset Password</div>
|
||||
<div class="panel-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.email') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Send Password Reset Link
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,76 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Reset Password</div>
|
||||
|
||||
<div class="panel-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.request') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" required autofocus>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<label for="password" class="col-md-4 control-label">Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control" name="password" required>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
|
||||
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Reset Password
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
76
resources/theme/backend/adminlte/auth/register.blade.php
Normal file
76
resources/theme/backend/adminlte/auth/register.blade.php
Normal file
@ -0,0 +1,76 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Register</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" role="form" method="POST" action="{{ route('register') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-4 control-label">Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus>
|
||||
|
||||
@if ($errors->has('name'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<label for="password" class="col-md-4 control-label">Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control" name="password" required>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
63
resources/theme/backend/adminlte/authorise.blade.php
Normal file
63
resources/theme/backend/adminlte/authorise.blade.php
Normal file
@ -0,0 +1,63 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Authorise an Email address
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
<div class="container-fluid spark-screen">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-md-offset-1">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Authorise Email address</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<form role="form" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<div class="box-body">
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($doorman->count())
|
||||
<div class="alert alert-success">
|
||||
<ul>
|
||||
@foreach ($doorman->all() as $invite)
|
||||
<li>Invite Code: <strong>{{ $invite->code }}</strong> for: <strong>{{ $invite->for }}</strong> valid {{ $invite->max }} times until {{ $invite->valid_until }}.</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="Enter email">
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
186
resources/theme/backend/adminlte/brand.blade.php
Normal file
186
resources/theme/backend/adminlte/brand.blade.php
Normal file
@ -0,0 +1,186 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
{{ $name }}
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@php
|
||||
$data = collect();
|
||||
@endphp
|
||||
|
||||
<div class="col-sm-3 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">IBM</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="chart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">IBM</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover" style="color: #000000;" id="brand">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="1" colspan="3">Categories</th>
|
||||
<th rowspan="2" class="text-right bg-primary">Entitled</th>
|
||||
<th colspan="3" class="text-center" style="background-color: #5cb85c !important">Deployed</th>
|
||||
<th rowspan="2" style="background-color: #d6d6c2 !important">Behind</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #f0ad4e !important">Assigned</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #d9534f !important; color: white;">Unassigned</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Unit</th>
|
||||
<th>Segment</th>
|
||||
<th>Category</th>
|
||||
<th style="background-color: #5cb85c !important">Actual</th>
|
||||
<th style="background-color: #7cd87c !important">Ahead</th>
|
||||
<th style="background-color: #0099e6 !important">Over</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($scope->get()->sortBy(function ($item,$key) { return sprintf('%s.%s.%s',$item->segment->unit->name,$item->segment->name,$item->name); }) as $o)
|
||||
@php
|
||||
$data->push($o->summary($ido)->pop());
|
||||
$filter = $o->summary($ido);
|
||||
if (! $e=$filter->sum('entitled')) continue;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $o->segment->unit->name }}</td>
|
||||
<td>{{ $o->segment->name }}</td>
|
||||
<td><a href="{{ $next ? url('/'.$next.'/'.$o->id.'/'.$ido->id) : '#' }}"> {{ $o->name }}</a></td>
|
||||
<td class="text-right bg-primary" style="!important">{{ number_format($e,2) }}</td>
|
||||
<td class="text-right" style="background-color: #5cb85c !important">{{ number_format($filter->sum('actual')/$e*100,1) }}%</td>
|
||||
<td class="text-right" style="background-color: #7cd87c !important">{{ number_format($filter->sum('ahead')/$e*100,1) }}%</td>
|
||||
<td class="text-right" style="background-color: #0099e6 !important">{{ number_format($filter->sum('over')/$e*100,1) }}%</td>
|
||||
<td class="text-right" style="background-color: #d6d6c2 !important">{{ number_format($filter->sum('behind')/$e*100,1) }}%</td>
|
||||
<td class="text-right" style="background-color: #f0ad4e !important">{{ number_format($filter->sum('assigned')/$e*100,1) }}%</td>
|
||||
<td class="text-right" style="background-color: #d9534f !important; color: white;">{{ number_format($filter->sum('unassigned')/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
||||
<script src="{{ url('/plugins/dataTables.bootstrap.min.js') }}"></script>
|
||||
<script src="{{ url('/plugins/jquery.dataTables.js') }}"></script>
|
||||
<link href="{{ url('/plugins/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">
|
||||
<link href="{{ url('/plugins/dataTables.bootstrap.css') }}" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript">
|
||||
revenueData = [];
|
||||
revenueData.push({ color: '#337ab7', name: 'Entitled', y: {{ $data->sum('entitled') }}, });
|
||||
revenueData.push({ color: '#0099e6', name: 'Over', y: {{ $data->sum('over') }}, });
|
||||
|
||||
riskData = [];
|
||||
riskData.push({ color: '#004d00', name: 'Actual', y: {{ $data->sum('deployed') }}, });
|
||||
riskData.push({ color: '#7cd87c', name: 'Ahead', y: {{ $data->sum('ahead') }}, });
|
||||
riskData.push({ color: '#d6d6c2', name: 'Behind', y: {{ $data->sum('behind') }}, });
|
||||
riskData.push({ color: '#f0ad4e', name: 'Assigned', y: {{ $data->sum('assigned') }}, });
|
||||
riskData.push({ color: '#d9534f', name: 'Unassigned', y: {{ $data->sum('unassigned') }}, });
|
||||
|
||||
// Create the chart
|
||||
Highcharts.chart('chart', {
|
||||
chart: {
|
||||
type: 'pie',
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
pie: {
|
||||
shadow: false,
|
||||
center: ['50%', '40%'],
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
crop: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
valuePrefix: '$',
|
||||
valueSuffix: 'm',
|
||||
},
|
||||
series: [{
|
||||
name: 'Revenue',
|
||||
data: revenueData,
|
||||
size: '80%',
|
||||
innerSize: '70%',
|
||||
dataLabels: {
|
||||
/*
|
||||
formatter: function () {
|
||||
return this.y > 5 ? this.point.name : null;
|
||||
},
|
||||
*/
|
||||
color: '#ffffff',
|
||||
distance: 20,
|
||||
}
|
||||
}, {
|
||||
name: 'Risk',
|
||||
data: riskData,
|
||||
size: '60%',
|
||||
innerSize: '70%',
|
||||
dataLabels: {
|
||||
/*
|
||||
formatter: function () {
|
||||
// display only if larger than 1
|
||||
return this.y > 1 ? '<b>' + this.point.name + ':</b> $' + this.y + 'm' : null;
|
||||
},
|
||||
*/
|
||||
distance: 20,
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#brand").DataTable({
|
||||
"pageLength": 20,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
20
resources/theme/backend/adminlte/errors/403.blade.php
Normal file
20
resources/theme/backend/adminlte/errors/403.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
@extends('adminlte::layouts.errors')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.servererror') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
|
||||
<div class="error-page">
|
||||
<h2 class="headline text-red">403</h2>
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-red"></i> Oops! Bad Authentication</h3>
|
||||
<p>
|
||||
Sorry, your authentication failed.
|
||||
{{ trans('adminlte_lang::message.mainwhile') }} <a href='{{ url('/home') }}'>{{ trans('adminlte_lang::message.returndashboard') }}</a>.
|
||||
</p>
|
||||
<br>
|
||||
</div>
|
||||
</div><!-- /.error-page -->
|
||||
@endsection
|
20
resources/theme/backend/adminlte/errors/404.blade.php
Normal file
20
resources/theme/backend/adminlte/errors/404.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
@extends('adminlte::layouts.errors')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.pagenotfound') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
|
||||
<div class="error-page">
|
||||
<h2 class="headline text-yellow">404</h2>
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-yellow"></i> Oops! {{ trans('adminlte_lang::message.pagenotfound') }}.</h3>
|
||||
<p>
|
||||
{{ trans('adminlte_lang::message.notfindpage') }}
|
||||
{{ trans('adminlte_lang::message.mainwhile') }} <a href='{{ url('/home') }}'>{{ trans('adminlte_lang::message.returndashboard') }}</a>.
|
||||
</p>
|
||||
<br/>
|
||||
</div><!-- /.error-content -->
|
||||
</div><!-- /.error-page -->
|
||||
@endsection
|
20
resources/theme/backend/adminlte/errors/500.blade.php
Normal file
20
resources/theme/backend/adminlte/errors/500.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
@extends('adminlte::layouts.errors')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.servererror') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
|
||||
<div class="error-page">
|
||||
<h2 class="headline text-red">500</h2>
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-red"></i> Oops! {{ trans('adminlte_lang::message.somethingwrong') }}</h3>
|
||||
<h4><i class="text-red"></i> {{ trans($msg) }}</h4>
|
||||
<p>
|
||||
{{ trans('adminlte_lang::message.wewillwork') }}
|
||||
{{ trans('adminlte_lang::message.mainwhile') }} <a href='{{ url('/home') }}'>{{ trans('adminlte_lang::message.returndashboard') }}</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div><!-- /.error-page -->
|
||||
@endsection
|
93
resources/theme/backend/adminlte/expiring.blade.php
Normal file
93
resources/theme/backend/adminlte/expiring.blade.php
Normal file
@ -0,0 +1,93 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Expiring Contracts
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@php
|
||||
$data = collect();
|
||||
@endphp
|
||||
|
||||
<div class="col-sm-11 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $name }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover small" style="color: #000000;" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="1" colspan="4">{{ $name }}</th>
|
||||
<th rowspan="2" class="text-right bg-primary">Entitled</th>
|
||||
<th colspan="3" class="text-center" style="background-color: #5cb85c !important">Deployed</th>
|
||||
<th rowspan="2" style="background-color: #d6d6c2 !important">Behind</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #f0ad4e !important">Assign</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #d9534f !important; color: white;">UnAssign</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Ending</th>
|
||||
<th>Unit</th>
|
||||
<th>Segment</th>
|
||||
<th>Category</th>
|
||||
<th class="text-right" style="background-color: #5cb85c !important">Actual</th>
|
||||
<th style="background-color: #7cd87c !important">Ahead</th>
|
||||
<th class="text-right" style="background-color: #0099e6 !important">Over</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($scope->get() as $o)
|
||||
@php
|
||||
$filter = $o->category_summary($ido)->filter(function($item,$value) use ($co) { return $item['category_id'] == $co->id; });
|
||||
if (! $e=$filter->sum('entitled')) continue;
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>{{ $o->contract_end->format('Y-m-d') }}</td>
|
||||
<td>{{ $o->account->imt->iot->name }}</td>
|
||||
<td>{{ $o->account->imt->name }}</td>
|
||||
<td><a href="{{ $next ? url('/'.$next.'/'.$co->id.'/'.$ido->id.'/'.$o->account->id) : '#' }}"> {{ $o->account->name }}</a></td>
|
||||
<td class="text-right bg-primary" style="!important">{{ number_format($e,2) }}</td>
|
||||
<td class="text-right" style="background-color: #5cb85c !important">{{ number_format($filter->sum('deployed'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #7cd87c !important">{{ number_format($filter->sum('ahead'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #0099e6 !important">{{ number_format($filter->sum('over'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #d6d6c2 !important">{{ number_format($filter->sum('behind'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #f0ad4e !important">{{ number_format($filter->sum('assigned'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #d9534f !important; color: white;">{{ number_format($filter->sum('unassigned'),1) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script src="{{ url('/plugins/dataTables.bootstrap.min.js') }}"></script>
|
||||
<script src="{{ url('/plugins/jquery.dataTables.js') }}"></script>
|
||||
<link href="{{ url('/plugins/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">
|
||||
<link href="{{ url('/plugins/dataTables.bootstrap.css') }}" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
"pageLength": 20,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
16
resources/theme/backend/adminlte/home.blade.php
Normal file
16
resources/theme/backend/adminlte/home.blade.php
Normal file
@ -0,0 +1,16 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Software Deployment
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
Home
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
|
||||
@endsection
|
40
resources/theme/backend/adminlte/layouts/app.blade.php
Normal file
40
resources/theme/backend/adminlte/layouts/app.blade.php
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@section('htmlheader')
|
||||
@include('layouts.partials.htmlheader')
|
||||
@show
|
||||
|
||||
<!-- BODY BEGIN -->
|
||||
<body class="fixed skin-blue sidebar-mini">
|
||||
<div id="app" v-cloak>
|
||||
<div class="wrapper">
|
||||
@include('layouts.partials.mainheader')
|
||||
|
||||
@include('layouts.partials.sidebar')
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
@include('adminlte::layouts.partials.contentheader')
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<!-- Your Page Content Here -->
|
||||
@yield('main-content')
|
||||
</div>
|
||||
</section><!-- /.content -->
|
||||
</div><!-- /.content-wrapper -->
|
||||
|
||||
<!-- #include('adminlte::layouts.partials.controlsidebar') -->
|
||||
@include('adminlte::layouts.partials.footer')
|
||||
</div><!-- ./wrapper -->
|
||||
</div> <!-- ./app -->
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts.partials.scripts')
|
||||
@show
|
||||
</body>
|
||||
<!-- BODY END -->
|
||||
</html>
|
@ -0,0 +1,17 @@
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<div id="search_results"></div>
|
||||
<h1>
|
||||
@yield('contentheader_title', 'Software Deployment')
|
||||
<small>@yield('contentheader_description')</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ url('/home') }}"><i class="fa fa-dashboard"></i>Home</a></li>
|
||||
@isset($breadcrumb)
|
||||
@foreach ($breadcrumb as $item => $url)
|
||||
<li><a href="{{url($url)}}">{{ $item }}</a></li>
|
||||
@endforeach
|
||||
<li class="active">{{ $name }}</li>
|
||||
@endisset
|
||||
</ol> <!-- /.breadcrumb -->
|
||||
</section> <!-- /.content-header -->
|
@ -0,0 +1,9 @@
|
||||
<!-- FOOTER BEGIN -->
|
||||
<footer class="main-footer">
|
||||
<!-- To the right -->
|
||||
<div class="pull-right hidden-xs">
|
||||
<a href="#"></a><b>{{ config('app.name') }}</b></a>
|
||||
</div>
|
||||
<strong>{{ config('app.copyright') }}</strong>
|
||||
</footer>
|
||||
<!-- FOOTER END -->
|
@ -0,0 +1,38 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title> {{ config('app.name') }} - @yield('htmlheader_title', 'Your title here') </title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<link href="{{ asset('/css/all.css') }}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{-- asset('/css/softdeploy.css') --}}" rel="stylesheet" type="text/css" />
|
||||
@css('css/all.css')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script>
|
||||
//See https://laracasts.com/discuss/channels/vue/use-trans-in-vuejs
|
||||
window.trans =
|
||||
@php
|
||||
// copy all translations from /resources/lang/CURRENT_LOCALE/* to global JS variable
|
||||
$lang_files = File::files(resource_path() . '/lang/' . App::getLocale());
|
||||
$trans = [];
|
||||
foreach ($lang_files as $f) {
|
||||
$filename = pathinfo($f)['filename'];
|
||||
$trans[$filename] = trans($filename);
|
||||
}
|
||||
$trans['adminlte_lang_message'] = trans('adminlte_lang::message');
|
||||
echo json_encode($trans);
|
||||
@endphp
|
||||
</script>
|
||||
|
||||
{{-- Styles --}}
|
||||
{!! Asset::styles() !!}
|
||||
|
||||
</head>
|
@ -0,0 +1,74 @@
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="{{ url('/home') }}" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>S</b>D</span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><b>Software</b>Deployment</span>
|
||||
</a>
|
||||
|
||||
<!-- Header Navbar -->
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">{{ trans('adminlte_lang::message.togglenav') }}</span>
|
||||
</a>
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- Tasks Menu -->
|
||||
@if (Auth::guest())
|
||||
<li><a href="{{ url('/register') }}">{{ trans('adminlte_lang::message.register') }}</a></li>
|
||||
<li><a href="{{ url('/login') }}">{{ trans('adminlte_lang::message.login') }}</a></li>
|
||||
@else
|
||||
<!-- User Account Menu -->
|
||||
<li class="dropdown user user-menu" id="user_menu">
|
||||
<!-- Menu Toggle Button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<!-- The user image in the navbar-->
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="user-image" alt="User Image"/>
|
||||
<!-- hidden-xs hides the username on small devices so only the image appears. -->
|
||||
<span class="hidden-xs">{{ Auth::user()->name }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- The user image in the menu -->
|
||||
<li class="user-header">
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||
<p>
|
||||
{{ Auth::user()->name }}
|
||||
<small>{{ trans('adminlte_lang::message.login') }}: @if(Auth::user()->last_access){{ Auth::user()->last_access->format('Y-m-d') }} @else Unknown @endif</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="{{ url('/settings') }}" class="btn btn-default btn-flat">{{ trans('adminlte_lang::message.profile') }}</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{ url('/logout') }}" class="btn btn-default btn-flat" id="logout"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ trans('adminlte_lang::message.signout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
||||
{{ csrf_field() }}
|
||||
<input type="submit" value="logout" style="display: none;">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<!-- Control Sidebar Toggle Button -->
|
||||
<li>
|
||||
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
@ -0,0 +1,17 @@
|
||||
<!-- REQUIRED JS SCRIPTS -->
|
||||
|
||||
<!-- JQuery and bootstrap are required by Laravel 5.3 in resources/assets/js/bootstrap.js-->
|
||||
<!-- Laravel App -->
|
||||
<script src="{{-- url (mix('/js/app.js')) --}}" type="text/javascript"></script>
|
||||
@js('/js/app.js')
|
||||
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
|
||||
@yield('page-scripts')
|
||||
<!-- Optionally, you can add Slimscroll and FastClick plugins.
|
||||
Both of these plugins are recommended to enhance the
|
||||
user experience. Slimscroll is required when using the
|
||||
fixed layout. -->
|
||||
<script src="{{ url('/plugins/jquery.slimscroll.min.js') }}" type="text/javascript"></script>
|
||||
<script src="{{ url('/plugins/fastclick/fastclick.min.js') }}" type="text/javascript"></script>
|
@ -0,0 +1,117 @@
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
@if (! Auth::guest())
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ Gravatar::get($user->email) }}" class="img-circle" alt="User Image" />
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ Auth::user()->name }}</p>
|
||||
<!-- Status -->
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> {{ trans('adminlte_lang::message.online') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- search form (Optional) -->
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" autocomplete="off" placeholder="{{ trans('adminlte_lang::message.search') }}..."/>
|
||||
<span class="input-group-btn">
|
||||
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<ul class="sidebar-menu">
|
||||
<li class="header">Menu</li>
|
||||
<!-- Optionally, you can add icons to the links -->
|
||||
<li class="active"><a href="{{ url('home') }}"><i class='fa fa-link'></i> <span>{{ trans('adminlte_lang::message.home') }}</span></a></li>
|
||||
<li class="active"><a href="{{ url('my') }}"><i class='fa fa-link'></i> <span>My Accounts</span></a></li>
|
||||
<li class="active"><a href="{{ url('brand') }}"><i class='fa fa-link'></i> <span>Brand Compare</span></a></li>
|
||||
<li class="treeview">
|
||||
<a href="#"><i class='fa fa-link'></i> <span>Contracts</span> <i class="fa fa-angle-left pull-right"></i></a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ url('new') }}">New</a></li>
|
||||
<li><a href="{{ url('expiring') }}">Expiring</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul><!-- /.sidebar-menu -->
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
@section('page-scripts')
|
||||
<script src="{{ url('/plugins/bootstrap3-typeahead.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("input[name=q]").typeahead({
|
||||
delay: 300,
|
||||
minLength: 2,
|
||||
fitToElement: false,
|
||||
appendTo: "#search_results",
|
||||
source: function (query,process) {
|
||||
search('{{ url("search") }}',query,process);
|
||||
},
|
||||
|
||||
matcher: function () { return true; },
|
||||
|
||||
updater: function (item) {
|
||||
window.parent.location.href = '{{ url("/") }}'+users[item];
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
var c=0;
|
||||
var search = _.debounce(function(url,query,process,icon){
|
||||
$.ajax({
|
||||
url : url,
|
||||
type : 'GET',
|
||||
data : 'term=' + query,
|
||||
dataType : 'JSON',
|
||||
async : false,
|
||||
cache : false,
|
||||
beforeSend : function() {
|
||||
if (c++ == 0) {
|
||||
if (icon)
|
||||
$('i[name='+icon+']').addClass("fa-spin");
|
||||
else
|
||||
$('i[name=searching]').removeClass("hidden");
|
||||
}
|
||||
},
|
||||
success : function(data) {
|
||||
// if json is null, means no match, won't do again.
|
||||
if(data==null || (data.length===0)) return;
|
||||
|
||||
users = {};
|
||||
userLabels = [];
|
||||
_.each(data,function(item,ix,list) {
|
||||
if (_.includes(users,item.label))
|
||||
item.label = item.label + ' #' + item.value;
|
||||
|
||||
userLabels.push(item.label);
|
||||
users[item.label] = item.value;
|
||||
});
|
||||
|
||||
process(userLabels);
|
||||
},
|
||||
complete : function() {
|
||||
if (--c == 0) {
|
||||
if (icon)
|
||||
$('i[name='+icon+']').removeClass("fa-spin");
|
||||
else
|
||||
$('i[name=searching]').addClass("hidden");
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 500);
|
||||
</script>
|
||||
@append
|
93
resources/theme/backend/adminlte/new.blade.php
Normal file
93
resources/theme/backend/adminlte/new.blade.php
Normal file
@ -0,0 +1,93 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
New Contracts
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@php
|
||||
$data = collect();
|
||||
@endphp
|
||||
|
||||
<div class="col-sm-11 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $name }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover small" style="color: #000000;" id="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="1" colspan="4">{{ $name }}</th>
|
||||
<th rowspan="2" class="text-right bg-primary">Entitled</th>
|
||||
<th colspan="3" class="text-center" style="background-color: #5cb85c !important">Deployed</th>
|
||||
<th rowspan="2" style="background-color: #d6d6c2 !important">Behind</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #f0ad4e !important">Assign</th>
|
||||
<th rowspan="2" class="text-right" style="background-color: #d9534f !important; color: white;">UnAssign</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Start</th>
|
||||
<th>Unit</th>
|
||||
<th>Segment</th>
|
||||
<th>Category</th>
|
||||
<th class="text-right" style="background-color: #5cb85c !important">Actual</th>
|
||||
<th style="background-color: #7cd87c !important">Ahead</th>
|
||||
<th class="text-right" style="background-color: #0099e6 !important">Over</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($scope->get() as $o)
|
||||
@php
|
||||
$filter = $o->category_summary($ido)->filter(function($item,$value) use ($co) { return $item['category_id'] == $co->id; });
|
||||
if (! $e=$filter->sum('entitled')) continue;
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td>{{ $o->contract_start->format('Y-m-d') }}</td>
|
||||
<td>{{ $o->account->imt->iot->name }}</td>
|
||||
<td>{{ $o->account->imt->name }}</td>
|
||||
<td><a href="{{ $next ? url('/'.$next.'/'.$co->id.'/'.$ido->id.'/'.$o->account->id) : '#' }}"> {{ $o->account->name }}</a></td>
|
||||
<td class="text-right bg-primary" style="!important">{{ number_format($e,2) }}</td>
|
||||
<td class="text-right" style="background-color: #5cb85c !important">{{ number_format($filter->sum('actual'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #7cd87c !important">{{ number_format($filter->sum('ahead'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #0099e6 !important">{{ number_format($filter->sum('over'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #d6d6c2 !important">{{ number_format($filter->sum('behind'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #f0ad4e !important">{{ number_format($filter->sum('assigned'),1) }}</td>
|
||||
<td class="text-right" style="background-color: #d9534f !important; color: white;">{{ number_format($filter->sum('unassigned'),1) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script src="{{ url('/plugins/dataTables.bootstrap.min.js') }}"></script>
|
||||
<script src="{{ url('/plugins/jquery.dataTables.js') }}"></script>
|
||||
<link href="{{ url('/plugins/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">
|
||||
<link href="{{ url('/plugins/dataTables.bootstrap.css') }}" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
"pageLength": 20,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
35
resources/theme/backend/adminlte/noaccounts.blade.php
Normal file
35
resources/theme/backend/adminlte/noaccounts.blade.php
Normal file
@ -0,0 +1,35 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Change Title here!
|
||||
@endsection
|
||||
|
||||
|
||||
@section('main-content')
|
||||
<div class="container-fluid spark-screen">
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-1">
|
||||
|
||||
<div class="box box-solid">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">No Accounts tagged!</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<p>
|
||||
You havent tagged any accounts.<br>
|
||||
To tag an account, press the <i class="fa fa-2x fa-star"></i> icon so that it turns orange <i style="color: orange;" class="fa fa-2x fa-star"></i>.
|
||||
</p>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
18
resources/theme/backend/adminlte/product-iot.blade.php
Normal file
18
resources/theme/backend/adminlte/product-iot.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Summary for {{$co->name}}
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@include('widgets.product-iot')
|
||||
|
||||
@yield('product')
|
||||
@endsection
|
63
resources/theme/backend/adminlte/product.blade.php
Normal file
63
resources/theme/backend/adminlte/product.blade.php
Normal file
@ -0,0 +1,63 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ trans('adminlte_lang::message.home') }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Product Detail
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
<div class="col-sm-9 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $po->name }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover" style="color: #000000">
|
||||
<tr>
|
||||
<th> </td>
|
||||
<th colspan="2" class="text-center bg-primary">Entitled</td>
|
||||
<th colspan="3" class="text-center" style="background-color: #5cb85c">Deployment</td>
|
||||
<th colspan="2" class="text-center" style="background-color: #d9534f; color: white;">Unassigned</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th class="text-right bg-primary">Qty</th>
|
||||
<th class="text-right bg-primary">Value</th>
|
||||
<th class="text-right" style="background-color: #5cb85c">Qty</th>
|
||||
<th class="text-right" style="background-color: #5cb85c">Deployed</th>
|
||||
<th class="text-right" style="background-color: #f0ad4e">Assigned</th>
|
||||
<th class="text-right" style="background-color: #d9534f; color: white;">Qty</th>
|
||||
<th class="text-right" style="background-color: #d9534f; color: white;">Unassigned</th>
|
||||
</tr>
|
||||
|
||||
@foreach ($po->accounts($ido) as $o)
|
||||
<tr>
|
||||
<td><a href="{{ url('/account/'.$po->category_id().'/'.$ido->id.'/'.$o->account_id) }}">{{ $o->account_name }}</a></td>
|
||||
<td class="text-right bg-primary">{{ $q=(isset($o->qty_entitled) ? $o->qty_entitled : 0) }}</td>
|
||||
<td class="text-right bg-primary">J${{ number_format($e=(isset($o->entitled) ? $o->entitled : 0),3) }}m</td>
|
||||
<td class="text-right" style="background-color: #5cb85c">{{ $r=(isset($o->qty_rate) ? $o->qty_rate : 0) }}</td>
|
||||
<td class="text-right" style="background-color: #5cb85c">J${{ number_format($d=(isset($o->deployed) ? $o->deployed : 0),3) }}m</td>
|
||||
<td class="text-right" style="background-color: #f0ad4e">J${{ number_format($a=(isset($o->assigned) ? $o->assigned : 0),3) }}m</td>
|
||||
<td class="text-right" style="background-color: #d9534f; color: white;">{{ $q-$r }}</td>
|
||||
<td class="text-right" style="background-color: #d9534f; color: white;">J${{ number_format(($e-$d-$a),3) }}m</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
24
resources/theme/backend/adminlte/summary.blade.php
Normal file
24
resources/theme/backend/adminlte/summary.blade.php
Normal file
@ -0,0 +1,24 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ $co->name }}@if ($name != $co->name)|{{ $name }}@endif
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Summary for {{$co->name}}@if ($name != $co->name)|{{ $name }}@endif
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $ido->import_date->format('Y-m-d') }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@include('widgets.category-select')
|
||||
@include('widgets.summary')
|
||||
|
||||
@yield('category-select')
|
||||
@yield('summary')
|
||||
@if($pdata)
|
||||
@include('widgets.product-iot')
|
||||
@yield('product')
|
||||
@endif
|
||||
@endsection
|
53
resources/theme/backend/adminlte/vendor/adminlte/auth/login.blade.php
vendored
Normal file
53
resources/theme/backend/adminlte/vendor/adminlte/auth/login.blade.php
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
@extends('adminlte::layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Log in
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<body class="hold-transition login-page">
|
||||
<div id="app" v-cloak>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}"><b>Software</b>Deployment</a>
|
||||
</div><!-- /.login-logo -->
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg"> {{ trans('adminlte_lang::message.siginsession') }} </p>
|
||||
|
||||
<login-form name="{{ config('auth.providers.users.field','email') }}"
|
||||
domain="{{ config('auth.defaults.domain','') }}"></login-form>
|
||||
|
||||
<a href="{{ url('/password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a><br>
|
||||
|
||||
@include('adminlte::auth.partials.social_login')
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('adminlte::layouts.partials.scripts_auth')
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@endsection
|
4
resources/theme/backend/adminlte/vendor/adminlte/auth/partials/social_login.blade.php
vendored
Normal file
4
resources/theme/backend/adminlte/vendor/adminlte/auth/partials/social_login.blade.php
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="social-auth-links text-center">
|
||||
<p>- OR -</p>
|
||||
<a href="{{ url('/auth/ibm') }}" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-address-card-o"></i> Sign In with W3id</a>
|
||||
</div><!-- /.social-auth-links -->
|
59
resources/theme/backend/adminlte/vendor/adminlte/auth/passwords/email.blade.php
vendored
Normal file
59
resources/theme/backend/adminlte/vendor/adminlte/auth/passwords/email.blade.php
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
@extends('adminlte::layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Password recovery
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<body class="login-page">
|
||||
<div id="app">
|
||||
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="{{ url('/home') }}"><b>Admin</b>LTE</a>
|
||||
</div><!-- /.login-logo -->
|
||||
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Reset Password</p>
|
||||
|
||||
<email-reset-password-form></email-reset-password-form>
|
||||
|
||||
<a href="{{ url('/login') }}">Log in</a><br>
|
||||
|
||||
</div><!-- /.login-box-body -->
|
||||
|
||||
</div><!-- /.login-box -->
|
||||
</div>
|
||||
|
||||
@include('adminlte::layouts.partials.scripts_auth')
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-blue',
|
||||
radioClass: 'iradio_square-blue',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@endsection
|
44
resources/theme/backend/adminlte/vendor/adminlte/auth/register.blade.php
vendored
Normal file
44
resources/theme/backend/adminlte/vendor/adminlte/auth/register.blade.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
@extends('adminlte::layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Register
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<body class="hold-transition register-page">
|
||||
<div id="app" v-cloak>
|
||||
<div class="register-box">
|
||||
<div class="register-logo">
|
||||
<a href="{{ url('/home') }}"><b>Software</b>Deployment</a>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="register-box-body">
|
||||
<p class="login-box-msg">Register for access</p>
|
||||
|
||||
<register-form></register-form>
|
||||
<!-- #include('adminlte::auth.partials.social_login') -->
|
||||
|
||||
<a href="{{ url('/login') }}" class="text-center">I already have an account</a>
|
||||
</div><!-- /.form-box -->
|
||||
</div><!-- /.register-box -->
|
||||
</div>
|
||||
|
||||
@include('adminlte::layouts.partials.scripts_auth')
|
||||
|
||||
@include('adminlte::auth.terms')
|
||||
|
||||
</body>
|
||||
|
||||
@endsection
|
212
resources/theme/backend/adminlte/widgets/account.blade.php
Normal file
212
resources/theme/backend/adminlte/widgets/account.blade.php
Normal file
@ -0,0 +1,212 @@
|
||||
@php
|
||||
use App\Models\Product;
|
||||
use App\Models\Prodsum;
|
||||
|
||||
$codata = $data->filter(function($item,$key) use ($co) { return $item['category_id'] == $co->id; })->pop();
|
||||
@endphp
|
||||
|
||||
@section('account')
|
||||
<div class="col-sm-6 col-md-offset-0">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">Deployment Summary [{{$co->name}}]</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="donutchart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Account Summary [{{$co->name}}]</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<ul class="list-unstyled">
|
||||
<li>Type: <strong>{{ $ao->diamond }}</strong> @if (! is_null($ao->diamondreport) AND $ao->diamond == 'Diamond') @if ($ao->diamondreport) <small>(Reporting)</small> @else <small>(Not Reporting)</small> @endif @endif</li>
|
||||
<li>SDL: <strong>{{ $ao->sdl }}</strong></li>
|
||||
<li>{{ $co->name }} Entitlement: <strong>J${{ array_get($codata,'entitled',0) }}m</strong> [ J${{ $data->sum('entitled') }}m ]</li>
|
||||
<li>Contracts: <strong>{{ $ao->contracts()->count() }}</strong> [<strong>{{ $ao->contracts()->min('contract_start') }}</strong> -> <strong>{{ $ao->contracts()->max('contract_end') }}</strong>]</li>
|
||||
<li>Projects: <strong>{{ $ao->projects()->count() }}</strong></li>
|
||||
<li>Estimated Sub IN: <strong>J${{ $codata['subin'] }}m</strong></li>
|
||||
<li>Estimated Sub OUT: <strong>J${{ $codata['subout'] }}m</strong></li>
|
||||
@if(array_get($codata,'subchance')) <li>Estimated Sub RISK: <strong>{{ $codata['subchance'] }}</strong></li>@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-5 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">Substitution Position</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="substitution"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Contracts with [{{$co->name}}] Entitlement or Deployment</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover small">
|
||||
<tr>
|
||||
<th>Name</th><th>Start</th><th>End</th><th>Progress</th><th>Status</th><th>Type</th>
|
||||
<th class="sd-entitled">Entitled</th>
|
||||
<th class="sd-actual">Actual</th>
|
||||
<th class="sd-ahead">Ahead</th>
|
||||
<th class="sd-behind">Behind</th>
|
||||
<th class="sd-over">Over</th>
|
||||
<th class="sd-assigned">Assigned</th>
|
||||
<th class="sd-unassigned">Unassigned</th>
|
||||
</tr>
|
||||
@foreach ($ao->contracts->sortBy(['contract_start']) as $o)
|
||||
<tr>
|
||||
@php
|
||||
$filter = $o->category_summary($ido)->filter(function($item,$key) use ($co) { return $item['category_id'] == $co->id; })->pop();
|
||||
@endphp
|
||||
<td>{{ $o->name }}</td>
|
||||
<td>{{ $o->contract_start->format('Y-m-d') }}</td>
|
||||
<td>{{ $o->contract_end->format('Y-m-d') }}</td>
|
||||
<td>{{ number_format($o->progress($ido->import_date->lastOfHalf())*100,1) }}%</td>
|
||||
<td>{{ $o->contract_status }} @if ($o->contract_status_reason) ({{ $o->contract_status_reason }}) @endif</td>
|
||||
<td>{{ $o->contract_type }}</td>
|
||||
<td class="sd-entitled">J${{ number_format(array_get($filter,'entitled'),3) }}m</td>
|
||||
<td class="sd-actual">J${{ number_format(array_get($filter,'actual'),3) }}m</td>
|
||||
<td class="sd-ahead">J${{ number_format(array_get($filter,'ahead'),3) }}m</td>
|
||||
<td class="sd-behind">J${{ number_format(array_get($filter,'behind'),3) }}m</td>
|
||||
<td class="sd-over">J${{ number_format(array_get($filter,'over'),3) }}m</td>
|
||||
<td class="sd-assigned">J${{ number_format(array_get($filter,'assigned'),3) }}m</td>
|
||||
<td class="sd-unassigned">J${{ number_format(array_get($filter,'unassigned'),3) }}m</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">Projects with [{{$co->name}}] Deployment</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover small" id="dataTables-contracts">
|
||||
<tr>
|
||||
<th>Name</th><th>Start</th><th>End</th><th>Status</th>
|
||||
</tr>
|
||||
@foreach ($ao->product_projects($ido)->filter(function($item,$key) use ($co) { return $item->category_id == $co->id; }) as $o)
|
||||
<tr>
|
||||
<td>{{ $o->project_name }}</td><td>{{ $o->project_start }}</td><td>{{ $o->project_end }}</td><td>{{ $o->project_status }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-offset-0">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">[{{$co->name}}] Products</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover small" id="dataTables-contracts">
|
||||
<tr>
|
||||
<th> </td>
|
||||
<th colspan="2" class="text-center sd-entitled">Entitled</td>
|
||||
<th colspan="3" class="text-center sd-deployed">Deployment</td>
|
||||
<th colspan="2" class="text-center sd-unassigned">Unassigned</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th class="text-right sd-entitled">Qty</th>
|
||||
<th class="text-right sd-entitled">Value</th>
|
||||
<th class="text-right sd-deployed">Qty</th>
|
||||
<th class="text-right sd-deployed">Deployed</th>
|
||||
<th class="text-right sd-assigned">Assigned</th>
|
||||
<th class="text-right sd-unassigned">Qty</th>
|
||||
<th class="text-right sd-unassigned">Unassigned</th>
|
||||
</tr>
|
||||
|
||||
@foreach ($ao->product_summary($ido)->filter(function($item,$key) use ($co) { return $item['category_id'] == $co->id; }) as $o)
|
||||
<tr>
|
||||
<td>
|
||||
@if (isset($o['id']))
|
||||
{{ $o['id'] }}: <a href="{{ url('/product/'.$o['id']) }}">{{ Product::find($o['id'])->name }}</a>
|
||||
@elseif (isset($o['prodsum_id']))
|
||||
<a href="{{ url('/prodsum/'.$o['prodsum_id']) }}">{{ Prodsum::find($o['prodsum_id'])->name }}</a>
|
||||
@else
|
||||
Other
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-right sd-entitled">{{ $q=$o['entitled_qty'] }}</td>
|
||||
<td class="text-right sd-entitled">J${{ number_format($o['entitled'],3) }}m</td>
|
||||
<td class="text-right sd-deployed">{{ $r=$o['qty'] }}</td>
|
||||
<td class="text-right sd-deployed">J${{ number_format($o['deployed'],3) }}m</td>
|
||||
<td class="text-right sd-assigned">J${{ number_format($o['assigned'],3) }}m</td>
|
||||
<td class="text-right sd-unassigned">{{ $q-$r < 0 ? 0 : $q-$r }}</td>
|
||||
<td class="text-right sd-unassigned">J${{ number_format($o['unassigned'],3) }}m</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('widgets.donut_chart',['chart'=>$codata])
|
||||
@include('widgets.sub_scater',['chart'=>$data])
|
@ -0,0 +1,63 @@
|
||||
@php
|
||||
use App\Models\{Category,Import};
|
||||
@endphp
|
||||
|
||||
@section('category-select')
|
||||
|
||||
<div class="col-md-5 col-md-offset-0">
|
||||
|
||||
<!-- Default box -->
|
||||
<div class="box {{isset($co->id) ? 'collapsed-box' : ''}}">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Select Data to View</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-{{ isset($co->id) ? 'plus' : 'minus' }}"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="category" class="col-sm-2 control-label">Category</label>
|
||||
<div class="col-sm-7">
|
||||
<select class="form-control" id="category">
|
||||
@foreach (Category::active()->orderby('name')->get() as $o)
|
||||
<option value="{{ $o->id }}" {{ ((isset($co) AND $o->id == $co->id) OR (Auth::user()->category_id == $o->id)) ? 'selected="selected"' : '' }}>{{ $o->name }} ({{ $o->segment->unit->name.':'.$o->segment->name }})</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="import" class="col-sm-2 control-label">Import Data</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control" id="import">
|
||||
@foreach (Import::orderby('import_date','DESC')->get() as $o)
|
||||
<option value="{{ $o->id }}" {{ (isset($io) AND $o->id == $io->id) ? 'selected="selected"' : '' }}>{{ $o->import_date->format('Y-m-d') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button id="go" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- /.box -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#go").click(function() {
|
||||
location.replace('{{ url('/category.iot/') }}/'+$('#category').val()+'/'+$('#import').val());
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
<div id="areachart"></div>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<canvas id="cbar" width="350" height="220"></canvas>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<canvas class ="round" id="cdonut" width="250" height="195"></canvas>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<canvas id="cline" width="350" height="220"></canvas>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<canvas class ="round" id="cpie" width="250" height="200"></canvas>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<div id="donutchart"></div>
|
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
<div id="linechart"></div>
|
@ -0,0 +1,2 @@
|
||||
|
||||
<div id="piechart"></div>
|
@ -0,0 +1,81 @@
|
||||
@section('page-scripts')
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
revenueData = [];
|
||||
revenueData.push({ color: '#337ab7', name: 'Entitled', y: {{ array_get($chart,'entitled',0) }} });
|
||||
revenueData.push({ color: '#0099e6', name: 'Over', y: {{ array_get($chart,'over',0) }} });
|
||||
|
||||
riskData = [];
|
||||
riskData.push({ color: '#004d00', name: 'Actual', y: {{ array_get($chart,'actual',0) }} });
|
||||
riskData.push({ color: '#7cd87c', name: 'Ahead', y: {{ array_get($chart,'ahead',0) }} });
|
||||
riskData.push({ color: '#ffc48c', name: 'Behind', y: {{ $b=array_get($chart,'behind',0) }} });
|
||||
riskData.push({ color: '#f0ad4e', name: 'Assigned', y: {{ ($a=array_get($chart,'assigned',0)) > $b ? $a-$b : $a }} });
|
||||
riskData.push({ color: '#d9534f', name: 'Unassigned', y: {{ array_get($chart,'unassigned',0)-$b }} });
|
||||
riskData.push({ color: '#0099e6', name: 'Over', y: {{ array_get($chart,'over',0) }} });
|
||||
|
||||
// Create the chart
|
||||
Highcharts.chart('donutchart', {
|
||||
chart: {
|
||||
type: 'pie',
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
pie: {
|
||||
shadow: false,
|
||||
center: ['50%', '40%'],
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
crop: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
valuePrefix: '$',
|
||||
valueSuffix: 'm',
|
||||
},
|
||||
series: [{
|
||||
name: 'Revenue',
|
||||
data: revenueData,
|
||||
size: '80%',
|
||||
innerSize: '70%',
|
||||
dataLabels: {
|
||||
/*
|
||||
formatter: function () {
|
||||
return this.y > 5 ? this.point.name : null;
|
||||
},
|
||||
*/
|
||||
color: '#ffffff',
|
||||
distance: 20,
|
||||
}
|
||||
}, {
|
||||
name: 'Risk',
|
||||
data: riskData,
|
||||
size: '60%',
|
||||
innerSize: '70%',
|
||||
dataLabels: {
|
||||
/*
|
||||
formatter: function () {
|
||||
// display only if larger than 1
|
||||
return this.y > 1 ? '<b>' + this.point.name + ':</b> $' + this.y + 'm' : null;
|
||||
},
|
||||
*/
|
||||
distance: 20,
|
||||
}
|
||||
}]
|
||||
});
|
||||
</script>
|
||||
@append
|
108
resources/theme/backend/adminlte/widgets/product-iot.blade.php
Normal file
108
resources/theme/backend/adminlte/widgets/product-iot.blade.php
Normal file
@ -0,0 +1,108 @@
|
||||
@section('product')
|
||||
@php
|
||||
$cols = $model->find($pdata->pluck($model_key)->unique())->sortBy('name');
|
||||
@endphp
|
||||
|
||||
<!-- Default box -->
|
||||
<div class="container-fluid spark-screen">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-md-offset-0">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> Product Data: {{ $co->name }} ({{$co->segment->unit->name."|".$co->segment->name}}) as at {{ $ido->import_date->format('Y-m-d') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-target="#entitled" data-toggle="tab">Entitled</a></li>
|
||||
<li><a data-target="#unassigned" data-toggle="tab">Unassigned</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
@foreach (['entitled','unassigned'] as $show)
|
||||
<div class="tab-pane @if($show=='entitled') active @endif" id="{{ $show }}">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover" style="color: #000000;">
|
||||
<tr>
|
||||
<th> </th>
|
||||
@foreach ($cols as $col)
|
||||
<th class="text-right" colspan="2">{{ $col->name }}</th>
|
||||
@endforeach
|
||||
|
||||
<th class="text-right" colspan="2">TOTAL</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
@foreach ($cols as $col)
|
||||
<th class="text-right">#</th>
|
||||
<th class="text-right">$</th>
|
||||
@endforeach
|
||||
|
||||
<th class="text-right">#</th>
|
||||
<th class="text-right">$</th>
|
||||
</tr>
|
||||
|
||||
<!-- Show group products -->
|
||||
@foreach (\App\Models\Prodsum::find($pdata->pluck('prodsum_id')->unique())->sortBy('name') as $o)
|
||||
<tr>
|
||||
<td><a href="{{ $next ? url('/prodsum/'.$o->id) : '#' }}"> {{ $o->name }}</a></td>
|
||||
|
||||
@foreach ($cols as $col)
|
||||
<td class="text-right">{{$pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id AND $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }}</td>
|
||||
<td class="text-right">{{ number_format($pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id AND $item->iot_id == $col->id; })->sum($show),3) }}</td>
|
||||
@endforeach
|
||||
|
||||
<th class="text-right">{{$pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id; })->pluck('account_id')->unique()->count()}}</th>
|
||||
<th class="text-right">{{ number_format($pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id; })->sum($show),3) }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<!-- Show non-group products -->
|
||||
@php
|
||||
$rest = $pdata->reject(function($item,$key) { return isset($item->prodsum_id); });
|
||||
//dd($rest);
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td><i>Other Items</i></td>
|
||||
|
||||
@foreach ($cols as $col)
|
||||
<td class="text-right">{{ $rest->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }}</td>
|
||||
<td class="text-right">{{ number_format($rest->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->sum($show),3) }}</td>
|
||||
@endforeach
|
||||
|
||||
<th class="text-right">{{ $rest->pluck('account_id')->unique()->count() }}</th>
|
||||
<th class="text-right">{{ number_format($rest->sum($show),3) }}</th>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>TOTAL</th>
|
||||
@foreach ($cols as $col)
|
||||
<th class="text-right">{{ $pdata->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }}</th>
|
||||
<th class="text-right">{{ number_format($pdata->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->sum($show),3) }}</th>
|
||||
@endforeach
|
||||
|
||||
<th class="text-right">{{ $pdata->pluck('account_id')->unique()->count() }}</th>
|
||||
<th class="text-right">{{ number_format($pdata->sum($show),3) }}</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>Please Note:</strong> This view is a product centric view and does not reduce the "Unassigned" value when clients
|
||||
deploy products that they do not have a recorded entitlement allocated to it. For a truer representation of Risk, please use the Geography/Market view</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,98 @@
|
||||
@section('page-scripts')
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
subout = [];
|
||||
subin = [];
|
||||
@php
|
||||
$x=0;
|
||||
@endphp
|
||||
@foreach ($chart->sortBy(function($item,$key) { $co = \App\Models\Category::findOrFail($item['category_id']); return sprintf('%s|%s|%s',$co->segment->unit->name,$co->segment->name,$co->name); }) as $data)
|
||||
@php
|
||||
$co = \App\Models\Category::findOrFail($data['category_id']);
|
||||
$name = sprintf('%s|%s|%s',$co->segment->unit->name,$co->segment->name,$co->name);
|
||||
$x++;
|
||||
@endphp
|
||||
@if ($data['subout'] > 0)
|
||||
subout.push({ "x": {{ $x }}, "y": -{{ $data['subout'] }}, "name": '{{ $name }}' });
|
||||
@else
|
||||
subin.push({ "x": {{ $x }}, "y": {{ $data['subin'] }}, "name": '{{ $name }}' });
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
// Create the chart
|
||||
Highcharts.chart('substitution', {
|
||||
chart: {
|
||||
type: 'scatter',
|
||||
zoomtype: 'xy',
|
||||
height: '30%',
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
yAxis: {
|
||||
title: {
|
||||
text: 'Rev J$m'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
title: {
|
||||
text: 'BU Categories'
|
||||
},
|
||||
visible: true,
|
||||
labels: { enabled: false }
|
||||
},
|
||||
plotOptions: {
|
||||
scatter: {
|
||||
marker: {
|
||||
radius: 5,
|
||||
states: {
|
||||
hover: {
|
||||
enabled: true,
|
||||
lineColor: 'rgb(100,100,100)'
|
||||
}
|
||||
}
|
||||
},
|
||||
states: {
|
||||
hover: {
|
||||
marker: {
|
||||
enabled: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
headerFormat: '{series.name}<br>',
|
||||
pointFormat: '<b>{point.name}</b>: {point.y}'
|
||||
}
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
layout: 'vertical',
|
||||
align: 'right',
|
||||
verticalAlign: 'top',
|
||||
floating: true,
|
||||
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF',
|
||||
borderWidth: 1
|
||||
},
|
||||
exporting: {
|
||||
enabled: false
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
tooltip: {
|
||||
valuePrefix: '$',
|
||||
valueSuffix: 'm',
|
||||
},
|
||||
series: [{
|
||||
name: 'Sub Out',
|
||||
color: '#d9534f',
|
||||
data: subout,
|
||||
}, {
|
||||
name: 'Sub In',
|
||||
color: '#0099e6',
|
||||
data: subin,
|
||||
}],
|
||||
});
|
||||
</script>
|
||||
@append
|
247
resources/theme/backend/adminlte/widgets/summary.blade.php
Normal file
247
resources/theme/backend/adminlte/widgets/summary.blade.php
Normal file
@ -0,0 +1,247 @@
|
||||
@section('summary')
|
||||
|
||||
@php
|
||||
$e=$data->sum('entitled');
|
||||
@endphp
|
||||
|
||||
@if ($e)
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
|
||||
<div class="box collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Summary</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-condensed table-striped" style="color: #000000;">
|
||||
<tr>
|
||||
<td class="sd-actual">Deployment</td><td class="text-right sd-actual">{{ number_format($data->sum('actual')/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-ahead">Deployment (with Ahead)</td><td class="text-right sd-ahead">{{ number_format(($data->sum('actual')+$data->sum('ahead'))/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-shouldbe">Should Be</td><td class="text-right sd-shouldbe">{{ number_format(($data->sum('actual')+$data->sum('behind'))/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-behind">Gap</td><td class="text-right sd-behind">{{ number_format($data->sum('behind')/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-assigned">Deployment with Plans</td><td class="text-right sd-assigned">{{ number_format(($data->sum('actual')+$data->sum('ahead')+$data->sum('assigned'))/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-unassigned">Unassigned</td><td class="text-right sd-unassigned">{{ number_format($data->sum('unassigned')/$e*100,1) }}%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3 col-md-offset-0">
|
||||
|
||||
<div class="box collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Substition Estimatation</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<table width="100%" class="table table-condensed table-striped" style="color: #000000;">
|
||||
<tr>
|
||||
<td class="sd-over">Sub Ins</td><td class="text-right sd-over">J${{ $si=number_format($data->sum('subin'),3) }}m</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sd-unassigned">Sub Outs</td><td class="text-right sd-unassigned">J${{ $so=number_format($data->sum('subout'),3) }}m</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-sm-12 col-md-offset-0">
|
||||
<div class="container-fluid spark-screen">
|
||||
<div class="row" style="line-height: 1.4; color: black;">
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box sd-entitled">
|
||||
<div class="info-box-icon"><i class="fa fa-money"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Clients</span>
|
||||
<span class="info-box-number">{{ $n=$data->filter(function($item) { return array_get($item,'entitled',0) > 0; })->count() }}</span>
|
||||
<div class="progress">
|
||||
<span class="progress-bar" style="width: 100%"></span>
|
||||
</div>
|
||||
<span class="progress-description">J${{ $data->sum('entitled') }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box sd-deployed">
|
||||
<div class="info-box-icon"><i class="fa fa-thumbs-o-up"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Deployed</span>
|
||||
<span class="info-box-number">{{ $d=($data->filter(function($item) { return array_get($item,'actual',0) > 0; })->count()) }}</span>
|
||||
<div class="progress">
|
||||
<span class="progress-bar" style="width: {{ number_format(($n-$d)/$n*100,0) }}%"></span>
|
||||
</div>
|
||||
<span class="progress-description">J${{ $data->sum('actual')+$data->sum('ahead') }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box sd-unassigned">
|
||||
<div class="info-box-icon"><i class="fa fa-question"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Not Deploying</span>
|
||||
<span class="info-box-number">{{ $not=($data->filter(function($item) { return array_get($item,'actual',0) == 0 AND $item['assigned'] == 0 AND $item['entitled'] > 0; })->count()) }}</span>
|
||||
<div class="progress">
|
||||
<span class="progress-bar" style="width: {{ number_format(($n-$not)/$n*100,0) }}%"></span>
|
||||
</div>
|
||||
<span class="progress-description">J${{ $data->filter(function($item) { return array_get($item,'actual',0) == 0 AND $item['assigned'] == 0 AND $item['entitled'] > 0; })->sum('unassigned') }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box sd-behind">
|
||||
<div class="info-box-icon"><i class="fa fa-warning"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Behind</span>
|
||||
<span class="info-box-number">{{ $b=($data->filter(function($item) { return array_get($item,'behind',0) > 0; })->count()) }}</span>
|
||||
<div class="progress">
|
||||
<span class="progress-bar" style="width: {{ number_format(($n-$b)/$n*100,0) }}%"></span>
|
||||
</div>
|
||||
<span class="progress-description">J${{ $data->sum('behind') }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box sd-unassigned">
|
||||
<div class="info-box-icon"><i class="fa fa-thumbs-o-down"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">No Plans</span>
|
||||
<span class="info-box-number">{{ $u=($data->filter(function($item) { return array_get($item,'unassigned',0) > 0; })->count()) }}</span>
|
||||
<div class="progress">
|
||||
<span class="progress-bar" style="width: {{ number_format(($n-$u)/$n*100,0) }}%"></span>
|
||||
</div>
|
||||
<span class="progress-description">J${{ $data->sum('unassigned') }}m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-offset-0">
|
||||
<div class="info-box @if( $si >= $so) sd-over @else sd-unassigned @endif">
|
||||
<div class="info-box-icon"><i class="fa @if( $si >= $so) fa-money @else fa-exclamation @endif"></i></div>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Sub Estimate</span>
|
||||
<span class="info-box-number">{{ $data->filter(function($item) use ($si,$so) { return array_get($item,($si >= $so ? 'subin' : 'subout'),0) > 0; })->count() }}</span>
|
||||
<span class="progress-description">@if( $si >= $so) J${{ $si }}m @else J${{ $so }}m @endif</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default box -->
|
||||
<div class="container-fluid spark-screen">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-md-offset-0">
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> Deployment Data: {{ $co->name }} ({{$co->segment->unit->name."|".$co->segment->name}}) as at {{ $ido->import_date->format('Y-m-d') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="donutchart"></div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<table width="100%" class="table table-striped table-bordered table-hover" style="color: #000000;">
|
||||
<tr>
|
||||
<th rowspan="2">{{ $name }}</th>
|
||||
<th rowspan="2" class="text-right sd-entitled">Entitled</th>
|
||||
<th colspan="3" class="text-center sd-deployed">Deployed</th>
|
||||
<th rowspan="2" class="text-right sd-behind">Behind</th>
|
||||
<th rowspan="2" class="text-right sd-assigned">Assigned</th>
|
||||
<th rowspan="2" class="text-right sd-unassigned">Unassigned</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right sd-actual">Actual</th>
|
||||
<th class="text-right sd-ahead">Ahead</th>
|
||||
<th class="text-right sd-over">Over</th>
|
||||
</tr>
|
||||
|
||||
@foreach ($model->find($data->pluck($model_key)->unique())->sortBy('name') as $o)
|
||||
@php
|
||||
$row = $data->where($model_key,$o->id);
|
||||
if (! $row->sum('entitled') AND ! $row->sum('over') AND ! Request::query('hidden'))
|
||||
continue;
|
||||
@endphp
|
||||
|
||||
<tr>
|
||||
<td><a href="{{ $next ? url('/'.$next.'/'.$co->id.'/'.$ido->id.'/'.$o->id) : '#' }}"> {{ $o->name }}</a></td>
|
||||
<td class="text-right sd-entitled">{{ number_format($row->sum('entitled'),3) }}</td>
|
||||
<td class="text-right sd-actual">{{ number_format($row->sum('actual'),3) }}</td>
|
||||
<td class="text-right sd-ahead">{{ number_format($row->sum('ahead'),3) }}</td>
|
||||
<td class="text-right sd-over">{{ number_format($row->sum('over'),3) }}</td>
|
||||
<td class="text-right sd-behind">{{ number_format($row->sum('behind'),3) }}</td>
|
||||
<td class="text-right sd-assigned">{{ number_format($row->sum('assigned'),3) }}</td>
|
||||
<td class="text-right sd-unassigned">{{ number_format($row->sum('unassigned'),3) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<th>TOTAL</th>
|
||||
<th class="text-right sd-entitled">{{ number_format($e,3) }}</th>
|
||||
<th class="text-right sd-actual">{{ number_format($data->sum('actual'),3) }}</th>
|
||||
<th class="text-right sd-ahead">{{ number_format($data->sum('ahead'),3) }}</th>
|
||||
<th class="text-right sd-over">{{ number_format($data->sum('over'),3) }}</th>
|
||||
<th class="text-right sd-behind">{{ number_format($data->sum('behind'),3) }}</th>
|
||||
<th class="text-right sd-assigned">{{ number_format($data->sum('assigned'),3) }}</th>
|
||||
<th class="text-right sd-unassigned">{{ number_format($data->sum('unassigned'),3) }}</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@include('widgets.donut_chart',['chart'=>[
|
||||
'entitled'=>$data->sum('entitled'),
|
||||
'over'=>$data->sum('over'),
|
||||
'actual'=>$data->sum('actual'),
|
||||
'ahead'=>$data->sum('ahead'),
|
||||
'behind'=>$data->sum('behind'),
|
||||
'assigned'=>$data->sum('assigned'),
|
||||
'unassigned'=>$data->sum('unassigned'),
|
||||
]])
|
||||
|
@ -1,18 +1,8 @@
|
||||
@extends('layouts.frontend')
|
||||
@extends('layouts.app')
|
||||
@section('page_heading','Careers')
|
||||
@section('section')
|
||||
@section('main-content')
|
||||
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="javascript:;">Pages</a></li>
|
||||
<li class="active">Careers</li>
|
||||
</ul>
|
||||
<!-- BEGIN SIDEBAR & CONTENT -->
|
||||
<div class="row margin-bottom-40">
|
||||
<!-- BEGIN CONTENT -->
|
||||
<div class="col-md-9 col-sm-9">
|
||||
<h1>Careers</h1>
|
||||
<div class="content-page">
|
||||
<!-- BEGIN CAROUSEL -->
|
||||
@ -161,49 +151,29 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-sm-3 sidebar2">
|
||||
<h2 class="padding-top-30">Our Contacts</h2>
|
||||
<address>
|
||||
<strong>Loop, Inc.</strong><br>
|
||||
795 Park Ave, Suite 120<br>
|
||||
San Francisco, CA 94107<br>
|
||||
<abbr title="Phone">P:</abbr> (234) 145-1810
|
||||
</address>
|
||||
<address>
|
||||
<strong>Email</strong><br>
|
||||
<a href="mailto:info@email.com">info@email.com</a><br>
|
||||
<a href="mailto:support@example.com">support@example.com</a>
|
||||
</address>
|
||||
<!-- BEGIN PAGE LEVEL JAVASCRIPTS (REQUIRED ONLY FOR CURRENT PAGE) -->
|
||||
@js('assets/jquery/plugins/fancybox/source/jquery.fancybox.pack.js','jq-fancybox','jquery')<!-- pop up -->
|
||||
@js('assets/jquery/plugins/owl.carousel/2.0.0/js/owl.carousel.min.js','jq-owl-carousel','jquery')<!-- slider for products -->
|
||||
@js('assets/jquery/plugins/uniform/2.1.0/js/jquery.uniform.min.js','jq-uniform','jquery')
|
||||
|
||||
<h2 class="padding-top-20">Contact Form</h2>
|
||||
<!-- BEGIN FORM-->
|
||||
<form action="#" role="form">
|
||||
<div class="form-group">
|
||||
<label for="career-name">Name</label>
|
||||
<input type="text" class="form-control" id="career-name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="career-position">Position</label>
|
||||
<select class="form-control" id="career-position">
|
||||
<option>Senior Software Engineer</option>
|
||||
<option>Systems Administrator/Operations Engineer</option>
|
||||
<option>Technical Support Engineer</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="career-resume">Resume</label>
|
||||
<input type="file" id="career-resume">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="icon-ok"></i> Send</button>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
<!-- END CONTENT -->
|
||||
</div>
|
||||
<!-- BEGIN SIDEBAR & CONTENT -->
|
||||
</div>
|
||||
</div>
|
||||
@js('corporate/scripts/layout.js','layout','jquery')
|
||||
@js('pages/scripts/bs-carousel.js','bs-carousel','jq-owl-carousel')
|
||||
@js('pages/scripts/contact-us.js','contact-us','jquery')
|
||||
|
||||
@stop
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
Layout.init();
|
||||
Layout.initOWL();
|
||||
<!-- Layout.initTwitter(); -->
|
||||
Layout.initUniform();
|
||||
Layout.initFixHeaderWithPreHeader();
|
||||
Layout.initNavScrolling();
|
||||
<!-- ContactUs.init(); -->
|
||||
});
|
||||
</script>
|
||||
<!-- END PAGE LEVEL JAVASCRIPTS -->
|
||||
@stop
|
@ -5,66 +5,37 @@
|
||||
<html lang="en">
|
||||
<!--<![endif]-->
|
||||
|
||||
<!-- Head BEGIN -->
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>@yield('page_heading')</title>
|
||||
@section('htmlheader')
|
||||
@include('layouts.partials.htmlheader')
|
||||
@show
|
||||
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
||||
<meta property="og:site_name" content="{{ config('app.name') }}" />
|
||||
<meta property="og:title" content="{{ $so->site->name }}" />
|
||||
<meta property="og:description" content="{{ $so->site->description }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="{{ $so->site->logo }}" />
|
||||
<meta property="og:url" content="{{ url('') }}" />
|
||||
|
||||
<link rel="shortcut icon" href="@yield('site_favicon','favicon.ico')" />
|
||||
|
||||
{{-- Fonts START --}}
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
||||
{{-- Fonts END --}}
|
||||
|
||||
{{-- Global styles START --}}
|
||||
@css('assets/font-awesome/css/font-awesome.min.css')
|
||||
@css('assets/bootstrap/3.3.5/css/bootstrap.min.css')
|
||||
{{-- Global styles END --}}
|
||||
|
||||
{{-- Theme styles START --}}
|
||||
@css('pages/css/components.css')
|
||||
@css('pages/css/slider.css')
|
||||
@css('corporate/css/style.css')
|
||||
@css('corporate/css/style-responsive.css')
|
||||
@css('corporate/css/themes/red.css')
|
||||
@css('corporate/css/custom.css')
|
||||
{{-- Theme styles END --}}
|
||||
|
||||
{{-- Styles --}}
|
||||
{!! Asset::styles() !!}
|
||||
</head>
|
||||
<!-- Head END -->
|
||||
|
||||
<!-- Body BEGIN -->
|
||||
<!-- BODY BEGIN -->
|
||||
<body class="corporate">
|
||||
@yield('body')
|
||||
{{-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) --}}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="@js('assets/respondjs/js/respond.min.js')"></script>
|
||||
<![endif]-->
|
||||
@include('layouts.partials.mainheader')
|
||||
|
||||
@js('assets/jquery/1.11.2/js/jquery.min.js','jquery')
|
||||
@js('assets/jquery/plugins/migrate/1.2.1/js/jquery-migrate.min.js','jq-migrate','jquery')
|
||||
@js('assets/bootstrap/3.3.5/js/bootstrap.min.js','bootstrap-js','jquery')
|
||||
{{-- @include('layouts.partials.sidebar') --}}
|
||||
{{-- No sidebar in this theme --}}
|
||||
|
||||
@js('corporate/scripts/back-to-top.js','back-to-top','jquery')
|
||||
{{-- END CORE PLUGINS --}}
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
@include('layouts.partials.contentheader')
|
||||
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
<div class="row margin-bottom-40">
|
||||
<div class="col-md-9 col-sm-9">
|
||||
@yield('main-content')
|
||||
</div>
|
||||
|
||||
{{-- @TODO Consider removing this, so that scripts are rendered with @js() --}}
|
||||
@yield('scripts')
|
||||
@include('layouts.partials.rightsidebar')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('layouts.partials.footer')
|
||||
|
||||
@section('scripts')
|
||||
@include('layouts.partials.scripts')
|
||||
@show
|
||||
</body>
|
||||
<!-- END BODY -->
|
||||
<!-- BODY END -->
|
||||
</html>
|
||||
|
@ -1,203 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
{{-- Page level plugin styles START --}}
|
||||
@css('assets/animate/css/animate.css')
|
||||
@css('assets/jquery/plugins/fancybox/source/jquery.fancybox.css')
|
||||
@css('assets/jquery/plugins/owl.carousel/2.0.0/css/owl.carousel.css')
|
||||
@css('assets/jquery/plugins/uniform/2.1.0/css/uniform.default.css')
|
||||
{{-- Page level plugin styles END --}}
|
||||
@section('body')
|
||||
<!-- BEGIN TOP BAR -->
|
||||
<div class="pre-header">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- BEGIN TOP BAR LEFT PART -->
|
||||
<div class="col-md-6 col-sm-6 additional-shop-info">
|
||||
<ul class="list-unstyled list-inline">
|
||||
<li><i class="fa fa-phone"></i><span>{{ $so->site->phone }}</span></li>
|
||||
<li><i class="fa fa-envelope-o"></i><span>{{ $so->site->email }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END TOP BAR LEFT PART -->
|
||||
|
||||
<!-- BEGIN TOP BAR MENU -->
|
||||
<div class="col-md-6 col-sm-6 additional-nav">
|
||||
<ul class="list-unstyled list-inline pull-right">
|
||||
<li><a href="{{ url('login') }}">Log In</a></li>
|
||||
<li><a href="{{ url('register') }}">Registration</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END TOP BAR MENU -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END TOP BAR -->
|
||||
|
||||
<!-- BEGIN HEADER -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<a class="site-logo" href="index.html"><img src="{{ $so->site->logo_url() }}" alt="{{ $so->site->name }}" height="32"></a>
|
||||
<a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>
|
||||
|
||||
<!-- BEGIN NAVIGATION -->
|
||||
<div class="header-navigation pull-right font-transform-inherit">
|
||||
<ul>
|
||||
{{-- @todo Replace this with a function that can traverse children with multiple depths --}}
|
||||
@foreach ($so->site->top_menu() as $item => $menu)
|
||||
<li class="dropdown {{ Request::is($menu['url']) ? 'active' : '' }}">
|
||||
|
||||
@if (! array_get($menu,'children'))
|
||||
<a {{ Request::is($menu['url']) ? 'class=active' : '' }} href="{{ url($menu['url']) }}">{{ $menu['name'] }}</a>
|
||||
@else
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="javascript:;">{{ $item }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li {{ (Request::is($menu['url']) ? 'class=active' : '') }}><a href="{{ url($menu['url']) }}">{{ $menu['name'] }}</a></li>
|
||||
@foreach($menu['children'] as $name => $menuitem)
|
||||
<li {{ (Request::is($menuitem['url']) ? 'class=active' : '') }}><a href="{{ url($menuitem['url']) }}">{{ $menuitem['name'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
<!-- BEGIN TOP SEARCH -->
|
||||
<li class="menu-search">
|
||||
<span class="sep"></span>
|
||||
<i class="fa fa-search search-btn"></i>
|
||||
|
||||
<div class="search-box">
|
||||
<form action="#">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Search" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
<!-- END TOP SEARCH -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END NAVIGATION -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Header END -->
|
||||
|
||||
@yield('section')
|
||||
|
||||
<!-- BEGIN PRE-FOOTER -->
|
||||
<div class="pre-footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- BEGIN BOTTOM ABOUT BLOCK -->
|
||||
<div class="col-md-4 col-sm-6 pre-footer-col">
|
||||
<h2>About us</h2>
|
||||
<p>{{ $so->site->aboutus() }}</p>
|
||||
<!--
|
||||
<div class="photo-stream">
|
||||
<h2>Photos Stream</h2>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="javascript:;"><img alt="" src="{{!! Theme::url('pages/img/people/img5-small.jpg') !!}}"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<!-- END BOTTOM ABOUT BLOCK -->
|
||||
|
||||
<!-- BEGIN BOTTOM CONTACTS -->
|
||||
<div class="col-md-4 col-sm-6 pre-footer-col">
|
||||
<h2>Our Contacts</h2>
|
||||
<address class="margin-bottom-40">
|
||||
<table>
|
||||
<tr><th style="vertical-align:top; padding-right: 5px;">Address</th><td>{!! $so->site->address('html') !!}</td></tr>
|
||||
<tr><th>Phone</th><td>{{ $so->site->phone }}</tr>
|
||||
@if ($so->site->fax)<tr><th>Fax</th><td>{{ $so->site->fax }}</tr>@endif
|
||||
<tr><th>Email</th><td> <a href="mailto:{{ $so->site->email }}">{{ $so->site->email }}</a></tr>
|
||||
</table>
|
||||
</address>
|
||||
<!--
|
||||
<div class="pre-footer-subscribe-box pre-footer-subscribe-box-vertical">
|
||||
<h2>Newsletter</h2>
|
||||
<p>Subscribe to our newsletter and stay up to date with the latest news and deals!</p>
|
||||
<form action="#">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="youremail@mail.com" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">Subscribe</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<!-- END BOTTOM CONTACTS -->
|
||||
|
||||
<!-- BEGIN TWITTER BLOCK -->
|
||||
<!--
|
||||
<div class="col-md-4 col-sm-6 pre-footer-col">
|
||||
<h2 class="margin-bottom-0">Latest Tweets</h2>
|
||||
<a class="twitter-timeline" href="https://twitter.com/twitterapi" data-tweet-limit="2" data-theme="dark" data-link-color="#57C8EB" data-widget-id="" data-chrome="noheader nofooter noscrollbar noborders transparent">Loading tweets...</a>
|
||||
</div>
|
||||
-->
|
||||
<!-- END TWITTER BLOCK -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END PRE-FOOTER -->
|
||||
|
||||
<!-- BEGIN FOOTER -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- BEGIN COPYRIGHT -->
|
||||
<div class="col-md-4 col-sm-4 padding-top-10">
|
||||
2016 © Leenooks. ALL Rights Reserved. <!--<a href="javascript:;">Privacy Policy</a> | <a href="javascript:;">Terms of Service</a>-->
|
||||
</div>
|
||||
<!-- END COPYRIGHT -->
|
||||
|
||||
<!-- BEGIN SOCIAL -->
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<ul class="social-footer list-unstyled list-inline pull-right">
|
||||
@foreach ($so->site->social() as $social)
|
||||
<li><a href="javascript:;"><i class="fa fa-{{ $social }}"></i></a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END SOCIAL -->
|
||||
|
||||
<!-- BEGIN POWERED -->
|
||||
<div class="col-md-4 col-sm-4 text-right">
|
||||
<p class="powered">Powered by: <a href="http://www.leenooks.net/">leenooks</a></p>
|
||||
</div>
|
||||
<!-- END POWERED -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END FOOTER -->
|
||||
|
||||
<!-- BEGIN PAGE LEVEL JAVASCRIPTS (REQUIRED ONLY FOR CURRENT PAGE) -->
|
||||
@js('assets/jquery/plugins/fancybox/source/jquery.fancybox.pack.js','jq-fancybox','jquery')<!-- pop up -->
|
||||
@js('assets/jquery/plugins/owl.carousel/2.0.0/js/owl.carousel.min.js','jq-owl-carousel','jquery')<!-- slider for products -->
|
||||
@js('assets/jquery/plugins/uniform/2.1.0/js/jquery.uniform.min.js','jq-uniform','jquery')
|
||||
|
||||
@js('corporate/scripts/layout.js','layout','jquery')
|
||||
@js('pages/scripts/bs-carousel.js','bs-carousel','jq-owl-carousel')
|
||||
@js('pages/scripts/contact-us.js','contact-us','jquery')
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
Layout.init();
|
||||
Layout.initOWL();
|
||||
<!-- Layout.initTwitter(); -->
|
||||
Layout.initUniform();
|
||||
Layout.initFixHeaderWithPreHeader();
|
||||
Layout.initNavScrolling();
|
||||
<!-- ContactUs.init(); -->
|
||||
});
|
||||
</script>
|
||||
<!-- END PAGE LEVEL JAVASCRIPTS -->
|
||||
@stop
|
@ -0,0 +1,5 @@
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="javascript:;">Pages</a></li>
|
||||
<li class="active">Careers</li>
|
||||
</ul>
|
@ -0,0 +1,29 @@
|
||||
<!-- FOOTER BEGIN -->
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- BEGIN COPYRIGHT -->
|
||||
<div class="col-md-4 col-sm-4 padding-top-10">
|
||||
{{ config('app.copyright') }}
|
||||
</div>
|
||||
<!-- END COPYRIGHT -->
|
||||
|
||||
<!-- BEGIN SOCIAL -->
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<ul class="social-footer list-unstyled list-inline pull-right">
|
||||
@foreach ($so->site->social() as $social)
|
||||
<li><a href="javascript:;"><i class="fa fa-{{ $social }}"></i></a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END SOCIAL -->
|
||||
|
||||
<!-- BEGIN POWERED -->
|
||||
<div class="col-md-4 col-sm-4 text-right">
|
||||
<p class="powered">Powered by: <a href="http://www.leenooks.net/">leenooks</a></p>
|
||||
</div>
|
||||
<!-- END POWERED -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- FOOTER END -->
|
@ -0,0 +1,39 @@
|
||||
<!-- Head BEGIN -->
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>@yield('page_heading')</title>
|
||||
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
||||
<meta property="og:site_name" content="{{ config('app.name') }}" />
|
||||
<meta property="og:title" content="{{ $so->site->name }}" />
|
||||
<meta property="og:description" content="{{ $so->site->description }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="{{ $so->site->logo }}" />
|
||||
<meta property="og:url" content="{{ url('') }}" />
|
||||
|
||||
<link rel="shortcut icon" href="@yield('site_favicon','favicon.ico')" />
|
||||
|
||||
{{-- Fonts START --}}
|
||||
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
|
||||
{{-- Fonts END --}}
|
||||
|
||||
{{-- Global styles START --}}
|
||||
@css('assets/font-awesome/css/font-awesome.min.css')
|
||||
@css('assets/bootstrap/3.3.5/css/bootstrap.min.css')
|
||||
{{-- Global styles END --}}
|
||||
|
||||
{{-- Theme styles START --}}
|
||||
@css('pages/css/components.css')
|
||||
@css('pages/css/slider.css')
|
||||
@css('corporate/css/style.css')
|
||||
@css('corporate/css/style-responsive.css')
|
||||
@css('corporate/css/themes/red.css')
|
||||
@css('corporate/css/custom.css')
|
||||
{{-- Theme styles END --}}
|
||||
|
||||
{{-- Styles --}}
|
||||
{!! Asset::styles() !!}
|
||||
</head>
|
||||
<!-- Head END -->
|
@ -0,0 +1,78 @@
|
||||
<!-- BEGIN TOP BAR -->
|
||||
<div class="pre-header">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<!-- BEGIN TOP BAR LEFT PART -->
|
||||
<div class="col-md-6 col-sm-6 additional-shop-info">
|
||||
<ul class="list-unstyled list-inline">
|
||||
<li><i class="fa fa-phone"></i><span>{{ $so->site->phone }}</span></li>
|
||||
<li><i class="fa fa-envelope-o"></i><span>{{ $so->site->email }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END TOP BAR LEFT PART -->
|
||||
|
||||
<!-- BEGIN TOP BAR MENU -->
|
||||
<div class="col-md-6 col-sm-6 additional-nav">
|
||||
<ul class="list-unstyled list-inline pull-right">
|
||||
<li><a href="{{ url('login') }}">Log In</a></li>
|
||||
<li><a href="{{ url('register') }}">Registration</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END TOP BAR MENU -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END TOP BAR -->
|
||||
|
||||
|
||||
<!-- BEGIN HEADER -->
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<a class="site-logo" href="index.html"><img src="{{ $so->site->logo_url() }}" alt="{{ $so->site->name }}" height="32"></a>
|
||||
<a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>
|
||||
|
||||
<!-- BEGIN NAVIGATION -->
|
||||
<div class="header-navigation pull-right font-transform-inherit">
|
||||
<ul>
|
||||
{{-- @todo Replace this with a function that can traverse children with multiple depths --}}
|
||||
@foreach ($so->site->top_menu() as $item => $menu)
|
||||
<li class="dropdown {{ Request::is($menu['url']) ? 'active' : '' }}">
|
||||
|
||||
@if (! array_get($menu,'children'))
|
||||
<a {{ Request::is($menu['url']) ? 'class=active' : '' }} href="{{ url($menu['url']) }}">{{ $menu['name'] }}</a>
|
||||
@else
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="javascript:;">{{ $item }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li {{ (Request::is($menu['url']) ? 'class=active' : '') }}><a href="{{ url($menu['url']) }}">{{ $menu['name'] }}</a></li>
|
||||
@foreach($menu['children'] as $name => $menuitem)
|
||||
<li {{ (Request::is($menuitem['url']) ? 'class=active' : '') }}><a href="{{ url($menuitem['url']) }}">{{ $menuitem['name'] }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
</li>
|
||||
@endforeach
|
||||
|
||||
<!-- BEGIN TOP SEARCH -->
|
||||
<li class="menu-search">
|
||||
<span class="sep"></span>
|
||||
<i class="fa fa-search search-btn"></i>
|
||||
|
||||
<div class="search-box">
|
||||
<form action="#">
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="Search" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
<!-- END TOP SEARCH -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- END NAVIGATION -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Header END -->
|
@ -0,0 +1,37 @@
|
||||
<div class="col-md-3 col-sm-3 sidebar2">
|
||||
<h2 class="padding-top-30">Our Contacts</h2>
|
||||
<address>
|
||||
<strong>Loop, Inc.</strong><br>
|
||||
795 Park Ave, Suite 120<br>
|
||||
San Francisco, CA 94107<br>
|
||||
<abbr title="Phone">P:</abbr> (234) 145-1810
|
||||
</address>
|
||||
<address>
|
||||
<strong>Email</strong><br>
|
||||
<a href="mailto:info@email.com">info@email.com</a><br>
|
||||
<a href="mailto:support@example.com">support@example.com</a>
|
||||
</address>
|
||||
|
||||
<h2 class="padding-top-20">Contact Form</h2>
|
||||
<!-- BEGIN FORM-->
|
||||
<form action="#" role="form">
|
||||
<div class="form-group">
|
||||
<label for="career-name">Name</label>
|
||||
<input type="text" class="form-control" id="career-name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="career-position">Position</label>
|
||||
<select class="form-control" id="career-position">
|
||||
<option>Senior Software Engineer</option>
|
||||
<option>Systems Administrator/Operations Engineer</option>
|
||||
<option>Technical Support Engineer</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="career-resume">Resume</label>
|
||||
<input type="file" id="career-resume">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="icon-ok"></i> Send</button>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
@ -0,0 +1,16 @@
|
||||
{{-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) --}}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="@js('assets/respondjs/js/respond.min.js')"></script>
|
||||
<![endif]-->
|
||||
|
||||
@js('assets/jquery/1.11.2/js/jquery.min.js','jquery')
|
||||
@js('assets/jquery/plugins/migrate/1.2.1/js/jquery-migrate.min.js','jq-migrate','jquery')
|
||||
@js('assets/bootstrap/3.3.5/js/bootstrap.min.js','bootstrap-js','jquery')
|
||||
|
||||
@js('corporate/scripts/back-to-top.js','back-to-top','jquery')
|
||||
{{-- END CORE PLUGINS --}}
|
||||
|
||||
{{-- Scripts --}}
|
||||
{!! Asset::scripts() !!}
|
||||
|
||||
@yield('page-scripts')
|
@ -12,7 +12,3 @@ use Illuminate\Http\Request;
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
})->middleware('auth:api');
|
||||
|
215
routes/web.php
215
routes/web.php
@ -16,32 +16,19 @@ Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
Route::get('logout','Auth\LoginController@logout');
|
||||
|
||||
// Generic Image Renderer - Render images that we dont have with a generic image
|
||||
Route::get('image/generic/{width}/{height}/{color}','MediaController@image')->name('image');
|
||||
|
||||
// Backend Routes
|
||||
Route::group(['middleware'=>['auth','admin','setTheme:adminlte-be'],'prefix'=>'a'], function() {
|
||||
|
||||
|
||||
/* Route::get('/login', function()
|
||||
{
|
||||
return View::make('page-login');
|
||||
})->name('login');
|
||||
*/
|
||||
Route::group(['middleware'=>['setTheme:metronic-fe']], function() {
|
||||
/* Route::get('/', function()
|
||||
Route::get('/home', function()
|
||||
{
|
||||
return View::make('home');
|
||||
})->name('home');
|
||||
*/
|
||||
|
||||
|
||||
Route::get('/kangaroos', function()
|
||||
{
|
||||
return View::make('kangaroos');
|
||||
})->name('kangaroos');
|
||||
|
||||
|
||||
// Render site specific images
|
||||
#Route::get('image/site/','MediaController@imagesite')->name('imagesite');
|
||||
});
|
||||
|
||||
Route::group(['prefix'=>'public','namespace'=>'public','middleware'=>['setTheme:metronic-be']], function() {
|
||||
@ -51,187 +38,19 @@ Route::group(['prefix'=>'public','namespace'=>'public','middleware'=>['setTheme:
|
||||
return View::make('home');
|
||||
})->name('public');
|
||||
|
||||
Route::get('/page-about', function()
|
||||
{
|
||||
return View::make('page-about');
|
||||
})->name('public.page-about');
|
||||
|
||||
Route::get('/page-services', function()
|
||||
{
|
||||
return View::make('page-services');
|
||||
})->name('public.page-services');
|
||||
|
||||
Route::get('/page-prices', function()
|
||||
{
|
||||
return View::make('page-prices');
|
||||
})->name('public.page-prices');
|
||||
|
||||
Route::get('/page-faq', function()
|
||||
{
|
||||
return View::make('page-faq');
|
||||
})->name('public.page-faq');
|
||||
|
||||
Route::get('/page-gallery', function()
|
||||
{
|
||||
return View::make('page-gallery');
|
||||
})->name('public.page-gallery');
|
||||
|
||||
Route::get('/page-search-result', function()
|
||||
{
|
||||
return View::make('page-search-result');
|
||||
})->name('public.page-search-result');
|
||||
|
||||
Route::get('/page-forgotton-password', function()
|
||||
{
|
||||
return View::make('page-forgotton-password');
|
||||
})->name('public.page-forgotton-password');
|
||||
|
||||
Route::get('/page-reg-page', function()
|
||||
{
|
||||
return View::make('page-reg-page');
|
||||
})->name('register');
|
||||
|
||||
Route::get('/page-careers', function()
|
||||
{
|
||||
return View::make('page-careers');
|
||||
})->name('public.page-careers');
|
||||
|
||||
Route::get('/page-site-map', function()
|
||||
{
|
||||
return View::make('page-site-map');
|
||||
})->name('public.page-site-map');
|
||||
|
||||
Route::get('/page-contacts', function()
|
||||
{
|
||||
return View::make('page-contacts');
|
||||
})->name('public.page-contacts');
|
||||
|
||||
Route::get('/portfolio-item', function()
|
||||
{
|
||||
return View::make('portfolio-item');
|
||||
})->name('public.portfolio-item');
|
||||
|
||||
Route::get('/blog', function()
|
||||
{
|
||||
return View::make('blog');
|
||||
})->name('public.blog');
|
||||
|
||||
Route::get('/blog-item', function()
|
||||
{
|
||||
return View::make('blog-item');
|
||||
})->name('public.blog-item');
|
||||
|
||||
Route::get('/page-404', function()
|
||||
{
|
||||
return View::make('page-404');
|
||||
})->name('public.page-404');
|
||||
|
||||
Route::get('/page-500', function()
|
||||
{
|
||||
return View::make('page-500');
|
||||
})->name('public.page-500');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['prefix'=>'demo','namespace'=>'sbadmin','middleware'=>['setTheme:sbadmin']], function() {
|
||||
|
||||
Route::get('/', function()
|
||||
{
|
||||
return View::make('home');
|
||||
})->name('demo');
|
||||
|
||||
Route::get('/charts', function()
|
||||
{
|
||||
return View::make('mcharts');
|
||||
})->name('demo.charts');
|
||||
|
||||
Route::get('/tables', function()
|
||||
{
|
||||
return View::make('table');
|
||||
})->name('demo.tables');
|
||||
|
||||
Route::get('/forms', function()
|
||||
{
|
||||
return View::make('form');
|
||||
})->name('demo.forms');
|
||||
|
||||
Route::get('/grid', function()
|
||||
{
|
||||
return View::make('grid');
|
||||
})->name('demo.grid');
|
||||
|
||||
Route::get('/buttons', function()
|
||||
{
|
||||
return View::make('buttons');
|
||||
})->name('demo.buttons');
|
||||
|
||||
Route::get('/icons', function()
|
||||
{
|
||||
return View::make('icons');
|
||||
})->name('demo.icons');
|
||||
|
||||
Route::get('/panels', function()
|
||||
{
|
||||
return View::make('panel');
|
||||
})->name('demo.panels');
|
||||
|
||||
Route::get('/typography', function()
|
||||
{
|
||||
return View::make('typography');
|
||||
})->name('demo.typography');
|
||||
|
||||
Route::get('/notifications', function()
|
||||
{
|
||||
return View::make('notifications');
|
||||
})->name('demo.notifications');
|
||||
|
||||
Route::get('/blank', function()
|
||||
{
|
||||
return View::make('blank');
|
||||
})->name('demo.blank');
|
||||
|
||||
Route::get('/login', function()
|
||||
{
|
||||
return View::make('login');
|
||||
})->name('demo.login');
|
||||
|
||||
Route::get('/documentation', function()
|
||||
{
|
||||
return View::make('documentation');
|
||||
})->name('demo.documentation');
|
||||
|
||||
Route::get('/a', function () {})->name('demo');
|
||||
Route::get('/b', function () {})->name('demo.login');
|
||||
Route::get('/c', function () {})->name('demo.charts');
|
||||
Route::get('/d', function () {})->name('demo.tables');
|
||||
Route::get('/e', function () {})->name('demo.forms');
|
||||
Route::get('/f', function () {})->name('demo.panels');
|
||||
Route::get('/g', function () {})->name('demo.buttons');
|
||||
Route::get('/h', function () {})->name('demo.typography');
|
||||
Route::get('/i', function () {})->name('demo.icons');
|
||||
Route::get('/j', function () {})->name('demo.grid');
|
||||
Route::get('/k', function () {})->name('demo.blank');
|
||||
Route::get('/l', function () {})->name('demo.documentation');
|
||||
});
|
||||
|
||||
#Auth::routes();
|
||||
#
|
||||
#Route::get('/home', 'HomeController@index');
|
||||
#Route::get('/test', 'TestController@index');
|
||||
|
||||
DB::enableQueryLog();
|
||||
|
||||
DB::listen(
|
||||
function ($sql) {
|
||||
foreach ($sql->bindings as $i => $binding) {
|
||||
if ($binding instanceof \DateTime) {
|
||||
$sql->bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
|
||||
} else {
|
||||
if (is_string($binding)) {
|
||||
$sql->bindings[$i] = "'$binding'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Insert bindings into query
|
||||
$query = str_replace(array('%', '?'), array('%%', '%s'), $sql->sql);
|
||||
|
||||
$query = vsprintf($query, $sql->bindings);
|
||||
|
||||
// Save the query to file
|
||||
$logFile = fopen(
|
||||
storage_path('logs' . DIRECTORY_SEPARATOR . date('Y-m-d') . '_query.log'),
|
||||
'a+'
|
||||
);
|
||||
fwrite($logFile, date('Y-m-d H:i:s') . ': ' . $query . PHP_EOL);
|
||||
fclose($logFile);
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user