This commit is contained in:
Shohrat 2023-10-03 03:15:33 +05:00
parent 427d61c66c
commit 0ed8496a32
70 changed files with 1918 additions and 110 deletions

View File

@ -10,6 +10,7 @@ use Romanah\Gokbakja\Models\PivotProduction as PivotProductionModel;
use Redirect;
use Carbon\Carbon;
use Flash;
use DB;
class Production extends ComponentBase
{
@ -23,6 +24,81 @@ class Production extends ComponentBase
];
}
public function onCalculateReportDaily()
{
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$data = post();
$excruiter = $this->param("excruiter");
$currentDateLast = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->orderBy('id', 'DESC')->first();
$currentDateFirst = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->orderBy('id', 'ASC')->first();
$diffMinutes = Carbon::parse($currentDateLast->time)->diffInMinutes($currentDateFirst->time);
$currentDateProductionAll = ProductionModel::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->avg('all_amount');
// $testq = PivotProductionModel::whereDate('created_at', date($currentDateFormat))
// ->where('excruiter_id', $excruiter)
// ->select('id', 'product_name', 'excruiter_id',DB::raw('round(AVG(amount),0) as average'), DB::raw('round(AVG(amount_percentage),0) as average_percentage'))
// ->groupBy('product_id')
// ->get();
$pivotFirsts = PivotProductionModel::where('production_id', $currentDateFirst->id)->get();
$pivotLasts = PivotProductionModel::where('production_id', $currentDateLast->id)->get();
$allData = array(
"all" => array(
"hours" => floor($diffMinutes / 60).' sagat '.($diffMinutes - floor($diffMinutes / 60) * 60).' minut',
"avg_all_amount" => number_format($currentDateProductionAll, 2),
)
);
$producedAll = $currentDateFirst->all_amount - $currentDateLast->all_amount;
$html_data = '<div class="row">';
$html_data .= '<h4 style="margin-top: 20px;margin-bottom: 20px;">IŞLENEN ÇIG MAL</h4>';
$html_data .= '<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;">JEMI IŞLENEN: '. $producedAll.' kg</p>
</div>
</a>
</div>';
for ($x = 0; $x < count($pivotFirsts); $x++) {
$html_data .= '<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>'.($pivotFirsts[$x]->amount - $pivotLasts[$x]->amount).' kg</h5>
<hr>
<p class="card-text" style="font-size: 15px;color: white;">'.$pivotFirsts[$x]->product_name.' : '.($pivotFirsts[$x]->average_percentage - $pivotFirsts[$x]->average_percentage).'</p>
</div>
</a>
</div>';
}
$html_data .= '</div>';
return [
'#calculation_of_day' => $html_data
];
}
public function onCreateMachineProduction()
{
$user = \Auth::user();
@ -58,37 +134,85 @@ class Production extends ComponentBase
}
}
function onCalculateAvg(){
function onCalculateAvg()
{
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
$data = post();
$product = ProductModel::where('id', $data["prod_id"])->first();
$sumPercentage = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->sum('amount_percentage');
$sumPercentageCount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->count('amount_percentage');
$sumAmount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->sum('amount');
$sumAmountcount = PivotProductionModel::where('product_id', $data["prod_id"])->whereDate('created_at', date($currentDateFormat))->count('amount');
dd($sumPercentage / $sumPercentageCount);
dd(($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1));
// dd($sumPercentage / $sumPercentageCount);
// dd(($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1));
$calcAvgPerc = ($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1);
if ($sumPercentage != 0) {
$calcAvgPerc = ($sumPercentage + (float) $data["field_value"]) / ($sumPercentageCount + 1);
// $convertedToKgAvg = ((int) $data["field_value"] / 100) * ((int) $data["all_amount"]);
$convertedToKgSum = ((float) $data["field_value"] / 100) * ((float) $data["all_amount"]);
$convertToCount = $sumAmountcount + 1;
$calculateAvgAmount = ($convertedToKgSum + $sumAmount) / $convertToCount;
$allData = array(
"product_name" => $product->name,
"avg_percentage" => number_format($calcAvgPerc, 2),
"avg_amount" => number_format($calculateAvgAmount, 2)
);
} else {
$allData = array(
"product_name" => $product->name,
"avg_percentage" => number_format(0, 2),
"avg_amount" => number_format(0, 2)
);
}
// $calcAvgAmount = ($sumPercentage + (int) $data["field_value"]) / ($sumPercentageCount + 1);
$allData = array(
"avg_percentage" => $calcAvgPerc,
"avg_amount" => '000'
);
return $allData;
// dd($currentDateFormat);
}
public function onUpdatePivotProduction()
{
$user = \Auth::user();
$currentDate = Carbon::now()->timezone('UTC +05:00');
// $this["currentMonth"] = $currentDate->format('m');
$data = post();
$updatePivotProduction = PivotProductionModel::where("id", $data["product_id"])->first();
$production = ProductionModel::where("id", $updatePivotProduction->production_id)->first();
$fieldName = "product_" . $data["product_id"];
$updatePivotProduction->amount_percentage = (float) $data[$fieldName] ?? 0;
$updatePivotProduction->amount = (((float) $data[$fieldName] ?? 0) / 100) * ((float) $production->all_amount);
$updatePivotProduction->save();
if ($updatePivotProduction) {
Flash::success("Hasabat Ustunlikli Üýtgedildi");
return Redirect::refresh();
}
}
public function onCreateProduction()
{
$user = \Auth::user();
@ -96,38 +220,47 @@ class Production extends ComponentBase
$currentDate = Carbon::now()->timezone('UTC +05:00');
// $this["currentMonth"] = $currentDate->format('m');
$data = post();
$excruiter = $this->param("excruiter");
$createProduction = new ProductionModel();
$createProduction->all_amount = $data["all_amount"];
$createProduction->note = $data["note"];
$createProduction->user_id = $user->id;
$createProduction->date = $currentDate->format('Y-m-d');
$createProduction->time = $currentDate->format('H:i:s');
$createProduction->excruiter_id = 1;
$createProduction->save();
$products = ProductModel::where("report", "simple")->get();
for ($x = 0; $x < count($products); $x++) {
$fieldName = "product_" . $products[$x]->code;
$createPivotProduction = new PivotProductionModel();
$createPivotProduction->production_id = $createProduction->id;
$createPivotProduction->product_id = $products[$x]->id;
$createPivotProduction->amount_percentage = $data[$fieldName];
$createPivotProduction->product_name = $products[$x]->name;
$createPivotProduction->product_code = $products[$x]->code;
$createPivotProduction->amount = ($data[$fieldName] / 100) * ($createProduction->all_amount);
$createPivotProduction->save();
}
if ($createProduction && $createPivotProduction) {
Flash::success("Hasabat Ustunlikli Goşuldy");
if ($excruiter == 0) {
Flash::error("Ekskruiter Saýla!");
return Redirect::refresh();
} else {
$createProduction = new ProductionModel();
$createProduction->all_amount = $data["all_amount"];
$createProduction->note = $data["note"];
$createProduction->user_id = $user->id;
$createProduction->date = $currentDate->format('Y-m-d');
$createProduction->time = $currentDate->format('H:i:s');
$createProduction->excruiter_id = $excruiter;
$createProduction->shift_id = $data["shift_id"];
$createProduction->save();
$products = ProductModel::where("report", "simple")->get();
for ($x = 0; $x < count($products); $x++) {
$fieldName = "product_" . $products[$x]->code;
$createPivotProduction = new PivotProductionModel();
$createPivotProduction->production_id = $createProduction->id;
$createPivotProduction->product_id = $products[$x]->id;
$createPivotProduction->amount_percentage = (float) $data[$fieldName] ?? 0;
$createPivotProduction->product_name = $products[$x]->name;
$createPivotProduction->product_code = $products[$x]->code;
$createProduction->excruiter_id = $excruiter;
$createPivotProduction->amount = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $createProduction->all_amount);
$createPivotProduction->date = $currentDate->format('Y-m-d');
$createPivotProduction->time = $currentDate->format('H:i:s');
$createPivotProduction->save();
}
if ($createProduction && $createPivotProduction) {
Flash::success("Hasabat Ustunlikli Goşuldy");
return Redirect::refresh();
}
}
}

View File

@ -0,0 +1,18 @@
<?php namespace Romanah\Gokbakja\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class OrderItem extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Romanah.Gokbakja', 'main-menu-item', 'side-menu-item2');
}
}

