eighty9nine / filament-approvals

MIT License
70 stars 21 forks source link

i got Attempt to read property "status" on null #7

Closed bo3bdo closed 11 months ago

bo3bdo commented 11 months ago

Attempt to read property "status" on null

Models

namespace App\Models;

use EightyNine\Approvals\Models\ApprovableModel;

class Sig extends ApprovableModel
{
    protected $guarded = [];

    // get staff name
    public function user()
    {
        return $this->belongsTo(User::class, 'user_to_sig');
    }
}

resource

return $table
            ->columns([
                Tables\Columns\TextColumn::make('name'),
                \EightyNine\Approvals\Tables\Columns\ApprovalStatusColumn::make("approvalStatus.status"),
            ])
            ->filters([
                //
            ])
            ->actions([
                Tables\Actions\EditAction::make(),
                ...\EightyNine\Approvals\Tables\Actions\ApprovalActions::make(
                    Action::make("Done")
                ),
            ])

image

image

image

habibtalib commented 11 months ago

how u fixed that?