-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Classes/PrintTicket.php Http/Controllers/.gitkeep Http/Controllers/TicketController.php Http/Requests/.gitkeep Models/.gitkeep Models/Attendant.php Models/Data/Attendant.php Models/Data/Destination.php Models/Destination.php Models/Ticket.php Models/TicketLog.php Resources/views/ticket-create.blade.php Resources/views/ticket-dashboard.blade.php Resources/views/ticket-move.blade.php Resources/vue/widgets/destination.vue Resources/vue/widgets/ticket.vue Routes/.gitkeep Routes/api.php Routes/web.php Tests/Feature/.gitkeep Tests/Unit/.gitkeep composer.json
- Loading branch information
1 parent
e0a5a00
commit 83b448b
Showing
39 changed files
with
617 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources; | ||
|
||
use Modules\Queuing\Filament\Resources\AttendantResource\Pages; | ||
use Modules\Queuing\Filament\Resources\AttendantResource\RelationManagers; | ||
use Modules\Queuing\Models\Attendant; | ||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class AttendantResource extends Resource | ||
{ | ||
protected static ?string $model = Attendant::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('name') | ||
->maxLength(255) | ||
->default(null), | ||
Forms\Components\TextInput::make('slug') | ||
->maxLength(255) | ||
->default(null), | ||
Forms\Components\Textarea::make('description') | ||
->columnSpanFull(), | ||
Forms\Components\TextInput::make('partner_id') | ||
->required() | ||
->numeric(), | ||
Forms\Components\TextInput::make('destination_id') | ||
->required() | ||
->numeric(), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('name') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('slug') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('partner_id') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('destination_id') | ||
->numeric() | ||
->sortable(), | ||
Tables\Columns\TextColumn::make('created_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
Tables\Columns\TextColumn::make('updated_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
]) | ||
->filters([ | ||
Tables\Filters\TrashedFilter::make(), | ||
]) | ||
->actions([ | ||
Tables\Actions\EditAction::make(), | ||
]) | ||
->bulkActions([ | ||
Tables\Actions\BulkActionGroup::make([ | ||
Tables\Actions\DeleteBulkAction::make(), | ||
Tables\Actions\ForceDeleteBulkAction::make(), | ||
Tables\Actions\RestoreBulkAction::make(), | ||
]), | ||
]); | ||
} | ||
|
||
public static function getRelations(): array | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
|
||
public static function getPages(): array | ||
{ | ||
return [ | ||
'index' => Pages\ListAttendants::route('/'), | ||
'create' => Pages\CreateAttendant::route('/create'), | ||
'edit' => Pages\EditAttendant::route('/{record}/edit'), | ||
]; | ||
} | ||
|
||
public static function getEloquentQuery(): Builder | ||
{ | ||
return parent::getEloquentQuery() | ||
->withoutGlobalScopes([ | ||
SoftDeletingScope::class, | ||
]); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/Filament/Resources/AttendantResource/Pages/CreateAttendant.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\AttendantResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\AttendantResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\CreateRecord; | ||
|
||
class CreateAttendant extends CreateRecord | ||
{ | ||
protected static string $resource = AttendantResource::class; | ||
} |
21 changes: 21 additions & 0 deletions
21
app/Filament/Resources/AttendantResource/Pages/EditAttendant.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\AttendantResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\AttendantResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\EditRecord; | ||
|
||
class EditAttendant extends EditRecord | ||
{ | ||
protected static string $resource = AttendantResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\DeleteAction::make(), | ||
Actions\ForceDeleteAction::make(), | ||
Actions\RestoreAction::make(), | ||
]; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Resources/AttendantResource/Pages/ListAttendants.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\AttendantResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\AttendantResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\ListRecords; | ||
|
||
class ListAttendants extends ListRecords | ||
{ | ||
protected static string $resource = AttendantResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::make(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources; | ||
|
||
use Modules\Queuing\Filament\Resources\DestinationResource\Pages; | ||
use Modules\Queuing\Filament\Resources\DestinationResource\RelationManagers; | ||
use Modules\Queuing\Models\Destination; | ||
use Filament\Forms; | ||
use Filament\Forms\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Tables; | ||
use Filament\Tables\Table; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class DestinationResource extends Resource | ||
{ | ||
protected static ?string $model = Destination::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('name') | ||
->maxLength(255) | ||
->default(null), | ||
Forms\Components\TextInput::make('slug') | ||
->maxLength(255) | ||
->default(null), | ||
Forms\Components\Textarea::make('description') | ||
->columnSpanFull(), | ||
Forms\Components\TextInput::make('assigned'), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('name') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('slug') | ||
->searchable(), | ||
Tables\Columns\TextColumn::make('assigned'), | ||
Tables\Columns\TextColumn::make('created_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
Tables\Columns\TextColumn::make('updated_at') | ||
->dateTime() | ||
->sortable() | ||
->toggleable(isToggledHiddenByDefault: true), | ||
]) | ||
->filters([ | ||
Tables\Filters\TrashedFilter::make(), | ||
]) | ||
->actions([ | ||
Tables\Actions\EditAction::make(), | ||
]) | ||
->bulkActions([ | ||
Tables\Actions\BulkActionGroup::make([ | ||
Tables\Actions\DeleteBulkAction::make(), | ||
Tables\Actions\ForceDeleteBulkAction::make(), | ||
Tables\Actions\RestoreBulkAction::make(), | ||
]), | ||
]); | ||
} | ||
|
||
public static function getRelations(): array | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
|
||
public static function getPages(): array | ||
{ | ||
return [ | ||
'index' => Pages\ListDestinations::route('/'), | ||
'create' => Pages\CreateDestination::route('/create'), | ||
'edit' => Pages\EditDestination::route('/{record}/edit'), | ||
]; | ||
} | ||
|
||
public static function getEloquentQuery(): Builder | ||
{ | ||
return parent::getEloquentQuery() | ||
->withoutGlobalScopes([ | ||
SoftDeletingScope::class, | ||
]); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/Filament/Resources/DestinationResource/Pages/CreateDestination.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\DestinationResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\DestinationResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\CreateRecord; | ||
|
||
class CreateDestination extends CreateRecord | ||
{ | ||
protected static string $resource = DestinationResource::class; | ||
} |
21 changes: 21 additions & 0 deletions
21
app/Filament/Resources/DestinationResource/Pages/EditDestination.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\DestinationResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\DestinationResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\EditRecord; | ||
|
||
class EditDestination extends EditRecord | ||
{ | ||
protected static string $resource = DestinationResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\DeleteAction::make(), | ||
Actions\ForceDeleteAction::make(), | ||
Actions\RestoreAction::make(), | ||
]; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/Filament/Resources/DestinationResource/Pages/ListDestinations.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Modules\Queuing\Filament\Resources\DestinationResource\Pages; | ||
|
||
use Modules\Queuing\Filament\Resources\DestinationResource; | ||
use Filament\Actions; | ||
use Filament\Resources\Pages\ListRecords; | ||
|
||
class ListDestinations extends ListRecords | ||
{ | ||
protected static string $resource = DestinationResource::class; | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::make(), | ||
]; | ||
} | ||
} |
Oops, something went wrong.