thyk123
thyk123
FFilament
Created by thyk123 on 5/26/2024 in #❓┊help
notification inside action not showing
Oh i see, thank you so much!
8 replies
FFilament
Created by thyk123 on 5/26/2024 in #❓┊help
notification inside action not showing
Hello, thank you again for helping me I already tried that but seems the same, the notification does not show 🥹
8 replies
FFilament
Created by thyk123 on 5/26/2024 in #❓┊help
is it possible to get model name inside resource?
Thank you!
5 replies
FFilament
Created by kartikey_maandothiya on 5/25/2024 in #❓┊help
Image is not showing on filament admin panel
10 replies
FFilament
Created by kartikey_maandothiya on 5/25/2024 in #❓┊help
Image is not showing on filament admin panel
10 replies
FFilament
Created by thyk123 on 5/21/2024 in #❓┊help
get maxvalue qty based on stock
oh I'm so sorry, i already found the answer
->maxValue(function(Forms\Get $get, $record)
{
if (!empty($record))
return $record->inventory->qty-$record->inventory->inventory_location_list->count();
if (filled($get('inventory_id')))
return Inventory::where('id',$get('inventory_id'))->select(['qty'])->first()->qty;
else return '1';
})
->maxValue(function(Forms\Get $get, $record)
{
if (!empty($record))
return $record->inventory->qty-$record->inventory->inventory_location_list->count();
if (filled($get('inventory_id')))
return Inventory::where('id',$get('inventory_id'))->select(['qty'])->first()->qty;
else return '1';
})
Thank you so much for your help! @Dennis Koch
9 replies
FFilament
Created by thyk123 on 5/21/2024 in #❓┊help
get maxvalue qty based on stock
error shows when trying to create where inventory_id is not selected
9 replies
FFilament
Created by thyk123 on 5/21/2024 in #❓┊help
get maxvalue qty based on stock
i got this
Attempt to read property "qty" on null
Attempt to read property "qty" on null
9 replies
FFilament
Created by thyk123 on 5/21/2024 in #❓┊help
get maxvalue qty based on stock
Hello! Thank you for your response, I appreciate it! I use this but still not working
->disabled(fn (Forms\Get $get): bool => !filled($get('inventory_id')))
->disabled(fn (Forms\Get $get): bool => !filled($get('inventory_id')))
9 replies
FFilament
Created by thyk123 on 5/16/2024 in #❓┊help
is it possible to add loading screen
Thank you so much! Sorry for my late respond
7 replies
FFilament
Created by thyk123 on 5/16/2024 in #❓┊help
is it possible to add loading screen
Hello, thank you for the respond, i really gratefull for that! So, take an example when we are try to set another field with
->afterStateUpdated(Set $set)
->afterStateUpdated(Set $set)
Livewire try update the another field right, but it takes time. I want to show a loading information for that, so user can know that field is tring to fetch data. But instead showing loading animation in that field, i want to show the loading animation or something inside
Forms\Components\Section::make('')
Forms\Components\Section::make('')
So the whole section showing a loading that tells user something has been change and takes a time Is that possible?
7 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
thank you for your help! i already test it but sadly it doesnt work
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
Btw, do you know how to make the groups searchable? I think i need user can search the group title too. So in this context it's become searchable for the paymentType.name
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
works like a charm!, Thank you so much for your help! I really appreciate for your help!
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
correct!
25 replies
FFilament
Created by thyk123 on 5/16/2024 in #❓┊help
return string instead array
Thank you Lara Zeus admin!
5 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
in InvoiceList resource, its inside repeater
FilamentTableRepeater\Forms\Components\TableRepeater::make('invoice_items')
->label('Items')
->relationship()
->schema([
Forms\Components\Select::make('payment_type_list_id')
->searchable()
->options(function (){
$lists=PaymentTypeList::first()->payment_type->id;
$paymentTypes = PaymentType::whereHas('payment_type_lists', function ($query) use ($lists)
{
$query->where('payment_type_list_id', $lists);
})
->get()
->groupBy('name');
dd($lists);
}),
])
FilamentTableRepeater\Forms\Components\TableRepeater::make('invoice_items')
->label('Items')
->relationship()
->schema([
Forms\Components\Select::make('payment_type_list_id')
->searchable()
->options(function (){
$lists=PaymentTypeList::first()->payment_type->id;
$paymentTypes = PaymentType::whereHas('payment_type_lists', function ($query) use ($lists)
{
$query->where('payment_type_list_id', $lists);
})
->get()
->groupBy('name');
dd($lists);
}),
])
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
class PaymentTypeList extends Model
{
use HasFactory;


public function payment_type(): BelongsTo
{
return $this->BelongsTo(PaymentType::class);
}
}

class PaymentType extends Model
{
use HasFactory,SoftDeletes;

public function payment_type_lists(): HasMany
{
return $this->HasMany(PaymentTypeList::class);
}
}
class PaymentTypeList extends Model
{
use HasFactory;


public function payment_type(): BelongsTo
{
return $this->BelongsTo(PaymentType::class);
}
}

class PaymentType extends Model
{
use HasFactory,SoftDeletes;

public function payment_type_lists(): HasMany
{
return $this->HasMany(PaymentTypeList::class);
}
}
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
@FK21 thank you for you help! i have 2 tables is PaymentTypes and PaymentTypeLists each PaymentTypes has multiple PaymentTypeLists, so PaymentType hasMany PaymentTypeLists so i want to make PaymentTypes as groups key and PaymentTypeLists as the options
25 replies
FFilament
Created by thyk123 on 5/15/2024 in #❓┊help
is it possible to group select items from query database
Hi thank you so much for your help! But can I get an example, it's should not be exactly what I ask but could you give me a rough sketch of how to build in query builder laravel? Many thanks!
25 replies