This commit is contained in:
Shohrat 2023-09-22 19:20:57 +05:00
parent 4cfb900e54
commit 9cb772e045
5 changed files with 171 additions and 19 deletions

View File

@ -66,34 +66,54 @@ items:
cssClass: ''
isExternal: '0'
-
title: Önümçilik
nesting: null
title: 'Çig mallar boýunça'
type: url
url: /w
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ri-bar-chart-2-line
cssClass: ri-stack-line
isExternal: '0'
items:
-
title: 'Çig Mal Sarp Ediş'
nesting: null
title: 'Täze Hasabat'
type: cms-page
url: null
code: ''
reference: production
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Enjamlar Boýunça'
title: 'Aýlar Boýunça'
type: cms-page
code: ''
reference: all-production-month
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Ortaça Hasaplama'
type: cms-page
code: ''
reference: report-production
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Enjamlar Boýunça'
type: url
url: /ee
code: ''
viewBag:
isHidden: '0'
cssClass: 'ri-bar-chart-2-line '
isExternal: '0'
items:
-
title: 'Täze Hasabat'
type: cms-page
code: ''
reference: machine
@ -102,14 +122,29 @@ items:
cssClass: ''
isExternal: '0'
-
title: Tikinçiler
nesting: null
title: 'Aylar boyunca'
type: url
url: /tt
url: /sss
code: ''
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Tikinçiler
type: url
url: /tt
code: ''
viewBag:
isHidden: '0'
cssClass: 'ri-surround-sound-line '
isExternal: '0'
items:
-
title: 'Taze hasabat'
type: url
url: /s
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''

View File

@ -11,6 +11,9 @@ function onStart() {
$this["reportProducts"] = Romanah\Gokbakja\Models\Product::where("report", "simple")->get();
if($this["month"] == 'default'){
$this["month"] = $currentDate->month;
}
if($year){
$this["productions"] = Romanah\Gokbakja\Models\Production::whereMonth('created_at', $this["month"])->whereYear('created_at', $year)->with(['pivot_production'])->get();

View File

@ -5,6 +5,8 @@ is_hidden = 0
==
<?php
function onStart() {
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
$this["currentYear"] = $currentDate->year;
$productionId = $this->param("id");

View File

@ -2,4 +2,110 @@ title = "machine"
url = "/machine"
layout = "platform_main"
is_hidden = 0
==
==
<?php
function onStart(){
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = Carbon\Carbon::now()->format('Y-m-d');
$this["currentDate"] = $currentDate;
$this["currentMonth"] = $currentDate->format('m');
$this["currentYear"] = $currentDate->format('Y');
$this["machineProductions"] = Romanah\Gokbakja\Models\ProductionMachine::with(['bag_type', 'bag_size', 'machine', 'employee', 'mechanic'])->whereDate('created_at', date($currentDateFormat))->get();
}
?>
==
{% 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 %}
<link href="{{'assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
<link href="{{'assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
<link href="{{'assets/libs/datatables.net-select-bs4/css/select.bootstrap4.min.css'|theme}}" rel="stylesheet"
type="text/css" />
{% endput %}
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Enjamlar boýunça ({{currentDate|date('d.m.Y | H:i')}})</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
</div>
</div>
<h1>{{machineProductions}}</h1>
<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 style="width: 5%;"></th>
<th>Bina No</th>
<th>Enjam No</th>
<th>Önen Önüm (kg)</th>
<th>Ady Familiýasy</th>
<th>Mehanik</th>
<th>Ölçegi</th>
<th>Görnüşi</th>
<th>Bellik</th>
<!-- <th>Настройки</th> -->
</tr>
</thead>
<tbody>
{% for key, machine in machineProductions %}
<tr>
<td style="font-weight: bold;">{{key + 1}}</td>
<td><a href="#" style="font-weight: bold;">{{machine.building.name}}</a></td>
<td>{{machine.name}}</td>
<td>onen onum</td>
<td>{{machine.employee.name}}</td>
<td>{{machine.mechanic.name}}</td>
<td></td>
<td></td>
<td></td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th style="width: 5%;"></th>
<th>Bina No</th>
<th>Enjam No</th>
<th>Önen Önüm (kg)</th>
<th>Ady Familiýasy</th>
<th>Mehanik</th>
<th>Ölçegi</th>
<th>Görnüşi</th>
<th>Bellik</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
{% partial 'dataTableJs' %}

View File

@ -4,8 +4,14 @@ layout = "platform_main"
is_hidden = 0
==
function onStart(){
$currentDate = Carbon\Carbon::now()->timezone('UTC +05:00');
$this["year"] = $this->param("year");
if(!$this["year"]){
$this["year"] = $currentDate->year;
}
$this["productions"] = Romanah\Gokbakja\Models\Production::with(['pivot_production'])->get();
$this["reportProducts"] = Romanah\Gokbakja\Models\Product::where("report", "simple")->get();