M3 Integration fixes
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
@extends('m3::liberty-theme.layout.main')
|
||||
@section('title')
|
||||
Sentinel Doc Archive
|
||||
@endsection
|
||||
@section('content')
|
||||
<!-- /.row -->
|
||||
<div class="container-fluid px-4">
|
||||
<h1 class="mt-4">Warehouse Performance Metrics</h1>
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-12 mt-1">
|
||||
<form class="needs-validation" enctype="multipart/form-data" method="GET" action="{{ route("m3.whsePerfShow") }}">
|
||||
{{-- @csrf --}}
|
||||
<div class="mb-2 row">
|
||||
<label for="date" class="col-sm-1 col-form-label">Select Year and Month</label>
|
||||
<div class="col-sm-1">
|
||||
<select aria-label="Date In Yr" name="date_in_yr" id="date_in_yr">
|
||||
@for($x=date('Y',strtotime(date('Y').'- 5 years'));$x<date('Y');$x++)
|
||||
<option value={{$x}}>{{$x}}</option>
|
||||
@endfor
|
||||
<option value={{date('Y')}} SELECTED>{{date('Y')}}</option>
|
||||
</select>
|
||||
<select name="date_in_mth" id="date_in_mth">
|
||||
@for($x=1;$x<=12;$x++)
|
||||
@if($x==date('m'))
|
||||
<option value={{str_pad($x,2,"0",STR_PAD_LEFT)}} SELECTED>{{str_pad($x,2,"0",STR_PAD_LEFT)}}</option>
|
||||
@else
|
||||
<option value={{str_pad($x,2,"0",STR_PAD_LEFT)}}>{{str_pad($x,2,"0",STR_PAD_LEFT)}}</option>
|
||||
@endif
|
||||
@endfor
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<label for="sonar-input-54ed629414" class="visually-hidden">sonar input 54ed629414</label>
|
||||
<input type=submit class="btn btn-primary" value="Display table" id="sonar-input-54ed629414">
|
||||
|
||||
<button type="button" class="btn btn-warning" id="exportExcel">Download to Excel</button>
|
||||
|
||||
</form>
|
||||
|
||||
{{-- Form for Export --}}
|
||||
<form enctype="multipart/form-data" method="POST" action="{{ route("m3.whsePerfExcel") }}" id="exporttoExcelForm">
|
||||
@csrf
|
||||
<input type="hidden" name="date_in_yr" id="date_in_yr1" value="">
|
||||
<input type="hidden" name="date_in_mth" id="date_in_mth1" value="">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click','#exportExcel', function () {
|
||||
var date_in_yr = $('#date_in_yr').val().trim();
|
||||
var date_in_mth = $('#date_in_mth').val().trim();
|
||||
|
||||
date_in_yr = $("#date_in_yr").val();
|
||||
date_in_mth = $("#date_in_mth").val();
|
||||
|
||||
$("#date_in_yr1").val(date_in_yr);
|
||||
$("#date_in_mth1").val(date_in_mth);
|
||||
|
||||
$("#exporttoExcelForm").submit();
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user