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

Sk sb estimate next purchase #35

Closed
wants to merge 6 commits into from

Conversation

skillitzimberg
Copy link
Contributor

@skillitzimberg skillitzimberg commented May 3, 2020

Type of Changes

Type
πŸ› Bug fix
βœ“ ✨ New feature
πŸ”¨ Refactoring
πŸ’― Add tests
πŸ”— Update dependencies
πŸ“œ Docs

Description

Updates

Before

After

Steps to take

  • Discover the basic math involved in calculating the average length of purchase intervals
  • Understand the estimates.js script
  • Need number of times an item is purchased numberOfPurchases : add to db : increment every time the purchase button is clicked
  • Get latestInterval (current date - last purchase date)

Related Issue

closes #35

Acceptance Criteria

  • When a purchase is recorded:
  1. the estimated number of days until the next purchase date should be calculated
  2. recorded in the database

Testing Steps / QA Criteria

USE BRANCH/DEPLOY PREVIEW FOR PR REVEIW AND TESTING!!!!
Pull the sk-sb-estimate-next-purchase branch.
Run npm install.
Run npm start.

@skillitzimberg skillitzimberg changed the title Add estimates script. Sk sb estimate next purchase May 4, 2020
@skillitzimberg skillitzimberg deleted the sk-sb-estimate-next-purchase branch May 5, 2020 18:23
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.

4 participants