68 lines
2.8 KiB
PHP
68 lines
2.8 KiB
PHP
@extends('layouts.app')
|
|
@section('title', __('supplychain::lang.demand_forecasts'))
|
|
@section('content')
|
|
@include('supplychain::layouts.nav')
|
|
<section class="content-header">
|
|
<h1>@lang('supplychain::lang.demand_forecasts')
|
|
@can('supplychain.forecast.create')
|
|
<span class="pull-right">
|
|
<form method="POST" action="{{ action([\Modules\SupplyChain\Http\Controllers\DemandForecastController::class, 'generate']) }}" style="display:inline-block;">
|
|
@csrf
|
|
<input type="hidden" name="months_ahead" value="3">
|
|
<button type="submit" class="btn btn-success btn-sm"><i class="fa fa-line-chart"></i> @lang('supplychain::lang.generate_forecasts')</button>
|
|
</form>
|
|
<a href="{{ action([\Modules\SupplyChain\Http\Controllers\DemandForecastController::class, 'create']) }}" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> @lang('supplychain::lang.add_forecast')</a>
|
|
</span>
|
|
@endcan
|
|
</h1>
|
|
</section>
|
|
<section class="content">
|
|
@if(session('status'))
|
|
<div class="alert alert-{{ session('status.success') ? 'success' : 'warning' }} alert-dismissible">
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
{{ session('status.msg') }}
|
|
</div>
|
|
@endif
|
|
<div class="box box-primary">
|
|
<div class="box-body">
|
|
<table class="table table-bordered table-striped" id="sc_forecasts_table" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('supplychain::lang.product')</th>
|
|
<th>@lang('supplychain::lang.variation')</th>
|
|
<th>@lang('supplychain::lang.forecast_month')</th>
|
|
<th>@lang('supplychain::lang.forecast_qty')</th>
|
|
<th>@lang('supplychain::lang.method')</th>
|
|
<th>@lang('supplychain::lang.confidence')</th>
|
|
<th>@lang('supplychain::lang.source')</th>
|
|
<th>@lang('supplychain::lang.action')</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@section('javascript')
|
|
<script>
|
|
$(function() {
|
|
$('#sc_forecasts_table').DataTable({
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: '{{ action([\Modules\SupplyChain\Http\Controllers\DemandForecastController::class, 'index']) }}',
|
|
columns: [
|
|
{ data: 'product_name', name: 'product.name' },
|
|
{ data: 'variation_name', orderable: false, searchable: false },
|
|
{ data: 'forecast_month' },
|
|
{ data: 'forecast_qty' },
|
|
{ data: 'method' },
|
|
{ data: 'confidence' },
|
|
{ data: 'source' },
|
|
{ data: 'action', orderable: false, searchable: false }
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|