View File

@ -0,0 +1,18 @@
<?php namespace Romanah\Gokbakja\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class Payment extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Romanah.Gokbakja', 'main-menu-item', 'side-menu-item4');
}
}

View File

@ -0,0 +1,18 @@
<?php namespace Romanah\Gokbakja\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class SewerProduction extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Romanah.Gokbakja', 'main-menu-item5', 'side-menu-item5');
}
}

View File

@ -0,0 +1,18 @@
<?php namespace Romanah\Gokbakja\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class Shipping extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Romanah.Gokbakja', 'main-menu-item', 'side-menu-item3');
}
}

View File

@ -0,0 +1,18 @@
<div data-control="toolbar">
<a href="<?= Backend::url('romanah/gokbakja/orderitem/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true)"
data-stripe-load-indicator>
<?= e(trans('backend::lang.list.delete_selected')) ?>
</button>
</div>

View File

@ -0,0 +1,10 @@
name: OrderItem
form: $/romanah/gokbakja/models/orderitem/fields.yaml
modelClass: Romanah\Gokbakja\Models\OrderItem
defaultRedirect: romanah/gokbakja/orderitem
create:
redirect: 'romanah/gokbakja/orderitem/update/:id'
redirectClose: romanah/gokbakja/orderitem
update:
redirect: romanah/gokbakja/orderitem
redirectClose: romanah/gokbakja/orderitem

View File

@ -0,0 +1,12 @@
list: $/romanah/gokbakja/models/orderitem/columns.yaml
modelClass: Romanah\Gokbakja\Models\OrderItem
title: OrderItem
noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
toolbar:
buttons: list_toolbar
search:
prompt: 'backend::lang.list.search_prompt'
recordUrl: 'romanah/gokbakja/orderitem/update/:id'

View File

@ -0,0 +1,46 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>">OrderItem</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.create')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.create_and_close')) ?>
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1 @@
<?= $this->listRender() ?>

View File

@ -0,0 +1,22 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>">OrderItem</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<div class="form-preview">
<?= $this->formRenderPreview() ?>
</div>
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<?php endif ?>
<p>
<a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>" class="btn btn-default oc-icon-chevron-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</p>

View File

@ -0,0 +1,54 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>">OrderItem</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-request-data="redirect:0"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.save')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.save_and_close')) ?>
</button>
<button
type="button"
class="oc-icon-trash-o btn-icon danger pull-right"
data-request="onDelete"
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/orderitem') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1,18 @@
<div data-control="toolbar">
<a href="<?= Backend::url('romanah/gokbakja/payment/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true)"
data-stripe-load-indicator>
<?= e(trans('backend::lang.list.delete_selected')) ?>
</button>
</div>

