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

add link to create new variant if none #5904

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

zachariah-at-msupply
Copy link
Contributor

Fixes Part 1 of #5554

πŸ‘©πŸ»β€πŸ’» What does this PR do?

Adds a create new variant link on the catalogue>item>variants tab, if there are no variants present.

Screenshot 2024-12-30 at 09 02 38

πŸ’Œ Any notes for the reviewer?

The capitalisation seems a bit dodgy. It seems all the 'create a new one' links will be similar. Using a function called toLocaleLowerCase() in the NothingHere.tsx file can solve this - should I create an issue to do that?

πŸ§ͺ Testing

  • log in to your open mSupply central server
  • go to cataogue>item page and then click on an item that has no variants to see its detail view
  • go to the variants tab
  • see if the link that says 'create a new one' functions the same as the 'add variant' button on the top right of the variants tab page.

πŸ“ƒ 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 Dec 29, 2024
@github-actions github-actions bot added bug Something is borken feature: GAPS Team Korimako LachΓ©, Aimee, Noel John, and Zachariah labels Dec 29, 2024
Copy link

github-actions bot commented Dec 29, 2024

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.02 MB 5.02 MB 11 B (0.00%)

Copy link
Collaborator

@mark-prins mark-prins left a comment

Choose a reason for hiding this comment

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

πŸ‘ Looks good thanks!
I have a requested change - it's a minor point but worth getting into the habit of which is why I mention it.

Re the question about capitalisation - the place that you would change it is in the translation, and not calling a lowercase function. but don't πŸ˜„ I think the caps is ok - if anything is needed, it would be a separator or some punctuation.. but it's fine as it. at least it's consistent!

Copy link
Collaborator

@mark-prins mark-prins left a comment

Choose a reason for hiding this comment

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

🚒 Ship it! (thanks!)

@zachariah-at-msupply zachariah-at-msupply merged commit 61779e4 into develop Dec 31, 2024
4 checks passed
@zachariah-at-msupply zachariah-at-msupply deleted the 5554.1-link-to-add-variant branch December 31, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is borken feature: GAPS Team Korimako LachΓ©, Aimee, Noel John, and Zachariah
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants