diff --git a/resources/views/cart/index.blade.php b/resources/views/cart/index.blade.php index fe23d6e..8746b85 100644 --- a/resources/views/cart/index.blade.php +++ b/resources/views/cart/index.blade.php @@ -3,134 +3,9 @@ @section('content') -@if (! CartCollection::isEmpty()) -
-@endif +@includeWhen (! CartCollection::isEmpty(), 'cart.partials.transaction-draft-tabs') @if ($draft) -| Produk | -Harga Satuan ({{ $draft->type }}) | -Action | -
|---|---|---|
| {{ $product->name }} | -{{ formatRp($draft->type == 'cash' ? $product->cash_price : $product->credit_price) }} | -- - | -
| - Produk tidak ditemukan dengan keyword : {{ request('query') }} - | -||
| # | -Nama Item | -Harga Satuan | -Diskon per Item | -Qty | -Subtotal | -Action | -
|---|---|---|---|---|---|---|
| {{ $key + 1 }} | -{{ $item->name }} | -{{ formatRp($item->price) }} | -- {{ Form::open(['route' => ['cart.update-draft-item', $draft->draftKey], 'method' => 'patch']) }} - {{ Form::hidden('item_key', $key) }} - {{ Form::hidden('qty', $item->qty) }} - {{ Form::text('item_discount', $item->item_discount, ['id' => 'item_discount-' . $key, 'style' => 'width:100px;text-align:right']) }} - {{ Form::submit('update-item-' . $key, ['style'=>'display:none']) }} - {{ Form::close() }} - | -- {{ Form::open(['route' => ['cart.update-draft-item', $draft->draftKey], 'method' => 'patch']) }} - {{ Form::hidden('item_key', $key) }} - {{ Form::hidden('item_discount', $item->item_discount) }} - {{ Form::number('qty', $item->qty, ['id' => 'qty-' . $key, 'style' => 'width:50px;text-align:center']) }} - {{ Form::submit('update-item-' . $key, ['style'=>'display:none']) }} - {{ Form::close() }} - | -{{ formatRp($item->subtotal) }} | -- {!! FormField::delete([ - 'route' => ['cart.remove-draft-item', $draft->draftKey], - 'onsubmit' => 'Yakin ingin menghapus Item ini?', - 'class' => '', - ], 'x', ['id' => 'remove-item-' . $key, 'class' => 'btn btn-danger btn-xs'], ['item_index' => $key]) !!} - | -
| Subtotal : | -{{ formatRp($draft->getSubtotal()) }} | -- | ||||
| Diskon Total : | -{{ formatRp($draft->getDiscountTotal()) }} | -- | ||||
| Total : | -{{ formatRp($draft->getTotal()) }} | -- | ||||
| # | +Nama Item | +Harga Satuan | +Diskon per Item | +Qty | +Subtotal | +Action | +
|---|---|---|---|---|---|---|
| {{ $key + 1 }} | +{{ $item->name }} | +{{ formatRp($item->price) }} | ++ {{ Form::open(['route' => ['cart.update-draft-item', $draft->draftKey], 'method' => 'patch']) }} + {{ Form::hidden('item_key', $key) }} + {{ Form::hidden('qty', $item->qty) }} + {{ Form::text('item_discount', $item->item_discount, ['id' => 'item_discount-' . $key, 'style' => 'width:100px;text-align:right']) }} + {{ Form::submit('update-item-' . $key, ['style'=>'display:none']) }} + {{ Form::close() }} + | ++ {{ Form::open(['route' => ['cart.update-draft-item', $draft->draftKey], 'method' => 'patch']) }} + {{ Form::hidden('item_key', $key) }} + {{ Form::hidden('item_discount', $item->item_discount) }} + {{ Form::number('qty', $item->qty, ['id' => 'qty-' . $key, 'style' => 'width:50px;text-align:center']) }} + {{ Form::submit('update-item-' . $key, ['style'=>'display:none']) }} + {{ Form::close() }} + | +{{ formatRp($item->subtotal) }} | ++ {!! FormField::delete([ + 'route' => ['cart.remove-draft-item', $draft->draftKey], + 'onsubmit' => 'Yakin ingin menghapus Item ini?', + 'class' => '', + ], 'x', ['id' => 'remove-item-' . $key, 'class' => 'btn btn-danger btn-xs'], ['item_index' => $key]) !!} + | +
| Subtotal : | +{{ formatRp($draft->getSubtotal()) }} | ++ | ||||
| Diskon Total : | +{{ formatRp($draft->getDiscountTotal()) }} | ++ | ||||
| Total : | +{{ formatRp($draft->getTotal()) }} | ++ | ||||
| Produk | +Harga Satuan ({{ $draft->type }}) | +Action | +
|---|---|---|
| {{ $product->name }} | +{{ formatRp($draft->type == 'cash' ? $product->cash_price : $product->credit_price) }} | ++ + | +
| + Produk tidak ditemukan dengan keyword : {{ request('query') }} + | +||