Sayy
Sayy
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
solve with code like this :
->description(fn (Product $record): string => $record->productItems()->pluck('satuan')->implode(', '))
->description(fn (Product $record): string => $record->productItems()->pluck('satuan')->implode(', '))
10 replies
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
No description
10 replies
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
already try then how to get data string ?
Tables\Columns\TextColumn::make('productItems.stock')
->numeric()
->label('Stock Satuan')
->description(fn (Product $record): string => $record->productItems()->pluck('satuan'))
->placeholder('-')
->formatStateUsing(function ($state) {
return str($state)->replace(',', ' | ');
}),
Tables\Columns\TextColumn::make('productItems.stock')
->numeric()
->label('Stock Satuan')
->description(fn (Product $record): string => $record->productItems()->pluck('satuan'))
->placeholder('-')
->formatStateUsing(function ($state) {
return str($state)->replace(',', ' | ');
}),
10 replies
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
my code
Tables\Columns\TextColumn::make('productItems.stock')
->numeric()
->label('Stock Satuan')
->description(fn (Product $record): string => $record->productItems->satuan)
->formatStateUsing(function ($state) {
return str($state)->replace(',', ' | ');
}),
Tables\Columns\TextColumn::make('productItems.stock')
->numeric()
->label('Stock Satuan')
->description(fn (Product $record): string => $record->productItems->satuan)
->formatStateUsing(function ($state) {
return str($state)->replace(',', ' | ');
}),
10 replies
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
No description
10 replies
FFilament
Created by Sayy on 6/13/2024 in #❓┊help
how to get data relationship from table text column in description
No description
10 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
@Dennis Koch thanks for help me, sorry make you confuse to understand
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
you say this in the beginning ? (im so sorry sir if you say that), its work but i just want to simple like updateQuantity with harga will change together like that but if cant i think just change one by one
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
its same im change with hargaAwal() not trigger
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
if im duplicate this function then im change for updateHargaAwal, and my blade same with updateQuantity its work
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
not triggered
public function updateHargaAwal()
{
$this->recordDetail->update([
'harga_awal' => $this->hargaAwal,
]);
}
public function updateHargaAwal()
{
$this->recordDetail->update([
'harga_awal' => $this->hargaAwal,
]);
}
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
No description
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
i think posible to create new function right ? like one by one harga_awal same with quantity ?
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
not run with dd if im using like this
<input
class="w-15 text-xs h-8 dark:bg-zinc-800 dark:text-white rounded-md border shadow-sm border-zinc-200 dark:border-zinc-700"
type="number"
wire:model.blur="harga_awal"
/>
<input
class="w-15 text-xs h-8 dark:bg-zinc-800 dark:text-white rounded-md border shadow-sm border-zinc-200 dark:border-zinc-700"
type="number"
wire:model.blur="harga_awal"
/>
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
<input class="w-15 text-xs h-8 dark:bg-zinc-800 dark:text-white rounded-md border shadow-sm border-zinc-200 dark:border-zinc-700"
type="number"
value="{{ $orderDetail->quantity }}"
wire:change="updateQuantity({{ $orderDetail->id }}, $event.target.value)"
min="1"
max="{{ $orderDetail->product->stock_quantity }}" />
<input class="w-15 text-xs h-8 dark:bg-zinc-800 dark:text-white rounded-md border shadow-sm border-zinc-200 dark:border-zinc-700"
type="number"
value="{{ $orderDetail->quantity }}"
wire:change="updateQuantity({{ $orderDetail->id }}, $event.target.value)"
min="1"
max="{{ $orderDetail->product->stock_quantity }}" />
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
yes because im using wire:change
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
what you want to screenshot?
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
//Update Quantity for product
public function updateQuantity(TransaksiPembelianDetail $record, $quantity): void
{
if($quantity > 0){
$record->update([
'quantity' => $quantity,
]);
}
}
//Update Quantity for product
public function updateQuantity(TransaksiPembelianDetail $record, $quantity): void
{
if($quantity > 0){
$record->update([
'quantity' => $quantity,
]);
}
}
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
if im using wire change will be update if im change my input
83 replies
FFilament
Created by Sayy on 5/24/2024 in #❓┊help
how to get data from input with custom page
this function means
public function updatedHargaAwal() {
$this->transaksiDetail->update([
'harga_awal' => $this->harga_awal
]);
}
public function updatedHargaAwal() {
$this->transaksiDetail->update([
'harga_awal' => $this->harga_awal
]);
}
83 replies