Shaung Bhone
Shaung Bhone
Explore posts from servers
FFilament
Created by Shaung Bhone on 10/13/2024 in #❓┊help
url() validation gives me valid url
How can I validate for that case?
4 replies
FFilament
Created by Shaung Bhone on 10/13/2024 in #❓┊help
url() validation gives me valid url
https://www.nike.com/th/t/รองเท้าผู้-air-force-1-07-WrLlWX/CW2288-111?cp=11357671355_search_%7Cth%7CPMax:+TH+-+Smart+Shopping+-+Brand%7C%7CGOOGLE&gad_source=1&gbraid=0AAAAADLM_Zk46u-Ws6BnF93pFK2j4QcT2&gclid=CjwKCAjwvKi4BhABEiwAH2gcw_7jvIHZETI4DRxbYgnEU-OJKRqKfsLhXmYoGHsVNDw_tqUd6_Q5PhoCenEQAvD_BwE&gclsrc=aw.ds
https://www.nike.com/th/t/รองเท้าผู้-air-force-1-07-WrLlWX/CW2288-111?cp=11357671355_search_%7Cth%7CPMax:+TH+-+Smart+Shopping+-+Brand%7C%7CGOOGLE&gad_source=1&gbraid=0AAAAADLM_Zk46u-Ws6BnF93pFK2j4QcT2&gclid=CjwKCAjwvKi4BhABEiwAH2gcw_7jvIHZETI4DRxbYgnEU-OJKRqKfsLhXmYoGHsVNDw_tqUd6_Q5PhoCenEQAvD_BwE&gclsrc=aw.ds
4 replies
FFilament
Created by Shaung Bhone on 10/12/2024 in #❓┊help
Best approach to save "price" field
do not use format
11 replies
FFilament
Created by Shaung Bhone on 10/12/2024 in #❓┊help
Best approach to save "price" field
used format
11 replies
FFilament
Created by Shaung Bhone on 10/12/2024 in #❓┊help
Best approach to save "price" field
Both are decimal
11 replies
FFilament
Created by Shaung Bhone on 10/12/2024 in #❓┊help
Best approach to save "price" field
No description
11 replies
FFilament
Created by Shaung Bhone on 10/12/2024 in #❓┊help
Best approach to save "price" field
No description
11 replies
FFilament
Created by Shaung Bhone on 9/21/2024 in #❓┊help
Multi Tenancy with one to many polymorphic relationship.
stucking
5 replies
FFilament
Created by Shaung Bhone on 9/21/2024 in #❓┊help
Multi Tenancy with one to many polymorphic relationship.
No description
5 replies
FFilament
Created by Shaung Bhone on 9/21/2024 in #❓┊help
Multi Tenancy with one to many polymorphic relationship.
Yes, error guide me like to do that. But it's one to many ploymorphic relationship. I don't need reverse relationship. Maybe I'm not sure. Let me check
5 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
Forms\Components\Select::make('product_id')
->label('Product')
->options(Product::query()->pluck('name', 'id'))
->required()
->live(onBlur: true)
->afterStateUpdated(
fn(
$state,
Forms\Set $set
) => $set(
'unit_price',
Number::format(
Product::find($state)?->price *
Product::find($state)?->currency->rate *
(1 + Product::find($state)?->margin / 100) ?? 0
),
)
)
Forms\Components\Select::make('product_id')
->label('Product')
->options(Product::query()->pluck('name', 'id'))
->required()
->live(onBlur: true)
->afterStateUpdated(
fn(
$state,
Forms\Set $set
) => $set(
'unit_price',
Number::format(
Product::find($state)?->price *
Product::find($state)?->currency->rate *
(1 + Product::find($state)?->margin / 100) ?? 0
),
)
)
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
Thank you so much
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
No description
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
Forms\Components\TextInput::make('unit_price')
->label('Unit Price')
->disabled()
->formatStateUsing(fn (?int $state): ?int => $state)
->mask(RawJs::make(<<<'JS'
$money($input, ',', '.')
JS))
->required()
//
Forms\Components\TextInput::make('unit_price')
->label('Unit Price')
->disabled()
->formatStateUsing(fn (?int $state): ?int => $state)
->mask(RawJs::make(<<<'JS'
$money($input, ',', '.')
JS))
->required()
//
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
maybe that code wrong
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
Forms\Components\Select::make('product_id')
->label('Product')
->options(Product::query()->pluck('name', 'id'))
->required()
->reactive()
->afterStateUpdated(
fn(
$state,
Forms\Set $set
) => $set(
'unit_price',
Product::find($state)?->price *
Product::find($state)?->currency->rate *
(1 + Product::find($state)?->margin / 100) ?? 0,
)

Forms\Components\Select::make('product_id')
->label('Product')
->options(Product::query()->pluck('name', 'id'))
->required()
->reactive()
->afterStateUpdated(
fn(
$state,
Forms\Set $set
) => $set(
'unit_price',
Product::find($state)?->price *
Product::find($state)?->currency->rate *
(1 + Product::find($state)?->margin / 100) ?? 0,
)

21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
not working
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
It's still
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
Thank you let me check
21 replies
FFilament
Created by Shaung Bhone on 8/29/2024 in #❓┊help
mask money comma separate is not working
No description
21 replies