Umar Farooq
Umar Farooq
FFilament
Created by KA on 12/6/2023 in #❓┊help
->expandableLimitedList() seems not working as expected for InfoList
The expandableLimitedList also navigates the page instead of just expanding the list
23 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
where applications is the relation define in the user model
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
filament automatically handle
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
then use something like TextInputColumn::make('applications.screening_mark')
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
is there a relation with the users table?
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
in which table screening_mark column exists?
17 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
inside the EditResource class
protected function handleRecordUpdate(Model $record, array $data): Model
{
return parent::handleRecordUpdate($record, $data); // TODO: Change the autogenerated stub
}
protected function handleRecordUpdate(Model $record, array $data): Model
{
return parent::handleRecordUpdate($record, $data); // TODO: Change the autogenerated stub
}
17 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
no solution? 🥲
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
HasLocalPreference is not working
/**
* @return string|null
*/
public function preferredLocale(): ?string
{
return \App::getLocale();
}
/**
* @return string|null
*/
public function preferredLocale(): ?string
{
return \App::getLocale();
}
38 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
thanks
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
working
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
No description
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
nothing change
public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();

$data = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$data['response-' . $postOrderRequest->id] = [
'image' => null,
'response' => null
];
} else {
$data['response-' . $postOrderRequest->id] = null;
}
}
}

$this->form->fill($data);
}
public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();

$data = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$data['response-' . $postOrderRequest->id] = [
'image' => null,
'response' => null
];
} else {
$data['response-' . $postOrderRequest->id] = null;
}
}
}

$this->form->fill($data);
}
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
I don't have $this->form->fill() 😃
13 replies
FFilament
Created by Umar Farooq on 6/11/2024 in #❓┊help
Repeater not working on custom page
here is the full code
class CustomerReview extends BasePage
{
protected static string $view = 'filament.pages.customer-review';

protected static ?string $model = LineItem::class;

public LineItem $record;

public array $settings;

public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();
}

/**
* @param Form $form
* @return Form
*/
public function form(Form $form): Form
{
$formComponents = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$formComponents[] = Forms\Components\Repeater::make('request-' . $postOrderRequest->id)
->schema([
Forms\Components\FileUpload::make('image')
->label(__('request-builder.post_request.message'))
->disk('s3')
->image()
->required(),

Forms\Components\Textarea::make('response')
->label(__('request-builder.post_request.message'))
->rows(8)
->required(),
])
->minItems(1)
->columns(2)
->maxItems(3);
} else {
$formComponents[] = Forms\Components\TextInput::make('response-' . $postOrderRequest->id)
->required();
}
}
}

return $form
->schema($formComponents);
}
}
class CustomerReview extends BasePage
{
protected static string $view = 'filament.pages.customer-review';

protected static ?string $model = LineItem::class;

public LineItem $record;

public array $settings;

public function mount(
AppSettings $settings,
int $lineItem,
): void
{
$this->record = static::$model::find($lineItem);
$this->settings = $settings->toArray();
}

/**
* @param Form $form
* @return Form
*/
public function form(Form $form): Form
{
$formComponents = [];

foreach ($this->record->postOrderRequests as $postOrderRequest) {
$request = $postOrderRequest->request;

if (!$request->workflow->terminated) {
if ($request->type === 'need_picture_request') {
$formComponents[] = Forms\Components\Repeater::make('request-' . $postOrderRequest->id)
->schema([
Forms\Components\FileUpload::make('image')
->label(__('request-builder.post_request.message'))
->disk('s3')
->image()
->required(),

Forms\Components\Textarea::make('response')
->label(__('request-builder.post_request.message'))
->rows(8)
->required(),
])
->minItems(1)
->columns(2)
->maxItems(3);
} else {
$formComponents[] = Forms\Components\TextInput::make('response-' . $postOrderRequest->id)
->required();
}
}
}

return $form
->schema($formComponents);
}
}
13 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
I try to flush all the redis cache
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
No description
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
no, I double check the __('filament-actions::export.notifications.completed.title') working fine expect inside the db notification
38 replies
FFilament
Created by Vp on 5/28/2024 in #❓┊help
export notification message doesn't change base on locale
other translations are working fine according to zh
38 replies