changes to bukja view corrections

This commit is contained in:
ilmedova 2021-04-06 12:39:14 +05:00
parent 35c1300952
commit 9275187657
4 changed files with 53 additions and 161 deletions

View File

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\BukjaOrder;
use App\Models\Folder;
use App\User;
use App\Models\PropertyType;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
@ -21,12 +22,15 @@ class BukjaController extends Controller
//
$folders = $this->getFolders();
$props=$this->getProps();
$userbukja = User::where('bukja', '!=' , false)->first();
$email = $userbukja->email;
return view('web.bukjalar')->with([
'title'=>'Mahabat Nyrhnama bukjalary',
'keywords'=>'',
'meta_description'=>'',
'folders'=>$folders,
'props'=>$props
'folders'=> $folders,
'props'=> $props,
'email' => $email
]);
}
@ -117,9 +121,9 @@ class BukjaController extends Controller
/**
/*
Send order to mail "mahabat@turkmentv.gov.tm"
*/
*/
public function sendToMail($bukjaOrder){
$data = array(
'id' => utf8_encode($bukjaOrder->id),

View File

@ -62,6 +62,15 @@ class UserCrudController extends CrudController
'label' => trans('backpack::permissionmanager.email'),
'type' => 'email',
],
[
'name' => 'bukja',
'label' => 'Bukja pochtasy',
'type' => 'radio',
'options' => [ // the key will be stored in the db, the value will be shown as label;
1 => "Shu pochtany ullan",
0 => "Ullanma buny"
],
],
[
'name' => 'password',
'label' => trans('backpack::permissionmanager.password'),

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddBukjaToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('bukja')->nullable()->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
//
});
}
}

View File

