report dynamic

This commit is contained in:
Shohrat 2023-10-11 03:29:27 +05:00
parent bc015268e8
commit 447dd3aa69
5 changed files with 454 additions and 98 deletions

View File

@ -5,12 +5,14 @@ namespace Romanah\Gokbakja\Components;
use Cms\Classes\ComponentBase; use Cms\Classes\ComponentBase;
use Romanah\Gokbakja\Models\Product as ProductModel; use Romanah\Gokbakja\Models\Product as ProductModel;
use Romanah\Gokbakja\Models\Production as ProductionModel; use Romanah\Gokbakja\Models\Production as ProductionModel;
use Romanah\Gokbakja\Models\Excruiter as ExcruiterModel;
use Romanah\Gokbakja\Models\ProductionMachine as ProductionMachineModel; use Romanah\Gokbakja\Models\ProductionMachine as ProductionMachineModel;
use Romanah\Gokbakja\Models\PivotProduction as PivotProductionModel; use Romanah\Gokbakja\Models\PivotProduction as PivotProductionModel;
use Redirect; use Redirect;
use Carbon\Carbon; use Carbon\Carbon;
use Flash; use Flash;
use DB; use DB;
use October\Rain\Support\Facades\Flash as FacadesFlash;
class Production extends ComponentBase class Production extends ComponentBase
{ {
@ -25,6 +27,76 @@ class Production extends ComponentBase
} }
public function onReportProduction()
{
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$data = post();
$productions = ProductionModel::with(['pivot_production', 'excruiter', 'shift'])->orderBy('id', 'DESC');
$start = Carbon::parse($data["start"])->format('Y-m-d');
$end = Carbon::parse($data["end"])->format('Y-m-d');
$startView = Carbon::parse($data["start"])->format('d.m.Y');
$endView = Carbon::parse($data["end"])->format('d.m.Y');
$excruiter = $data["excruiter_id"];
$shiftId = $data["shift_id"];
if ($excruiter) {
$productions->where("excruiter_id", $excruiter);
}
if ($shiftId) {
$productions->where("shift_id", $shiftId);
}
if ($start != $currentDateFormat) {
$productions->whereBetween('created_at', [$start, $end]);
}
$productionsFiltered = $productions->get();
$html_data = '';
for ($x = 0; $x < count($productionsFiltered); $x++) {
// dd($productionsFiltered[0]->shift->desc);
$html_data .= '<tr>
<td style="font-weight: bold;width: 5%;">' . ($x + 1) . '</td>
<td><a href="#" style="font-weight: bold;color: #0005c5;">' . $productionsFiltered[$x]->created_at->format("d.m.Y | H:i") . '</a></td>
<td><a href="#" style="font-weight: bold;color: #1e2038;">' . $productionsFiltered[$x]->shift->desc . '</a></td>
<td style="text-align: center;">
<span class="badge badge-soft-info"
style="font-size: 14px;">' . $productionsFiltered[$x]->excruiter->name . '</span>
</td>
<td style="text-align: center;">
<span class="badge badge-soft-success"
style="font-size: 14px;">' . number_format($productionsFiltered[$x]->all_amount) . ' kg</span>
</td>';
for ($i = 0; $i < count($productionsFiltered[$x]->pivot_production); $i++) {
$html_data .= '<td> <a href="#">'.number_format($productionsFiltered[$x]->pivot_production[$i]->amount_percentage).'%</a></td>';
}
$html_data .= '<td style="font-weight: bold;color: #0005c5;">' . $productionsFiltered[$x]->note . '</td>
</tr>';
}
if ($productionsFiltered) {
return [
'#production_report_datas' => $html_data,
'#exampleModalFullscreenLabel' => '<font style="color: darkgreen;text-decoration: underline;font-weight: bold;">'. $startView .' - '. $endView .'</font> seneleri aralygynda güni jemi',
];
} else {
Flash::error("Yalnyshlyk bar!!");
}
}
public function onCalculateReportDaily() public function onCalculateReportDaily()
{ {
@ -37,7 +109,7 @@ class Production extends ComponentBase
$excruiter = $this->param("excruiter"); $excruiter = $this->param("excruiter");
$currentDateLast = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->orderBy('id', 'DESC')->first(); $currentDateLast = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->with("excruiter")->orderBy('id', 'DESC')->first();
$currentDateFirst = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->orderBy('id', 'ASC')->first(); $currentDateFirst = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->orderBy('id', 'ASC')->first();
$diffMinutes = Carbon::parse($currentDateLast->time)->diffInMinutes($currentDateFirst->time); $diffMinutes = Carbon::parse($currentDateLast->time)->diffInMinutes($currentDateFirst->time);
@ -58,48 +130,233 @@ class Production extends ComponentBase
$allData = array( $allData = array(
"all" => array( "all" => array(
"hours" => floor($diffMinutes / 60).' sagat '.($diffMinutes - floor($diffMinutes / 60) * 60).' minut', "hours" => floor($diffMinutes / 60) . ' sagat ' . ($diffMinutes - floor($diffMinutes / 60) * 60) . ' minut',
"avg_all_amount" => number_format($currentDateProductionAll, 2), "avg_all_amount" => number_format($currentDateProductionAll, 2),
) )
); );
$producedAll = $currentDateLast->all_amount - $currentDateFirst->all_amount; $producedAll = $currentDateLast->all_amount - $currentDateFirst->all_amount;
$html_data = '<div class="row">'; $countDailyChanges = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->get();
$html_data .= '<h4 style="margin-top: 20px;margin-bottom: 20px;">IŞLENEN ÇIG MAL</h4>';
$html_data .= '<div class="col-lg"> // dd(count($countDailyChanges));
if (count($countDailyChanges) > 1) {
// gunluk hasabat
$html_data = '<div class="row">';
$html_data .= '<h4 style="margin-top: 20px;margin-bottom: 20px;">JEMI IŞLENEN ÇIG MAL (ekskruiter: ' . $currentDateLast->excruiter->name . ')</h4>';
$html_data .= '<div class="col-lg">
<a class="card bg-success text-white-50"> <a class="card bg-success text-white-50">
<div class="card-body"> <div class="card-body">
<h5 class="mb-4 text-white"><i <h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>'.$allData["all"]["hours"].'</h5> class="mdi mdi-bullseye-arrow me-3"></i>' . $allData["all"]["hours"] . '</h5>
<hr> <hr>
<p class="card-text" style="font-size: 15px;color: white;">JEMI IŞLENEN: '. $producedAll.' kg</p> <p class="card-text" style="font-size: 15px;color: white;">JEMI IŞLENEN: ' . $producedAll . ' kg</p>
</div> </div>
</a> </a>
</div>'; </div>';
for ($x = 0; $x < count($pivotLasts); $x++) { for ($x = 0; $x < count($pivotLasts); $x++) {
$diff = $pivotLasts[$x]->amount - $pivotFirsts[$x]->amount; // $diff = $pivotLasts[$x]->amount - $pivotFirsts[$x]->amount;
$diffPerc = ($diff * 100) / $producedAll; // $diffPerc = ($diff * 100) / $producedAll;
$calculatedPercentage = (float) ($pivotLasts[$x]->amount_percentage / 100) * (float) $producedAll;
$html_data .= '<div class="col-lg"> $html_data .= '<div class="col-lg">
<a class="card bg-info text-white-50"> <a class="card bg-info text-white-50">
<div class="card-body"> <div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i>'.($diff).' kg</h5> <h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i>' . ($calculatedPercentage) . ' kg</h5>
<hr> <hr>
<p class="card-text" style="font-size: 15px;color: white;">'.$pivotLasts[$x]->product_name.' : '.($diffPerc).' %</p> <p class="card-text" style="font-size: 15px;color: white;">' . $pivotLasts[$x]->product_name . ' : ' . ($pivotLasts[$x]->amount_percentage) . ' %</p>
</div> </div>
</a> </a>
</div>'; </div>';
}
$html_data .= '</div>';
$hourCount = floor($diffMinutes / 60) . '.' . ($diffMinutes - floor($diffMinutes / 60) * 60);
$avgProducedHour = $producedAll / $hourCount;
// sagatda ortacha hasbat
$html_data2 = '<div class="row">';
$html_data2 .= '<h4 style="margin-top: 20px;margin-bottom: 20px;">SAGATDA ORTAÇA SARP EDIŞ HASABATY (ekskruiter: ' . $currentDateLast->excruiter->name . ')</h4>';
$html_data2 .= '<div class="col-lg">
<a class="card bg-success text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>' . $allData["all"]["hours"] . '</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">Sagatda Ortaça: ' . (number_format($avgProducedHour, 2)) . ' kg</p>
</div>
</a>
</div>';
for ($x = 0; $x < count($pivotLasts); $x++) {
// $diff = $pivotLasts[$x]->amount - $pivotFirsts[$x]->amount;
// $diffPerc = ($diff * 100) / $producedAll;
$calculatedPercentage = (float) ($pivotLasts[$x]->amount_percentage / 100) * (float) $producedAll;
$calculatePercentageHour = (float) (($calculatedPercentage / $hourCount) * 100) / (float) $producedAll;
$html_data2 .= '<div class="col-lg">
<a class="card bg-info text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Sagatda: ' . (number_format(($calculatedPercentage / $hourCount), 2)) . ' kg</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">' . $pivotLasts[$x]->product_name . ' : ' . (number_format($calculatePercentageHour, 2)) . ' %</p>
</div>
</a>
</div>';
}
$html_data2 .= '</div>';
$html_data3 = '';
$currentDateExcruiters = ProductionModel::whereDate('created_at', date($currentDateFormat))->groupBy("excruiter_id")->orderBy('id', 'DESC')->with("excruiter")->get();
for ($i = 0; $i < count($currentDateExcruiters); $i++) {
$currentDateLastExc = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $currentDateExcruiters[$i]->excruiter_id)->orderBy('id', 'DESC')->first();
$currentDateFirstExc = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $currentDateExcruiters[$i]->excruiter_id)->orderBy('id', 'ASC')->first();
$diffMinutesExc = Carbon::parse($currentDateLastExc->time)->diffInMinutes($currentDateFirstExc->time);
$hourCountExc = floor($diffMinutesExc / 60) . ' sagat ' . ($diffMinutesExc - floor($diffMinutesExc / 60) * 60) . ' minut';
$allAmountExc = $currentDateLastExc->all_amount - $currentDateFirstExc->all_amount;
// dd($currentDateFirstExc);
$html_data3 .= '<div class="row">';
$html_data3 .= '<h4 style="margin-top: 20px;margin-bottom: 20px;">' . $currentDateExcruiters[$i]->excruiter->name . ' - işlenen çig mallar boýunça.</h4>';
$html_data3 .= '<div class="col-lg">
<a class="card bg-success text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i
class="mdi mdi-bullseye-arrow me-3"></i>' . $hourCountExc . '</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">Jemi Işlenen: ' . (number_format($allAmountExc)) . ' kg</p>
</div>
</a>
</div>';
$excruiterDatas = PivotProductionModel::where('production_id', $currentDateLastExc->id)->get();
// $pivotLasts = PivotProductionModel::where('production_id', $currentDateLast->id)->get();
// \Log::info($excruiterDatas);
for ($ii = 0; $ii < count($excruiterDatas); $ii++) {
// $diff = $pivotLasts[$x]->amount - $pivotFirsts[$x]->amount;
// $diffPerc = ($diff * 100) / $producedAll;
$calculatedPercentage = (float) ($excruiterDatas[$ii]->amount_percentage / 100) * (float) $allAmountExc;
$html_data3 .= '<div class="col-lg">
<a class="card bg-info text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i>' . ($calculatedPercentage) . ' kg</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">' . $excruiterDatas[$ii]->product_name . ' : ' . ($excruiterDatas[$ii]->amount_percentage) . ' %</p>
</div>
</a>
</div>';
}
$html_data3 .= '</div><hr>';
}
// }
$currentDateShifts = ProductionModel::whereDate('created_at', date($currentDateFormat))
->where("excruiter_id", $excruiter)
->with(["shift", "excruiter", "pivot_production"])
->orderBy('id', 'ASC')
->groupBy("shift_id")
->get();
// $products = ProductModel::where("report", "simple")->get();
$html_data4 = '<h4 style="margin-top: 20px;margin-bottom: 20px;">SMENLAR BOÝUNÇA</h4>';
$html_data4 .= '<div class="container-fluid"><div class="row"><div class="col-md-12">';
$html_data4 .= '<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>#</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Wagty</th>
<th>Jemi</th>
';
for ($ii = 0; $ii < count($currentDateShifts[0]->pivot_production); $ii++) {
$html_data4 .= '<th>' . $currentDateShifts[0]->pivot_production[$ii]->product_name . '</th>';
}
$html_data4 .= '</tr>
</thead><tbody>';
for ($i = 0; $i < count($currentDateShifts); $i++) {
$pivotShiftLasts = PivotProductionModel::where('production_id', $currentDateShifts[$i]->id)->get();
$currentDateLastShift = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('shift_id', $currentDateShifts[$i]->shift_id)->where('excruiter_id', $currentDateShifts[$i]->excruiter_id)->with('excruiter')->orderBy('id', 'DESC')->first();
$currentDateFirstShift = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('shift_id', $currentDateShifts[$i]->shift_id)->where('excruiter_id', $currentDateShifts[$i]->excruiter_id)->orderBy('id', 'ASC')->first();
$diffMinutesShift = Carbon::parse($currentDateLastShift->time)->diffInMinutes($currentDateFirstShift->time);
$hourCountShift = floor($diffMinutesShift / 60) . ' sagat ' . ($diffMinutesShift - floor($diffMinutesShift / 60) * 60) . ' minut';
$hourCountShiftCalc = floor($diffMinutesShift / 60) . '.' . ($diffMinutesShift - floor($diffMinutesShift / 60) * 60);
$allAmountShift = $currentDateLastShift->all_amount - $currentDateFirstShift->all_amount;
$html_data4 .= '<tr>
<th scope="row">' . ($i + 1) . '</th>
<td style="font-weight: bold;color: #0005c5;">' . $currentDateShifts[$i]->shift->desc . '(' . $currentDateShifts[$i]->shift->start . ' - ' . $currentDateShifts[$i]->shift->end . ')</td>
<td><span class="badge badge-soft-info"
style="font-size: 14px;">' . $currentDateLastShift->excruiter->name . '</span></td>
<td>' . $hourCountShift . '</td>
<td>' . $allAmountShift . ' kg</td>';
for ($x = 0; $x < count($pivotShiftLasts); $x++) {
$calculatedPercentageShift = (float) ($pivotShiftLasts[$x]->amount_percentage / 100) * (float) $allAmountShift;
$html_data4 .= '<td>' . ($calculatedPercentageShift) . ' kg </td>';
}
$html_data4 .= '</tr>';
}
$html_data4 .= ' </tbody>
</table></div></div></div>';
return [
'#calculation_of_day' => $html_data,
'#avg_of_day' => $html_data2,
'#excruiter_daily_report' => $html_data3,
'#shift_daily_report' => $html_data4
];
} else {
return [
'#calculation_of_day' => 'Gunluk Hasabat üçin 2-nji üýtgeşmeleri girizmeli!',
'#excruiter_daily_report' => 'Gunluk Hasabat üçin 2-nji üýtgeşmeleri girizmeli!',
'#shift_daily_report' => 'Gunluk Hasabat üçin 2-nji üýtgeşmeleri girizmeli!'
];
} }
$html_data .= '</div>';
return [
'#calculation_of_day' => $html_data
];
} }
@ -180,7 +437,6 @@ class Production extends ComponentBase
Flash::success("Hasabat Ustunlikli Üýtgedildi"); Flash::success("Hasabat Ustunlikli Üýtgedildi");
return Redirect::refresh(); return Redirect::refresh();
} }
} }
public function onCreateProduction() public function onCreateProduction()

