file cleanup

This commit is contained in:
2019-12-25 00:39:00 -06:00
parent 22d5d4692d
commit dbfdc41029
8 changed files with 0 additions and 281 deletions

View File

@@ -1,43 +0,0 @@
<?php
namespace App\Http\Controllers\Ajax;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use App\Models\User\User;
class LiveSearch extends Controller
{
public function index() {
return view('ajax.live_search');
}
public function action(Request $request) {
if($request->ajax()) {
$output = '';
$query = $request->get('query');
if($query != null) {
$data = User::where('name', 'like', '%'.$query.'%')->get();
} else {
$data = User::all();
}
$total_row = $data->count();
if($total_row > 0 ) {
foreach($data as $row) {
$output .= '
<tr>
<td>'.$row->name.'</td>
<td>'.$row->character_id.'</td>
</tr>';
}
} else {
$output = '<tr><td align="center" colspan="5">No Data Found</td></tr>';
}
$data = array('table_data' => $output, 'total_data' => $total_row);
echo json_encode($data);
}
}
}

View File

@@ -9,7 +9,6 @@ use Carbon\Carbon;
//Libraries
use App\Library\Lookups\LookupHelper;
//use App\Library\Contracts\ContractHelper;
//Models
use App\Models\User\User;
@@ -22,7 +21,6 @@ class ContractController extends Controller
public function __construct() {
$this->middleware('auth');
$this->middleware('role:User');
//$this->middleware('permission:contract.canbid');
}
/**

View File

@@ -1,69 +0,0 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-140677389-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-140677389-1');
</script>
<title>{{ config('app.name', 'W4RP Services') }}</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Bootstrap CSS
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
-->
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}">
</head>
<body>
@include('layouts.navbar')
<div class="container">
@include('inc.messages')
</div>
@yield('content')
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
<script>
$(document).ready(function(){
fetch_customer_data();
function fetch_customer_data(query = '')
{
$.ajax({
url:"{{ route('live_search.action') }}",
method:'GET',
data:{query:query},
dataType:'json',
success:function(data)
{
$('tbody').html(data.table_data);
$('#total_records').text(data.total_data);
}
})
}
$(document).on('keyup', '#search', function(){
var query = $(this).val();
fetch_customer_data(query);
});
});
</script>

View File

@@ -1,64 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Live search in laravel using AJAX</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<br />
<div class="container box">
<h3 align="center">Live search in laravel using AJAX</h3><br />
<div class="panel panel-default">
<div class="panel-heading">Search Customer Data</div>
<div class="panel-body">
<div class="form-group">
<input type="text" name="search" id="search" class="form-control" placeholder="Search Customer Data" />
</div>
<div class="table-responsive">
<h3 align="center">Total Data : <span id="total_records"></span></h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Character Id</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
fetch_customer_data();
function fetch_customer_data(query = '')
{
$.ajax({
url:"{{ route('live_search.action') }}",
method:'GET',
data:{query:query},
dataType:'json',
success:function(data)
{
$('tbody').html(data.table_data);
$('#total_records').text(data.total_data);
}
})
}
$(document).on('keyup', '#search', function(){
var query = $(this).val();
fetch_customer_data(query);
});
});
</script>

View File

@@ -1,10 +0,0 @@
@extends('layouts.ajaxb4')
@section('content')
<div id = 'msg'>This message will be replaced using Ajax.
Click the button to replace the message.</div>
<?php
echo Form::button('Replace Message',['onClick'=>'getMessage()']);
?>
@endsection

View File

@@ -1,19 +0,0 @@
@extends('layouts.b4')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
<h2>Add New Structure Market</h2>
</div>
<div class="card-body">
{!! Form::open(['action' => 'Market\MarketController@storeAddStructure', 'method' => 'POST']) !!}
<div class="form-group">
{{ Form::label('tax', 'Market Tax') }}
{{ Form::text('tax', null, ['class' => 'form-control', 'placeholder' => '5.00']) }}
</div>
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
{!! Form::close() !!}
</div>
</div>
</div>
@endsection

View File

@@ -1,41 +0,0 @@
@extends('layouts.b4')
@section('content')
<div class="container">
<div class="row">
<div table="table table-striped table-bordered table-hover">
<thead>
<th>Location</th>
<th>Items</th>
<th>Quantities</th>
<th>Date</th>
</thead>
<tbody>
@foreach()
<tr data-toggle="collapse" data-target="{{ $stationName }}" class="accordion-toggle">
<td>Station</td>
<td>Item Types</td>
<td></td>
<td>Date</td>
</tr>
@foreach()
<tr class="hiddenRow">
<td>
<div class="accordion-body collapse" id="{{ $stationName }}"></div>
</td>
<td>
<div class="accordion-body collapse" id="{{ $stationName }}"></div>
</td>
<td>
<div class="accordion-body collapse" id="{{ $stationName }}"></div>
</td>
<td>
<div class="accordion-body collapse" id="{{ $stationName }}"></div>
</td>
</tr>
@endforeach
@endforeach
</tbody>
</div>
</div>
</div>
@endsection

View File

@@ -1,33 +0,0 @@
@extends('layouts.b4')
@section('content')
<div class="container">
<div class="container">
<div class="row">
<div class="card">
<div class="card-header">
<h2>Station Name</h2><br>
<h3>Date Updated</h3>
</div>
<div class="card-body">
<div table="table table-striped table-bordered">
<thead>
<th>Location</th>
<th>Items</th>
<th>Quantities</th>
</thead>
<tbody>
@foreach($items as $item)
<tr>
<td></td>
<td>Item Name</td>
<td>Quantity</td>
</tr>
@endforeach
</tbody>
</div>
</div>
</div>
</div>
</div>
@endsection