Coder Social home page Coder Social logo

uppsaladatavetare / foobar-api Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 6.0 1.95 MB

The backend of the FooBar kiosk and inventory system.

License: MIT License

Makefile 0.23% Python 92.57% HTML 3.16% CSS 0.96% JavaScript 3.08%
shop store warehouses rest-api inventory finance

foobar-api's People

Contributors

elinswedin avatar flaeppe avatar kjagiello avatar thizizmyname avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

foobar-api's Issues

Make modification of transaction history impossible

The timeline over transactions should be kept intact.

Changing or reverting a transaction should instead introduce a new transaction entry, which could reference an older transaction to keep a better history of what happened. The timeline for transactions is with this logic considered write-only which in many cases spares a lot of headache.

This also leads to new logic/functionality for a customer to be able to return an item and get compensation for it from the system.

Improve referencing in the API for the wallet and shop

UUID referencing in the wallet and shop models should be replaced to be more generic yet still more identifying.

A single UUID reference does not, in some cases, achieve enough object identification, whereas if we mimic a generic foreign key relation we can instead identify an object with its type and UUID.

This can all be done without exposing any underlying model(for wallet and shop), hence we can better protect against eventual sidestepping of their API and unwanted usage/behaviour.

Track product prices

Combine the price history with the prediction algorithm in order to order more when prices are low.

Mobile-friendly UI for registration, account details updating, etc

Currently, customers need to contact one of the staff members in order to change any account details or in order to register the card. The idea is to present a QR-code in the kiosk UI, let the customer scan it and it will lead them to either registration page or a profile page, where account details can be updated, purchase history viewed, etc. Everything should be mobile friendly.

Prioritised task list:

  • Registration page
  • Account details page
  • Purchase history

Automatize the inventory system

When a delivery is received, the staff should be able to upload the delivery report (in PDF format) to the admin system and automatically update all the stock quantities for products.

Update active status on product quantity change

If a product is inactive and it's quantity amount is changed it should be automatically set to active again so it's quantity is confirmed in the next stock-take.

This is an expansion for #75.

There are three moments a quantity is changed:

  • When a product is purchased
  • When a delivery is finalized
  • When an admin manually changes the amount of the product

A purchased object gets changed on "finalize_purchase" in
foobar_api/src/foobar/api.py

A delivery changes a product on "populate_delivery" in
foobar_api/src/shop/api.py

Weekly overview of purchases

Add weekly overview of purchases (Should be sorted by week number).
Should be visible after selecting month.
tillfoo
After selecting a week should the days in that week be displayed.
Ex:
tillfoo

Update cash wallet

There should be function that enables the user to reset the cash wallet after counting the cash register.

tillfoo

The user should be able to set the withdrawal amount and the amount off loss.
This will then reset the cash register to the current amount of loose change in the register.

tillfoo

There should also be statistics showing the total amount of loss and withdrawals during a given time period.

Add id_category into products api response

For now you can with an api call retrieve all categories. But since the product api call does not hold the category id linked to the product, it's hard to actually use the category in any way (i.e. sorting).

If the id_category were included into the product serializer it would be much more useful.

Filter stock-takes based on active state

We have a huge amount of products in our database and many of them we haven't had in stock for a long time. These product should be able to filter out from a stock-take to make it easier to handle our inventory.

Every product already have an "active" checkmark so should be easy to implement.

The filtering could be done in the "initiate_stocktaking" method in:
foobar-api/src/shop/api.py

This could also be expanded to if a product has been zero between two stock-takes and the inventory of the product has not changed in the time period, it could be auto-assigned to inactive.

Ability to easily track the product quantity

Every time we receive a delivery, we get an e-mail containing the list of products that have been sent to us with respective quantities. The idea is to be able to import that list and automatically change product quantities.

Cant update an overly generous account

When trying to update an account with a very large wallet history, for example, to update what card to use, the site hangs and the edit does not get accepted.

Automatic resupplying times out

When a lot if products need to be resupplied, the request triggering that action will most likely time out. This kind of tasks should be moved to a background worker. Celery will be a perfect fit here.

Optimised stock-taking

Currently all the items need to be counted during each stock-take. We can however skip some items, namely items that have not been restocked since the last stock-take.

Ability to edit wallet corrections

Ability to remove or edit a wallet correction if a mishap has occurred. Perhaps regular users only have ability to change their own wallet log entries, and only given a time-period of 24 hours.

Stock quantity prediction

Make it possible to define the desired stock levels for each product and predict when a product will run out of stock.

Income statistics

Statistics that show the total amount of differences and withdrawals during a given time period.

Distribute the card charging workload

Currently only a small group of people is granted the ability to charge FooCards. That group should be extended with more people. The group should have very limited set of permissions that only allow for charging cards and nothing more. Track all the activity and present it to the superadmins.

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.