1
0
Fork 0

fix card and customer

main
A1Gard 2 years ago
parent 24e73c3ff2
commit 819f8b7eea

@ -1261,6 +1261,94 @@ nav a {
display: block;
}
#profile-tab {
list-style: none;
padding: 0;
}
#profile-tab li {
padding: 0.5rem 1rem;
/*border-bottom: 1px solid silver;*/
}
#profile-tab li a, #profile-tab li span {
display: block;
transition: 300ms;
}
#profile-tab li:hover span, #profile-tab li:hover a {
transform: translateX(-10px);
}
#profile-tab li.active {
background: gray;
color: white;
}
.gird4 {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 0.5rem;
margin-bottom: 0.5rem;
}
.gird4 > div {
height: 10rem;
padding: 2rem;
border: 1px solid rgba(0, 0, 0, 0.1254901961);
position: relative;
text-align: start;
overflow: hidden;
}
.gird4 > div:first-child {
background: rgba(154, 205, 50, 0.5647058824);
color: black;
}
.gird4 > div:nth-child(2) {
background: rgba(32, 222, 215, 0.56);
color: black;
}
.gird4 > div:nth-child(3) {
background: rgba(250, 38, 69, 0.56);
color: black;
}
.gird4 > div:last-child {
background: rgba(255, 69, 0, 0.5647058824);
color: black;
}
.gird4 > div i {
font-size: 75px;
width: 75px;
position: absolute;
left: 15px;
top: 15px;
transform: rotateZ(25deg);
color: rgba(255, 255, 255, 0.3333333333);
}
/*-768px width*/
@media (max-width: 1000px) {
.gird4 {
display: grid;
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 650px) {
.gird4 {
display: grid;
grid-template-columns: repeat(1, 1fr);
}
}
.profile-tab {
border: 0 !important;
padding: 0 !important;
}
.txt-area {
white-space: pre-line;
}

@ -11073,6 +11073,57 @@ tr.border-bottom td {
transform: scale(1);
}
}
.progress-step {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
.progress-step .step {
text-align: center;
margin-bottom: 35px;
position: relative;
z-index: 9;
}
.progress-step .step.done i, .progress-step .step.done img {
border-color: black;
color: black;
}
.progress-step .step i, .progress-step .step img {
font-size: 45px;
width: 75px;
height: 75px;
border-radius: 50%;
border: 2px solid gray;
display: flex;
align-items: center;
justify-content: center;
color: gray;
margin: 15px auto;
background: #ffffff;
position: relative;
z-index: 10;
cursor: pointer;
}
.progress-step .step:before {
height: 2px;
background: silver;
top: calc(50% - 15px);
position: absolute;
left: 0;
right: 0;
content: " ";
transform: translateY(-50%);
}
.progress-step .step.done:before {
background: black;
}
#card-steps .step {
display: none;
}
#card-steps .step.active {
display: block;
}
.x-mega-menu {
background: #eeeeee;
display: grid;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -107,6 +107,96 @@ nav {
}
}
#profile-tab{
list-style: none;
padding: 0;
}
#profile-tab li{
padding: .5rem 1rem;
/*border-bottom: 1px solid silver;*/
}
#profile-tab li a,#profile-tab li span{
display: block;
transition: 300ms;
}
#profile-tab li:hover span,#profile-tab li:hover a{
transform: translateX(-10px);
}
#profile-tab li.active{
background: gray;
color: white;
}
#profile-tab li a{
//color: ;
}
.gird4 {
display: grid;
grid-template-columns: repeat(4,1fr);
grid-gap: .5rem;
margin-bottom: .5rem;
}
.gird4 > div{
height: 10rem;
padding: 2rem;
border: 1px solid #00000020;
position: relative;
text-align: start;
overflow: hidden;
}
.gird4 > div:first-child{
background: #9ACD3290;
color: black;
}
.gird4 > div:nth-child(2){
background: rgba(32, 222, 215, 0.56);
color: black;
}
.gird4 > div:nth-child(3){
background: rgba(250, 38, 69, 0.56);
color: black;
}
.gird4 > div:last-child{
background: #FF450090;
color: black;
}
.gird4 > div i{
font-size: 75px;
width: 75px;
position: absolute;
left: 15px;
top: 15px;
transform:rotateZ(25deg);
color: #ffffff55;
}
/*-768px width*/
@media ( max-width: 1000px ) {
.gird4 {
display: grid;
grid-template-columns: repeat(2,1fr);
}
}
@media ( max-width: 650px ) {
.gird4 {
display: grid;
grid-template-columns: repeat(1,1fr);
}
}
.profile-tab{
border: 0 !important;
padding: 0!important;
}
.txt-area {
white-space: pre-line;
}

