Giter Site home page Giter Site logo

little-esty-shop's Introduction

Little Esty Shop

https://fast-forest-60065.herokuapp.com/

Background and Description

"Little Esty Shop" is a group project that requires Turing students to build a fictitious e-commerce platform where merchants and admins can manage inventory and fulfill customer invoices.

Our project uses many to many relationships to connect merchants, invoices, items, transactions and customers and allows us to access a variety of information gathering options and display them to a website. Using TDD and OOP, our team developed an application that utilizes ActiveRecord to join our various databases to achieve desired outputs. In addition, API calls are utilized to reference our project's GitHub repository, and the final project was deployed to the web using Heroku.

Technologies Utilized

Ruby 2.7.4

Rails 5.2.6

Connect With Our Team

Brady Rohrig - https://github.com/BRohrig

Brandon Gray - https://github.com/bGray88

Bryan Flanagan - https://github.com/bflanagan138

Sergio Azcona - https://github.com/Sergio-Azcona

Project Phases

  1. Database Setup
  2. User Stories
  3. Extensions
  4. Evaluation

little-esty-shop's People

Contributors

bflanagan138 avatar bgray88 avatar brianzanti avatar brohrig avatar cjsim89 avatar jamisonordway avatar mikedao avatar scottalexandra avatar sergio-azcona avatar timomitchel avatar

Stargazers

 avatar

Forkers

bgray88 brohrig

little-esty-shop's Issues

23. Admin Dashboard Invoices sorted by least recent

As an admin,
When I visit the admin dashboard
In the section for "Incomplete Invoices",
Next to each invoice id I see the date that the invoice was created
And I see the date formatted like "Monday, July 18, 2019"
And I see that the list is ordered from oldest to newest

1. Merchant Dashboard

As a merchant,
When I visit my merchant dashboard (/merchants/merchant_id/dashboard)
Then I see the name of my merchant

12. Merchant Item: Index 5 most popular items

As a merchant
When I visit my items index page
Then I see the names of the top 5 most popular items ranked by total revenue generated
And I see that each item name links to my merchant item show page for that item
And I see the total revenue generated next to each item name

Notes on Revenue Calculation:

  • Only invoices with at least one successful transaction should count towards revenue
  • Revenue for an invoice should be calculated as the sum of the revenue of all invoice items
  • Revenue for an invoice item should be calculated as the invoice item unit price multiplied by the quantity (do not use the item unit price)

11. Merchant Item: Create

As a merchant
When I visit my items index page
I see a link to create a new item.
When I click on the link,
I am taken to a form that allows me to add item information.
When I fill out the form I click ‘Submit’
Then I am taken back to the items index page
And I see the item I just created displayed in the list of items.
And I see my item was created with a default status of disabled.

22. Admin Dashboard Incomplete Invoices

As an admin,
When I visit the admin dashboard
Then I see a section for "Incomplete Invoices"
In that section I see a list of the ids of all invoices
That have items that have not yet been shipped
And each invoice id links to that invoice's admin show page

28. Admin Merchants Grouped by Status

As an admin,
When I visit the admin merchants index
Then I see two sections, one for "Enabled Merchants" and one for "Disabled Merchants"
And I see that each Merchant is listed in the appropriate section

2. Merchant Dashboard Links

As a merchant,
When I visit my merchant dashboard
Then I see link to my merchant items index (/merchants/merchant_id/items)
And I see a link to my merchant invoices index (/merchants/merchant_id/invoices)

GitHub API: Commits

As a visitor or an admin user
When I visit any page on the site
I see the number of commits next to each Github username
This number is updated as each member of the team contributes more commits

26. Admin Merchant Update

As an admin,
When I visit a merchant's admin show page
Then I see a link to update the merchant's information.
When I click the link
Then I am taken to a page to edit this merchant
And I see a form filled in with the existing merchant attribute information
When I update the information in the form and I click ‘submit’
Then I am redirected back to the merchant's admin show page where I see the updated information
And I see a flash message stating that the information has been successfully updated.

30. Admin Merchants: Top 5 Merchants by Revenue

As an admin,
When I visit the admin merchants index
Then I see the names of the top 5 merchants by total revenue generated
And I see that each merchant name links to the admin merchant show page for that merchant
And I see the total revenue generated next to each merchant name

Notes on Revenue Calculation:

  • Only invoices with at least one successful transaction should count towards revenue
  • Revenue for an invoice should be calculated as the sum of the revenue of all invoice items
  • Revenue for an invoice item should be calculated as the invoice item unit price multiplied by the quantity (do not use the item unit price)

24. Admin Merchants Index

