fix card and customer

pull/1/head
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,21 +4,34 @@
@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>
لطفا پیش از ادامه ثبت نام کنید یا وارد شوید
<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>
@endif
<div class="step step2" data-id="step2" data-done=".progress-step .step1,.progress-step .step2">
<i class="fa fa-truck-fast"></i>
اطلاعات ارسال
</div>
<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="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-bordered table-striped table-hover"
<table class="table table-hover table-responsive-lg"
id="card-table">
<tr>
<th>
@ -168,58 +181,26 @@
</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>
</div>
</td>
</tr>
</table>
</div>
<div class="alert alert-success text-center">
شما می‌توانید محصولات را رزرو کنید , برای اینکار به مرحله بعدی بروید و
<b>
گزینه فعال سازی
حالت
رزرو
</b>
@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
را انتخاب کنید
</div>
</div>
<div id="step2" class="step">
@if(count($transports) > 0)
<div class="card mb-2">
<h4 class="card-header">
<h5>
{{__("Transport method")}}
</h4>
<div class="card-body">
</h5>
<ul class="list-group">
@foreach($transports as $k=> $t)
<li class="list-group-item">
@ -268,7 +249,6 @@
@endforeach
@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"
@ -277,19 +257,78 @@
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
<div class="alert alert-info">
<h2>
{{__("Final amount")}}:
<div class="float-end">
<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>--}}
</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
</div>
</div>
</div>
<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>
</h5>
&nbsp;@if (Auth::guard('customer')->check())
خریدار:
{{auth('customer')->user()->name}} -
@ -333,15 +372,27 @@
<br>
@endif
&nbsp;@else
{{__("Register or login to complete purchase")}}
<a href="{{route('sign')}}">
{{-- {{__("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
</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>

@ -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 data-id="#address">
<span>
<i class="fa fa-map-pin"></i>
{{__("Addresses")}}
</span>
</li>
<li class="list-group-item" data-id="#tickets">
<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>
@if(!(auth('customer')->user()->colleague??null))
<li class="list-group-item" data-id="#req">
{{__("Application request")}}
</li>
@endif
<li class="list-group-item" data-id="#crt">
{{__("Credit")}}
<li data-id="#crt">
<span>
<i class="fa fa-coins"></i>
مدیریت کیف پول
</span>
</li>
<li class="list-group-item" data-id="#favs">
<li data-id="#favs">
<span>
<i class="fa fa-heart"></i>
{{__("Favorites")}}
</span>
</li>
<li class="list-group-item" data-id="#address">
{{__("Addresses")}}
@if(!(auth('customer')->user()->colleague??null))
<li data-id="#req">
<span>
<i class="fa fa-user-check"></i>
{{__("Application request")}}
</span>
</li>
<li class="list-group-item">
@endif
<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">
@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>
@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