syedahnb
syedahnb
Explore posts from servers
FFilament
Created by syedahnb on 6/12/2024 in #❓┊help
Need Assistance with Setting and Retrieving Filter Form Values
I need to set a value in one filter form and retrieve it in another filter here's a simplified
` public static function table(Table $table): Table
{
return $table->


->filters([

Tables\Filters\Filter::make('created_date')->form(
[
Forms\Components\DatePicker::make('created_date_from')
->prefix('Starts')
->format('d/m/Y')->placeholder("Date To")->columns(1)
->reactive()
->live()
->afterStateUpdated(function (Forms\Set $set, $state) {

$set('created_date_from',$state);
}),
Forms\Components\DatePicker::make('created_date_to')
->prefix('End')
->format('d/m/Y')->placeholder("Date From")
->default(now())->columns(1)->reactive(),
])
->query(function (Builder $query, array $data) {
||

}),||
Tables\Filters\Filter::make('table_id')
->form([


Forms\Components\Select::make('table_id')
->label('Table')

->options(function (Forms\Get $get) {
Log::info($get('created_date'));
if ( $get('created_date')) {

Log::info($get('created_date'));
dd($get('created_date'));

}


}),


])
->query(function (Builder $query, array $data): Builder {

}),
], )


->defaultPaginationPageOption(25);
}
` public static function table(Table $table): Table
{
return $table->


->filters([

Tables\Filters\Filter::make('created_date')->form(
[
Forms\Components\DatePicker::make('created_date_from')
->prefix('Starts')
->format('d/m/Y')->placeholder("Date To")->columns(1)
->reactive()
->live()
->afterStateUpdated(function (Forms\Set $set, $state) {

$set('created_date_from',$state);
}),
Forms\Components\DatePicker::make('created_date_to')
->prefix('End')
->format('d/m/Y')->placeholder("Date From")
->default(now())->columns(1)->reactive(),
])
->query(function (Builder $query, array $data) {
||

}),||
Tables\Filters\Filter::make('table_id')
->form([


Forms\Components\Select::make('table_id')
->label('Table')

->options(function (Forms\Get $get) {
Log::info($get('created_date'));
if ( $get('created_date')) {

Log::info($get('created_date'));
dd($get('created_date'));

}


}),


])
->query(function (Builder $query, array $data): Builder {

}),
], )


->defaultPaginationPageOption(25);
}
6 replies
TtRPC
Created by syedahnb on 11/14/2023 in #❓-help
Can You Provide Guidance on Implementing RBAC and Share GitHub Examples?
I am currently exploring the implementation of Role-Based Access Control (RBAC) and am seeking your guidance. Could you kindly provide insights, examples, or direct me to relevant GitHub repositories showcasing effective RBAC implementation? Your expertise and assistance would be highly appreciated.
13 replies
TtRPC
Created by syedahnb on 9/22/2023 in #❓-help
Troubleshooting 'Type Instantiation Is Excessively Deep' Error in Next.js Project with TRPC Integrat
I am using the table and pagination for listing data, just as the awesome developer did in 'https://github.com/PoffM/nextjs-issue-tracker.' Everything was working perfectly. I upgraded all packages, including the trpc code, but after the update, I started getting an error. I applied the same code in version 10, but I'm encountering this specific error at the 'PathValue' for the type 'GetProcedure<TRouteKey extends RouteKey>': 'type instantiation is excessively deep and possibly infinite.' //file src/utils/trpc.ts at this line getting error
type GetProcedure = PathValue<
AppRouter["_def"]["procedures"],
TRouteKey
>;
type GetProcedure = PathValue<
AppRouter["_def"]["procedures"],
TRouteKey
>;
2 replies