Uploading content

This commit is contained in:
David
2025-03-12 00:41:31 -04:00
parent b192e57eb5
commit f70ef52f9e
108 changed files with 13255 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Tables;
use App\Models\Product;
use Illuminate\Database\Eloquent\Model;
use Mmt\GenericTable\Components\Column;
use Mmt\GenericTable\Components\ColumnCollection;
use Mmt\GenericTable\Interfaces\IBulkAction;
use Mmt\GenericTable\Interfaces\IGenericTable;
use Mmt\GenericTable\Support\BulkAction;
use Mmt\GenericTable\Support\BulkActionCollection;
use Mmt\GenericTable\Support\BulkActionGroup;
use Mmt\GenericTable\Support\BulkActionSettings;
class TableWithBulkActions implements IGenericTable, IBulkAction
{
public Model|string $model;
public ColumnCollection $columns;
public BulkActionCollection $bulkActionCollection;
public function __construct()
{
$this->model = new Product();
$this->columns = ColumnCollection::make(
new Column('Id'),
new Column('Description'),
new Column('Price'),
new Column('Stock'),
new Column('Department', 'subDepartment.department.name'),
new Column('SubDepartment', 'subDepartment.name'),
);
$this->bulkActionCollection = BulkActionCollection::make(
BulkActionGroup::make('Emails',
BulkActionGroup::make('FxLive',
BulkActionGroup::make('Marketing',
BulkAction::make('100:1 Boost Fund', fn($e) => $this->ProcessMassiveEmailMarketing($e)),
BulkAction::make('100:2 Boost Fund', fn($e) => $this->ProcessMassiveEmailMarketing($e)),
BulkAction::make('100:3 Boost Fund', fn($e) => $this->ProcessMassiveEmailMarketing($e)),
),
BulkAction::make('100:3 Boost Fund', fn($e) => $this->ProcessMassiveEmailMarketing($e)),
)
)
);
}
public function ProcessMassiveEmailMarketing(BulkActionSettings $bulkActionSettings)
{
dd('Processing action ... ', $bulkActionSettings);
}
}