Merge pull request #44 from FahimAnzamDip/dev

Updated to Livewire v3
This commit is contained in:
Fahim Anzam Dip 2023-09-21 02:17:37 +06:00 committed by GitHub
commit 37cbc22fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 800 additions and 527 deletions

View File

@ -26,6 +26,9 @@ class ProductDataTable extends DataTable
->addColumn('product_price', function ($data) {
return format_currency($data->product_price);
})
->addColumn('product_cost', function ($data) {
return format_currency($data->product_cost);
})
->addColumn('product_quantity', function ($data) {
return $data->product_quantity . ' ' . $data->product_unit;
})
@ -66,14 +69,22 @@ class ProductDataTable extends DataTable
->title('Image')
->className('text-center align-middle'),
Column::make('product_name')
->title('Name')
Column::make('category.category_name')
->title('Category')
->className('text-center align-middle'),
Column::make('product_code')
->title('Code')
->className('text-center align-middle'),
Column::make('product_name')
->title('Name')
->className('text-center align-middle'),
Column::computed('product_cost')
->title('Cost')
->className('text-center align-middle'),
Column::computed('product_price')
->title('Price')
->className('text-center align-middle'),
@ -82,10 +93,6 @@ class ProductDataTable extends DataTable
->title('Quantity')
->className('text-center align-middle'),
Column::make('category.category_name')
->title('Category')
->className('text-center align-middle'),
Column::computed('action')
->exportable(false)
->printable(false)

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Adjustment;
namespace App\Livewire\Adjustment;
use Illuminate\Support\Collection;
use Livewire\Component;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Barcode;
namespace App\Livewire\Barcode;
use Livewire\Component;
use Milon\Barcode\Facades\DNS1DFacade;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Pos;
namespace App\Livewire\Pos;
use Gloudemans\Shoppingcart\Facades\Cart;
use Livewire\Component;
@ -38,7 +38,6 @@ class Checkout extends Component
public function hydrate() {
$this->total_amount = $this->calculateTotal();
$this->updatedCustomerId();
}
public function render() {
@ -51,7 +50,7 @@ class Checkout extends Component
public function proceed() {
if ($this->customer_id != null) {
$this->dispatchBrowserEvent('showCheckoutModal');
$this->dispatch('showCheckoutModal');
} else {
session()->flash('message', 'Please Select Customer!');
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Pos;
namespace App\Livewire\Pos;
use Livewire\Component;
@ -19,10 +19,10 @@ class Filter extends Component
}
public function updatedCategory() {
$this->emitUp('selectedCategory', $this->category);
$this->dispatch('selectedCategory', $this->category);
}
public function updatedShowCount() {
$this->emitUp('showCount', $this->category);
$this->dispatch('showCount', $this->category);
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Pos;
namespace App\Livewire\Pos;
use Livewire\Component;
use Livewire\WithPagination;
@ -46,6 +46,6 @@ class ProductList extends Component
}
public function selectProduct($product) {
$this->emit('productSelected', $product);
$this->dispatch('productSelected', $product);
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire;
namespace App\Livewire;
use Gloudemans\Shoppingcart\Facades\Cart;
use Illuminate\Support\Facades\Request;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Livewire\WithPagination;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Modules\Expense\Entities\Expense;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Livewire\WithPagination;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Livewire\WithPagination;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Livewire\WithPagination;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire\Reports;
namespace App\Livewire\Reports;
use Livewire\Component;
use Livewire\WithPagination;

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Livewire;
namespace App\Livewire;
use Illuminate\Support\Collection;
use Livewire\Component;
@ -41,6 +41,6 @@ class SearchProduct extends Component
}
public function selectProduct($product) {
$this->emit('productSelected', $product);
$this->dispatch('productSelected', $product);
}
}

View File

@ -13,7 +13,7 @@
"laravel/framework": "^10.0",
"laravel/tinker": "^2.5",
"laravel/ui": "^4.0",
"livewire/livewire": "^2.5",
"livewire/livewire": "^3.0",
"milon/barcode": "^10.0",
"nwidart/laravel-modules": "^10.0",
"realrashid/sweet-alert": "^6.0",

1005
composer.lock generated

File diff suppressed because it is too large Load Diff

158
config/livewire.php Normal file
View File

@ -0,0 +1,158 @@
<?php
return [
/*
|---------------------------------------------------------------------------
| Class Namespace
|---------------------------------------------------------------------------
|
| This value sets the root class namespace for Livewire component classes in
| your application. This value will change where component auto-discovery
| finds components. It's also referenced by the file creation commands.
|
*/
'class_namespace' => 'App\\Livewire',
/*
|---------------------------------------------------------------------------
| View Path
|---------------------------------------------------------------------------
|
| This value is used to specify where Livewire component Blade templates are
| stored when running file creation commands like `artisan make:livewire`.
| It is also used if you choose to omit a component's render() method.
|
*/
'view_path' => resource_path('views/livewire'),
/*
|---------------------------------------------------------------------------
| Layout
|---------------------------------------------------------------------------
| The view that will be used as the layout when rendering a single component
| as an entire page via `Route::get('/post/create', CreatePost::class);`.
| In this case, the view returned by CreatePost will render into $slot.
|
*/
'layout' => 'components.layouts.app',
/*
|---------------------------------------------------------------------------
| Lazy Loading Placeholder
|---------------------------------------------------------------------------
| Livewire allows you to lazy load components that would otherwise slow down
| the initial page load. Every component can have a custom placeholder or
| you can define the default placeholder view for all components below.
|
*/
'lazy_placeholder' => null,
/*
|---------------------------------------------------------------------------
| Temporary File Uploads
|---------------------------------------------------------------------------
|
| Livewire handles file uploads by storing uploads in a temporary directory
| before the file is stored permanently. All file uploads are directed to
| a global endpoint for temporary storage. You may configure this below:
|
*/
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
/*
|---------------------------------------------------------------------------
| Render On Redirect
|---------------------------------------------------------------------------
|
| This value determines if Livewire will run a component's `render()` method
| after a redirect has been triggered using something like `redirect(...)`
| Setting this to true will render the view once more before redirecting
|
*/
'render_on_redirect' => false,
/*
|---------------------------------------------------------------------------
| Eloquent Model Binding
|---------------------------------------------------------------------------
|
| Previous versions of Livewire supported binding directly to eloquent model
| properties using wire:model by default. However, this behavior has been
| deemed too "magical" and has therefore been put under a feature flag.
|
*/
'legacy_model_binding' => false,
/*
|---------------------------------------------------------------------------
| Auto-inject Frontend Assets
|---------------------------------------------------------------------------
|
| By default, Livewire automatically injects its JavaScript and CSS into the
| <head> and <body> of pages containing Livewire components. By disabling
| this behavior, you need to use @livewireStyles and @livewireScripts.
|
*/
'inject_assets' => true,
/*
|---------------------------------------------------------------------------
| Navigate (SPA mode)
|---------------------------------------------------------------------------
|
| By adding `wire:navigate` to links in your Livewire application, Livewire
| will prevent the default link handling and instead request those pages
| via AJAX, creating an SPA-like effect. Configure this behavior here.
|
*/
'navigate' => [
'show_progress_bar' => true,
],
/*
|---------------------------------------------------------------------------
| HTML Morph Markers
|---------------------------------------------------------------------------
|
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
| after each update. To make this process more reliable, Livewire injects
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
|
*/
'inject_morph_markers' => true,
/*
|---------------------------------------------------------------------------
| Pagination Theme
|---------------------------------------------------------------------------
|
| When enabling Livewire's pagination feature by using the `WithPagination`
| trait, Livewire will use Tailwind templates to render pagination views
| on the page. If you want Bootstrap CSS, you can specify: "bootstrap"
|
*/
'pagination_theme' => 'tailwind',
];

View File

@ -8,8 +8,6 @@
@yield('third_party_stylesheets')
@livewireStyles
@stack('page_css')
<style>

View File

@ -10,6 +10,4 @@
@yield('third_party_scripts')
@livewireScripts
@stack('page_scripts')

View File

@ -1,5 +1,5 @@
<footer class="c-footer">
<div>Triangle Pos © {{ date('Y') }} || Developed by <strong><a target="_blank" href="https://fahimanzamdip.github.io">Fahim Anzam Dip</a></strong></div>
<div>Triangle Pos © {{ date('Y') }} || Developed by <strong><a target="_blank" href="https://fahimanzam.netlify.app">Fahim Anzam Dip</a></strong></div>
<div class="mfs-auto d-md-down-none">Version <strong class="text-danger">1.1.0</strong></div>
<div class="mfs-auto d-md-down-none">Version <strong class="text-danger">1.0</strong></div>
</footer>

View File

@ -28,7 +28,7 @@
<td class="align-middle">{{ $product->product_name }}</td>
<td class="align-middle">{{ $product->product_code }}</td>
<td class="align-middle text-center" style="width: 200px;">
<input wire:model="quantity" class="form-control" type="number" min="1" max="100" value="{{ $quantity }}">
<input wire:model.live="quantity" class="form-control" type="number" min="1" max="100" value="{{ $quantity }}">
</td>
@else
<td colspan="3" class="text-center">

View File

@ -18,7 +18,7 @@
<span aria-hidden="true">&times;</span>
</button>
</div>
<form wire:submit.prevent="setProductDiscount('{{ $cart_item->rowId }}', '{{ $cart_item->id }}')" method="POST">
<form wire:submit="setProductDiscount('{{ $cart_item->rowId }}', '{{ $cart_item->id }}')" method="POST">
<div class="modal-body">
@if (session()->has('discount_message' . $cart_item->id))
<div class="alert alert-success alert-dismissible fade show" role="alert">
@ -32,7 +32,7 @@
@endif
<div class="form-group">
<label>Discount Type <span class="text-danger">*</span></label>
<select wire:model="discount_type.{{ $cart_item->id }}" class="form-control" required>
<select wire:model.live="discount_type.{{ $cart_item->id }}" class="form-control" required>
<option value="fixed">Fixed</option>
<option value="percentage">Percentage</option>
</select>
@ -40,10 +40,10 @@
<div class="form-group">
@if($discount_type[$cart_item->id] == 'percentage')
<label>Discount(%) <span class="text-danger">*</span></label>
<input wire:model.defer="item_discount.{{ $cart_item->id }}" type="number" class="form-control" value="{{ $item_discount[$cart_item->id] }}" min="0" max="100">
<input wire:model="item_discount.{{ $cart_item->id }}" type="number" class="form-control" value="{{ $item_discount[$cart_item->id] }}" min="0" max="100">
@elseif($discount_type[$cart_item->id] == 'fixed')
<label>Discount <span class="text-danger">*</span></label>
<input wire:model.defer="item_discount.{{ $cart_item->id }}" type="number" class="form-control" value="{{ $item_discount[$cart_item->id] }}">
<input wire:model="item_discount.{{ $cart_item->id }}" type="number" class="form-control" value="{{ $item_discount[$cart_item->id] }}">
@endif
</div>
</div>

View File

@ -1,6 +1,6 @@
<form wire:submit.prevent="updateQuantity('{{ $cart_item->rowId }}', '{{ $cart_item->id }}')">
<form wire:submit="updateQuantity('{{ $cart_item->rowId }}', '{{ $cart_item->id }}')">
<div class="input-group">
<input wire:model.defer="quantity.{{ $cart_item->id }}" style="min-width: 40px;max-width: 90px;" type="number" class="form-control" value="{{ $cart_item->qty }}" min="1">
<input wire:model="quantity.{{ $cart_item->id }}" style="min-width: 40px;max-width: 90px;" type="number" class="form-control" value="{{ $cart_item->qty }}" min="1">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">
<i class="bi bi-check"></i>

View File

@ -21,7 +21,7 @@
<i class="bi bi-person-plus"></i>
</a>
</div>
<select wire:model="customer_id" id="customer_id" class="form-control">
<select wire:model.live="customer_id" id="customer_id" class="form-control">
<option value="" selected>Select Customer</option>
@foreach($customers as $customer)
<option value="{{ $customer->id }}">{{ $customer->customer_name }}</option>
@ -116,19 +116,19 @@
<div class="col-lg-4">
<div class="form-group">
<label for="tax_percentage">Order Tax (%)</label>
<input wire:model.lazy="global_tax" type="number" class="form-control" min="0" max="100" value="{{ $global_tax }}" required>
<input wire:model.blur="global_tax" type="number" class="form-control" min="0" max="100" value="{{ $global_tax }}" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label for="discount_percentage">Discount (%)</label>
<input wire:model.lazy="global_discount" type="number" class="form-control" min="0" max="100" value="{{ $global_discount }}" required>
<input wire:model.blur="global_discount" type="number" class="form-control" min="0" max="100" value="{{ $global_discount }}" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label for="shipping_amount">Shipping</label>
<input wire:model.lazy="shipping" type="number" class="form-control" min="0" value="0" required step="0.01">
<input wire:model.blur="shipping" type="number" class="form-control" min="0" value="0" required step="0.01">
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
<div class="col-md-7">
<div class="form-group">
<label>Product Category</label>
<select wire:model="category" class="form-control">
<select wire:model.live="category" class="form-control">
<option value="">All Products</option>
@foreach($categories as $category)
<option value="{{ $category->id }}">{{ $category->category_name }}</option>
@ -14,7 +14,7 @@
<div class="col-md-5">
<div class="form-group">
<label>Product Count</label>
<select wire:model="showCount" class="form-control">
<select wire:model.live="showCount" class="form-control">
<option value="9">9 Products</option>
<option value="15">15 Products</option>
<option value="21">21 Products</option>

View File

@ -121,19 +121,19 @@
<div class="col-lg-4">
<div class="form-group">
<label for="tax_percentage">Tax (%)</label>
<input wire:model.lazy="global_tax" type="number" class="form-control" name="tax_percentage" min="0" max="100" value="{{ $global_tax }}" required>
<input wire:model.blur="global_tax" type="number" class="form-control" name="tax_percentage" min="0" max="100" value="{{ $global_tax }}" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label for="discount_percentage">Discount (%)</label>
<input wire:model.lazy="global_discount" type="number" class="form-control" name="discount_percentage" min="0" max="100" value="{{ $global_discount }}" required>
<input wire:model.blur="global_discount" type="number" class="form-control" name="discount_percentage" min="0" max="100" value="{{ $global_discount }}" required>
</div>
</div>
<div class="col-lg-4">
<div class="form-group">
<label for="shipping_amount">Shipping</label>
<input wire:model.lazy="shipping" type="number" class="form-control" name="shipping_amount" min="0" value="0" required step="0.01">
<input wire:model.blur="shipping" type="number" class="form-control" name="shipping_amount" min="0" value="0" required step="0.01">
</div>
</div>
</div>

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-6">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -28,7 +28,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payments</label>
<select wire:model="payments" class="form-control" name="payments">
<select wire:model.live="payments" class="form-control" name="payments">
<option value="">Select Payments</option>
<option value="sale">Sales</option>
<option value="sale_return">Sale Returns</option>
@ -43,7 +43,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payment Method</label>
<select wire:model.defer="payment_method" class="form-control" name="payment_method">
<select wire:model="payment_method" class="form-control" name="payment_method">
<option value="">Select Payment Method</option>
<option value="Cash">Cash</option>
<option value="Credit Card">Credit Card</option>

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-6">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-4">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -26,7 +26,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>Supplier</label>
<select wire:model.defer="supplier_id" class="form-control" name="supplier_id">
<select wire:model="supplier_id" class="form-control" name="supplier_id">
<option value="">Select Supplier</option>
@foreach($suppliers as $supplier)
<option value="{{ $supplier->id }}">{{ $supplier->supplier_name }}</option>
@ -39,7 +39,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Status</label>
<select wire:model.defer="purchase_status" class="form-control" name="purchase_status">
<select wire:model="purchase_status" class="form-control" name="purchase_status">
<option value="">Select Status</option>
<option value="Pending">Pending</option>
<option value="Ordered">Ordered</option>
@ -50,7 +50,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payment Status</label>
<select wire:model.defer="payment_status" class="form-control" name="payment_status">
<select wire:model="payment_status" class="form-control" name="payment_status">
<option value="">Select Payment Status</option>
<option value="Paid">Paid</option>
<option value="Unpaid">Unpaid</option>

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-4">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -26,7 +26,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>Supplier</label>
<select wire:model.defer="supplier_id" class="form-control" name="supplier_id">
<select wire:model="supplier_id" class="form-control" name="supplier_id">
<option value="">Select Supplier</option>
@foreach($suppliers as $supplier)
<option value="{{ $supplier->id }}">{{ $supplier->supplier_name }}</option>
@ -39,7 +39,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Status</label>
<select wire:model.defer="purchase_return_status" class="form-control" name="purchase_return_status">
<select wire:model="purchase_return_status" class="form-control" name="purchase_return_status">
<option value="">Select Status</option>
<option value="Pending">Pending</option>
<option value="Shipped">Shipped</option>
@ -50,7 +50,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payment Status</label>
<select wire:model.defer="payment_status" class="form-control" name="payment_status">
<select wire:model="payment_status" class="form-control" name="payment_status">
<option value="">Select Payment Status</option>
<option value="Paid">Paid</option>
<option value="Unpaid">Unpaid</option>

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-4">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -26,7 +26,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>Customer</label>
<select wire:model.defer="customer_id" class="form-control" name="customer_id">
<select wire:model="customer_id" class="form-control" name="customer_id">
<option value="">Select Customer</option>
@foreach($customers as $customer)
<option value="{{ $customer->id }}">{{ $customer->customer_name }}</option>
@ -39,7 +39,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Status</label>
<select wire:model.defer="sale_status" class="form-control" name="sale_status">
<select wire:model="sale_status" class="form-control" name="sale_status">
<option value="">Select Status</option>
<option value="Pending">Pending</option>
<option value="Shipped">Shipped</option>
@ -50,7 +50,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payment Status</label>
<select wire:model.defer="payment_status" class="form-control" name="payment_status">
<select wire:model="payment_status" class="form-control" name="payment_status">
<option value="">Select Payment Status</option>
<option value="Paid">Paid</option>
<option value="Unpaid">Unpaid</option>

View File

@ -3,12 +3,12 @@
<div class="col-12">
<div class="card border-0 shadow-sm">
<div class="card-body">
<form wire:submit.prevent="generateReport">
<form wire:submit="generateReport">
<div class="form-row">
<div class="col-lg-4">
<div class="form-group">
<label>Start Date <span class="text-danger">*</span></label>
<input wire:model.defer="start_date" type="date" class="form-control" name="start_date">
<input wire:model="start_date" type="date" class="form-control" name="start_date">
@error('start_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -17,7 +17,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>End Date <span class="text-danger">*</span></label>
<input wire:model.defer="end_date" type="date" class="form-control" name="end_date">
<input wire:model="end_date" type="date" class="form-control" name="end_date">
@error('end_date')
<span class="text-danger mt-1">{{ $message }}</span>
@enderror
@ -26,7 +26,7 @@
<div class="col-lg-4">
<div class="form-group">
<label>Customer</label>
<select wire:model.defer="customer_id" class="form-control" name="customer_id">
<select wire:model="customer_id" class="form-control" name="customer_id">
<option value="">Select Customer</option>
@foreach($customers as $customer)
<option value="{{ $customer->id }}">{{ $customer->customer_name }}</option>
@ -39,7 +39,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Status</label>
<select wire:model.defer="sale_return_status" class="form-control" name="sale_return_status">
<select wire:model="sale_return_status" class="form-control" name="sale_return_status">
<option value="">Select Status</option>
<option value="Pending">Pending</option>
<option value="Shipped">Shipped</option>
@ -50,7 +50,7 @@
<div class="col-lg-6">
<div class="form-group">
<label>Payment Status</label>
<select wire:model.defer="payment_status" class="form-control" name="payment_status">
<select wire:model="payment_status" class="form-control" name="payment_status">
<option value="">Select Payment Status</option>
<option value="Paid">Paid</option>
<option value="Unpaid">Unpaid</option>

View File

@ -8,7 +8,7 @@
<i class="bi bi-search text-primary"></i>
</div>
</div>
<input wire:keydown.escape="resetQuery" wire:model.debounce.500ms="query" type="text" class="form-control" placeholder="Type product name or code....">
<input wire:keydown.escape="resetQuery" wire:model.live.debounce.500ms="query" type="text" class="form-control" placeholder="Type product name or code....">
</div>
</div>
</div>