View File

@ -0,0 +1,10 @@
name: Payment
form: $/romanah/gokbakja/models/payment/fields.yaml
modelClass: Romanah\Gokbakja\Models\Payment
defaultRedirect: romanah/gokbakja/payment
create:
redirect: 'romanah/gokbakja/payment/update/:id'
redirectClose: romanah/gokbakja/payment
update:
redirect: romanah/gokbakja/payment
redirectClose: romanah/gokbakja/payment

View File

@ -0,0 +1,12 @@
list: $/romanah/gokbakja/models/payment/columns.yaml
modelClass: Romanah\Gokbakja\Models\Payment
title: Payment
noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
toolbar:
buttons: list_toolbar
search:
prompt: 'backend::lang.list.search_prompt'
recordUrl: 'romanah/gokbakja/payment/update/:id'

View File

@ -0,0 +1,46 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/payment') ?>">Payment</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.create')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.create_and_close')) ?>
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/payment') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/payment') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1 @@
<?= $this->listRender() ?>

View File

@ -0,0 +1,22 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/payment') ?>">Payment</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<div class="form-preview">
<?= $this->formRenderPreview() ?>
</div>
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<?php endif ?>
<p>
<a href="<?= Backend::url('romanah/gokbakja/payment') ?>" class="btn btn-default oc-icon-chevron-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</p>

View File

@ -0,0 +1,54 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/payment') ?>">Payment</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-request-data="redirect:0"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.save')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.save_and_close')) ?>
</button>
<button
type="button"
class="oc-icon-trash-o btn-icon danger pull-right"
data-request="onDelete"
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/payment') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/payment') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1,18 @@
<div data-control="toolbar">
<a href="<?= Backend::url('romanah/gokbakja/sewerproduction/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true)"
data-stripe-load-indicator>
<?= e(trans('backend::lang.list.delete_selected')) ?>
</button>
</div>

View File

@ -0,0 +1,10 @@
name: SewerProduction
form: $/romanah/gokbakja/models/sewerproduction/fields.yaml
modelClass: Romanah\Gokbakja\Models\SewerProduction
defaultRedirect: romanah/gokbakja/sewerproduction
create:
redirect: 'romanah/gokbakja/sewerproduction/update/:id'
redirectClose: romanah/gokbakja/sewerproduction
update:
redirect: romanah/gokbakja/sewerproduction
redirectClose: romanah/gokbakja/sewerproduction

View File

@ -0,0 +1,12 @@
list: $/romanah/gokbakja/models/sewerproduction/columns.yaml
modelClass: Romanah\Gokbakja\Models\SewerProduction
title: SewerProduction
noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
toolbar:
buttons: list_toolbar
search:
prompt: 'backend::lang.list.search_prompt'
recordUrl: 'romanah/gokbakja/sewerproduction/update/:id'

View File

@ -0,0 +1,46 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>">SewerProduction</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.create')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.create_and_close')) ?>
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1 @@
<?= $this->listRender() ?>

View File

@ -0,0 +1,22 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>">SewerProduction</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<div class="form-preview">
<?= $this->formRenderPreview() ?>
</div>
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<?php endif ?>
<p>
<a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>" class="btn btn-default oc-icon-chevron-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</p>

View File

@ -0,0 +1,54 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>">SewerProduction</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-request-data="redirect:0"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.save')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.save_and_close')) ?>
</button>
<button
type="button"
class="oc-icon-trash-o btn-icon danger pull-right"
data-request="onDelete"
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/sewerproduction') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1,18 @@
<div data-control="toolbar">
<a href="<?= Backend::url('romanah/gokbakja/shipping/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true)"
data-stripe-load-indicator>
<?= e(trans('backend::lang.list.delete_selected')) ?>
</button>
</div>

View File

@ -0,0 +1,10 @@
name: Shipping
form: $/romanah/gokbakja/models/shipping/fields.yaml
modelClass: Romanah\Gokbakja\Models\Shipping
defaultRedirect: romanah/gokbakja/shipping
create:
redirect: 'romanah/gokbakja/shipping/update/:id'
redirectClose: romanah/gokbakja/shipping
update:
redirect: romanah/gokbakja/shipping
redirectClose: romanah/gokbakja/shipping

View File

@ -0,0 +1,12 @@
list: $/romanah/gokbakja/models/shipping/columns.yaml
modelClass: Romanah\Gokbakja\Models\Shipping
title: Shipping
noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
toolbar:
buttons: list_toolbar
search:
prompt: 'backend::lang.list.search_prompt'
recordUrl: 'romanah/gokbakja/shipping/update/:id'

View File

@ -0,0 +1,46 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/shipping') ?>">Shipping</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.create')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.create_and_close')) ?>
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/shipping') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/shipping') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1 @@
<?= $this->listRender() ?>

View File

@ -0,0 +1,22 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/shipping') ?>">Shipping</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<div class="form-preview">
<?= $this->formRenderPreview() ?>
</div>
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<?php endif ?>
<p>
<a href="<?= Backend::url('romanah/gokbakja/shipping') ?>" class="btn btn-default oc-icon-chevron-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</p>

View File

