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

[Enhancement] Qualifications Page Resets After Adding New Staff #9

Open
YuxinZhang214 opened this issue Aug 8, 2023 · 3 comments
Open

Comments

@YuxinZhang214
Copy link
Contributor

Describe the Enhancement

  • Currently, after adding a new staff member, the Qualifications page resets to its default state 0.
  • While this reset might be an intended feature, maintaining the current state and not resetting could improve user experience, especially when adding multiple staff members consecutively.

Desired Behaviour
After adding a new staff member, the Qualifications page should maintain its current state

Current Behaviour
After adding a new staff member, the Qualifications page resets to its default state 0

Suggested Solution

  • Consider updating the page's behaviour to retain its state after adding new staff.
  • If the reset is an intended feature, perhaps a toggle or setting can be added that allows users to choose between resetting and retaining the page's state.

Environment

  • OS: macOS Ventura 13.2.1
  • Browser: Chrome 115.0.5790.114
  • Node.js version: v16.17.1
@YuxinZhang214
Copy link
Contributor Author

In /page/(main)/qualifications/page.tsx line 37 - 48.
Here's that code section for resetting the staff number to its default state 0

{Object.entries(skillList).map((skill) => (
            <div key={skill[0]} className={"flex w-full gap-4"}>
              <NumberInput
                defaultValue={skill[1].minCount}
                min={0}
                className={"max-w-[80px] max-h-[40px]"}
                onChange={(e) => {
                  if (e.trim() && parseInt(e.trim()) >= 0) {
                    setSkillMinCount(skill[0], parseInt(e.trim()));
                  }
                }}
              >

@YuxinZhang214
Copy link
Contributor Author

The issue also happens when deleting the staff

@YuxinZhang214
Copy link
Contributor Author

It also happens after done scheduling

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

No branches or pull requests

1 participant