As an admin,
When I visit the admin merchants index (/admin/merchants)
Then I see the name of each merchant in the system

DTR Review

DTR and project review prior to first project checkin.
All team members present.

Completed 1-5-23

7. Merchant Items: Show Page

As a merchant,
When I click on the name of an item from the merchant items index page,
Then I am taken to that merchant's item's show page (/merchants/merchant_id/items/item_id)
And I see all of the item's attributes including:

  • Name
  • Description
  • Current Selling Price

21. Admin Dashboard Statistics - Top Customers

As an admin,
When I visit the admin dashboard
Then I see the names of the top 5 customers
who have conducted the largest number of successful transactions
And next to each customer name I see the number of successful transactions they have
conducted

14. Merchant Invoices Index

As a merchant,
When I visit my merchant's invoices index (/merchants/merchant_id/invoices)
Then I see all of the invoices that include at least one of my merchant's items
And for each invoice I see its id
And each id links to the merchant invoice show page

Completed 1/4/23 - BF

8. Merchant Item: Update

As a merchant,
When I visit the merchant show page of an item
I see a link to update the item information.
When I click the link
Then I am taken to a page to edit this item
And I see a form filled in with the existing item attribute information
When I update the information in the form and I click ‘submit’
Then I am redirected back to the item show page where I see the updated information
And I see a flash message stating that the information has been successfully updated.

10. Merchant Item: Grouped by Status

As a merchant,
When I visit my merchant items index page
Then I see two sections, one for "Enabled Items" and one for "Disabled Items"
And I see that each Item is listed in the appropriate section

GitHub API: PRs

As a visitor or an admin user
When I visit any page on the site
I see the number of merged PRs across all team members
This number is updated as each member of the team merges more PRs

5. Merchant Dashboard Invoices sorted by least recent

As a merchant
When I visit my merchant dashboard
In the section for "Items Ready to Ship",
Next to each Item name I see the date that the invoice was created
And I see the date formatted like "Monday, July 18, 2019"
And I see that the list is ordered from oldest to newest

GitHub API: User Names

As a visitor or an admin user
When I visit any page on the site
I see the Github usernames of myself and my teammates somewhere on the site
The most up to date usernames are always displayed

9. Merchant Item: Disable/Enable

As a merchant
When I visit my items index page
Next to each item name I see a button to disable or enable that item.
When I click this button
Then I am redirected back to the items index
And I see that the items status has changed

31. Admin Merchants: Top Merchant's Best Day

As an admin,
When I visit the admin merchants index
Then next to each of the 5 merchants by revenue I see the date with the most revenue for each merchant.
And I see a label “Top selling date for was "

Note: use the invoice date. If there are multiple days with equal number of sales, return the most recent day.

13. Merchant Item: Index- Top Item's Best Day

As a merchant
When I visit my items index page
Then next to each of the 5 most popular items I see the date with the most sales for each item.
And I see a label “Top selling date for was "

Note: use the invoice date. If there are multiple days with equal number of sales, return the most recent day.

Completed 1/10/22

6. Merchant Items: Index Page

As a merchant,
When I visit my merchant items index page ("merchants/merchant_id/items")
I see a list of the names of all of my items
And I do not see items for any other merchant

19. Admin Dashboard

As an admin,
When I visit the admin dashboard (/admin)
Then I see a header indicating that I am on the admin dashboard

4. Merchant Dashboard Items Ready to Ship

As a merchant
When I visit my merchant dashboard
Then I see a section for "Items Ready to Ship"
In that section I see a list of the names of all of my items that
have been ordered and have not yet been shipped,
And next to each Item I see the id of the invoice that ordered my item
And each invoice id is a link to my merchant's invoice show page

27. Admin Merchant Enable/Disable

As an admin,
When I visit the admin merchants index
Then next to each merchant name I see a button to disable or enable that merchant.
When I click this button
Then I am redirected back to the admin merchants index
And I see that the merchant's status has changed

3. Merchant Dashboard Statistics - Favorite Customers

As a merchant,
When I visit my merchant dashboard
Then I see the names of the top 5 customers
who have conducted the largest number of successful transactions with my merchant
And next to each customer name I see the number of successful transactions they have
conducted with my merchant

20. Admin Dashboard Links

As an admin,
When I visit the admin dashboard (/admin)
Then I see a link to the admin merchants index (/admin/merchants)
And I see a link to the admin invoices index (/admin/invoices)

GitHub API: Repo Name

As a visitor or an admin user
When I visit any page on the site
I see the name of the Github repo somewhere on the site

36. Admin Invoice Show Page: Update Invoice Status