@ -0,0 +1,54 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('romanah/gokbakja/shipping') ?>">Shipping</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-request-data="redirect:0"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.save')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.save_and_close')) ?>
</button>
<button
type="button"
class="oc-icon-trash-o btn-icon danger pull-right"
data-request="onDelete"
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('romanah/gokbakja/shipping') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('romanah/gokbakja/shipping') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -39,6 +39,10 @@ class Employee extends Model
'Romanah\Gokbakja\Models\ProductionMachine',
'key' => 'mechanic_id'
],
'sewer_production' => [
'Romanah\Gokbakja\Models\SewerProduction',
'key' => 'employee_id'
],
];
/**

View File

@ -8,11 +8,25 @@ use Model;
class Order extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
public $hasMany = [
'shipping' => [
'Romanah\Gokbakja\Models\Order',
'key' => 'order_id'
],
'order_items' => [
'Romanah\Gokbakja\Models\OrderItem',
'key' => 'order_id'
],
'payment' => [
'Romanah\Gokbakja\Models\Payment',
'key' => 'order_id'
],
];
/**
* @var string The database table used by the model.

View File

@ -0,0 +1,38 @@
<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class OrderItem extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
public $belongsTo = [
'order' => [
'Romanah\Gokbakja\Models\Order',
'key' => 'order_id'
],
'product' => [
'Romanah\Gokbakja\Models\Product',
'key' => 'product_id'
]
];
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_order_item';
/**
* @var array Validation rules
*/
public $rules = [
];
}

View File

@ -0,0 +1,34 @@
<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class Payment extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
public $belongsTo = [
'order' => [
'Romanah\Gokbakja\Models\Order',
'key' => 'order_id'
]
];
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_payment';
/**
* @var array Validation rules
*/
public $rules = [
];
}

View File

@ -18,7 +18,11 @@ class Product extends Model
public $hasMany = [
'action' => [
'Romanah\Gokbakja\Models\Action',
'key' => 'user_id'
'key' => 'product_id'
],
'order_items' => [
'Romanah\Gokbakja\Models\OrderItem',
'key' => 'product_id'
]
];

View File

@ -25,6 +25,10 @@ class Production extends Model
'excruiter' => [
'Romanah\Gokbakja\Models\Excruiter',
'key' => 'excruiter_id'
],
'shift' => [
'Romanah\Gokbakja\Models\Shift',
'key' => 'shift_id'
]
];
@ -46,5 +50,10 @@ class Production extends Model
* @var array Validation rules
*/
public $rules = [
'all_amount' => 'required',
];
public $customMessages = [
'all_amount.required' => 'Jemi diýen hökman doldurylmalydyr.',
];
}

View File

@ -0,0 +1,33 @@
<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class SewerProduction extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
public $belongsTo = [
'employee' => [
'Romanah\Gokbakja\Models\Employee',
'key' => 'employee_id'
],
];
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_sewer_production';
/**
* @var array Validation rules
*/
public $rules = [
];
}

View File

@ -0,0 +1,38 @@
<?php namespace Romanah\Gokbakja\Models;
use Model;
/**
* Model
*/
class Shipping extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
public $belongsTo = [
'order' => [
'Romanah\Gokbakja\Models\Order',
'key' => 'order_id'
],
'employee' => [
'Romanah\Gokbakja\Models\Employee',
'key' => 'employee_id'
],
];
/**
* @var string The database table used by the model.
*/
public $table = 'romanah_gokbakja_shipping';
/**
* @var array Validation rules
*/
public $rules = [
];
}

View File

@ -0,0 +1,13 @@
columns:
id:
label: id
type: number
amount:
label: amount
type: text
product_id:
label: product_id
type: number
note:
label: note
type: text

View File

@ -0,0 +1,15 @@
fields:
amount:
label: Amount
span: auto
type: number
product:
label: Haryt
span: auto
nameFrom: name
descriptionFrom: description
type: relation
note:
label: Note
span: auto
type: textarea

View File

@ -0,0 +1,13 @@
columns:
id:
label: id
type: number
order_id:
label: order_id
type: number
amount:
label: amount
type: text
note:
label: note
type: text

View File

@ -0,0 +1,15 @@
fields:
order:
label: 'Order id'
span: auto
nameFrom: name
descriptionFrom: description
type: relation
amount:
label: Amount
span: auto
type: number
note:
label: Note
span: auto
type: textarea

View File

@ -0,0 +1,16 @@
columns:
id:
label: id
type: number
employee_id:
label: employee_id
type: number
amount:
label: amount
type: text
produced_bag_qty:
label: produced_bag_qty
type: text
note:
label: note
type: text

View File

@ -0,0 +1,19 @@
fields:
employee:
label: 'Employee id'
span: auto
nameFrom: name
descriptionFrom: description
type: relation
amount:
label: Amount
span: auto
type: number
produced_bag_qty:
label: 'Produced bag qty'
span: auto
type: number
note:
label: Note
span: auto
type: textarea

View File

@ -0,0 +1,22 @@
columns:
id:
label: id
type: number
order_id:
label: order_id
type: number
status:
label: status
type: text
employee_id:
label: employee_id
type: number
place_now:
label: place_now
type: text
loaded_amount:
label: loaded_amount
type: text
note:
label: note
type: text

View File

@ -0,0 +1,34 @@
fields:
order:
label: Order
nameFrom: id
descriptionFrom: description
span: auto
type: relation
status:
label: Status
span: auto
options:
loading: Yuklenyar
process: Ugrady
completed: 'Barmaly yerine bardy'
default: loading
type: balloon-selector
employee:
label: 'Employee id'
nameFrom: name
descriptionFrom: description
span: auto
type: relation
place_now:
label: 'Place now'
span: auto
type: text
loaded_amount:
label: 'Loaded amount'
span: auto
type: number
note:
label: Note
span: auto
type: text

