Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve admin tools #71

Merged
merged 9 commits into from
Sep 17, 2023
Merged

Improve admin tools #71

merged 9 commits into from
Sep 17, 2023

Conversation

ttoino
Copy link
Member

@ttoino ttoino commented Sep 16, 2023

Related to #58.

@ttoino ttoino self-assigned this Sep 16, 2023
Naapperas
Naapperas previously approved these changes Sep 17, 2023
Naapperas
Naapperas previously approved these changes Sep 17, 2023
@ttoino ttoino marked this pull request as ready for review September 17, 2023 04:14
toni-santos
toni-santos previously approved these changes Sep 17, 2023
Copy link
Contributor

@pedrosilva17 pedrosilva17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things I've noticed:

  • I'm not sure if it's only happening with me, but after editing a user's picture, it no longer appears when I'm in the edit page for that user.
  • Creating a new Company causes the following error:
    image
  • Updating social media currently has no effect. More on it in the comments
  • isset() returns true when evaluating an array of keys with null values, which in this case means it will always return true, regardless of whether I type anything in the social media inputs or not (for example), and it will also create those types of arrays in the database. Not sure if this was intended or not, my idea was that an entry in the SocialMedia table would only be created/updated if anything was typed in the social media inputs. However, if this behavior is fixed, maybe we would need to remove that check when updating, as I might want to delete all of my social media from the website (and that will be impossible if arrays of keys with null values are properly filtered).

app/Http/Controllers/UserCRUDController.php Outdated Show resolved Hide resolved
@ttoino
Copy link
Member Author

ttoino commented Sep 17, 2023

Some things I've noticed:

  • I'm not sure if it's only happening with me, but after editing a user's picture, it no longer appears when I'm in the edit page for that user.

This is caused by two things, firstly, you have to run the storage:link artisan command to create the relevant folders where pfps are stored, secondly, you need to change the APP_URL env variable to include the port (this is already done in #69).

  • Creating a new Company causes the following error:
    image

This works for me. You probably need to migrate the db.

  • Updating social media currently has no effect. More on it in the comments
  • isset() returns true when evaluating an array of keys with null values, which in this case means it will always return true, regardless of whether I type anything in the social media inputs or not (for example), and it will also create those types of arrays in the database. Not sure if this was intended or not, my idea was that an entry in the SocialMedia table would only be created/updated if anything was typed in the social media inputs. However, if this behavior is fixed, maybe we would need to remove that check when updating, as I might want to delete all of my social media from the website (and that will be impossible if arrays of keys with null values are properly filtered).

I'll look into these issues. This should now be fixed.

@ttoino ttoino merged commit bdd35a2 into main Sep 17, 2023
5 checks passed
@ttoino ttoino deleted the feature/better-admin-tools branch September 17, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants