Jr.Pikong
Jr.Pikong
FFilament
Created by Jr.Pikong on 9/11/2024 in #❓┊help
Custom page
No description
7 replies
FFilament
Created by Jr.Pikong on 9/11/2024 in #❓┊help
Custom page
thanks @Dennis Koch , you save my time again, just follow this section :
7 replies
FFilament
Created by Jr.Pikong on 9/2/2024 in #❓┊help
Multi Tenancy
3 replies
FFilament
Created by Jr.Pikong on 7/9/2024 in #❓┊help
export format column
No , I dont have a solution 🙏
6 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
Yes, but thank @Dennis Koch for your help 👌
13 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
But I want label with condition 😆, and I can do that with label .
13 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
So to manage the label, I use a description to clarify the data.
TextColumn::make('stok_1')
->getStateUsing(fn (StockDigipos $record): int => $record->category === "PERDANA LITE" ? $record->stok_sp_ld : $record->stok_inj_357)
->description(fn (StockDigipos $record): string => $record->category === "PERDANA LITE" ? "Stok SP LD" : "STOK INJ 357"),
TextColumn::make('stok_1')
->getStateUsing(fn (StockDigipos $record): int => $record->category === "PERDANA LITE" ? $record->stok_sp_ld : $record->stok_inj_357)
->description(fn (StockDigipos $record): string => $record->category === "PERDANA LITE" ? "Stok SP LD" : "STOK INJ 357"),
This explanation highlights the purpose of the description , emphasizing that it provides clarity regarding the data associated with each label.
13 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
with this code I Have problem with the Label
13 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
thanks @Marco and @Dennis Koch .
13 replies
FFilament
Created by Jr.Pikong on 8/23/2024 in #❓┊help
filament table hidden record null
Here's a revised version of your question for the forum: --- "I have a table in a Resource with the following columns:
Tables\Columns\TextColumn::make('stok_sp_ld')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_sd')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_md1')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_md2')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_hd')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_total')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_ld')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_sd')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_md1')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_md2')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_hd')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_sp_total')
->numeric()
->sortable(),
And another set of columns:
Tables\Columns\TextColumn::make('stok_inj_357')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_4gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_10gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_14gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_other')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_total')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_357')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_4gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_10gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_14gb')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_other')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('stok_inj_total')
->numeric()
->sortable(),
If the category is PERDANA LITE, I only want to show the first set of columns and hide the second set. Conversely, if the category is VOUCHER, I want to show only the second set of columns. How can I achieve this?"
13 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
@Dennis Koch this is my detail log error: https://flareapp.io/share/353gO6W5
12 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
in laravel.log I get error :
[2024-06-19 16:20:34] local.ERROR: Undefined array key "label" {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined array key \"label\" at /var/www/html/vendor/filament/actions/src/Concerns/CanExportRecords.php:155)
[stacktrace]
[2024-06-19 16:20:34] local.ERROR: Undefined array key "label" {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined array key \"label\" at /var/www/html/vendor/filament/actions/src/Concerns/CanExportRecords.php:155)
[stacktrace]
12 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
12 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
In resource I call with this action :
return $table
->headerActions([
ExportAction::make()
->exporter(TransactionAggreGateExporter::class)
->icon('heroicon-o-arrow-down-tray')
->color('primary')
->chunkSize(2000)
->formats([
ExportFormat::Xlsx,
])
->label('Export')
->fileName('SummaryReport'.now())
])
return $table
->headerActions([
ExportAction::make()
->exporter(TransactionAggreGateExporter::class)
->icon('heroicon-o-arrow-down-tray')
->color('primary')
->chunkSize(2000)
->formats([
ExportFormat::Xlsx,
])
->label('Export')
->fileName('SummaryReport'.now())
])
12 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
there my code TransactionAggreGateExporter.php :
<?php

namespace App\Filament\Exports;

use App\Models\TransactionSummaryAgg;
use App\Models\TrxAggreGate;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\MorphTo;

class TransactionAggreGateExporter extends Exporter
{
protected static ?string $model = TrxAggreGate::class;

public static function getColumns(): array
{
// Fetch distinct denominations
$denominations = TransactionSummaryAgg::select('denom')
->distinct()
->pluck('denom');

// Define columns
$columns = [
ExportColumn::make('trx_date')
];

foreach ($denominations as $denom) {
$columns[] = ExportColumn::make($denom);
$columns[] = ExportColumn::make("Total_Value_{$denom}");
}
return $columns;
}

public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your trx aggre gate export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';

if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
}

return $body;
}
}
<?php

namespace App\Filament\Exports;

use App\Models\TransactionSummaryAgg;
use App\Models\TrxAggreGate;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\MorphTo;

class TransactionAggreGateExporter extends Exporter
{
protected static ?string $model = TrxAggreGate::class;

public static function getColumns(): array
{
// Fetch distinct denominations
$denominations = TransactionSummaryAgg::select('denom')
->distinct()
->pluck('denom');

// Define columns
$columns = [
ExportColumn::make('trx_date')
];

foreach ($denominations as $denom) {
$columns[] = ExportColumn::make($denom);
$columns[] = ExportColumn::make("Total_Value_{$denom}");
}
return $columns;
}

public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your trx aggre gate export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';

if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
}

return $body;
}
}
12 replies
FFilament
Created by Jr.Pikong on 6/15/2024 in #❓┊help
Custom Exporter Colum
my apologies for the lack of clarity on my question,
12 replies
FFilament
Created by Jr.Pikong on 5/22/2024 in #❓┊help
Export FIle Excel error create big file
No description
4 replies
FFilament
Created by Jr.Pikong on 5/22/2024 in #❓┊help
Export FIle Excel error create big file
If I check in my S3 Bucket .csv file is created complete, but no .xlsx file
4 replies
FFilament
Created by Jr.Pikong on 3/27/2024 in #❓┊help
importer S3 Get Error
Yes, that's right, as @Dennis Koch said, there was an error in the S3 bucket policy process. after I made some changes it worked. and you just need to setup FILAMENT_FILESYSTEM_DISK=s3
14 replies
FFilament
Created by Raziul Islam on 3/28/2024 in #❓┊help
Allowed memory size of 134217728 bytes exhausted
change your memory_limit = 2048M in php.ini
41 replies