View File

@ -7,3 +7,11 @@ fields:
label: Note
span: auto
type: textarea
type:
label: 'Sklad Görnüşi'
options:
raw: 'Çig mal'
produced: 'Önen önüm'
span: auto
default: raw
type: balloon-selector

View File

@ -14,6 +14,18 @@ navigation:
label: 'Çig Mal Skladlary'
url: romanah/gokbakja/stock
icon: icon-archive
side-menu-item2:
label: 'Sargyt harytlary'
url: romanah/gokbakja/orderitem
icon: icon-cart-plus
side-menu-item3:
label: 'Sargyt logistika'
url: romanah/gokbakja/shipping
icon: icon-truck
side-menu-item4:
label: Tölegler
url: romanah/gokbakja/payment
icon: icon-money
main-menu-item2:
label: 'Giriş we Çykyş'
url: romanah/gokbakja/action
@ -56,6 +68,10 @@ navigation:
label: 'Production Machine'
url: romanah/gokbakja/prodctionmachine
icon: icon-sliders
side-menu-item5:
label: Tikinçiler
url: romanah/gokbakja/sewerproduction
icon: icon-simplybuilt
main-menu-item6:
label: Korpslar
url: romanah/gokbakja/building

View File

@ -0,0 +1,27 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateRomanahGokbakjaOrderItems extends Migration
{
public function up()
{
Schema::create('romanah_gokbakja_order_items', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
$table->timestamp('deleted_at')->nullable();
$table->double('amount', 10, 0);
$table->integer('product_id');
$table->text('note');
});
}
public function down()
{
Schema::dropIfExists('romanah_gokbakja_order_items');
}
}

View File

@ -0,0 +1,27 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateRomanahGokbakjaPayment extends Migration
{
public function up()
{
Schema::create('romanah_gokbakja_payment', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
$table->timestamp('deleted_at')->nullable();
$table->integer('order_id');
$table->double('amount', 10, 0);
$table->text('note');
});
}
public function down()
{
Schema::dropIfExists('romanah_gokbakja_payment');
}
}

View File

@ -0,0 +1,28 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateRomanahGokbakjaSewerProduction extends Migration
{
public function up()
{
Schema::create('romanah_gokbakja_sewer_production', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
$table->timestamp('deleted_at')->nullable();
$table->integer('employee_id');
$table->double('amount', 10, 0);
$table->double('produced_bag_qty', 10, 0);
$table->text('note');
});
}
public function down()
{
Schema::dropIfExists('romanah_gokbakja_sewer_production');
}
}

View File

@ -0,0 +1,30 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateRomanahGokbakjaShipping extends Migration
{
public function up()
{
Schema::create('romanah_gokbakja_shipping', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
$table->timestamp('deleted_at')->nullable();
$table->integer('order_id');
$table->string('status');
$table->integer('employee_id');
$table->string('place_now');
$table->double('loaded_amount', 10, 0);
$table->text('note');
});
}
public function down()
{
Schema::dropIfExists('romanah_gokbakja_shipping');
}
}

View File

@ -0,0 +1,17 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaOrderItem extends Migration
{
public function up()
{
Schema::rename('romanah_gokbakja_order_items', 'romanah_gokbakja_order_item');
}
public function down()
{
Schema::rename('romanah_gokbakja_order_item', 'romanah_gokbakja_order_items');
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaOrderItem2 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_order_item', function($table)
{
$table->integer('order_id');
});
}
public function down()
{
Schema::table('romanah_gokbakja_order_item', function($table)
{
$table->dropColumn('order_id');
});
}
}

View File