View File

@ -202,7 +202,7 @@ function onStart(){
{% for product in report.pivot_production %} {% for product in report.pivot_production %}
<td> <a href="#" data-bs-toggle="modal" <td> <a href="#" data-bs-toggle="modal"
data-bs-target=".bs-example-modal-sm-{{product.id}}">{{product.amount_percentage|number_format(2)}} data-bs-target=".bs-example-modal-sm-{{product.id}}">{{product.amount_percentage|number_format(2)}}
% {{product.amount}}</a></td> %</a></td>
@ -240,8 +240,8 @@ function onStart(){
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot> <tfoot>
@ -358,4 +358,4 @@ function onStart(){
</script> </script>
{% endput %} {% endput %}

View File

@ -2,6 +2,18 @@ title = "production/report-dynamic"
url = "/production/report-dynamic" url = "/production/report-dynamic"
layout = "platform_main" layout = "platform_main"
is_hidden = 0 is_hidden = 0
[builderList]
modelClass = "Romanah\Gokbakja\Models\Product"
scope = "scopeGetReport"
scopeValue = "{{ :scope }}"
displayColumn = "id"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[production]
== ==
<?php <?php
function onStart(){ function onStart(){
@ -10,6 +22,15 @@ function onStart(){
} }
?> ?>
== ==
{% set records = builderList.records %}
{% set displayColumn = builderList.displayColumn %}
{% set noRecordsMessage = builderList.noRecordsMessage %}
{% set detailsPage = builderList.detailsPage %}
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
{% put styles %} {% put styles %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet" <link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" /> type="text/css" />
@ -17,7 +38,7 @@ function onStart(){
type="text/css" /> type="text/css" />
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet" <link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" /> type="text/css" />
<link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css"> <link href="{{'assets/libs/select2/css/select2.min.css'|theme}}" rel="stylesheet" type="text/css">
{% endput %} {% endput %}
@ -27,43 +48,48 @@ function onStart(){
<div class="col-md-12"> <div class="col-md-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <form data-request="onReportProduction" data-request-flash>
<div class="col"> <div class="row">
<div> <div class="col">
<label class="form-label">Seneleri Saýlaň</label> <div>
<label class="form-label">Seneleri Saýlaň</label>
<div class="input-daterange input-group" id="datepicker6" data-date-format="dd M, yyyy" <div class="input-daterange input-group" id="datepicker6"
data-date-autoclose="true" data-provide="datepicker" data-date-format="d.m.yyyy" data-date-autoclose="true"
data-date-container='#datepicker6'> data-provide="datepicker" data-date-container='#datepicker6'>
<input type="text" class="form-control" name="start" placeholder="Başlanýan sene" /> <input type="text" class="form-control" name="start"
<input type="text" class="form-control" name="end" placeholder="Gutarýan sene" /> placeholder="Başlanýan sene" />
<input type="text" class="form-control" name="end"
placeholder="Gutarýan sene" />
</div>
</div> </div>
</div> </div>
</div> <div class="col">
<div class="col"> <label class="form-label">Ekstruiter Saýlaň</label>
<label class="form-label">Ekstruiter Saýlaň</label> <select class="form-control select2" name="excruiter_id" id="excruiter_id">
<select class="form-control select2" name="shift_id" id="shift_id"> <option value="0">Saýla</option>
<option value="0">Saýla</option> {% for excruiter in excruiters %}
{% for excruiter in excruiters %} <option value="{{excruiter.id}}">{{excruiter.name}}</option>
<option value="{{excruiter.id}}">{{excruiter.name}}</option> {% endfor %}
{% endfor %} </select>
</select> </div>
</div> <div class="col">
<div class="col"> <label class="form-label">Smen Saýlaň</label>
<label class="form-label">Smen Saýlaň</label> <select class="form-control select2" name="shift_id" id="shift_id">
<select class="form-control select2" name="shift_id" id="shift_id"> <option value="0">Saýla</option>
<option value="0">Saýla</option> {% for shift in shifts %}
{% for shift in shifts %} <option value="{{shift.id}}">{{shift.desc}} - ({{shift.start}} -
<option value="{{shift.id}}">{{shift.desc}} - ({{shift.start}} - {{shift.end}})</option>
{{shift.end}})</option> {% endfor %}
{% endfor %} </select>
</select> </div>
</div> <div class="col">
<div class="col"> <button type="submit" class="btn btn-primary waves-effect waves-light"
<button type="submit" class="btn btn-primary waves-effect waves-light" style="margin-top: 30px;width: 100%;">Hasabat</button> style="margin-top: 30px;width: 100%;">Hasabat</button>
</div> </div>
</div> </div>
</form>
</div> </div>
</div> </div>
</div> </div>
@ -75,38 +101,39 @@ function onStart(){
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Çig Mallar Boýunça Umumy <h3 class="card-title" style="font-size: 22px;color: #1e2038;">Çig Mallar Boýunça Umumy</h3>
({{year}} ýyl)</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p> <p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div> </div>
<!-- <div class="col-md-6" style="text-align: right;"> <div class="col-md-6" style="text-align: right;">
<button type="button" class="btn btn-primary waves-effect waves-light" <button type="button" class="btn btn-primary waves-effect waves-light"
data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom" data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen">
aria-controls="offcanvasBottom"> <i class="ri-pie-chart-line align-middle ms-2" style="font-size: 17px;"></i> Jemini Jemle
<i class="ri-add-line align-middle ms-2" style="font-size: 17px;"></i> Добавить
</button> </button>
</div> --> </div>
</div> </div>
{% partial "production/modal-report" %}
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap" <table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'> style="border-collapse: collapse; border-spacing: 0; width: 100%;" data-page-length='13'>
<thead> <thead>
<tr> <tr>
<th style="width: 5%;"></th> <th style="width: 5%;"></th>
<th>Aýlar</th> <th>Senesi</th>
<th>Ortaça Işlenen</th> <th>Smen</th>
{% for key, record in reportProducts %} <th>Ekskruiter</th>
<th>Hemmesi</th>
{% for key, record in records %}
<th>{{record.name}}</th> <th>{{record.name}}</th>
{% endfor %} {% endfor %}
<th>Bellik</th> <th>Bellik</th>
<!-- <th>Настройки</th> --> <!-- <th>Настройки</th> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody id="production_report_datas">
{% partial 'report/row' products=reportProducts title="Ýanwar" no=1 %}
</tbody> </tbody>
@ -114,11 +141,14 @@ function onStart(){
<tr> <tr>
<th style="width: 5%;"></th> <th style="width: 5%;"></th>
<th>Senesi</th> <th>Senesi</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Hemmesi</th> <th>Hemmesi</th>
{% for key, record in reportProducts %} {% for key, record in records %}
<th>{{record.name}}</th> <th>{{record.name}}</th>
{% endfor %} {% endfor %}
<th>Bellik</th> <th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
@ -138,4 +168,4 @@ function onStart(){
<script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script> <script src="{{'assets/libs/select2/js/select2.min.js'|theme}}"></script>
<script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script> <script src="{{'assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js'|theme}}"></script>
<script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script> <script src="{{'assets/js/pages/form-advanced.init.js'|theme}}"></script>
{% endput %} {% endput %}

View File

@ -0,0 +1,81 @@
[viewBag]
==
<!-- sample modal content -->
<div id="exampleModalFullscreen" class="modal fade" tabindex="-1" aria-hidden="true" data-request-flash>
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalFullscreenLabel">
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<!-- Nav tabs -->
<!-- <ul class="nav nav-tabs nav-tabs-custom nav-justified" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" href="#home1" role="tab">
<span class="d-block d-sm-none"><i class="fas fa-home"></i></span>
<span class="d-none d-sm-block">Hemmesi</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#profile1" role="tab">
<span class="d-block d-sm-none"><i class="far fa-user"></i></span>
<span class="d-none d-sm-block">Ekskruitorlar boýunça</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#messages1" role="tab">
<span class="d-block d-sm-none"><i class="far fa-envelope"></i></span>
<span class="d-none d-sm-block">Smenlar Boýunça</span>
</a>
</li> -->
<!-- <li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#settings1" role="tab">
<span class="d-block d-sm-none"><i class="fas fa-cog"></i></span>
<span class="d-none d-sm-block">Settings</span>
</a>
</li> -->
<!-- </ul> -->
<!-- Tab panes -->
<div class="tab-content p-3 text-muted">
<div class="tab-pane active" id="home1" role="tabpanel">
<div id="calculation_of_day">
</div>
<hr>
<div id="avg_of_day">
</div>
</div>
<!-- <div class="tab-pane" id="profile1" role="tabpanel">
<div id="excruiter_daily_report">
</div>
</div>
<div class="tab-pane" id="messages1" role="tabpanel">
<div id="shift_daily_report">
</div>
</div> -->
<!-- <div class="tab-pane" id="settings1" role="tabpanel">
<p class="mb-0">
Trust fund seitan letterpress, keytar raw denim keffiyeh etsy
art party before they sold out master cleanse gluten-free squid
scenester freegan cosby sweater. Fanny pack portland seitan DIY,
art party locavore wolf cliche high life echo park Austin. Cred
vinyl keffiyeh DIY salvia PBR, banh mi before they sold out
farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral,
mustache readymade keffiyeh craft.
</p>
</div> -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" data-bs-dismiss="modal">Ýapmak</button>
<!-- <button type="button" class="btn btn-primary waves-effect waves-light">Save changes</button> -->
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

View File

@ -1,16 +1,16 @@
[viewBag] [viewBag]
== ==
<!-- sample modal content --> <!-- sample modal content -->
<div id="exampleModalFullscreen" class="modal fade" tabindex="-1" aria-hidden="true"> <div id="exampleModalFullscreen" class="modal fade" tabindex="-1" aria-hidden="true" data-request-flash>
<div class="modal-dialog modal-fullscreen"> <div class="modal-dialog modal-fullscreen">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="exampleModalFullscreenLabel"> <h5 class="modal-title" id="exampleModalFullscreenLabel">
<font style="color: darkgreen;text-decoration: underline;font-weight: bold;">{{currentDate|date('d.m.Y')}}</font> senesi <font style="color: darkgreen;text-decoration: underline;font-weight: bold;">
{{currentDate|date('d.m.Y')}}</font> senesi
boýunça güni jemi boýunça güni jemi
</h5> </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
aria-label="Close"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<!-- Nav tabs --> <!-- Nav tabs -->
@ -46,30 +46,20 @@
<div class="tab-pane active" id="home1" role="tabpanel"> <div class="tab-pane active" id="home1" role="tabpanel">
<div id="calculation_of_day"> <div id="calculation_of_day">
</div>
<hr>
<div id="avg_of_day">
</div> </div>
</div> </div>
<div class="tab-pane" id="profile1" role="tabpanel"> <div class="tab-pane" id="profile1" role="tabpanel">
<div id="excruiter_daily_report">
<p class="mb-0"> </div>
Food truck fixie locavore, accusamus mcsweeney's marfa nulla
single-origin coffee squid. Exercitation +1 labore velit, blog
sartorial PBR leggings next level wes anderson artisan four loko
farm-to-table craft beer twee. Qui photo booth letterpress,
commodo enim craft beer mlkshk aliquip jean shorts ullamco ad
vinyl cillum PBR. Homo nostrud organic, assumenda labore
aesthetic magna delectus.
</p>
</div> </div>
<div class="tab-pane" id="messages1" role="tabpanel"> <div class="tab-pane" id="messages1" role="tabpanel">
<p class="mb-0"> <div id="shift_daily_report">
Etsy mixtape wayfarers, ethical wes anderson tofu before they </div>
sold out mcsweeney's organic lomo retro fanny pack lo-fi
farm-to-table readymade. Messenger bag gentrify pitchfork
tattooed craft beer, iphone skateboard locavore carles etsy
salvia banksy hoodie helvetica. DIY synth PBR banksy irony.
Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh
mi whatever gluten-free carles.
</p>
</div> </div>
<!-- <div class="tab-pane" id="settings1" role="tabpanel"> <!-- <div class="tab-pane" id="settings1" role="tabpanel">
<p class="mb-0"> <p class="mb-0">
@ -85,8 +75,7 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary waves-effect" <button type="button" class="btn btn-secondary waves-effect" data-bs-dismiss="modal">Ýapmak</button>
data-bs-dismiss="modal">Ýapmak</button>
<!-- <button type="button" class="btn btn-primary waves-effect waves-light">Save changes</button> --> <!-- <button type="button" class="btn btn-primary waves-effect waves-light">Save changes</button> -->
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->