4jean / lav_sms

Laravel School Management System (LAVSMS)
MIT License
769 stars 475 forks source link

When trying to edit Super Admin Profile (Attempt to read property "emp_date" on null) #34

Closed jvivas-rock closed 2 years ago

jvivas-rock commented 2 years ago

That happens while I'm logged with Super Admin account and I just tried to edit the profile because photo is not working and while I press that option, that exception is happening

yungifez commented 2 years ago

Can you post a full screenshot of the error to know where exactly the error is coming from

jvivas-rock commented 2 years ago

Can you post a full screenshot of the error to know where exactly the error is coming from

src: /resources/views/pages/support_team/users/edit.blade.php image

yungifez commented 2 years ago

Ok I have found the problem which is not really a REAL WORLD problem

on seeding, some staff are added but associated staff records are not made with those staff

same case with students etc

but the code tries to look for those properties

Now there's no solution to this problem except to create another staff you'll test with instead of the default staff added during seeding

Try creating a new set of users and students that you'll perform your tests on instead of the seeded ones

you might also encounter problems like these when you try to batch fix students exam records and so on

yungifez commented 2 years ago

sorry for the late reply

4jean commented 2 years ago

Ok I have found the problem which is not really a REAL WORLD problem

on seeding, some staff are added but associated staff records are not made with those staff

same case with students etc

but the code tries to look for those properties

Now there's no solution to this problem except to create another staff you'll test with instead of the default staff added during seeding

Try creating a new set of users and students that you'll perform your tests on instead of the seeded ones

you might also encounter problems like these when you try to batch fix students exam records and so on

that;s correct the seeders had partial data. just create a new user, however issue fixed in edit.blade.php 8f8d922e30cb0f1e0fe6e1a01dff054c3544b785