@ -0,0 +1,27 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaPivotProduction5 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->date('date')->nullable();
$table->time('time')->nullable();
$table->dropColumn('date_time');
});
}
public function down()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->dropColumn('date');
$table->dropColumn('time');
$table->dateTime('date_time')->nullable();
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaPivotProduction6 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->integer('shift_id');
});
}
public function down()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->dropColumn('shift_id');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaPivotProduction7 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->dropColumn('shift_id');
});
}
public function down()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->integer('shift_id');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaPivotProduction8 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->integer('excruiter_id')->nullable()->default(0);
});
}
public function down()
{
Schema::table('romanah_gokbakja_pivot_production', function($table)
{
$table->dropColumn('excruiter_id');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaProduction7 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_production', function($table)
{
$table->integer('shift_id')->nullable()->default(0);
});
}
public function down()
{
Schema::table('romanah_gokbakja_production', function($table)
{
$table->dropColumn('shift_id');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaShipping extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_shipping', function($table)
{
$table->string('status', 191)->default('loading')->change();
});
}
public function down()
{
Schema::table('romanah_gokbakja_shipping', function($table)
{
$table->string('status', 191)->default(null)->change();
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaStoct extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_stoct', function($table)
{
$table->string('type')->nullable();
});
}
public function down()
{
Schema::table('romanah_gokbakja_stoct', function($table)
{
$table->dropColumn('type');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Romanah\Gokbakja\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateRomanahGokbakjaStoct2 extends Migration
{
public function up()
{
Schema::table('romanah_gokbakja_stoct', function($table)
{
$table->string('type', 191)->default('raw')->change();
});
}
public function down()
{
Schema::table('romanah_gokbakja_stoct', function($table)
{
$table->string('type', 191)->default(null)->change();
});
}
}

View File

@ -120,3 +120,45 @@
1.0.41:
- 'Updated table romanah_gokbakja_production'
- builder_table_update_romanah_gokbakja_production_6.php
1.0.42:
- 'Updated table romanah_gokbakja_pivot_production'
- builder_table_update_romanah_gokbakja_pivot_production_5.php
1.0.43:
- 'Created table romanah_gokbakja_order_items'
- builder_table_create_romanah_gokbakja_order_items.php
1.0.44:
- 'Updated table romanah_gokbakja_order_items'
- builder_table_update_romanah_gokbakja_order_item.php
1.0.45:
- 'Created table romanah_gokbakja_shipping'
- builder_table_create_romanah_gokbakja_shipping.php
1.0.46:
- 'Updated table romanah_gokbakja_shipping'
- builder_table_update_romanah_gokbakja_shipping.php
1.0.47:
- 'Created table romanah_gokbakja_payment'
- builder_table_create_romanah_gokbakja_payment.php
1.0.48:
- 'Updated table romanah_gokbakja_order_item'
- builder_table_update_romanah_gokbakja_order_item_2.php
1.0.49:
- 'Created table romanah_gokbakja_sewer_production'
- builder_table_create_romanah_gokbakja_sewer_production.php
1.0.50:
- 'Updated table romanah_gokbakja_stoct'
- builder_table_update_romanah_gokbakja_stoct.php
1.0.51:
- 'Updated table romanah_gokbakja_stoct'
- builder_table_update_romanah_gokbakja_stoct_2.php
1.0.52:
- 'Updated table romanah_gokbakja_pivot_production'
- builder_table_update_romanah_gokbakja_pivot_production_6.php
1.0.53:
- 'Updated table romanah_gokbakja_pivot_production'
- builder_table_update_romanah_gokbakja_pivot_production_7.php
1.0.54:
- 'Updated table romanah_gokbakja_production'
- builder_table_update_romanah_gokbakja_production_7.php
1.0.55:
- 'Updated table romanah_gokbakja_pivot_production'
- builder_table_update_romanah_gokbakja_pivot_production_8.php

View File

@ -81,31 +81,35 @@ items:
items:
-
title: 'Täze Hasabat'
type: cms-page
code: ''
reference: excruiters
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýlar Boýunça'
nesting: null
type: cms-page
url: null
code: ''
reference: production
reference: all-productions
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýlar Boýunça'
type: cms-page
code: ''
reference: all-productions
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Ýyl Boýunça'
nesting: null
type: cms-page
url: null
code: ''
reference: report-production
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
@ -139,27 +143,39 @@ items:
isExternal: '0'
-
title: 'Aýlar boýunca'
nesting: null
type: cms-page
url: null
code: ''
reference: all-production-machine-month
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Ýyl Boýunça'
nesting: null
type: cms-page
url: null
code: ''
reference: report-production-machine
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Mehanikler boýunça'
nesting: null
type: cms-page
url: null
code: ''
reference: machine-production-mechanic
cmsPage: null
replace: null
viewBag:
isHidden: '0'
cssClass: ''

View File

@ -0,0 +1,29 @@
title = "excruiters"
url = "/excruiters"
layout = "platform_main"
is_hidden = 0
==
<?php
function onStart(){
$this["excruiters"] = Romanah\Gokbakja\Models\Excruiter::all();
}
?>
==
<div class="container-fluid">
<div class="row">
{% for key, record in excruiters %}
<div class="col-md-3 col-sm">
<a href="/production/{{record.id}}" class="card bg-info text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white" style="text-transform: uppercase;"><i class="mdi mdi-bullseye-arrow me-3"></i> {{record.name}} </h5>
<p class="card-text">{% if record.note %}{{record.note}}{% else %} &nbsp; {% endif %}</p>
</div>
</a>
</div>
{% endfor %}
</div>
</div>

View File

@ -1,5 +1,5 @@
title = "Production"
url = "/production"
url = "/production/:excruiter"
layout = "platform_main"
is_hidden = 0
@ -26,10 +26,16 @@ function onStart(){
$this["currentMonth"] = $currentDate->format('m');
$this["currentYear"] = $currentDate->format('Y');
$this["productions"] = Romanah\Gokbakja\Models\Production::whereDate('created_at', date($currentDateFormat))->with(['pivot_production'])->orderBy('id', 'DESC')->get();
$excruiter = $this->param("excruiter");
$this["productions"] = Romanah\Gokbakja\Models\Production::whereDate('created_at', date($currentDateFormat))->where('excruiter_id', $excruiter)->with(['pivot_production', 'excruiter', 'shift'])->orderBy('id', 'DESC')->get();
$this["productCounts"] = Romanah\Gokbakja\Models\Product::where('report', 'simple')->count();
$this["shifts"] = Romanah\Gokbakja\Models\Shift::get();
$this["calcAll"] = Romanah\Gokbakja\Models\Production::whereDate('created_at', date($currentDateFormat))->sum('time');
}
?>
==
@ -53,36 +59,6 @@ function onStart(){
{% endput %}
<div class="container-fluid">
<div class="row">
<!-- <div class="col-lg-4">
<a href="/all-productions/{{currentMonth}}" class="card bg-primary text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> HEMMESI</h5>
<p class="card-text">Bu bölümde hasabatyň aýlar boýunça ählisini görüp bilersiňiz.</p>
</div>
</a>
</div>
<div class="col-lg-4">
<a href="/report-production/{{currentYear}}" class="card bg-primary text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> ORTAÇA ÖNÜMÇILIK</h5>
<p class="card-text">Bu bölümde ortaça önümçilik boýunça hasabat.</p>
</div>
</a>
</div> -->
<!-- <div class="col-lg-4">
<div class="card bg-primary text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white"><i class="mdi mdi-bullseye-arrow me-3"></i> Primary Card</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the
card's content.</p>
</div>
</div>
</div> -->
</div>
<div class="row">
<div class="col-lg">
<a class="card bg-success text-white-50">
@ -96,8 +72,9 @@ function onStart(){
<div class="col-lg col-sm">
<a class="card bg-info text-white-50">
<div class="card-body">
<h5 class="mb-4 text-white" id="avg_percentage_{{record.id}}"><i class="mdi mdi-bullseye-arrow me-3"></i> 0 %</h5>
<p class="card-text" id="avg_amount_{{record.id}}">ORTAÇA: 0 kg</p>
<h5 class="mb-4 text-white" id="avg_percentage_{{record.id}}"><i
class="mdi mdi-bullseye-arrow me-3"></i> 0 %</h5>
<p class="card-text" id="avg_amount_{{record.id}}">{{record.name}} : 0 kg</p>
</div>
</a>
</div>
@ -105,6 +82,7 @@ function onStart(){
</div>
<!-- end row -->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
@ -112,38 +90,64 @@ function onStart(){
<div class="col-md-6">
<h3 class="card-title" style="font-size: 22px;color: #1e2038;">Çig Mallar Boýunça
({{currentDate|date('d.m.Y | H:i')}})</h3>
<p class="card-title-desc" style="color: #6c6ff5;">Hasabat</p>
<div id="back_btn">
<a href="#">HASABAT</a>
</div>
</div>
<!-- <div class="col-md-6" style="text-align: right;">
<button type="button" class="btn btn-primary waves-effect waves-light"
data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom"
aria-controls="offcanvasBottom">
<i class="ri-add-line align-middle ms-2" style="font-size: 17px;"></i> Добавить
<div class="col-md-6" style="text-align: right;">
<a href="/excruiters" type="button" class="btn btn-danger waves-effect waves-light">
<i class="ri-arrow-left-line align-middle ms-2" style="font-size: 17px;"></i> Yza
</a>
<button data-request="onCalculateReportDaily" type="button" class="btn btn-primary waves-effect waves-light"
data-bs-toggle="modal" data-bs-target="#exampleModalFullscreen">
<i class="ri-pie-chart-line align-middle ms-2" style="font-size: 17px;"></i> Günüň
Jemini Jemle
</button>
</div> -->
</div>
</div>
<p id="product_count" style="color: transparent;position: absolute;">{{productCounts}}</p>
{% for key, record in records %}
<p id="product_id_{{key}}" style="color: transparent;font-size: 1;position: absolute;">{{record.id}}</p>
<p id="product_id_{{key}}" style="color: transparent;font-size: 1;position: absolute;">{{record.id}}
</p>
{% endfor %}
<div class="table-responsive" style="margin-bottom: 20px;">
<div class="table-responsive" style="margin-bottom: 20px;margin-top: 20px;">
<table class="table mb-0">
<thead class="table-light">
<form data-request="onCreateProduction">
<tr>
<th style="background: #daddff;">Täze maglumat</th>
<tr id="step1">
<th style="background: #daddff;">Saýla</th>
<th style="background: #daddff;">
<input type="number" name="all_amount" class="form-control"
placeholder="JEMI" onchange="getAllAmount(this.value);">
<select class="form-control" name="shift_id" id="shift_id">
<option value="0">Smen</option>
{% for shift in shifts %}
<option value="{{shift.id}}">{{shift.desc}} - ({{shift.start}} -
{{shift.end}})</option>
{% endfor %}
</select>
</th>
<th style="background: #daddff;">
<input type="number" name="all_amount" id="all_amount_input"
class="form-control" placeholder="JEMI"
oninput="getAllAmount(this.value);">
</th>
<th style="background: #daddff;">
<a onclick="goSecondStep();"
class="btn btn-primary waves-effect waves-light">Dowam et</a>
</th>
</tr>
<tr id="step2" style="display: none;">
<th style="background: #daddff;">Täze maglumat</th>
{% for key, record in records %}
<th style="background: #daddff;">
<input type="number" onchange="getValues();" step="0.01"
<input type="number" oninput="getValues();" step="0.01"
pattern="/^-?\d+\.?\d*$/"
onKeyPress="if(this.value.length==4) return false;"
name="product_{{record.code}}" id="product_{{key}}" class="form-control"
placeholder="{{record.name}} %">
placeholder="{{record.name}} %" disabled>
</th>
{% endfor %}
<th style="background: #daddff;">
@ -160,6 +164,7 @@ function onStart(){
</table>
</div>
{% partial "production/modal" %}
<table id="datatable-buttons" class="table table-striped table-bordered dt-responsive nowrap"
style="border-collapse: collapse; border-spacing: 0; width: 100%;">
@ -167,6 +172,8 @@ function onStart(){
<tr>
<th style="width: 5%;"></th>
<th>Senesi</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Hemmesi</th>
{% for key, record in records %}
<th>{{record.name}}</th>
@ -180,24 +187,58 @@ function onStart(){
{% for key, report in productions %}
<tr>
<td style="font-weight: bold;width: 5%;">{{key + 1}}</td>
<td><a href="#"
style="font-weight: bold;color: #0005c5;">{{report.created_at|date('d.m.Y |
<td><a href="#" style="font-weight: bold;color: #0005c5;">{{report.created_at|date('d.m.Y |
H:i')}}</a></td>
<td><a href="#" style="font-weight: bold;color: #1e2038;">{{report.shift.desc}}</a></td>
<td style="text-align: center;">
<span class="badge badge-soft-info"
style="font-size: 14px;">{{report.excruiter.name}}</span>
</td>
<td style="text-align: center;">
<span class="badge badge-soft-success"
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
</td>
{% for product in report.pivot_production %}
<td>{{product.amount_percentage|number_format(2)}} %
<!-- {% if product.amount != 0 %}<br>
<span style="font-size: 12px;color: darkgray;"> {{product.amount|number_format}}
kg</span> {% endif %} -->
</td>
<td> <a href="#" data-bs-toggle="modal"
data-bs-target=".bs-example-modal-sm-{{product.id}}">{{product.amount_percentage|number_format(2)}}
% {{product.amount}}</a></td>
<div class="modal fade bs-example-modal-sm-{{product.id}}" tabindex="-1" role="dialog"
aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="mySmallModalLabel">{{product.product_name}}
- {{report.created_at|date('d.m | H:i')}}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<form data-request="onUpdatePivotProduction" method="POST">
<input type="number" step="0.01" pattern="/^-?\d+\.?\d*$/"
onKeyPress="if(this.value.length==4) return false;"
name="product_{{product.id}}" class="form-control"
placeholder="{{product.product_name}} %"
value="{{product.amount_percentage|number_format(2)}}">
<input type="hidden" value="{{product.id}}" name="product_id" />
<button type="submit"
class="btn btn-primary waves-effect waves-light"
style="margin-top: 15px;width: 100%;">Üýtget</button>
</form>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{% endfor %}
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
</tr>
{% endfor %}
</tbody>
@ -205,6 +246,8 @@ function onStart(){
<tr>
<th style="width: 5%;"></th>
<th>Senesi</th>
<th>Smen</th>
<th>Ekskruiter</th>
<th>Hemmesi</th>
{% for key, record in records %}
<th>{{record.name}}</th>
@ -219,6 +262,8 @@ function onStart(){
</div>
</div>
</div>
</div>
@ -228,24 +273,64 @@ function onStart(){
{% put scripts %}
<script>
function backStep1() {
document.getElementById("step1").setAttribute("style", "display:contents");
document.getElementById("step2").setAttribute("style", "display:none");
$("#back_btn").html(`<a href="#">HASABAT</a>`);
}
function goSecondStep() {
var shift = document.getElementById("shift_id").value;
var allAmount = document.getElementById("all_amount_input").value;
if (shift == 0) {
window.alert("SMEN SAÝLA!");
} else if (allAmount == "") {
window.alert("JEMI MUKDARY GIRIZ!");
} else {
document.getElementById("step1").setAttribute("style", "display:none");
document.getElementById("step2").setAttribute("style", "display:contents");
$("#back_btn").html(`<a href="#" onclick="backStep1();">YZA 1-nji ädime</a>`);
}
}
function getAllAmount(amount) {
var prodCount = document.getElementById('product_count').innerHTML;
//var all_amount = document.getElementById("all_amount").value;
$('#all_amount').html(`JEMI: ` + amount + ` kg`);
if (amount) {
for (let i = 0; i < prodCount; i++) {
$("#product_" + i).prop('disabled', false);
}
} else {
for (let i = 0; i < prodCount; i++) {
$("#product_" + i).prop('disabled', true);
}
}
}
function getValues() {
var prodCount = document.getElementById('product_count').innerHTML;
var fieldValues = [];
var all_amount_value = $("input[name='all_amount']").val();
var allAmount = all_amount_value ? parseFloat(all_amount_value) : 0;
// console.log(prodCount);
for (let i = 0; i < prodCount; i++) {
var prod = document.getElementById("product_" + i).value;
var prodId = document.getElementById("product_id_" + i).innerHTML;
fieldValues[i] = prod ? parseFloat(prod) : 0;
calculate(prodId, prod);
calculate(prodId, prod, allAmount);
//console.log("q" + i + ": " + prod);
}
@ -257,13 +342,13 @@ function onStart(){
// return eval(fieldValues.join('+'));
}
function calculate(prodId, value) {
function calculate(prodId, value, all_amount) {
$.request('onCalculateAvg', {
data: {'prod_id': prodId, 'field_value': value},
data: { 'prod_id': prodId, 'field_value': value, 'all_amount': all_amount },
success: function (data) {
$('#avg_percentage_' + prodId).html(`<i class="mdi mdi-bullseye-arrow me-3"></i> `+ data.avg_percentage +` %`);
$('#avg_amount_' + prodId).html(`ORTAÇA: `+ data.avg_amount +` kg`);
$('#avg_percentage_' + prodId).html(`<i class="mdi mdi-bullseye-arrow me-3"></i> ` + data.avg_percentage + ` %`);
$('#avg_amount_' + prodId).html(data.product_name + ` : ` + (data.avg_amount) + ` kg`);
}
});

View File

@ -0,0 +1,94 @@
[viewBag]
==
<!-- sample modal content -->
<div id="exampleModalFullscreen" class="modal fade" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalFullscreenLabel">
<font style="color: darkgreen;text-decoration: underline;font-weight: bold;">{{currentDate|date('d.m.Y')}}</font> senesi
boýunça günü jemi
</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>
</div>
<div class="tab-pane" id="profile1" role="tabpanel">
<p class="mb-0">
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 class="tab-pane" id="messages1" role="tabpanel">
<p class="mb-0">
Etsy mixtape wayfarers, ethical wes anderson tofu before they
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 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 -->