/
home
/
sjslayjy
/
public_html
/
assets
/
resources
/
views
/
master
/
Upload File
HOME
@extends('layout.master') @push('plugin-styles') {!! Html::style('//cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css') !!} <style type="text/css"> .table th, .table td { white-space: break-spaces !important; } </style> @endpush @section('content') <div class="row"> @if(Session::has('error')) <div class="alert alert-danger alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>{{ Session::get('error') }}</strong> </div> @endif <div class="col-lg-12 grid-margin"> <div class="card"> <div class="card-body"> <div class="row grid-margin"> <div class="col-lg-6"> <h4 class="card-title">All Spare Parts</h4> </div> <div class="col-lg-6 top-tab text-right"> <a href="{{url('admin/export-all-spares')}}" class="btn btn-success btn-fw">Export All Spares</a> </div> </div> <div class="table-responsive"> <table class="table table-striped" id="myTable"> <thead> <tr> <th> Spare Code </th> <th> Description </th> <th> UOM</th> <th> Type </th> <th> Category</th> </tr> </thead> <tbody> @foreach($all_spare_parts as $spare_part) <tr id="sp_{{$spare_part->id}}"> <td class="font-weight-medium">{{$spare_part->code}}</td> <td>{{$spare_part->description}}</td> <td> @if($spare_part->uom == 1) PCS @elseif($spare_part->uom == 2) LTR @elseif($spare_part->uom == 3) SET @elseif($spare_part->uom == 4) KG @elseif($spare_part->uom == 5) SQM @elseif($spare_part->uom == 6) MTR @elseif($spare_part->uom == 7) ROLL @elseif($spare_part->uom == 8) NOs @elseif($spare_part->uom == 9) Km @elseif($spare_part->uom == 10) Site @elseif($spare_part->uom == 11) Pair @elseif($spare_part->uom == 12) LS @elseif($spare_part->uom == 13) Pack @elseif($spare_part->uom == 14) Monthly @elseif($spare_part->uom == 15) Quarterly @elseif($spare_part->uom == 16) Half Yearly @elseif($spare_part->uom == 17) Yearly @else {{$spare_part->uom}} @endif </td> <td>{{$spare_part->type}}</td> <td>{{$spare_part->category}}</td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> @endsection @push('plugin-scripts') {!! Html::script('/assets/plugins/chartjs/chart.min.js') !!} {!! Html::script('/assets/plugins/jquery-sparkline/jquery.sparkline.min.js') !!} @endpush @push('custom-scripts') {!! Html::script('/assets/js/dashboard.js') !!} {!! Html::script('//cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js') !!} <script type="text/javascript"> $(document).ready( function () { $('#myTable').dataTable({ "order": [[ 1, "desc" ]] // Sort by the second column (stn_date) in descending order initially }); }); </script> @endpush