Soundmit
Soundmit
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
Thank you, tomorrow I will try
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
any chance to use printjs? my app is working, but in the infolist when i print a label/invoice etc the pdf is opened in the same tab, after printing the pdf i have to hit the browser's back button to comback to the app.. not so friendly
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
I've already spent 3 hours on this. Is what I'm trying to do feasible, or am I wasting my time?
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
ok i try
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
this is the route Route::get('/label/{record}/download', [PdfController::class, 'downloadLabel'])->name('repair.pdf.label'); that calls the controller
public function downloadLabel($record)
{
$repair = Repair::find($record);
$companyData = app(CompanySettings::class);
$width = $this->mmToPoints(54);
$height = $this->mmToPoints(25);
$customPaper = [0, 0, $width, $height];
$pdf = PDF::loadView('pdf.label', compact('repair', 'companyData'))
->setPaper($customPaper)
->setWarnings(false);

return $pdf->stream('label.pdf');
}
public function downloadLabel($record)
{
$repair = Repair::find($record);
$companyData = app(CompanySettings::class);
$width = $this->mmToPoints(54);
$height = $this->mmToPoints(25);
$customPaper = [0, 0, $width, $height];
$pdf = PDF::loadView('pdf.label', compact('repair', 'companyData'))
->setPaper($customPaper)
->setWarnings(false);

return $pdf->stream('label.pdf');
}
how can i modify the action to call printjs instead of open the pdf?
16 replies
FFilament
Created by Soundmit on 6/24/2024 in #❓┊help
Custom widget, passing variables to blade
solution
public array $data = [];
// Quote
private function getQuote(): float
{
$quote = 0.0;

if ($this->record->parts) {
foreach ($this->record->parts as $part) {
$quote += intval($part['qt']) * floatval($part['selling_price']);
}
}
return round($quote, 2);
}
...
public function mount(): void
{
$this->data = [
'quote' => $this->getQuote(),
];
}
public array $data = [];
// Quote
private function getQuote(): float
{
$quote = 0.0;

if ($this->record->parts) {
foreach ($this->record->parts as $part) {
$quote += intval($part['qt']) * floatval($part['selling_price']);
}
}
return round($quote, 2);
}
...
public function mount(): void
{
$this->data = [
'quote' => $this->getQuote(),
];
}
4 replies
FFilament
Created by Soundmit on 6/24/2024 in #❓┊help
Custom browser tab title
i have the app_name ready but not appear in the tab and, i want to show the customer name while i view or edit his resource something like Customer - John Bohnam
9 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
i will try again tomorrow with fresh and rest mind
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
my model PAGE is for making PAGES pages are, for example: about, services etc... with spatie translatable, in the backend (form) i'm able to store the content in all the available languages in frontend (public website) i have a menu with link to those pages the problem starts when i want to see the page in the other languages...
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
no...
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
my problem is that i can't switch languages in frontend database are in 2 languages but, for example i'm in the english page ABOUT (slug: about) i want oto switch to italian CHI SIAMO (slug: chisiamo) and this is impossible
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
frontend is public not for the user
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
not interest in user settings
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
no, the user can choose the language of the content trough a languageswitcher that can set the locale in the session
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
frontend = public website
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
with filament in backend
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
a regular website
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
@Andrew Wallo it has a frontend? because i had no problem to do it in panels
32 replies
FFilament
Created by Nemesisesq on 6/17/2024 in #❓┊help
Can I use filament to build sites other than Admin Panels?
i have setup my model (page) with translatable title/slug and content i have tried 300 different possible solution but i can't switch one simple page from one language to another (different slug) also, you can't have a page with different language but same slug (/ for the home)
32 replies