Merge pull request 'Version 20250311' (#121) from development into main
Some checks failed
Deploy / deploy (push) Failing after 6s
Some checks failed
Deploy / deploy (push) Failing after 6s
Reviewed-on: #121
This commit is contained in:
commit
3defbd8253
76
README.md
76
README.md
@ -1,73 +1,7 @@
|
||||
# Changelog
|
||||
- Release
|
||||
|
||||
https://github.com/spatie/laravel-pdf/discussions/90
|
||||
|
||||
for spatie/pdf stuff
|
||||
|
||||
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
|
||||
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
|
||||
|
||||
### Premium Partners
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[WebReinvent](https://webreinvent.com/)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
|
||||
- **[Jump24](https://jump24.co.uk)**
|
||||
- **[Redberry](https://redberry.international/laravel/)**
|
||||
- **[Active Logic](https://activelogic.com)**
|
||||
- **[byte5](https://byte5.de)**
|
||||
- **[OP.GG](https://op.gg)**
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
**2025-03-11**
|
||||
- Fixed #107 - Fix dashboard
|
||||
- Fixed #118 - Improved customer form and re-add 'create customer' to order form
|
||||
- Fixed #117 - Draft orders should not show up in order tabs
|
||||
- Fixed #116 - 'Ready for invoice'-badge shows 0 instead of hiding
|
||||
|
@ -8,6 +8,7 @@
|
||||
use App\Filament\Admin\Resources\CustomerResource\RelationManagers\PaymentsRelationManager;
|
||||
use App\Filament\Admin\Resources\CustomerResource\RelationManagers\ShippingEntriesRelationManager;
|
||||
use App\Models\Customer;
|
||||
use Filament\Forms\Components\Fieldset;
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Form;
|
||||
@ -29,16 +30,44 @@ class CustomerResource extends Resource
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->columns(1)
|
||||
->schema([
|
||||
Section::make([
|
||||
Fieldset::make('Primary Information')
|
||||
->columns(1)
|
||||
->columnSpan(fn (?Customer $record) => $record ? 1 : 3)
|
||||
->schema([
|
||||
TextInput::make('company_name')
|
||||
->required(),
|
||||
TextInput::make('phone'),
|
||||
TextInput::make('shipping_address_line_1'),
|
||||
TextInput::make('shipping_address_line_2'),
|
||||
TextInput::make('billing_address_line_1'),
|
||||
TextInput::make('billing_address_line_2'),
|
||||
])->columns(2),
|
||||
]),
|
||||
|
||||
Fieldset::make('Shipping Address')
|
||||
->columns(1)
|
||||
->columnSpan(fn (?Customer $record) => $record ? 1 : 3)
|
||||
->schema([
|
||||
TextInput::make('shipping_address_line_1')
|
||||
->label('Line 1')
|
||||
->placeholder('618 East Kent Ave S #108'),
|
||||
TextInput::make('shipping_address_line_2')
|
||||
->label('Line 2')
|
||||
->placeholder('Vancouver, BC V5X 0B2, Canada'),
|
||||
]),
|
||||
|
||||
Fieldset::make('Billing Address')
|
||||
->columns(1)
|
||||
->columnSpan(fn (?Customer $record) => $record ? 1 : 3)
|
||||
->schema([
|
||||
TextInput::make('billing_address_line_1')
|
||||
->label('Line 1')
|
||||
->placeholder('618 East Kent Ave S #108'),
|
||||
TextInput::make('billing_address_line_2')
|
||||
->label('Line 2')
|
||||
->placeholder('Vancouver, BC V5X 0B2, Canada'),
|
||||
]),
|
||||
])
|
||||
->columns(3)
|
||||
->columnSpan(fn (?Customer $record) => $record ? 1 : 3),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ protected function getHeaderActions(): array
|
||||
return [
|
||||
Actions\CreateAction::make()
|
||||
->modal()
|
||||
->modalWidth('lg')
|
||||
->icon(IconEnum::NEW->value)
|
||||
->successRedirectUrl(fn ($record) => CustomerResource::getUrl('edit', ['record' => $record->id])),
|
||||
];
|
||||
|
@ -7,7 +7,6 @@
|
||||
use App\Enums\OrderAttributes;
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Enums\OrderType;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Order;
|
||||
use App\Models\OrderProduct;
|
||||
@ -61,11 +60,13 @@ public static function form(Form $form): Form
|
||||
->options(OrderType::class)
|
||||
->searchable(),
|
||||
|
||||
// Split::make([
|
||||
Select::make('customer_id')
|
||||
->required()
|
||||
->label('Customer')
|
||||
->options(Customer::all()->pluck('company_name', 'id'))
|
||||
->relationship(name: 'customer', titleAttribute: 'company_name')
|
||||
->preload()
|
||||
->createOptionForm(fn ($form) => CustomerResource::form($form))
|
||||
->createOptionAction(fn ($action) => $action->modalWidth('lg'))
|
||||
->searchable(),
|
||||
|
||||
TextInput::make('customer_po')
|
||||
|
@ -18,6 +18,7 @@ class ListOrders extends ListRecords
|
||||
private function excludeStatuses($query): mixed
|
||||
{
|
||||
return $query
|
||||
->whereNot('status', OrderStatus::DRAFT)
|
||||
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
||||
->whereNot('status', OrderStatus::INVOICED)
|
||||
->whereNot('status', OrderStatus::SHIPPED);
|
||||
@ -26,6 +27,7 @@ private function excludeStatuses($query): mixed
|
||||
private function getBadgeCount(callable $queryCallback): ?int
|
||||
{
|
||||
$count = Order::query()->when(true, $queryCallback)
|
||||
->whereNot('status', OrderStatus::DRAFT)
|
||||
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
||||
->whereNot('status', OrderStatus::INVOICED)
|
||||
->whereNot('status', OrderStatus::SHIPPED)
|
||||
@ -74,7 +76,7 @@ public function getTabs(): array
|
||||
'ready_for_invoice' => Tab::make()
|
||||
->query(fn ($query) => $query->where('status', OrderStatus::READY_FOR_INVOICE))
|
||||
->icon(OrderStatus::READY_FOR_INVOICE->getIcon())
|
||||
->badge(fn () => Order::query()->where('status', OrderStatus::READY_FOR_INVOICE)->count())
|
||||
->badge(fn () => ($count = Order::query()->where('status', OrderStatus::READY_FOR_INVOICE)->count()) > 0 ? $count : null)
|
||||
->badgeColor(OrderStatus::READY_FOR_INVOICE->getColor()),
|
||||
];
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Widgets;
|
||||
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Models\Order;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Widgets\TableWidget as BaseWidget;
|
||||
|
||||
class ActiveOrdersTable extends BaseWidget
|
||||
{
|
||||
protected static ?int $sort = 2;
|
||||
|
||||
protected string|int|array $columnSpan = 2;
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->query(
|
||||
Order::query()
|
||||
->where('status', '!=', OrderStatus::SHIPPED)
|
||||
->where('status', '!=', OrderStatus::INVOICED)
|
||||
)
|
||||
->columns([
|
||||
TextColumn::make('customer.company_name'),
|
||||
TextColumn::make('customer_po')
|
||||
->color('code')
|
||||
->weight('bold'),
|
||||
TextColumn::make('status')
|
||||
// ->color(OrderStatus::class)
|
||||
->badge(),
|
||||
])
|
||||
->defaultPaginationPageOption(5);
|
||||
}
|
||||
}
|
@ -35,7 +35,9 @@ protected function getStats(): array
|
||||
private function getActiveOrders(): string
|
||||
{
|
||||
return Order::all()
|
||||
->where('order_status', '!=', OrderStatus::DRAFT)
|
||||
->where('order_status', '!=', OrderStatus::SHIPPED)
|
||||
->where('order_status', '!=', OrderStatus::READY_FOR_INVOICE)
|
||||
->where('order_status', '!=', OrderStatus::INVOICED)
|
||||
->count();
|
||||
}
|
||||
@ -43,6 +45,8 @@ private function getActiveOrders(): string
|
||||
private function getOrdersPast30Days(): string
|
||||
{
|
||||
return Order::all()
|
||||
->where('order_status', '!=', OrderStatus::DRAFT)
|
||||
->where('order_status', '!=', OrderStatus::READY_FOR_INVOICE)
|
||||
->where('order_status', '!=', OrderStatus::SHIPPED)
|
||||
->where('order_status', '!=', OrderStatus::INVOICED)
|
||||
->whereBetween('created_at', [now()->startOfMonth(), now()->endOfMonth()])
|
||||
@ -65,6 +69,8 @@ private function getOrdersInPast30DaysChart(): array
|
||||
private function getDueOrders(): string
|
||||
{
|
||||
return Order::all()
|
||||
->where('order_status', '!=', OrderStatus::DRAFT)
|
||||
->where('order_status', '!=', OrderStatus::READY_FOR_INVOICE)
|
||||
->where('order_status', '!=', OrderStatus::SHIPPED)
|
||||
->where('order_status', '!=', OrderStatus::INVOICED)
|
||||
->where('due_date', '<=', now())
|
||||
|
@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Widgets;
|
||||
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Models\Order;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Widgets\TableWidget as BaseWidget;
|
||||
|
||||
class RushOrdersTable extends BaseWidget
|
||||
{
|
||||
protected string|int|array $columnSpan = 2;
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->query(
|
||||
Order::query()
|
||||
->where('status', '!=', OrderStatus::SHIPPED)
|
||||
->where('status', '!=', OrderStatus::INVOICED)
|
||||
->where('rush', true)
|
||||
->orderByDesc('due_date')
|
||||
)
|
||||
->columns([
|
||||
TextColumn::make('customer.company_name'),
|
||||
TextColumn::make('customer_po')
|
||||
->color('code')
|
||||
->weight('bold'),
|
||||
TextColumn::make('status')
|
||||
->badge(),
|
||||
])
|
||||
->defaultPaginationPageOption(5);
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
| or any other location as required by the application or its packages.
|
||||
*/
|
||||
|
||||
'version' => '1.0.0',
|
||||
'version' => '20250311',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user