As an admin
When I visit an admin invoice show page
I see the invoice status is a select field
And I see that the invoice's current status is selected
When I click this select field,
Then I can select a new status for the Invoice,
And next to the select field I see a button to "Update Invoice Status"
When I click this button
I am taken back to the admin invoice show page
And I see that my Invoice's status has now been updated

18. Merchant Invoice Show Page: Update Item Status

As a merchant
When I visit my merchant invoice show page
I see that each invoice item status is a select field
And I see that the invoice item's current status is selected
When I click this select field,
Then I can select a new status for the Item,
And next to the select field I see a button to "Update Item Status"
When I click this button
I am taken back to the merchant invoice show page
And I see that my Item's status has now been updated

Completed 1/6/22 - BF

25. Admin Merchant Show

As an admin,
When I click on the name of a merchant from the admin merchants index page,
Then I am taken to that merchant's admin show page (/admin/merchants/merchant_id)
And I see the name of that merchant

16. Merchant Invoice Show Page: Invoice Item Information

As a merchant
When I visit my merchant invoice show page
Then I see all of my items on the invoice including:

  • Item name
  • The quantity of the item ordered
  • The price the Item sold for
  • The Invoice Item status
    And I do not see any information related to Items for other merchants

Completed 1/4/23 - BF

0. Database Setup

Database Setup
This repo contains a directory /db/data that includes six csv files. You will write a Rake task that will seed your database with the data in those files.

Rake tasks give you the ability to execute tasks within Rails. You may have seen this before with commands like rake db:create and rake db:seed. In more recent versions of Rails, these commands are usually executed as rails db:create, rails db:seed, etc. but they are still utilizing Rake to execute them under the hood even though they don't include the rake executable in the command.

Your project will include a Rake task for each of the six csv files. For example, from the command line you should be able to run something like:

  • rails csv_load:customers
  • rails csv_load:invoice_items
  • rails csv_load:invoices
  • rails csv_load:items
  • rails csv_load:merchants
  • rails csv_load:transactions

After these commands, your database should be seeded with the data from the CSVs. You should be able to verify this by running a Rails Console session and doing some checks on your models.

Additionally, your project should contain a Rake Task that will execute the other six Rake Tasks at once, for example:

rails csv_load:all

Reference this documentation for additional information about running tasks from the command line.

Primary Key Sequence
Normally, when creating records with ActiveRecord we do not want to manually set the primary key attribute, for example Artist.create(id: 1). Instead, we want to rely on ActiveRecord and the Database to automatically assign the ids based on a primary key sequence. However, each CSV file includes an id column that you should include when creating each record to maintain data integrity. Manually assigning the id attribute will invalidate the primary key sequence, so you should include code in your rake tasks that resets the primary key sequence for each table after the data is seeded.

Schema Notes
items have a unit_price. This is the price that the item is currently selling at.
invoice_items also have a unit_price. This is the price the item sold at.
Both unit_price columns in the CSV files are stored as cents, for example the value 1300 for a unit price is 1,300 cents, or 13.00 dollars. When storing the unit prices in your database, you should also store them as integers (integers are more accurate than floats). When displaying prices or doing calculations, you made need to do some conversion into dollars.
In the CSV files, both invoice and invoice_item status are stored as strings. In your database, you should not store strings, and instead store integers that represent the different statuses. In your models, you should include an enum for these statuses

32. Admin Invoices Index Page

As an admin,
When I visit the admin Invoices index ("/admin/invoices")
Then I see a list of all Invoice ids in the system
Each id links to the admin invoice show page

33. Admin Invoice Show Page

As an admin,
When I visit an admin invoice show page
Then I see information related to that invoice including:

  • Invoice id
  • Invoice status
  • Invoice created_at date in the format "Monday, July 18, 2019"
  • Customer first and last name

15. Merchant Invoice Show Page

As a merchant
When I visit my merchant's invoice show page(/merchants/merchant_id/invoices/invoice_id)
Then I see information related to that invoice including:

  • Invoice id
  • Invoice status
  • Invoice created_at date in the format "Monday, July 18, 2019"
  • Customer first and last name

Completed 1/4/23- BF

29. Admin Merchant Create

As an admin,
When I visit the admin merchants index
I see a link to create a new merchant.
When I click on the link,
I am taken to a form that allows me to add merchant information.
When I fill out the form I click ‘Submit’
Then I am taken back to the admin merchants index page
And I see the merchant I just created displayed
And I see my merchant was created with a default status of disabled.

0.1 Associations / Relationships

Populate associations and relationships and write model tests for:
Customers
Invoices
Invoice_items
Items
Merchants
Transactions

_All associations are completed and tests pass. Not sure if we need to test the enums? -BF

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.