fix card and customer

pull/1/head
A1Gard 1 year ago
parent 24e73c3ff2
commit 819f8b7eea

@ -1261,6 +1261,94 @@ nav a {
display: block; 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 { .txt-area {
white-space: pre-line; white-space: pre-line;
} }

@ -11073,6 +11073,57 @@ tr.border-bottom td {
transform: scale(1); 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 { .x-mega-menu {
background: #eeeeee; background: #eeeeee;
display: grid; 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 { .txt-area {
white-space: pre-line; 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 "css/icofont/icofont.min.css";
@import "../sass/preloader"; @import "../sass/preloader";
@import "css/style.css"; @import "css/style.css";
@import "card";
$main-color: #0085a7; $main-color: #0085a7;
$invert-text-color: white; $invert-text-color: white;

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

@ -10,68 +10,211 @@
{{__("Dear customer, Please complete your information")}} {{__("Dear customer, Please complete your information")}}
</div> </div>
@else @else
<div class="alert alert-info"> {{-- <div class="alert alert-info">--}}
{{__("Hello")}}, {{Auth::guard('customer')->user()->name}} {{-- {{__("Hello")}}, {{Auth::guard('customer')->user()->name}}--}}
</div> {{-- </div>--}}
@endif @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') @include('starter-kit::component.err')
<div class="row"> <div class="row">
<div class="col-lg-2 col-md-3"> <div class="col-lg-3 col-md-4 mb-5">
<div class="position-sticky" style="top:100px;"> <div class="position-sticky" style="top:100px;box-shadow: 0 0 4px #00000044;">
<ul class="list-group" id="profile-tab"> <div class="text-center">
<li class="list-group-item active" data-id="#profile"> <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")}} {{__("Profile")}}
</span>
</li> </li>
<li class="list-group-item" data-id="#invoices"> <li data-id="#invoices">
<span>
<i class="fa fa-credit-card"></i>
{{__("Your invoices")}} {{__("Your invoices")}}
</span>
</li> </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")}} {{__("Tickets")}}
</span>
</li> </li>
<li class="list-group-item" data-id="#new"> <li data-id="#new">
<span>
<i class="fa fa-envelope-open"></i>
{{__("Send new ticket")}} {{__("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> </li>
@if(!(auth('customer')->user()->colleague??null)) @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")}} {{__("Application request")}}
</span>
</li> </li>
@endif @endif
<li class="list-group-item" data-id="#crt"> <li>
{{__("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">
<a href="{{route('logout')}}"> <a href="{{route('logout')}}">
<i class="fa fa-user-lock"></i>
{{__("Logout")}} {{__("Logout")}}
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="col-lg-10 col-md-9"> <div class="col-lg-9 col-md-8">
<div id="profile" class="active profile-tab"> <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')}}"> <form class="p-3" method="post" action="{{route('profile')}}">
@csrf @csrf
<div class="row"> <div class="row">
<div class="col-md-6 mt-3"> <div class="col-md-6 mt-3">
<div class="form-group"> <div class="form-group">
<label for="name"> <label for="name">
{{__('Name')}} نام و نام خانوادگی
</label> </label>
<input name="name" type="text" <input name="name" type="text"
class="form-control @error('name') is-invalid @enderror" class="form-control @error('name') is-invalid @enderror"
@ -104,7 +247,7 @@
<div class="col-md-4 mt-3"> <div class="col-md-4 mt-3">
<div class="form-group"> <div class="form-group">
<label for="mobile"> <label for="mobile">
{{__('Mobile')}} موبایل
</label> </label>
<input name="mobile" readonly type="text" <input name="mobile" readonly type="text"
class="form-control @error('mobile') is-invalid @enderror" class="form-control @error('mobile') is-invalid @enderror"
@ -116,7 +259,7 @@
<div class="col-md-4 mt-3"> <div class="col-md-4 mt-3">
<div class="form-group"> <div class="form-group">
<label for="description"> <label for="description">
{{__('Description')}}/{{__("Page name")}}/{{__("Store")}} {{__("Page name")}}/{{__("Store")}}
</label> </label>
<input name="description" type="text" <input name="description" type="text"
class="form-control @error('description') is-invalid @enderror" class="form-control @error('description') is-invalid @enderror"
@ -149,7 +292,7 @@
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"> <div class="form-group">
<label for="state" <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)}}" <select id="state" data-val="{{old('state',$customer->state??null)}}"
type="text" type="text"
class="form-control @error('state') is-invalid @enderror" name="state" class="form-control @error('state') is-invalid @enderror" name="state"
@ -160,7 +303,7 @@
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"> <div class="form-group">
<label for="city" <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" <select id="city" data-val="{{old('city',$customer->city??null)}}" type="text"
class="form-control @error('city') is-invalid @enderror" name="city" class="form-control @error('city') is-invalid @enderror" name="city"
required> required>
@ -198,7 +341,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <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':''}}"> <tr class="{{$invoice->status===\App\Models\Invoice::COMPLETED?'text-success':''}}">
<td>{{$loop->index+1}}</td> <td>{{$loop->index+1}}</td>
<td style="width: 45%"> <td style="width: 45%">
@ -381,11 +524,20 @@
<div id="favs" class="profile-tab"> <div id="favs" class="profile-tab">
<div class="row"> <div class="row">
@foreach(auth('customer')->user()->products as $p) @if(auth('customer')->user()->products()->count() == 0)
<div class="col-md-3"> <div class="alert alert-secondary">
@include('website.component.pro',['p' => $p]) محصولی به علاقه‌مندی هایتان اضافه نشده است.
<a href="{{route('welcome')}}" class="btn btn-success w-25 d-block m-auto mt-2">
رفتن به فروشگاه
</a>
</div> </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> </div>
<div id="address" class="profile-tab"> <div id="address" class="profile-tab">
@ -400,7 +552,8 @@
@foreach(auth('customer')->user()->addresses as $ad) @foreach(auth('customer')->user()->addresses as $ad)
<li class="list-group-item"> <li class="list-group-item">
{{$ad->address}} {{$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> <span class="fa fa-times"></span>
</a> </a>
</li> </li>
@ -420,7 +573,8 @@
class="col-md-4 col-form-label text-md-right">{{ __('State') }}</label> class="col-md-4 col-form-label text-md-right">{{ __('State') }}</label>
<select id="state_" data-val="{{old('state',$customer->state??null)}}" <select id="state_" data-val="{{old('state',$customer->state??null)}}"
type="text" type="text"
class="form-control @error('state') is-invalid @enderror" name="state" class="form-control @error('state') is-invalid @enderror"
name="state"
required> required>
</select> </select>
</div> </div>
@ -429,7 +583,8 @@
<div class="form-group"> <div class="form-group">
<label for="city_" <label for="city_"
class="col-md-4 col-form-label text-md-right">{{ __('City') }}</label> 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" class="form-control @error('city') is-invalid @enderror" name="city"
required> required>
</select> </select>

Loading…
Cancel
Save