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

5750 civ 2.5 add item in page #5909

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

roxy-dao
Copy link
Contributor

@roxy-dao roxy-dao commented Jan 2, 2025

Fixes #5750

👩🏻‍💻 What does this PR do?

  • Refactor routes to utils to reduce duplication
  • Change the Add item button in Requisition and Internal Order to redirect to the line edit page where the user can add a new item to the requisition
  • Add New item at the bottom of the item list so users can add new items directly on the line edit page instead of having to go out and add new items
  • The New item option shouldn't be available if the Internal Order or Requisition is created from a program.
    Screenshot 2025-01-03 at 12 45 50 PM
    Screenshot 2025-01-03 at 12 46 04 PM

🧪 Testing

  • Create an Internal Order or Requisition
  • Click on Add item button at the top right of the screen
  • Be redirect to a page where you can add item
  • Add item
  • Click New item in the list on the left
  • Should be able to add new items to the requisition
  • Create a program Internal Order or Requisition
  • Shouldn't be able to add item

📃 Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added this to the v2.5.0 milestone Jan 2, 2025
@github-actions github-actions bot added enhancement New feature or request Team Ruru 🦉 Andrei, Roxy, Ferg feature: CIV labels Jan 2, 2025
Copy link

github-actions bot commented Jan 2, 2025

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.13 MB 5.13 MB 52 B (0.00%)

@lache-melvin lache-melvin self-assigned this Jan 7, 2025
<InputWithLabelRow
Input={
<NumericTextInput
width={INPUT_WIDTH}
value={draft?.outgoingUnits}
value={draft?.itemStats.availableStockOnHand}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you summarise what you were changing here? Looks like you've added some fields... and hidden more things behind useConsumptionData - what does that mean? lol

Copy link
Contributor Author

@roxy-dao roxy-dao Jan 7, 2025

Choose a reason for hiding this comment

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

Ah no fields were added, they were just shifted since the stock autocomplete was added at the top~ and sorry, that's the wrong pref! It's supposed to be showExtraFields. Also the value was wrong (:

Copy link
Contributor

@lache-melvin lache-melvin left a comment

Choose a reason for hiding this comment

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

Looks great! Just want to understand the other changes in the line edit files - let me know what you think of using the button instead!

@roxy-dao roxy-dao requested a review from lache-melvin January 7, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: CIV Team Ruru 🦉 Andrei, Roxy, Ferg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CIV 2.5: Add item in page
2 participants