Commit 597fbb6b authored by Khumoyunmirzo Sodiqov's avatar Khumoyunmirzo Sodiqov

Release 28.10.2019

(
   - Disabled Auto LogIn before Register
)
parent 9b06c046
......@@ -259,7 +259,12 @@ class ProfileController extends Controller
public function address()
{
$units = Address::where('user_id', '=', Auth::user()->id)->get();
$units = Address::select([
'id', 'user_id', 'scan_id', 'firstname', 'secondname', 'fathername', 'phone', 'country',
'city', 'street', 'house', 'apartment', 'zip', 'is_default', 'created', 'zip', 'passport', 'passport_by', 'passport_issue', 'type',
DB::raw('(select title_ru from country where id=address_info.country) as country_name'),
DB::raw('(select title_ru from city where id=address_info.city) as city_name')
])->where('user_id', '=', Auth::user()->id)->get();
return view('pages.profile.addresses', compact('units'));
}
......
......@@ -57,12 +57,12 @@ class Address extends Model
public function getFormatedPassport()
{
return $this->passport . '| ' . $this->passport_by . ', ' . $this->passport_issue;
return $this->passport . ' ' . $this->passport_by . ' ' . $this->passport_issue;
}
public function getFormated()
{
return $this->street . ', ' . $this->house . ', ' . $this->apartment . ', ' . DB::raw('select title_ru from city id=' . $this->city) . ', ' . DB::raw('select title_ru from country id=' . $this->country);
return $this->street . ', ' . $this->house . ', ' . $this->apartment . ', ' . DB::raw('select title_ru from city where id=' . $this->city) . ', ' . DB::raw('select title_ru from country where id=' . $this->country);
}
public function getFIO()
......
......@@ -94,8 +94,8 @@
href="{{ ($package->payment_info == 3)?'/packages/payment/'.$package->id:'#' }}">{{ ($package->payment_info == 3)?'Оплатить онлайн':'Pay offline' }}</a>
</td>
<td class="text-center">{{ $package->payment_status }}</td>
<td class="text-center"><a
href="#"><i class="fa fa-pencil" style="color: #e0a800"></i></a></td>
{{-- <td class="text-center"><a--}}
{{-- href="#"><i class="fa fa-pencil" style="color: #e0a800"></i></a></td>--}}
</tr>
@endforeach
</tbody>
......
......@@ -351,13 +351,18 @@
</div>
<!-- Default checked -->
<div>
<div style="display: grid;">
<div class="custom-control custom-radio" style="float: left">
<input type="radio" class="custom-control-input" id="defaultChecked22"
name="delivery_info" value="Вызов курьера">
<label class="custom-control-label" for="defaultChecked22">Вызов курьера</label>
</div>
<div class="form-group" style="display: none" id="pickupDate">
<label class="form-label" for="forms-check-name1" >Дата <span
style="color: #ff0912">*</span></label>
<input class="form-control" id="forms-check-name1" type="date" name="delivery_info0"
data-constraints="@Required" placeholder="Date" required>
</div>
<div class="form-group" style="display: none; float: right" id="pickupTime">
<label class="form-label" for="involve-form-country1">Пожалуйста, укажите время
для
......@@ -376,6 +381,8 @@
<option value="16:00 - 17:00">16:00 - 17:00</option>
<option value="17:00 - 18:00">17:00 - 18:00</option>
<option value="18:00 - 19:00">18:00 - 19:00</option>
<option value="20:00 - 21:00">20:00 - 21:00</option>
<option value="21:00 - 22:00">21:00 - 22:00</option>
</select>
</div>
</div>
......@@ -488,20 +495,21 @@
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="forms-check-street">Город <span
<label class="form-label" for="forms-check-house">Адрес <span
style="color: #ff0912">*</span></label>
<input type="text" class="form-control" id="forms-check-street" name="street"
placeholder="Город" required>
<input type="text" class="form-control" id="forms-check-house" name="house"
placeholder="Адрес" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="form-label" for="forms-check-house">Адрес <span
<label class="form-label" for="forms-check-street">Город <span
style="color: #ff0912">*</span></label>
<input type="text" class="form-control" id="forms-check-house" name="house"
placeholder="Адрес" required>
<input type="text" class="form-control" id="forms-check-street" name="street"
placeholder="Город" required>
</div>
</div>
</div>
<div class="row">
......@@ -913,9 +921,11 @@
$("#defaultChecked22").click(function () {
$('#pickupTime').show();
$('#pickupDate').show();
});
$("#defaultUnchecked11").click(function () {
$('#pickupTime').hide();
$('#pickupDate').hide();
});
</script>
......
......@@ -30,10 +30,10 @@
@foreach($units as $i => $unit)
<tr>
<td>{{ $i++ }}</td>
<td>{{ $unit->firstname }} {{ $unit->lastname }}</td>
<td>{{ $unit->getFIO() }}</td>
<td>{{ $unit->getFormatedPassport() }}
</td>
<td>{{ $unit->getFormated() }}</td>
<td>{{ $unit->street . ', ' . $unit->house . ', ' . $unit->apartment . ', ' . $unit->city_name . ', ' . $unit->country_name }}</td>
<td>
{{ $unit->phone }}
</td>
......@@ -41,7 +41,7 @@
{{ ($unit->type == 'recipient')?'Получатель':'Отправитель' }}
</td>
<td>
<a href="/address/{{$unit->id}}/edit" class="btn btn-warning btn-sm mb-1">
<a href="/profile/address/edit/{{$unit->id}}" class="btn btn-warning btn-sm mb-1">
Редактировать</a>
<form action="{{ route('address.destroy', $unit->id) }}" method="POST">
@csrf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment