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

Product totals - custom units #4609

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

awwaiid
Copy link
Collaborator

@awwaiid awwaiid commented Aug 25, 2024

Implement #4408

  • Adds units when feature is enabled and there are any units
  • Changes sort to be by name instead of by qty

image

@@ -23,23 +23,8 @@
end
end

context 'when item name is nil' do
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From a production snapshot:

pry(main)> Partners::ItemRequest.where(name: nil).count
  Partners::ItemRequest Count (15.1ms)  SELECT COUNT(*) FROM "item_requests" WHERE "item_requests"."name" IS NULL
=> 0

@awwaiid awwaiid marked this pull request as ready for review August 25, 2024 02:57
@awwaiid awwaiid requested review from dorner and cielf August 25, 2024 02:58
@awwaiid awwaiid added this to the Request Units (Packs) milestone Aug 25, 2024
@awwaiid awwaiid linked an issue Aug 25, 2024 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

1/ Could we use the plural for the custom units in this?
2/ We're putting a dash, but no unit when it's that situation where they just have units. maybe we should say "units" there.
Screenshot 2024-08-27 at 1 44 24 PM

@awwaiid
Copy link
Collaborator Author

awwaiid commented Sep 1, 2024

I'm wondering which is better, Pads - units or Pads. Also ... the way we've implemented units elsewhere end up recording an empty string. We could maybe explicitly record "units" as the individual-units default recorded in the database.

@cielf
Copy link
Collaborator

cielf commented Sep 1, 2024

Which is better is a fair question. Is it a Wednesday question?

@dorner
Copy link
Collaborator

dorner commented Sep 2, 2024

I'd probably prefer it like this:

  • Pads (individual)
  • Pads (in packs)

@cielf
Copy link
Collaborator

cielf commented Sep 2, 2024

I'd probably prefer it like this:

  • Pads (individual)
  • Pads (in packs)

I think (in packs) implies the number of pads that happen to be in packs, as opposed to the number of packs. I kind of like the parentheses, though.

This is still the whole naming things issue - but I think we should be consistent between what we use for the partners and what we use for the banks -- because they do have conversations.

How about:

  • Pads (units)
  • Pads (packs)

I don't like "units", because of the naming conflict with "Custom Request Units" , but it's what we got from the banks. We could check if "pieces" would work for them, maybe?

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.

[PACKS] #13 Calcuate Product Totals
3 participants