Code Monkey home page Code Monkey logo

basedcode's People

Contributors

akinad avatar allenkaplan avatar chunwahchung avatar daniel-kozlovsky avatar matthewwalk avatar truong25 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

matthewwalk

basedcode's Issues

Final Cross-reference w/ SRS

We need to define all changes we have made with respect to the given SRS and meet with the PM team to get them to update.

Users

  • /account/:id (GET, PUT)
  • /employee (GET) => []User (employees only)
  • /employee/:id (GET, PUT, DELETE) => User
  • /manager (GET) => User
  • /manager/:id (GET, PUT, DELETE) => []User

In package @@truong25

  • getAccount
  • updateAccount
  • getEmployees
  • createEmployee
  • getManagers
  • promoteToManager
  • getAdmins
  • promoteToAdmin

"Calculate Route"

3.1-R7 The UI will have a “Calculate Route” button that will only be clickable if the size of the user’s
shopping list is non-zero. This button will output the items in the user’s shopping list by their order in the
store, starting at the front.

Navigation Bar

3.1-R10 The user will always have access to a search bar through which he can filter the current branch’s
items on sale through text.
Priority: 1
3.1-R11 The user will always have access to a “View Cart” button that prominently displays the user’s
cart when clicked.

  • View the current location in navbar

Categories / Items/Browse page

3.1-R8 The UI will provide the user with an overview of the items available for sale in the shop,
separated into categories.

+++++

3.1-R9 The user will be able to navigate into each category and only be shown the subset of items that fit
into it

  • The browse page should force a user to select a store before being shown items

  • The items on the browse page need to be filtered by those available from the user's selected store

Items

Oddly specific but

  • /item?storeid= (GET) => []item //get items in a specific store
  • /item (GET) => all items
  • /item/:id (GET; employee can PUT, POST, DELETE) => item

@chunwahchung in itemSrv

  • getItems() []Items
  • getItems(storeID int) []Items
  • addItem(item Item) Item
  • updateItem(itemID int, item Item) Item
  • deleteItem(itemID int) boolean

Database

  • Item location per store (currently just tracking which items are in which store)

Create BASIC, PLACEHOLDER routes/pages

  • / (home)
  • /signup
  • /signup
  • /stores (sysadmin can CRUD)
  • /item/:id (employee group can create, update, delete)
  • /browse
  • /recommended
  • /search?query=
  • /cart
  • /checkout
  • /account (settings)
  • /employees (manager can CRUD)
  • /managers (sysadmins can CRUD)

Employee and Manager Buttons Logic

Please see endpoints in Postman Team, smartshopper workspace

Collection accounts has templates for the requests below; you can view body and response.

Get User Groups

  • router.GET("/user", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), getGroupUser)
  • router.GET("/employee", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), getGroupEmployee)
  • router.GET("/manager", auth.AuthMiddleware(awsRegion, userPoolID, []string{"manager", "admin"}), getGroupManager)
  • router.GET("/admin", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), getGroupAdmin)

Employees actions

  • router.POST("/employee", auth.AuthMiddleware(awsRegion, userPoolID, []string{"manager", "admin"}), createEmployee)
  • router.PUT("/employee", auth.AuthMiddleware(cognitoRegion, userPoolID, []string{"employee", "manager", "admin"}), updateEmployee)
  • router.DELETE("/employee", auth.AuthMiddleware(cognitoRegion, userPoolID, []string{manager", "admin"}), deleteEmployee)

Managers actions

  • router.POST("/manager", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), promoteToManager)
  • router.DELETE("manager/:id", deleteManager)

Admin actions

  • router.POST("/admin", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), promoteToAdmin)
  • router.DELTE("admin/:id", auth.AuthMiddleware(cognitoRegion, userPoolID, []string{"admin"}) ,deleteFromAdmin)

item

  • router.POST("/item", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), createItem)
  • router.PUT("/item/:id", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), updateItem)
  • router.DELETE("/item/:id", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), deleteItem)

Categories

  • router.POST("/category", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), createCategory)
  • router.PUT("/category", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), updateCategory)
  • router.DELETE("/category/:id", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), deleteCategory)

These are not in the SRS and are low priority:

store

  • router.POST("/store", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), createStore)
  • router.PUT("/store", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), updateStore)
  • router.DELETE("/store/:id", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), deleteStore)

Stock

  • router.POST("/stock", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), createStock)
  • router.PUT("/stock", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), editStock)
  • router.DELETE("/stock/:store/:item", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager", "admin"}), deleteStock)

Stores

  • router.GET("/store", getStores)
  • router.GET("/store/:id", getStore) //return store + stock
  • router.POST("/store", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), addStore)
  • router.PUT("/store", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), updateStore)
  • router.DELETE("/store", auth.AuthMiddleware(awsRegion, userPoolID, []string{"admin"}), deleteStore)
  • router.POST("/stock", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager"}), addStock)
  • router.PUT("/stock", auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager"}), editStock)
  • router.DELETE("/stock" auth.AuthMiddleware(awsRegion, userPoolID, []string{"employee", "manager"}), deleteStock)

OLD:

  • /store?address=[address]&stores=[number] => # of stores closest to address
    @AllenKaplan Says

(must convert address to long/lat)? maybe we can just use google maps locally?

+++

  • /store/:id (GET; sysadmin can PUT, POST, DELETE) => store

implement /stores

3.1-R6 The UI will have a visible indication of the address of the branch the user is currently browsing,
and will allow the user to see other available branches and switch to them by clicking on the address.

implement /account

  • - Show Profile and account details,
  • - Recent purchases?
  • - --"Your items" (items they've frequently ordered) view?--
  • - Recommendations?

Implement item modal

Specifically

  • 3.1-R12 The user can click on an item to be provided with more details about it, including a description,price, and its location in the store.

Search Function || Navbar

3.1-R13 When using the search function, the user will be provided a list of suggested items based on
other users’ trends.

Search

Provide 5 random items that are not in the user's cart

UI adress indicator

3.1-R5 The UI will have a visible indication of the current address of the user, and will allow the user to
change it by clicking the address.

3.1-R6 The UI will have a visible indication of the address of the branch the user is currently browsing

Clear Cart

3.1-R4 The UI will have a “Clear Cart” button that removes all items from a user’s shopping list.

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.