Skip to content

Commit

Permalink
tab issue and cancel order fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
shivendra-webkul committed Jun 23, 2023
1 parent a3c65c3 commit e5d725f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public function cancel($id)
$result = $this->orderRepository->cancel($order);

if ($result) {
session()->flash('success', trans('shop::app.response.cancel-success', ['name' => trans('admin::app.customers.account.orders.order')]));
session()->flash('success', trans('shop::app.customers.account.orders.view.cancel-success', ['name' => trans('admin::app.customers.account.orders.order')]));
} else {
session()->flash('error', trans('shop::app.response.cancel-error', ['name' => trans('admin::app.customers.account.orders.order')]));
session()->flash('error', trans('shop::app.customers.account.orders.view.cancel-error', ['name' => trans('admin::app.customers.account.orders.order')]));
}

return redirect()->back();
Expand Down
2 changes: 2 additions & 0 deletions packages/Webkul/Shop/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
'payment-method' => 'Payment Method',
'cancel-btn-title' => 'Cancel',
'cancel-confirm-msg' => 'Are you sure you want to cancel this order ?',
'cancel-success' => 'Your order has been canceled',
'cancel-error' => 'Your order can not be canceled.',

'information' => [
'info' => 'Information',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
@props(['position' => 'left'])

<v-tabs position="{{ $position }}">
<v-tabs
position="{{ $position }}"
{{ $attributes }}
>
<x-shop::shimmer.tabs></x-shop::shimmer.tabs>
</v-tabs>

@pushOnce('scripts')
<script type="text/x-template" id="v-tabs-template">
<div>
<div
class="flex bg-[#F5F5F5] pt-[18px] gap-[30px] justify-center mt-20 max-1180:hidden"
{{ $attributes->merge(['class' => 'flex bg-[#F5F5F5] pt-[18px] gap-[30px] justify-center mt-20 max-1180:hidden']) }}
:style="positionStyles"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
{!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}

<div>
<x-shop::tabs>
<x-shop::tabs.item
<x-shop::tabs class="!mt-5">
<x-shop::tabs.item class="!p-0 !mt-5"
title="{{ __('shop::app.customers.account.orders.view.information.info') }}"
:is-selected="true"
>
<div>
<div class="text-[15px] font-medium">
<label>
@lang('shop::app.customers.account.orders.view.information.placed-on')
</label>
Expand Down Expand Up @@ -334,16 +334,17 @@ class="px-6 py-[16px] text-black font-medium"
<x-shop::tabs.item title="{{ __('shop::app.customers.account.orders.view.invoices.invoices') }}">

@foreach ($order->invoices as $invoice)
<div class="secton-title">
<a href="{{ route('shop.customers.account.orders.print-invoice', $invoice->id) }}">
@lang('shop::app.customers.account.orders.view.invoices.print')
</a>
</div>

<div>
<label>
<span>{{ __('shop::app.customers.account.orders.view.invoices.individual-invoice', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}</span>
</label>
<div class="flex justify-between items-center">
<div class="">
<p class="text-[15px] font-medium">
{{ __('shop::app.customers.account.orders.view.invoices.individual-invoice', ['invoice_id' => $invoice->increment_id ?? $invoice->id]) }}
</p>
</div>
<div class="flex items-center gap-x-[10px] border border-[#E9E9E9] rounded-[12px] py-[12px] px-[20px] cursor-pointer">
<a href="{{ route('shop.customers.account.orders.print-invoice', $invoice->id) }}">
@lang('shop::app.customers.account.orders.view.invoices.print')
</a>
</div>
</div>

<div class="relative overflow-x-auto border rounded-[12px] mt-[30px]">
Expand Down Expand Up @@ -547,7 +548,7 @@ class="px-6 py-[16px] text-black font-medium"

@foreach ($order->shipments as $shipment)
<div>
<label>
<label class="text-[15px] font-medium">
@lang('shop::app.customers.account.orders.view.shipments.tracking-number')
</label>

Expand All @@ -556,7 +557,7 @@ class="px-6 py-[16px] text-black font-medium"
</span>
</div>

<div>
<div class="text-[15px] font-medium">
<span>{{ __('shop::app.customers.account.orders.view.shipments.individual-shipment', ['shipment_id' => $shipment->id]) }}</span>
</div>

Expand Down Expand Up @@ -624,12 +625,10 @@ class="px-6 py-[16px] text-black font-medium"
title="{{ __('shop::app.customers.account.orders.view.refunds.refunds') }}"
>
@foreach ($order->refunds as $refund)
<div>
<label>
<span>
{{ __('shop::app.customers.account.orders.view.refunds.individual-refund', ['refund_id' => $refund->id]) }}
</span>
</label>
<div class="text-[15px] font-medium">
<span>
{{ __('shop::app.customers.account.orders.view.refunds.individual-refund', ['refund_id' => $refund->id]) }}
</span>
</div>

<div class="relative overflow-x-auto border rounded-[12px] mt-[30px]">
Expand Down

0 comments on commit e5d725f

Please sign in to comment.