[
{
"item_id" : 2 ,
"item_name" : " test expiry" ,
"current_quantity" : 0 ,
"required_quantity" : 4 ,
"missing_quantity" : 4 ,
"item_options" : [
{
"item_expiry_id" : 2 ,
"expiry_date" : " 2023-07-23" ,
"quantity" : 19
},
{
"item_expiry_id" : 41 ,
"expiry_date" : " 2023-08-19" ,
"quantity" : 0
},
{
"item_expiry_id" : 42 ,
"expiry_date" : " 2023-08-26" ,
"quantity" : -10
},
{
"item_expiry_id" : 123 ,
"expiry_date" : " 2023-11-25" ,
"quantity" : 45
},
{
"item_expiry_id" : 124 ,
"expiry_date" : " 2023-11-28" ,
"quantity" : 333
},
{
"item_expiry_id" : 3 ,
"expiry_date" : " 2033-07-13" ,
"quantity" : 12
}
],
"sufficient_stock" : true
},
{
"item_id" : 4 ,
"item_name" : " something new1" ,
"current_quantity" : 0 ,
"required_quantity" : 2 ,
"missing_quantity" : 2 ,
"item_options" : [
{
"item_expiry_id" : 44 ,
"expiry_date" : " 2023-08-24" ,
"quantity" : 19
},
{
"item_expiry_id" : 45 ,
"expiry_date" : " 2024-08-19" ,
"quantity" : 46
}
],
"sufficient_stock" : true
}
]
Restock Options
[
{
"item_id" : 2 ,
"item_name" : " test expiry" ,
"current_quantity" : 2 ,
"required_quantity" : 4 ,
"missing_quantity" : 2 ,
"item_options" : [
{
"item_expiry_id" : 2 ,
"expiry_date" : " 2023-07-23" ,
"quantity" : 19
},
{
"item_expiry_id" : 41 ,
"expiry_date" : " 2023-08-19" ,
"quantity" : 0
},
{
"item_expiry_id" : 42 ,
"expiry_date" : " 2023-08-26" ,
"quantity" : -10
},
{
"item_expiry_id" : 123 ,
"expiry_date" : " 2023-11-25" ,
"quantity" : 45
},
{
"item_expiry_id" : 124 ,
"expiry_date" : " 2023-11-28" ,
"quantity" : 333
},
{
"item_expiry_id" : 3 ,
"expiry_date" : " 2033-07-13" ,
"quantity" : 12
}
],
"sufficient_stock" : true
}
]
Kit is missing item_id 4, but restock options did not indicate or provide options for item_id 4
Steps to reproduce bug:
Restock a kit without providing any quantity for one of the items
Call restock options after the restock
Restock options will not provide restock options of the item which we did not provide quantity to restock to in step 1
Password is sent in clear
deck/src/js/login.js
const submitForm = ( ) => {
$ . ajax ( {
type : 'POST' ,
url : "/r'%5Elogin/$'" ,
data : {
username : username ,
password : password ,
to_redirect : toRedirect ,
csrfmiddlewaretoken : CSRF_TOKEN ,
} ,
success : function ( data ) {
window . location . href = toRedirect == undefined ? '/' : toRedirect ;
} ,
error : function ( xhr , status , error ) {
console . log ( 'Login failed:' , error ) ;
setMessage ( JSON . parse ( xhr [ 'responseText' ] ) . responseText ) ;
} ,
} ) ;
} ;
Current:
After user submits order, user is redirected to items page
Expected:
User redirected to a page which shows a receipt of the order that has just been submitted
Subtask of #16
Other than downloading CSV, allow users to upload CSV to add items to DB
Refer to this sheet , in particular the SJ FA Materials tab
For expiry with months or years only discuss with @Eriol8 which date to put since our DB only recognises full dates
Over withdrawal can result in negative values.
Suggestion:
Do a frontend check with javascript function.
Add layer of protection in api endpoint.
Enable kits page in inventory_index page (/inventory/kits)
Display list of kits
Add button
Sort by filter (kit size/status)
Jest test
Pop up modal to allow users to create kit
Allow users to specify name of new kit and select blueprint
Call get_new_kit_recipe
to get available items to add to the new kit
Orders and order types, eg loanOrder, to use inheritance instead of FK
Everything else remains as FK
Opens user's camera or photo library onClick
User will be able to preview image
When form is submitted, upload image to Django BE (will require exploration)
Icon on the top left of navbar is clickable, as a user I would expect it to convert to a pointer
Current:
Screen.Recording.2023-07-05.at.7.53.33.PM.mov
Expected:
Would expect a similar pointer on the navbar
Create a search feature for items
Should be a separate component (a search bar)
Responsive on typing (run a search on every keystroke)
Mobile responsive
Example:
Currently, we have alerts and cart, there are plans to add at least 4 more pages,
Add new item
View Item Data
View orders
View loans
Note: no need to name the buttons as above, feel free to name anything that makes sense
For mobile: Add new buttons which link to the pages (only add new item is up with the url: https://deckland.nhhs-sjb.org/inventory/add_item can leave as deadlinks for the other buttons)
For larger screens: Figure out a way, using the MUI library to accomodate all the buttons, currently it is placed on the navbar. However, having 6 buttons on the navbar is not feasible. Suggestions: using drawer component from mui or icon menu
Current:
When filter is used and results yield content <5, there is still a page 2 to the item list.
Expected behaviour: Pagination needs to dynamically adapt to filter changes
Add a rounded cart button that sticks to bottom right of FA homepage
onClick, leads to cart page
Add a badge to display amount of items in the cart
Create a filter so that users can filter by item type
Design yet to be decided (maybe a dropdown below the search bar?)
Allow for multi-select
Filtering should be done entirely on the frontend
Create new loan return page, UI should be identical to items page
Only loans by the current user will be displayed
Order loans by the nearest return date
Search bar to search loans by loanee name (?)
Upon typing in search bar, filter the items displayed according to the search key the user entered
Allow users to withdraw kit(s) for loan
Requires completion of #137
Requirements
Similar to item cart, except that we only have Loans
API contract
New page that allows users to create a kit blueprint
Kit Blueprint - a list of items that that shows what and how much of an item a kit should contain
Example API usage
@cheehengk shouldn't it be item_id
instead of item_expiry_id
?
Requirements
Call items endpoint and display all items
Allows users to select the items to add inside the blueprint and the quantity
Allow users to specify the blueprint name
Allow users to submit and create a blueprint
Large Screens:
Small Screens:
Create swagger docs
Add checks and validation
Add tests
Deleting an expiry entry updates the state (array) but the state is not re-rendered and updated in the DateQuantity component to be displayed to the user.
Similar to https://deck.nhhs-sjb.org/inventory/items/add
Add a new page to 'add an item' (should be accessible from FA homepage)
Consider using stepper from MUI
Some rules to follow when adding new items
An item either has expiry or no expiry (once an item is created as 'has expiry' it cannot be converted to 'no expiry')
Refer to inventory/models
: ItemModels
and ItemExpiryModels
to see how DB is structured
Page that allows users to restock an incomplete kit
Requirements
Call restock_options
to get all the available items the user can use to restock the kit
Allow users to specify what item expires they can use to restock
Display the old and new quantity in the kit (before & after restock)
Add checks to ensure user does not stock beyond the maximum quantity
Call restock_kit
to submit the restock order
Add jest tests for the components in the components/Admin
directory
Proper rendering of order/loans list
Working accordion
Working pagination
Search filters functions correctly
Originally posted by @jonasgwt in #103 (review)
Add an option to let users create a new expiry for an item
Only items that already has an expiry can add a new expiry
Option should only be available when user click on deposit
After clicking Deposit, immediately contact BE and add the new item expiry
Instead of 'Deposit', use 'Submit'
Add an alert on click on submit to tell the user that it will not be added to cart and will be submitted immediately.
References:
Recommend Projects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.