Compare commits
No commits in common. "4500ce0c273cb536e2ea0b85c04f9d59c025da72" and "4e952f96c00487aaa003c7d3c8ce30c9f28c79ba" have entirely different histories.
4500ce0c27
...
4e952f96c0
@ -1,10 +1,4 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
**2025-04-04**
|
|
||||||
- Fixed #133 - Make product name not required
|
|
||||||
- Fixed #127 - Implement resource lock for orders
|
|
||||||
- Fixed #125 - 'Add Payment' on LIst Invoice page modal is too wide
|
|
||||||
- Fixed #124 - Reorder button for product services is displayed on wrong side
|
|
||||||
- Fixed #123 - Typo 'Add to product Services'
|
|
||||||
|
|
||||||
**2025-03-11**
|
**2025-03-11**
|
||||||
- Fixed #122 - Non-admins can see payments
|
- Fixed #122 - Non-admins can see payments
|
||||||
|
@ -249,7 +249,6 @@ public static function table(Table $table): Table
|
|||||||
BulkAction::make('Create Payment')
|
BulkAction::make('Create Payment')
|
||||||
->icon(IconEnum::PAYMENTS->value)
|
->icon(IconEnum::PAYMENTS->value)
|
||||||
->form(fn ($form) => PaymentResource::form($form))
|
->form(fn ($form) => PaymentResource::form($form))
|
||||||
->modalWidth('lg')
|
|
||||||
->action(function (Collection $records, array $data) {
|
->action(function (Collection $records, array $data) {
|
||||||
if ($records->pluck('customer_id')->unique()->count() !== 1) {
|
if ($records->pluck('customer_id')->unique()->count() !== 1) {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
|
@ -145,15 +145,12 @@ public static function form(Form $form): Form
|
|||||||
|
|
||||||
TableRepeater::make('order_products')
|
TableRepeater::make('order_products')
|
||||||
->label('Garments')
|
->label('Garments')
|
||||||
->addActionLabel('Add new garment')
|
|
||||||
->reorderable()
|
|
||||||
->cloneable()
|
|
||||||
->defaultItems(1)
|
|
||||||
->schema([
|
->schema([
|
||||||
TextInput::make('sku')
|
TextInput::make('sku')
|
||||||
->datalist(OrderProduct::all()->unique('sku')->pluck('sku')->toArray()),
|
->datalist(OrderProduct::all()->unique('sku')->pluck('sku')->toArray()),
|
||||||
TextInput::make('product_name')
|
TextInput::make('product_name')
|
||||||
->datalist(OrderProduct::all()->unique('product_name')->pluck('product_name')->toArray()),
|
->datalist(OrderProduct::all()->unique('product_name')->pluck('product_name')->toArray())
|
||||||
|
->required(),
|
||||||
TextInput::make('color')
|
TextInput::make('color')
|
||||||
->datalist(OrderProduct::all()->unique('color')->pluck('color')->toArray()),
|
->datalist(OrderProduct::all()->unique('color')->pluck('color')->toArray()),
|
||||||
Cluster::make([
|
Cluster::make([
|
||||||
@ -183,12 +180,14 @@ public static function form(Form $form): Form
|
|||||||
->rules('numeric'),
|
->rules('numeric'),
|
||||||
])
|
])
|
||||||
->label('Sizes'),
|
->label('Sizes'),
|
||||||
]),
|
])
|
||||||
|
->reorderable()
|
||||||
|
->cloneable()
|
||||||
|
->defaultItems(1),
|
||||||
|
|
||||||
Repeater::make('services')
|
Repeater::make('services')
|
||||||
->view('filament.forms.compact-repeater')
|
->view('filament.forms.compact-repeater')
|
||||||
->label('Product Services')
|
->label('Product Services')
|
||||||
->addActionLabel('Add new product service')
|
|
||||||
->schema([
|
->schema([
|
||||||
Grid::make(19)
|
Grid::make(19)
|
||||||
->schema([
|
->schema([
|
||||||
|
@ -21,12 +21,9 @@
|
|||||||
use Filament\Resources\Pages\EditRecord;
|
use Filament\Resources\Pages\EditRecord;
|
||||||
use Illuminate\Contracts\Support\Htmlable;
|
use Illuminate\Contracts\Support\Htmlable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Kenepa\ResourceLock\Resources\Pages\Concerns\UsesResourceLock;
|
|
||||||
|
|
||||||
class EditOrder extends EditRecord
|
class EditOrder extends EditRecord
|
||||||
{
|
{
|
||||||
use UsesResourceLock;
|
|
||||||
|
|
||||||
protected static string $resource = OrderResource::class;
|
protected static string $resource = OrderResource::class;
|
||||||
|
|
||||||
public function getTitle(): string|Htmlable
|
public function getTitle(): string|Htmlable
|
||||||
|
@ -16,14 +16,13 @@
|
|||||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
use Kenepa\ResourceLock\Models\Concerns\HasLocks;
|
|
||||||
|
|
||||||
#[ObservedBy(OrderObserver::class)]
|
#[ObservedBy(OrderObserver::class)]
|
||||||
|
|
||||||
class Order extends Model
|
class Order extends Model
|
||||||
{
|
{
|
||||||
/** @use HasFactory<OrderFactory> */
|
/** @use HasFactory<OrderFactory> */
|
||||||
use HasFactory, SoftDeletes, HasLocks;
|
use HasFactory, SoftDeletes;
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'customer_id',
|
'customer_id',
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
use Illuminate\Session\Middleware\AuthenticateSession;
|
use Illuminate\Session\Middleware\AuthenticateSession;
|
||||||
use Illuminate\Session\Middleware\StartSession;
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
use Kenepa\ResourceLock\ResourceLockPlugin;
|
|
||||||
|
|
||||||
class AdminPanelProvider extends PanelProvider
|
class AdminPanelProvider extends PanelProvider
|
||||||
{
|
{
|
||||||
@ -63,7 +62,6 @@ public function panel(Panel $panel): Panel
|
|||||||
NavigationGroup::make('Financial'),
|
NavigationGroup::make('Financial'),
|
||||||
NavigationGroup::make('Reports'),
|
NavigationGroup::make('Reports'),
|
||||||
NavigationGroup::make('Settings'),
|
NavigationGroup::make('Settings'),
|
||||||
])
|
]);
|
||||||
->plugin(ResourceLockPlugin::make());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,16 +7,15 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"davidhsianturi/blade-bootstrap-icons": "^1.5",
|
"davidhsianturi/blade-bootstrap-icons": "^1.5",
|
||||||
"fakerphp/faker": "^1.23",
|
|
||||||
"filament/filament": "^3.2",
|
"filament/filament": "^3.2",
|
||||||
"guava/filament-clusters": "^1.4",
|
"guava/filament-clusters": "^1.4",
|
||||||
"icetalker/filament-table-repeater": "^1.3",
|
"icetalker/filament-table-repeater": "^1.3",
|
||||||
"kenepa/resource-lock": "^2.1",
|
|
||||||
"laravel/framework": "^11.9",
|
"laravel/framework": "^11.9",
|
||||||
"laravel/tinker": "^2.9",
|
"laravel/tinker": "^2.9",
|
||||||
"livewire/livewire": "^3.5",
|
"livewire/livewire": "^3.5",
|
||||||
"mallardduck/blade-lucide-icons": "^1.23",
|
"mallardduck/blade-lucide-icons": "^1.23",
|
||||||
"spatie/laravel-pdf": "^1.5"
|
"spatie/laravel-pdf": "^1.5",
|
||||||
|
"fakerphp/faker": "^1.23"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-ide-helper": "^3.5",
|
"barryvdh/laravel-ide-helper": "^3.5",
|
||||||
|
74
composer.lock
generated
74
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "8b981a2679ca20ca011a3c8b0c38ec22",
|
"content-hash": "46ac06345fc3d57a7d0a01cfcaeaac17",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "anourvalar/eloquent-serialize",
|
"name": "anourvalar/eloquent-serialize",
|
||||||
@ -2238,74 +2238,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2025-03-05T16:06:45+00:00"
|
"time": "2025-03-05T16:06:45+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "kenepa/resource-lock",
|
|
||||||
"version": "2.1.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/kenepa/resource-lock.git",
|
|
||||||
"reference": "dda6e14b5c4a47817569081b11248c572ebdfd07"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/kenepa/resource-lock/zipball/dda6e14b5c4a47817569081b11248c572ebdfd07",
|
|
||||||
"reference": "dda6e14b5c4a47817569081b11248c572ebdfd07",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"filament/filament": "^3.0",
|
|
||||||
"illuminate/contracts": "^9.0|^10.0|^11.0|^12.0",
|
|
||||||
"php": "^8.1",
|
|
||||||
"spatie/laravel-package-tools": "^1.15.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"laravel/pint": "^1.0",
|
|
||||||
"nunomaduro/collision": "^7.0|^8.1",
|
|
||||||
"nunomaduro/larastan": "^2.0.1",
|
|
||||||
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0",
|
|
||||||
"pestphp/pest": "^2.0|^3.7",
|
|
||||||
"pestphp/pest-plugin-laravel": "^2.0|^3.1",
|
|
||||||
"pestphp/pest-plugin-livewire": "^2.0|^3.0",
|
|
||||||
"phpstan/extension-installer": "^1.1",
|
|
||||||
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
|
|
||||||
"phpstan/phpstan-phpunit": "^1.0|^2.0",
|
|
||||||
"spatie/laravel-ray": "^1.26",
|
|
||||||
"tightenco/duster": "^1.1|^3.1"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"aliases": {
|
|
||||||
"ResourceLock": "Kenepa\\ResourceLock\\Facades\\ResourceLock"
|
|
||||||
},
|
|
||||||
"providers": [
|
|
||||||
"Kenepa\\ResourceLock\\ResourceLockServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Kenepa\\ResourceLock\\": "src",
|
|
||||||
"Kenepa\\ResourceLock\\Database\\Factories\\": "database/factories"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"description": "Filament Resource Lock is a Filament plugin that adds resource locking functionality to your site.",
|
|
||||||
"homepage": "https://github.com/kenepa/resource-lock",
|
|
||||||
"keywords": [
|
|
||||||
"Kenepa",
|
|
||||||
"laravel",
|
|
||||||
"resource-lock"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/kenepa/resource-lock/issues",
|
|
||||||
"source": "https://github.com/kenepa/resource-lock/tree/2.1.3"
|
|
||||||
},
|
|
||||||
"time": "2025-03-14T16:31:20+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "kirschbaum-development/eloquent-power-joins",
|
"name": "kirschbaum-development/eloquent-power-joins",
|
||||||
"version": "4.2.1",
|
"version": "4.2.1",
|
||||||
@ -11773,12 +11705,12 @@
|
|||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": [],
|
"stability-flags": {},
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "^8.2"
|
"php": "^8.2"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.6.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
| or any other location as required by the application or its packages.
|
| or any other location as required by the application or its packages.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'version' => '20250403',
|
'version' => '20250311',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::create('resource_locks', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->timestamps();
|
|
||||||
$table->foreignId('user_id')->constrained();
|
|
||||||
$table->morphs('lockable');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('resource_locks');
|
|
||||||
}
|
|
||||||
};
|
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "order_system",
|
"name": "topnotch_website",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
@ -118,7 +118,6 @@ class="fi-fo-repeater-item divide-y divide-gray-100 rounded-xl bg-white shadow-
|
|||||||
>
|
>
|
||||||
@if ($reorderActionIsVisible || $moveUpActionIsVisible || $moveDownActionIsVisible)
|
@if ($reorderActionIsVisible || $moveUpActionIsVisible || $moveDownActionIsVisible)
|
||||||
<ul class="flex items-center gap-x-3">
|
<ul class="flex items-center gap-x-3">
|
||||||
{{--
|
|
||||||
@if ($reorderActionIsVisible)
|
@if ($reorderActionIsVisible)
|
||||||
<li
|
<li
|
||||||
x-sortable-handle
|
x-sortable-handle
|
||||||
@ -127,7 +126,6 @@ class="fi-fo-repeater-item divide-y divide-gray-100 rounded-xl bg-white shadow-
|
|||||||
{{ $reorderAction }}
|
{{ $reorderAction }}
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
--}}
|
|
||||||
|
|
||||||
@if ($moveUpActionIsVisible || $moveDownActionIsVisible)
|
@if ($moveUpActionIsVisible || $moveDownActionIsVisible)
|
||||||
<li
|
<li
|
||||||
@ -158,7 +156,7 @@ class="flex items-center justify-center"
|
|||||||
</h4>
|
</h4>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($cloneActionIsVisible || $deleteActionIsVisible || $isCollapsible || $visibleExtraItemActions || $reorderActionIsVisible)
|
@if ($cloneActionIsVisible || $deleteActionIsVisible || $isCollapsible || $visibleExtraItemActions)
|
||||||
<ul
|
<ul
|
||||||
class="ms-auto flex items-center gap-x-3"
|
class="ms-auto flex items-center gap-x-3"
|
||||||
>
|
>
|
||||||
@ -168,15 +166,6 @@ class="ms-auto flex items-center gap-x-3"
|
|||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if ($reorderActionIsVisible)
|
|
||||||
<li
|
|
||||||
x-sortable-handle
|
|
||||||
x-on:click.stop
|
|
||||||
>
|
|
||||||
{{ $reorderAction }}
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($cloneActionIsVisible)
|
@if ($cloneActionIsVisible)
|
||||||
<li x-on:click.stop>
|
<li x-on:click.stop>
|
||||||
{{ $cloneAction }}
|
{{ $cloneAction }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user