@ -0,0 +1,54 @@
.progress-step{
display: grid;
grid-template-columns: repeat(3,1fr);
.step{
text-align: center;
margin-bottom: 35px;
position: relative;
z-index: 9 ;
&.done{
i,img{
border-color: black;
color: black;
}
}
i,img{
font-size: 45px;
width: 75px;
height: 75px;
border-radius: 50%;
border: 2px solid gray;
display: flex;
align-items: center;
justify-content: center;
color: gray;
margin: 15px auto;
background: #ffffff;
position: relative;
z-index: 10;
cursor: pointer;
}
}
.step:before{
height: 2px;
background: silver;
top: calc(50% - 15px);
position: absolute;
left: 0;
right: 0;
content: ' ';
transform: translateY(-50%);
}
.step.done:before{
background: black;
}
}
#card-steps {
.step{
display: none;
&.active{
display: block;
}
}
}

@ -11,6 +11,7 @@
@import "css/icofont/icofont.min.css";
@import "../sass/preloader";
@import "css/style.css";
@import "card";
$main-color: #0085a7;
$invert-text-color: white;

@ -4,347 +4,398 @@
@endsection
@section('content')
@if((count($pros) + count($qpros)) > 0)
<div id="main-conetent">
<section id="product" class="wow zoomInUp" data-wow-delay=".5">
<div class="container" style="min-height: 100vh">
@include('starter-kit::component.err')
@if (!Auth::guard('customer')->check())
<div class="alert alert-warning">
شما ثبت نام نکرده اید.
<br>
لطفا پیش از ادامه ثبت نام کنید یا وارد شوید
<section id="product" class="wow zoomInUp" data-wow-delay=".5">
<div class="container" style="min-height: 100vh">
<div>
<div class="progress-step">
<div class="step step1 done" data-id="step1" data-done=".progress-step .step1">
<i class="fa fa-shopping-bag"></i>
سبد خرید
</div>
<div class="step step2" data-id="step2" data-done=".progress-step .step1,.progress-step .step2">
<i class="fa fa-truck-fast"></i>
اطلاعات ارسال
</div>
@endif
<div class="step step3" data-id="step3" data-done=".progress-step .step1,.progress-step .step2, .progress-step .step3">
<i class="fa fa-credit-card"></i>
اطلاعات پرداخت
</div>
</div>
@include('starter-kit::component.err')
<form action="{{route('invoice.create')}}" method="post">
@csrf
<div class="text-center" id="card">
<table class="table table-bordered table-striped table-hover"
id="card-table">
<tr>
<th>
{{__("Image")}}
</th>
<th colspan="2">
{{__("Name")}}
</th>
<th colspan="2">
{{__("Quantity")}}
</th>
<th colspan="2">
{{__("Price")}}
</th>
<th colspan="2">
{{__("Count")}}
</th>
<th>
-
</th>
</tr>
@php($tot = 0)
@foreach ($pros as $pro)
<tr>
<td>
<a href="{{route('product',$pro->slug)}}">
<img src="{{$pro->thumbUrl()}}" class="img-64" alt="">
</a>
</td>
<td colspan="2">
{{$pro->name}}
<input type="hidden" name="products[]" value="{{$pro->id}}">
</td>
<td colspan="2">
@if($pro->quantities()->sum('count') > 0)
@foreach($pro->quantities as $q)
@if($q->count > 0)
@include('component.card-quantity',compact('q','pro'))
@endif
@endforeach
@else
<span class="active" data-count="{{$pro->stock_quantity}}"></span>
@foreach(\App\Helpers\getPriceableMeta($pro) as $k => $meta)
<div class="meta">
{{\App\Helpers\getPropLabel($k)}}
@if($k == 'color')
{!! \App\Helpers\showMeta($k,$meta) !!}
@else
<b>
{!! \App\Helpers\showMeta($k,$meta) !!}
</b>
@endif
</div>
@endforeach
@endif
</td>
<td colspan="2" class="price-td" data-price="{{$pro->getPurePrice()}}">
@if($pro->getPurePrice() == 0)
{{__("We call you about price soon.")}}
@else
<span class="price">
<div class="row">
<div class="col-md-9">
<div id="card-steps">
<div id="step1" class="step active" >
<div class="text-center" id="card">
<table class="table table-hover table-responsive-lg"
id="card-table">
<tr>
<th>
{{__("Image")}}
</th>
<th colspan="2">
{{__("Name")}}
</th>
<th colspan="2">
{{__("Quantity")}}
</th>
<th colspan="2">
{{__("Price")}}
</th>
<th colspan="2">
{{__("Count")}}
</th>
<th>
-
</th>
</tr>
@php($tot = 0)
@foreach ($pros as $pro)
<tr>
<td>
<a href="{{route('product',$pro->slug)}}">
<img src="{{$pro->thumbUrl()}}" class="img-64" alt="">
</a>
</td>
<td colspan="2">
{{$pro->name}}
<input type="hidden" name="products[]" value="{{$pro->id}}">
</td>
<td colspan="2">
@if($pro->quantities()->sum('count') > 0)
@foreach($pro->quantities as $q)
@if($q->count > 0)
@include('component.card-quantity',compact('q','pro'))
@endif
@endforeach
@else
<span class="active" data-count="{{$pro->stock_quantity}}"></span>
@foreach(\App\Helpers\getPriceableMeta($pro) as $k => $meta)
<div class="meta">
{{\App\Helpers\getPropLabel($k)}}
@if($k == 'color')
{!! \App\Helpers\showMeta($k,$meta) !!}
@else
<b>
{!! \App\Helpers\showMeta($k,$meta) !!}
</b>
@endif
</div>
@endforeach
@endif
</td>
<td colspan="2" class="price-td" data-price="{{$pro->getPurePrice()}}">
@if($pro->getPurePrice() == 0)
{{__("We call you about price soon.")}}
@else
<span class="price">
{{number_format($pro->getPurePrice())}}
</span>
{{config('app.currency_type')}}
@endif
@php($tot = $tot + $pro->getPurePrice())
</td>
<td colspan="2">
<div class="product-count">
<div class="btn btn-info count-inc">
<i class="fa fa-plus"></i>
</div>
<input type="number" data-stock="{{$pro->stock_quantity}}"
max="{{$pro->stock_quantity}}" name="count[{{$pro->id}}]"
min="1"
data-price="{{str_replace(',','',$pro->getPurePrice())}}"
class="form-control product-count"
value="1">
<div class="btn btn-info count-dec">
<i class="fa fa-minus"></i>
</div>
</div>
</td>
<td>
<a href="{{route('card.rem',$pro->slug)}}" class="btn btn-outline-danger">
<i class="fa fa-times"></i>
</a>
</td>
</tr>
{{config('app.currency_type')}}
@endif
@php($tot = $tot + $pro->getPurePrice())
</td>
<td colspan="2">
<div class="product-count">
<div class="btn btn-info count-inc">
<i class="fa fa-plus"></i>
</div>
<input type="number" data-stock="{{$pro->stock_quantity}}"
max="{{$pro->stock_quantity}}" name="count[{{$pro->id}}]"
min="1"
data-price="{{str_replace(',','',$pro->getPurePrice())}}"
class="form-control product-count"
value="1">
<div class="btn btn-info count-dec">
<i class="fa fa-minus"></i>
</div>
</div>
</td>
<td>
<a href="{{route('card.rem',$pro->slug)}}" class="btn btn-outline-danger">
<i class="fa fa-times"></i>
</a>
</td>
</tr>
@endforeach
@foreach ($qpros as $xkey => $qpro)
<tr>
<td>
@endforeach
@foreach ($qpros as $xkey => $qpro)
<tr>
<td>
<a href="{{route('product',$qpro->product->slug)}}">
<img src="{{$qpro->product->thumbUrl()}}" class="img-64" alt="">
</a>
</td>
<td colspan="2">
{{$qpro->product->name}}
</td>
<td colspan="2">
@php($data = json_decode($qpro->data))
<span class="badge badge-inverse" style="background: {{$data->color}};">
<a href="{{route('product',$qpro->product->slug)}}">
<img src="{{$qpro->product->thumbUrl()}}" class="img-64" alt="">
</a>
</td>
<td colspan="2">
{{$qpro->product->name}}
</td>
<td colspan="2">
@php($data = json_decode($qpro->data))
<span class="badge badge-inverse" style="background: {{$data->color}};">
<b>
{{\App\Helpers\getColorName($data->color)}}
</b>
</span>
<span class="badge bg-dark">
<span class="badge bg-dark">
{{$data->size}}
</span>
</td>
<td colspan="2" class="price-td" data-price="{{$qpro->price}}">
@if($qpro->price == 0)
{{__("We call you about price soon.")}}
@else
<span class="price">
</td>
<td colspan="2" class="price-td" data-price="{{$qpro->price}}">
@if($qpro->price == 0)
{{__("We call you about price soon.")}}
@else
<span class="price">
{{number_format($qpro->price)}}
</span>
{{config('app.currency_type')}}
@endif
@php($tot = $tot + $qpro->price)
</td>
<td colspan="2">
<div class="product-count">
<div class="btn btn-info count-inc">
<i class="fa fa-plus"></i>
</div>
<input type="number" data-stock="{{$qpro->count}}" max="{{$qpro->count}}"
name="qcount[{{$qpro->id}}]"
min="1"
data-price="{{$qpro->price}}"
class="form-control product-count"
value="{{$counts[$xkey]}}">
<div class="btn btn-info count-dec">
<i class="fa fa-minus"></i>
</div>
</div>
</td>
<td>
<a href="{{route('card.remq',$qpro->id)}}" class="btn btn-outline-danger">
<i class="fa fa-times"></i>
</a>
</td>
</tr>
{{config('app.currency_type')}}
@endif
@php($tot = $tot + $qpro->price)
</td>
<td colspan="2">
<div class="product-count">
<div class="btn btn-info count-inc">
<i class="fa fa-plus"></i>
</div>
<input type="number" data-stock="{{$qpro->count}}" max="{{$qpro->count}}"
name="qcount[{{$qpro->id}}]"
min="1"
data-price="{{$qpro->price}}"
class="form-control product-count"
value="{{$counts[$xkey]}}">
<div class="btn btn-info count-dec">
<i class="fa fa-minus"></i>
</div>
</div>
</td>
<td>
<a href="{{route('card.remq',$qpro->id)}}" class="btn btn-outline-danger">
<i class="fa fa-times"></i>
</a>
</td>
</tr>
@endforeach
<tr>
<td colspan="4" class="text-left">
<label class="desc">
{{__("Description")}}
</label>
<br>
<textarea
placeholder="{{__("If you have any description about your order write here...")}}"
name="desc" class="form-control" id="desc" rows="2"></textarea>
</td>
<td colspan="4">
{{__("Total amount")}}
<hr>
<span id="total-card">
{{number_format($tot)}}
</span>
{{config('app.currency_type')}}
</td>
<td colspan="2">
<label class="text-start d-block">
{{__("Discount code")}}
</label>
<div class="row">
<div class="col-md-6">
<input type="text" class="form-control" id="discount-code" name="discount"
placeholder="{{__("Discount code")}}">
</div>
<div class="col-md-6">
<div class="btn btn-primary" id="discount" data-discount="{}"
data-url="{{route('discount')}}">
{{__("Check discount")}}
</div>
</div>
@endforeach
</table>
</div>
</td>
<div class="alert alert-success text-center">
شما می‌توانید محصولات را رزرو کنید , برای اینکار به مرحله بعدی بروید و
<b>
گزینه فعال سازی
حالت
رزرو
</b>
</tr>
</table>
</div>
را انتخاب کنید
</div>
</div>
<div id="step2" class="step">
@if(count($transports) > 0)
@if(auth('customer')->user()->colleague??null)
<textarea name="address_alt" class="form-control mb-2" rows="4"
placeholder="{{__("Alternative address")}}">{{old('address_alt')}}</textarea>
<hr>
@endif
<h5>
{{__("Transport method")}}
</h5>
@if(count($transports) > 0)
<div class="card mb-2">
<h4 class="card-header">
{{__("Transport method")}}
</h4>
<div class="card-body">
<ul class="list-group">
@foreach($transports as $k=> $t)
<li class="list-group-item">
<input id="tns{{$k}}" type="radio" name="transport_id"
data-price="{{$t->price}}"
value="{{$t->id}}"
onclick="$('.product-count').change();"
@if ($t->is_default) checked
@endif class="form-check-input transport">
<label for="tns{{$k}}" class="form-check-label">
&nbsp;
{{$t->title}}
</label>
@if(strlen($t->description) > 1)
<p class="preline alert alert-info mt-1">{{$t->description}} <span
class="float-end">@if($t->price > 0){{number_format($t->price)}} @else {{__("Free")}} @endif</span>
</p>
<ul class="list-group">
@foreach($transports as $k=> $t)
<li class="list-group-item">
<input id="tns{{$k}}" type="radio" name="transport_id"
data-price="{{$t->price}}"
value="{{$t->id}}"
onclick="$('.product-count').change();"
@if ($t->is_default) checked
@endif class="form-check-input transport">
<label for="tns{{$k}}" class="form-check-label">
&nbsp;
{{$t->title}}
</label>
@if(strlen($t->description) > 1)
<p class="preline alert alert-info mt-1">{{$t->description}} <span
class="float-end">@if($t->price > 0){{number_format($t->price)}} @else {{__("Free")}} @endif</span>
</p>
@endif
</li>
@endforeach
@if(count($resevers) > 0)
@foreach($resevers as $k=> $r)
<li class="list-group-item">
<input id="rv{{$k}}" type="radio" name="invoice_id"
data-price="0"
value="{{$r->id}}"
class="form-check-input reserve">
<label for="rv{{$k}}" class="form-check-label">
&nbsp;
اضافه شدن به سفارش با مبلغ:
<b>
({{number_format($r->total_price)}})
</b>
و به آدرس:
<b>
{{$r->customer->address}}
</b>
و زمان سفارش:
<b>
{{$r->created_at->diffForHumans()}}
</b>
</label>
</li>
@endforeach
@endif
</li>
@endforeach
@if(count($resevers) > 0)
@foreach($resevers as $k=> $r)
<li class="list-group-item">
<input id="rv{{$k}}" type="radio" name="invoice_id"
data-price="0"
value="{{$r->id}}"
class="form-check-input reserve">
<label for="rv{{$k}}" class="form-check-label">
</ul>
<div class="p-5 py-3" id="resv">
<div class="form-check form-switch">
<input name="reserve" class="form-check-input" type="checkbox" role="switch"
id="flexSwitchCheckDefault">
<label class="form-check-label"
for="flexSwitchCheckDefault">{{__("Reserve order for :H hours",['H'=>\App\Helpers\getSetting('reserve')])}}</label>
</div>
</div>
@endif
<div>
<div class="text-left p-3">
@if(auth('customer')->check() && auth('customer')->user()->colleague == 1)
<div class="p-3 ">
اگر همکاری هستید آدرس مشتری را در این قسمت بنویسید
</div>
@endif
<label class="desc">
{{__("Description")}}
</label>
<br>
<textarea
placeholder="{{__("If you have any description about your order write here...")}}"
name="desc" class="form-control" id="desc" rows="3"></textarea>
</div>
{{-- <div >--}}
{{-- {{__("Total amount")}}--}}
{{-- <hr>--}}
{{-- <span id="total-card">--}}
{{-- {{number_format($tot)}}--}}
{{-- </span>--}}
{{-- {{config('app.currency_type')}}--}}
{{-- </div>--}}
&nbsp;
اضافه شدن به سفارش با مبلغ:
<b>
({{number_format($r->total_price)}})
</b>
و به آدرس:
<b>
{{$r->customer->address}}
</b>
و زمان سفارش:
<b>
{{$r->created_at->diffForHumans()}}
</b>
</label>
</li>
@endforeach
</div>
</div>
<div id="step3" class="step">
<div >
<label class="text-start d-block">
{{__("Discount code")}}
</label>
<div class="row">
<div class="col-md-6">
<input type="text" class="form-control" id="discount-code" name="discount"
placeholder="{{__("Discount code")}}">
</div>
<div class="col-md-6">
<div class="btn btn-primary" id="discount" data-discount="{}"
data-url="{{route('discount')}}">
{{__("Check discount")}}
</div>
</div>
</div>
</div>
@if (!Auth::guard('customer')->check())
<br>
<div class="alert alert-warning">
شما ثبت نام نکرده اید.
<br>
لطفا پیش از ادامه ثبت نام کنید یا وارد شوید
</div>
@endif
</ul>
</div>
<div class="p-5 py-3" id="resv">
<div class="form-check form-switch">
<input name="reserve" class="form-check-input" type="checkbox" role="switch"
id="flexSwitchCheckDefault">
<label class="form-check-label"
for="flexSwitchCheckDefault">{{__("Reserve order for :H hours",['H'=>\App\Helpers\getSetting('reserve')])}}</label>
</div>
</div>
</div>
@endif
<div class="alert alert-info">
<h2>
{{__("Final amount")}}:
<div class="float-end">
<div class="col-md-3">
<div class="alert alert-info text-center">
<b class="text-dark display-block mb-2">
مبلغ قابل پرداخت
</b>
<h5>
<div>
<span id="last-price">
{{number_format($tot)}}
</span>
{{config('app.currency_type')}}
</div>
</h2>
<hr>
&nbsp;@if (Auth::guard('customer')->check())
خریدار:
{{auth('customer')->user()->name}} -
موبایل: {{auth('customer')->user()->mobile}}
<hr>
<h5>
{{__("choose addrress")}}:
</h5>
<div class="p-2">
<label>
<input type="radio" name="address_id" value="0" checked>
{{auth('customer')->user()->address}} - کد
پستی: {{auth('customer')->user()->postal_code??'X'}}
</label>
</div>
@foreach(auth('customer')->user()->addresses as $ad)
{{config('app.currency_type')}}
</div>
</h5>
&nbsp;@if (Auth::guard('customer')->check())
خریدار:
{{auth('customer')->user()->name}} -
موبایل: {{auth('customer')->user()->mobile}}
<hr>
<h5>
{{__("choose addrress")}}:
</h5>
<div class="p-2">
<label>
<input type="radio" name="address_id" value="0" checked>
{{auth('customer')->user()->address}} - کد
پستی: {{auth('customer')->user()->postal_code??'X'}}
</label>
</div>
@foreach(auth('customer')->user()->addresses as $ad)
<div class="p-2">
<label>
<input type="radio" name="address_id" value="{{$ad->id}}">
{{$ad->address}}
</label>
</div>
@endforeach
@if(strlen(auth('customer')->user()->address) < 10)
تا زمانی که اطلاعات خود را تکمیل نکنید امکان ثبت سفارش ندارید
<br>
<a href="{{route('customer')}}" class="btn btn-warning">
تکمیل اطلاعات
</a>
@else
<button type="submit" class="btn btn-success float-end me-3 ms-3">
<i class="far fa-credit-card"></i>
پرداخت از درگاه های آنلاین
</button>
<button type="submit" class="btn btn-secondary float-end " name="nopay" value="no-payment">
<i class="far fa-credit-card"></i>
ثبت سفارش پرداخت اعتباری + آنلاین
</button>
<br>
<br>
@endif
&nbsp;@else
{{__("Register or login to complete purchase")}}
<a href="{{route('sign')}}">
<i class="fa fa-user"></i>
<span>
ثبت نام یا ورود
<div class="p-2">
<label>
<input type="radio" name="address_id" value="{{$ad->id}}">
{{$ad->address}}
</label>
</div>
@endforeach
@if(strlen(auth('customer')->user()->address) < 10)
تا زمانی که اطلاعات خود را تکمیل نکنید امکان ثبت سفارش ندارید
<br>
<a href="{{route('customer')}}" class="btn btn-warning">
تکمیل اطلاعات
</a>
@else
<button type="submit" class="btn btn-success float-end me-3 ms-3">
<i class="far fa-credit-card"></i>
پرداخت از درگاه های آنلاین
</button>
<button type="submit" class="btn btn-secondary float-end " name="nopay" value="no-payment">
<i class="far fa-credit-card"></i>
ثبت سفارش پرداخت اعتباری + آنلاین
</button>
<br>
<br>
@endif
&nbsp;@else
{{-- {{__("Register or login to complete purchase")}}--}}
<hr>
<br>
<a href="{{route('sign')}}" class="btn btn-primary w-100">
<i class="fa fa-user"></i>
<span>
برای ادامه لطفا ثبت نام / ورود کنید
</span>
</a>
@endif
</a>
@endif
</div>
</div>
</div>
@if(auth('customer')->user()->colleague??null)
<textarea name="address_alt" class="form-control mb-2" rows="4"
placeholder="{{__("Alternative address")}}">{{old('address_alt')}}</textarea>
<hr>
@endif
</form>
</div>
</section>
</section>
</div>
@else
<div class="container text-center">

