alonemz
alonemz
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
["AFB Stain:1", "Wet Smear:1", "Gram Stain:1"] how to edit this in filament
30 replies
FFilament
Created by alonemz on 5/25/2024 in #❓┊help
print action
9 replies
FFilament
Created by alonemz on 5/25/2024 in #❓┊help
print action
i have add new question sir related to filament can you see that https://discord.com/channels/883083792112300104/1244701110586048613
9 replies
FFilament
Created by alonemz on 5/25/2024 in #❓┊help
print action
Oh yah ok Sir
9 replies
FFilament
Created by alonemz on 5/25/2024 in #❓┊help
print action
yes but this makes print the current page i want print like invoice kinda
9 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
public function table(Table $table): Table { // Get the user ID $userId = $this->getOwnerRecord()->user_id; // Retrieve medical records for the user $medicalRecords = MedicalRecord::where('user_id', $userId)->get(); // Get the medical record IDs $medicalRecordIds = $medicalRecords->pluck('id'); // Retrieve vital signs for the medical records $vitalSigns = VitalSign::whereIn('medical_record_id', $medicalRecordIds)->get(); // Map the vital signs data $data = $vitalSigns->map(function ($vitalSign) { return [ 'user_id' => $vitalSign->user_id, 'temperature' => $vitalSign->temperature, 'blood_pressure' => $vitalSign->blood_pressure, 'heart_rate' => $vitalSign->heart_rate, 'respiratory_rate' => $vitalSign->respiratory_rate, 'oxygen_saturation' => $vitalSign->oxygen_saturation, ]; }); return $table ->viewData(['data' => $data]) ->columns([ TextColumn::make('user_id')->label('Patient ID'), TextColumn::make('temperature')->sortable()->searchable(), TextColumn::make('blood_pressure')->sortable()->searchable(), TextColumn::make('heart_rate')->sortable()->searchable(), TextColumn::make('respiratory_rate')->sortable()->searchable(), TextColumn::make('oxygen_saturation')->sortable()->searchable(), ]); how can i pass?
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
insted treat works for me thanx for ur support
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
Hello Leandro here when i create the medical request i want also crate record to medical record table the requester id and the medical_request_id can you help me with this if you can?
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
here is my code please refactor me i just want to crate the medical record when i crate the medical request
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
hello public static function form(Form $form): Form { $user = auth()->user(); return $form->schema([ Textarea::make('description')->nullable(), Hidden::make('status')->default('open'), Hidden::make('user_id')->default($user->id), Hidden::make('approver_id')->default($user->manager_id), FileUpload::make('attachment') // Define file validation rules ]); } i have this form and i want to stor also this to othere db the medical_request_id and also the user_id the requester to medical_record table so i used like this but not working protected function beforeSave(): void { $resource = $this->getResource(); $record = $resource->getCurrentRecord(); // Create a new MedicalRecord instance $medicalRecord = new MedicalRecord(); // Set the user_id and medical_request_id for the MedicalRecord $medicalRecord->user_id = $record->user_id; $medicalRecord->medical_request_id = $record->id; // Save the MedicalRecord instance $medicalRecord->save(); }
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
ONE MORE question but unless i didnt run this comand the notfication is not stored and also not coming in the pannel
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
No description
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
let me try this
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
yes i have set this ->databaseNotifications(); to the panel and also i have done the migration but in resorec i set befor save protected function beforeCreate(): void { Notification::make() ->success() ->title('User Created , You Need focus ') ->sendToDatabase(auth()->user()); } like this but cant store
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
sir i want the database notfication
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
public static function form(Form $form): Form { return $form ->schema([ TextInput::make('name')->label('Name')->required(), TextInput::make('email')->label('Email')->required(), TextInput::make('phone')->label('Phone')->required(), TextInput::make('password')->label('password')->required(), TextInput::make('job_role')->label('Job Role')->required(), TextInput::make('type')->label('User Type')->required(), Notification::make() ->success() ->title('User Created , You Need focus ') ->sendToDatabase(auth()->user()), ]); } hello how can i stor to the db the notificaation
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
filament form request how to get can i use like this public function form(Form $form, Request $request): Form
30 replies
FFilament
Created by alonemz on 5/2/2024 in #❓┊help
Resource page that can share the same Model
no i need the resorece man
30 replies