@ -52,7 +52,7 @@
<ul class="list-unstyled">
<li>Phone: +993 12 493705</li>
<li>Aşgabat şäheri Oguzhan 13</li>
<li>mahabat@turkmentv.gov.tm</li>
<li>{{ $email }}</li>
</ul>
</div>
</div>
@ -105,7 +105,6 @@
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Umumy bahasy</th>
</tr>
</thead>
<tbody>
@ -117,56 +116,6 @@
<td>@isset($table['set_radio']) {{$table['set_radio']}}@endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}} @endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
@if($folder->total_price !== '')
@if($k < 1)
<td rowspan="15" style="position: relative">
<div class="tot_price_center_box">
<span>@isset($folder->total_price) {{$folder->total_price}} TMT <i style="display: none">{{$k=$k+1}}</i> @endisset</span>
</div>
</td>
@endif
@endif
</tr>
@endforeach
@endisset
</tbody>
</table>
</div>
</div>
@endif
@if(!isset($folder->total_price) & $folder->total_price == '')
<div class="row">
<div class="col-md-12 col-xs-12" style="padding: 0">
<h4 class="text-center folder_title" style="border-bottom: 1px solid slategray; color:#fff; background-color: #187F7E; padding: 4px 0px;">
<b>{{$folder->title}}</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-12 col-xs-12 for-border-box" style="padding:0">
<div>
<p>{!! $folder->description !!}</p>
</div>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Wagt aralygy</th>
<th scope="col">TV</th>
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Bahasy</th>
</tr>
</thead>
<tbody>
@isset($folder->folder_table)
@foreach($folder->folder_table as $table)
<tr>
<td>@isset($table['time']) {{$table['time']}} @endisset</td>
<td>@isset($table['set_tv']) {{$table['set_tv']}} @endisset</td>
<td>@isset($table['set_radio']) {{$table['set_radio']}} @endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}}@endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
<td> {{$table['price'] ?? '0'}} TMT </td>
</tr>
@endforeach
@endisset
@ -217,7 +166,6 @@
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Umumy bahasy</th>
</tr>
</thead>
<tbody>
@ -229,56 +177,6 @@
<td>@isset($table['set_radio']) {{$table['set_radio']}}@endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}} @endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
@if($folder->total_price !== '')
@if($k < 1)
<td rowspan="15" style="position: relative">
<div class="tot_price_center_box">
<span>@isset($folder->total_price) {{$folder->total_price}} TMT <i style="display: none">{{$k=$k+1}}</i> @endisset</span>
</div>
</td>
@endif
@endif
</tr>
@endforeach
@endisset
</tbody>
</table>
</div>
</div>
@endif
@if(!isset($folder->total_price) & $folder->total_price == '')
<div class="row">
<div class="col-md-12 col-xs-12" style="padding: 0">
<h4 class="text-center folder_title" style="border-bottom: 1px solid slategray; color:#fff; background-color: #187F7E; padding: 4px 0px;">
<b>{{$folder->title}}</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-12 col-xs-12 for-border-box" style="padding:0">
<div>
<p>{!! $folder->description !!}</p>
</div>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Wagt aralygy</th>
<th scope="col">TV</th>
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Bahasy</th>
</tr>
</thead>
<tbody>
@isset($folder->folder_table)
@foreach($folder->folder_table as $table)
<tr>
<td>@isset($table['time']) {{$table['time']}} @endisset</td>
<td>@isset($table['set_tv']) {{$table['set_tv']}} @endisset</td>
<td>@isset($table['set_radio']) {{$table['set_radio']}} @endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}}@endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
<td>{{$table['price'] ?? ''}} TMT</td>
</tr>
@endforeach
@endisset
@ -293,7 +191,7 @@
</div>
</div>
@endif
@if($prop->filter_value==3)
@if($prop->filter_value == 3)
<div role="tabpanel" class="tab-pane fade {{ ($prop->filter_value==1) ? 'in active' : ''}}" id="Section{{$prop->filter_value}}">
<h3 class="m-t-c">{{$prop->title}}</h3>
<div class="prop-desc">
@ -329,7 +227,6 @@
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Umumy bahasy</th>
</tr>
</thead>
<tbody>
@ -341,56 +238,6 @@
<td>@isset($table['set_radio']) {{$table['set_radio']}}@endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}} @endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
@if($folder->total_price !== '')
@if($k < 1)
<td rowspan="15" style="position: relative">
<div class="tot_price_center_box">
<span>@isset($folder->total_price) {{$folder->total_price}} TMT <i style="display: none">{{$k=$k+1}}</i> @endisset</span>
</div>
</td>
@endif
@endif
</tr>
@endforeach
@endisset
</tbody>
</table>
</div>
</div>
@endif
@if(!isset($folder->total_price) & $folder->total_price == '')
<div class="row">
<div class="col-md-12 col-xs-12" style="padding: 0">
<h4 class="text-center folder_title" style="border-bottom: 1px solid slategray; color:#fff; background-color: #187F7E; padding: 4px 0px;">
<b>{{$folder->title}}</b></h4>
</div>
</div>
<div class="row">
<div class="col-md-12 col-xs-12 for-border-box" style="padding:0">
<div>
<p>{!! $folder->description !!}</p>
</div>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Wagt aralygy</th>
<th scope="col">TV</th>
<th scope="col">Radio</th>
<th scope="col">Subtitle</th>
<th scope="col">Web</th>
<th scope="col" class="text-center">Bahasy</th>
</tr>
</thead>
<tbody>
@isset($folder->folder_table)
@foreach($folder->folder_table as $table)
<tr>
<td>@isset($table['time']) {{$table['time']}} @endisset</td>
<td>@isset($table['set_tv']) {{$table['set_tv']}} @endisset</td>
<td>@isset($table['set_radio']) {{$table['set_radio']}} @endisset</td>
<td>@isset($table['set_sub']) {{$table['set_sub']}}@endisset</td>
<td>@isset($table['set_web']) {{$table['set_web']}} @endisset</td>
<td>{{$table['price'] ?? '0'}} TMT</td>
</tr>
@endforeach
@endisset
@ -582,7 +429,7 @@
</div>
<div class="text-right mb-3">
<button type="button" class="btn" id="hasapla-btn" style="font-size: 1em; background-color: #187F7E; color: #fff;">Hasapla</button> |
<button type="button" class="btn" id="add_new_calc" style="font-size: 1em; background-color: #187F7E; color: #fff; ">+</button>
<button type="button" class="btn" id="add_new_calc" style="font-size: 1em; background-color: #187F7E; color: #fff; ">Sargydyma goş +</button>
</div>
<div id="customer_cases" style="margin-top: 1em;"> {{--For orders--}} </div>
@ -608,7 +455,7 @@
<ul class="list-unstyled">
<li>Phone: +993 12 493705</li>
<li>Aşgabat şäheri Oguzhan 13</li>
<li>mahabat@turkmentv.gov.tm</li>
<li>{{ $email }}</li>
</ul>
</div>
</div>