Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

feat: allow row editing#131

Open
GrbavaCigla wants to merge 15 commits into
studentinovisad:mainfrom
GrbavaCigla:main
Open

feat: allow row editing#131
GrbavaCigla wants to merge 15 commits into
studentinovisad:mainfrom
GrbavaCigla:main

Conversation

@GrbavaCigla

Copy link
Copy Markdown

Closes #97.

@aleksasiriski aleksasiriski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great start, I haven't looked at everything yet but found a few questions :)

Comment thread src/routes/(dashboard)/data-table-actions.svelte Outdated
Comment thread src/routes/(dashboard)/data-table-actions.svelte Outdated
Comment thread src/routes/(dashboard)/data-table-actions.svelte Outdated
Comment thread src/routes/(dashboard)/data-table-actions.svelte Outdated
Comment thread src/lib/server/db/person.ts Outdated
Comment thread src/lib/server/db/person.ts Outdated
Comment thread src/routes/(dashboard)/data-table-actions.svelte Outdated
@GrbavaCigla

Copy link
Copy Markdown
Author

The feature is done, only polishing left. I want to somehow try and display combo boxes for foreign keys.

@GrbavaCigla

Copy link
Copy Markdown
Author

Also you don't have to review every change I make :) Save time and review it after I make draft a proper PR.

@GrbavaCigla
GrbavaCigla marked this pull request as ready for review January 9, 2025 12:49
Comment thread src/routes/(dashboard)/+page.server.ts Outdated
Comment thread src/routes/(dashboard)/+page.server.ts Outdated

@aleksasiriski aleksasiriski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks very good, but next to the two comments I left:

  • Enter while editing any field should submit the form (save changes)
  • There should be a toast on successful change
  • Form validation messages should appear under (or over, popover?) the fields when they're incorrect (instead of just a toast saying Invalid form input)
  • There should be a way to cancel the edit (next to save button another cancel button)

@aleksasiriski

Copy link
Copy Markdown
Contributor

If you need help with any of the requests please let me know :)

@GrbavaCigla

GrbavaCigla commented Jan 10, 2025

Copy link
Copy Markdown
Author
  • Form validation messages should appear under (or over, popover?) the fields when they're incorrect (instead of just a toast saying Invalid form input)
  • Add a delete button
  • Enter while editing any field should submit the form (save changes)
  • There should be a toast on successful change
  • There should be a way to cancel the edit (next to save button another cancel button)

@MikMik1011

Copy link
Copy Markdown
Contributor

Feedback we got from the rectorate building;

  • Identifiers should be editable because of typos
  • Persons should be deletable due to duplicate entries with correct and wrong identifiers because persons identifiers cannot be edited

From the security side, regular users shouldn't be able to do this kind of major edits, since some rogue user could just delete or edit someones whole history, but I guess that admins could be trusted to do that, so maybe it can be a feature in admin panel?

@aleksasiriski

Copy link
Copy Markdown
Contributor

From the security side, regular users shouldn't be able to do this kind of major edits, since some rogue user could just delete or edit someones whole history, but I guess that admins could be trusted to do that, so maybe it can be a feature in admin panel?

Perhaps there should be a simple dialog that asks for secret if the identifier is being changed. If it's untouched, no secret should be required.

@GrbavaCigla

Copy link
Copy Markdown
Author

I can easily add a delete button along with the edit button.

@aleksasiriski
aleksasiriski requested a review from a team January 14, 2025 16:01
@aleksasiriski

Copy link
Copy Markdown
Contributor

Can you resolve conflicts with main?

Also, definately any edit should require a dialog that asks for admin secret

@aleksasiriski

Copy link
Copy Markdown
Contributor

@GrbavaCigla Will you continue work on this?

There's was an idea to bring "admin sessions" to the app so that we can use better UIs for admins (tables with real data since it won't be public any more). Maybe this way we can make editing easier and restrict it only to admins, while also keeping the main search table clutterless.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Allow updates

3 participants