mirror of
https://github.com/anna-sara/filament_inventory
synced 2025-10-26 23:27:13 +01:00
Compare commits
2 commits
581a1fbf74
...
b22d05538e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b22d05538e | ||
|
|
de94eb4e30 |
7 changed files with 21 additions and 7 deletions
|
|
@ -67,6 +67,7 @@ class ItemResource extends Resource
|
||||||
->schema([
|
->schema([
|
||||||
Radio::make('type')
|
Radio::make('type')
|
||||||
->translateLabel()
|
->translateLabel()
|
||||||
|
->live()
|
||||||
->options([
|
->options([
|
||||||
'game' => __('Game'),
|
'game' => __('Game'),
|
||||||
'item' => __('Item'),
|
'item' => __('Item'),
|
||||||
|
|
@ -99,9 +100,20 @@ class ItemResource extends Resource
|
||||||
->default(0)
|
->default(0)
|
||||||
->hidden(fn ($get): string => $get('type') == 'game' || $get('type') == 'literature' ),
|
->hidden(fn ($get): string => $get('type') == 'game' || $get('type') == 'literature' ),
|
||||||
Select::make('category_id')
|
Select::make('category_id')
|
||||||
->label('Category')
|
->label('Category items')
|
||||||
->translateLabel()
|
->translateLabel()
|
||||||
->options(Category::all()->pluck('name', 'id')),
|
->options(Category::where('type', 'item')->pluck('name', 'id'))
|
||||||
|
->hidden(fn ($get): string => $get('type') == 'game' || $get('type') == 'literature' ),
|
||||||
|
Select::make('category_id')
|
||||||
|
->label('Category games')
|
||||||
|
->translateLabel()
|
||||||
|
->options(Category::where('type', 'game')->pluck('name', 'id'))
|
||||||
|
->hidden(fn ($get): string => $get('type') == 'item' || $get('type') == 'literature' ),
|
||||||
|
Select::make('category_id')
|
||||||
|
->label('Category literature')
|
||||||
|
->translateLabel()
|
||||||
|
->options(Category::where('type', 'literature')->pluck('name', 'id'))
|
||||||
|
->hidden(fn ($get): string => $get('type') == 'game' || $get('type') == 'item' ),
|
||||||
TextInput::make('cost')
|
TextInput::make('cost')
|
||||||
->label('Price')
|
->label('Price')
|
||||||
->translateLabel()
|
->translateLabel()
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class Delivered extends Mailable
|
||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Levererad',
|
subject: 'vBytes - Vara levererad',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class ReservationCreated extends Mailable
|
||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Reservation Created',
|
subject: 'Reservation skapad',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,6 +44,7 @@ class ReservationCreated extends Mailable
|
||||||
'reservationName' => $this->reservation->username,
|
'reservationName' => $this->reservation->username,
|
||||||
'reservationDesc' => Item::where('id', $this->reservation->item_id)->pluck('desc')->first(),
|
'reservationDesc' => Item::where('id', $this->reservation->item_id)->pluck('desc')->first(),
|
||||||
'reservationEmail' => $this->reservation->email,
|
'reservationEmail' => $this->reservation->email,
|
||||||
|
'reservationPhone' => $this->reservation->phone,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class ReservationCreatedUser extends Mailable
|
||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Reservation skapad',
|
subject: 'vBytes - Reservation skapad',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class ReservationDeletedUser extends Mailable
|
||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Reservation borttagen',
|
subject: 'vBytes - Reservation borttagen',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class ReturnDateReminder extends Mailable
|
||||||
public function envelope(): Envelope
|
public function envelope(): Envelope
|
||||||
{
|
{
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
subject: 'Påminnelse om återlämning',
|
subject: 'vBytes - Påminnelse om återlämning',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,6 @@
|
||||||
<h1>Reservation skapad</h1>
|
<h1>Reservation skapad</h1>
|
||||||
<p>{{ $reservationName }} har reserverat {{ $reservationDesc }}</p>
|
<p>{{ $reservationName }} har reserverat {{ $reservationDesc }}</p>
|
||||||
<p>Mail: {{ $reservationEmail }}</p>
|
<p>Mail: {{ $reservationEmail }}</p>
|
||||||
|
<p>Telefon: {{ $reservationPhone }}</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in a new issue