@ -10,68 +10,211 @@
{{__("Dear customer, Please complete your information")}}
</div>
@else
<div class="alert alert-info">
{{__("Hello")}}, {{Auth::guard('customer')->user()->name}}
</div>
{{-- <div class="alert alert-info">--}}
{{-- {{__("Hello")}}, {{Auth::guard('customer')->user()->name}}--}}
{{-- </div>--}}
@endif
@if (\App\Helpers\cardCount() > 0)
<div class="alert alert-success overflow-hidden">
{{__("You have got :count products in your basket, Could you complete your purchase?",['count'=>\App\Helpers\cardCount()])}}
<br>
<a href="{{route('card.show')}}" class="btn btn-success w-50 d-block m-auto mt-2">
{{__("Complete your purchase")}}
</a>
</div>
@endif
@include('starter-kit::component.err')
<div class="row">
<div class="col-lg-2 col-md-3">
<div class="position-sticky" style="top:100px;">
<ul class="list-group" id="profile-tab">
<li class="list-group-item active" data-id="#profile">
<div class="col-lg-3 col-md-4 mb-5">
<div class="position-sticky" style="top:100px;box-shadow: 0 0 4px #00000044;">
<div class="text-center">
<div class="py-2">
<img src="https://www.gravatar.com/avatar/{{Auth::guard('customer')->user()->email}}?s=64" alt="profile" class="rounded-circle">
</div>
<h5>
{{Auth::guard('customer')->user()->name}}
</h5>
</div>
<ul id="profile-tab">
<li class="active" data-id="#dashboard">
<span>
<i class="fa fa-home"></i>
{{__("Dashboard")}}
</span>
</li>
<li class="" data-id="#profile">
<span>
<i class="fa fa-user-cog"></i>
{{__("Profile")}}
</span>
</li>
<li class="list-group-item" data-id="#invoices">
<li data-id="#invoices">
<span>
<i class="fa fa-credit-card"></i>
{{__("Your invoices")}}
</span>
</li>
<li class="list-group-item" data-id="#tickets">
<li data-id="#address">
<span>
<i class="fa fa-map-pin"></i>
{{__("Addresses")}}
</span>
</li>
<li data-id="#tickets">
<span>
<i class="fa fa-envelopes-bulk"></i>
{{__("Tickets")}}
</span>
</li>
<li class="list-group-item" data-id="#new">
<li data-id="#new">
<span>
<i class="fa fa-envelope-open"></i>
{{__("Send new ticket")}}
</span>
</li>
<li data-id="#crt">
<span>
<i class="fa fa-coins"></i>
مدیریت کیف پول
</span>
</li>
<li data-id="#favs">
<span>
<i class="fa fa-heart"></i>
{{__("Favorites")}}
</span>
</li>
@if(!(auth('customer')->user()->colleague??null))
<li class="list-group-item" data-id="#req">
<li data-id="#req">
<span>
<i class="fa fa-user-check"></i>
{{__("Application request")}}
</span>
</li>
@endif
<li class="list-group-item" data-id="#crt">
{{__("Credit")}}
</li>
<li class="list-group-item" data-id="#favs">
{{__("Favorites")}}
</li>
<li class="list-group-item" data-id="#address">
{{__("Addresses")}}
</li>
<li class="list-group-item">
<li>
<a href="{{route('logout')}}">
<i class="fa fa-user-lock"></i>
{{__("Logout")}}
</a>
</li>
</ul>
</div>
</div>
<div class="col-lg-10 col-md-9">
<div id="profile" class="active profile-tab">
<div class="col-lg-9 col-md-8">
<div id="dashboard" class="active profile-tab">
<div class="container my-3">
<div class="gird4">
<div>
<a>
<i class="fa fa-location-pin-lock"></i>
<h1>
{{auth('customer')->user()->addresses()->count()+1}}
</h1>
<h5>
آدرس ها
</h5>
</a>
</div>
<div>
<div>
<i class="fa fa-headset"></i>
<h1>
{{auth('customer')->user()->tickets()->count()}}
</h1>
<h5>
پشتیبانی
</h5>
</div>
</div>
<div>
<div>
<i class="fa fa-bag-shopping"></i>
<h1>
{{auth('customer')->user()->invoices()->count()}}
</h1>
<h5>
سفارش‌ها
</h5>
</div>
</div>
<div>
<div>
<i class="fa fa-wallet"></i>
<h1>
{{number_format(auth('customer')->user()->credit)}}
<small style="font-size: 20px">
{{config('app.currency_type')}}
</small>
</h1>
<h5>
موجودی کیف پول
</h5>
</div>
</div>
</div>
@if (\App\Helpers\cardCount() > 0)
<div class="alert alert-success overflow-hidden w-100">
{{__("You have got :count products in your basket, Could you complete your purchase?",['count'=>\App\Helpers\cardCount()])}}
<br>
<a href="{{route('card.show')}}" class="btn btn-success w-50 d-block m-auto mt-2">
{{__("Complete your purchase")}}
</a>
</div>
@endif
<div class="alert border-1 border-secondary" style="min-height: 14rem">
<h5>
آخرین سفارش ها
</h5>
@if(auth('customer')->user()->invoices()->count() > 0)
<table class="table table-striped w-100 text-center " >
<tr>
<td>
شماره
</td>
<td>
مبلغ
</td>
<td>
وضعیت
</td>
<td>
زمان
</td>
</tr>
@foreach(auth('customer')->user()->invoices()->limit(5)->get() as $in )
<tr>
<td>
{{$in->id}}
</td>
<td>
{{number_format($in->total_price)}}
{{config('app.currency_type')}}
</td>
<td>
{{__($in->status)}}
</td>
<td>
{{$in->created_at->diffForHumans()}}
</td>
</tr>
@endforeach
</table>
@else
<div class="alert alert-secondary">
سفارشی ثبت نشده است
<a href="{{route('welcome')}}" class="btn btn-success w-25 d-block m-auto mt-2">
رفتن به فروشگاه
</a>
</div>
@endif
</div>
</div>
</div>
<div id="profile" class="profile-tab">
<form class="p-3" method="post" action="{{route('profile')}}">
@csrf
<div class="row">
<div class="col-md-6 mt-3">
<div class="form-group">
<label for="name">
{{__('Name')}}
نام و نام خانوادگی
</label>
<input name="name" type="text"
class="form-control @error('name') is-invalid @enderror"
@ -104,7 +247,7 @@
<div class="col-md-4 mt-3">
<div class="form-group">
<label for="mobile">
{{__('Mobile')}}
موبایل
</label>
<input name="mobile" readonly type="text"
class="form-control @error('mobile') is-invalid @enderror"
@ -116,7 +259,7 @@
<div class="col-md-4 mt-3">
<div class="form-group">
<label for="description">
{{__('Description')}}/{{__("Page name")}}/{{__("Store")}}
{{__("Page name")}}/{{__("Store")}}
</label>
<input name="description" type="text"
class="form-control @error('description') is-invalid @enderror"
@ -149,7 +292,7 @@
<div class="col-md-3">
<div class="form-group">
<label for="state"
class="col-md-4 col-form-label text-md-right">{{ __('State') }}</label>
class=" mt-3">{{ __('State') }}</label>
<select id="state" data-val="{{old('state',$customer->state??null)}}"
type="text"
class="form-control @error('state') is-invalid @enderror" name="state"
@ -160,7 +303,7 @@
<div class="col-md-3">
<div class="form-group">
<label for="city"
class="col-md-4 col-form-label text-md-right">{{ __('City') }}</label>
class=" mt-3">{{ __('City') }}</label>
<select id="city" data-val="{{old('city',$customer->city??null)}}" type="text"
class="form-control @error('city') is-invalid @enderror" name="city"
required>
@ -198,7 +341,7 @@
</tr>
</thead>
<tbody>
@foreach(\App\Models\Invoice::whereCustomerId(auth('customer')->id())->with('successPayments')->get() as $invoice)
@foreach(\App\Models\Invoice::whereCustomerId(auth('customer')->id())->orderBy('id','desc')->with('successPayments')->get() as $invoice)
<tr class="{{$invoice->status===\App\Models\Invoice::COMPLETED?'text-success':''}}">
<td>{{$loop->index+1}}</td>
<td style="width: 45%">
@ -381,11 +524,20 @@
<div id="favs" class="profile-tab">
<div class="row">
@foreach(auth('customer')->user()->products as $p)
<div class="col-md-3">
@include('website.component.pro',['p' => $p])
@if(auth('customer')->user()->products()->count() == 0)
<div class="alert alert-secondary">
محصولی به علاقه‌مندی هایتان اضافه نشده است.
<a href="{{route('welcome')}}" class="btn btn-success w-25 d-block m-auto mt-2">
رفتن به فروشگاه
</a>
</div>
@endforeach
@else
@foreach(auth('customer')->user()->products as $p)
<div class="col-md-3">
@include('website.component.pro',['p' => $p])
</div>
@endforeach
@endif
</div>
</div>
<div id="address" class="profile-tab">
@ -400,7 +552,8 @@
@foreach(auth('customer')->user()->addresses as $ad)
<li class="list-group-item">
{{$ad->address}}
<a href="{{route('customer.remaddress',$ad->id)}}" class="btn btn-danger delete-confirm float-end">
<a href="{{route('customer.remaddress',$ad->id)}}"
class="btn btn-danger delete-confirm float-end">
<span class="fa fa-times"></span>
</a>
</li>
@ -420,7 +573,8 @@
class="col-md-4 col-form-label text-md-right">{{ __('State') }}</label>
<select id="state_" data-val="{{old('state',$customer->state??null)}}"
type="text"
class="form-control @error('state') is-invalid @enderror" name="state"
class="form-control @error('state') is-invalid @enderror"
name="state"
required>
</select>
</div>
@ -429,7 +583,8 @@
<div class="form-group">
<label for="city_"
class="col-md-4 col-form-label text-md-right">{{ __('City') }}</label>
<select id="city_" data-val="{{old('city',$customer->city??null)}}" type="text"
<select id="city_" data-val="{{old('city',$customer->city??null)}}"
type="text"
class="form-control @error('city') is-invalid @enderror" name="city"
required>
</select>

Loading…
Cancel
Save