Commit Graph

3100 Commits

Author SHA1 Message Date
Oliver
2c953c73fa Stock tracking tweaks
- Ability to stocktake for entire part
- Enforce addition of notes to stockAdjust modal
2018-05-09 00:06:35 +10:00
Oliver
8000affeee Basic Index and Search endpoints
Index at /index/
Search at /search/
Search view accepts POST requests with search data
2018-05-08 23:44:51 +10:00
Oliver
c821d22b87 Skeleton for 'index' and 'search' pages 2018-05-08 23:26:32 +10:00
Oliver
552953a1f8 Added bootstrap font files
Also added 'search' button
2018-05-08 23:26:09 +10:00
Oliver
16b14c02d5 Merge branch 'login' 2018-05-08 23:14:16 +10:00
Oliver
84efaba920 Add link to admin page
- Only if user is admin!
2018-05-08 23:14:07 +10:00
Oliver
3cf45f5ed3 Added Login and Logout buttons to NavBar 2018-05-08 23:09:52 +10:00
Oliver
47aa3c8a45 Login / Logout views
Information found here - https://simpleisbetterthancomplex.com/tutorial/2016/06/27/how-to-use-djangos-built-in-login-system.html
2018-05-08 23:00:27 +10:00
Oliver
fdf35bd741 Fixes for double-submit on butons
- Function that first unbinds the submit button
2018-05-08 22:49:23 +10:00
Oliver
bf4ffb8b0b Add part stocktake to Stock Location page(s) 2018-05-08 22:41:52 +10:00
Oliver
f2982a59ad Added StockTracking API
/api/stock/track/
ListCreate API view
StockItem page now shows bootrap-table of tracking notes
2018-05-08 22:30:32 +10:00
Oliver
002c047105 Added count/add/remove to Part Stock Detail Page 2018-05-08 22:14:18 +10:00
Oliver
3b6ef3f008 Added stocktake / add / remove actions to StockItemDetail page 2018-05-08 22:14:03 +10:00
Oliver
25e0de1ce7 Vast improvements to stocktake API endpoint
- Also acts to ADD and REMOVE stock
- Send 'action' field to specify which one to perform
- Fixed add_stock and remove_stock funcs for StockItem model
- Autoatically add transaction notes for all actions
2018-05-08 22:06:28 +10:00
Oliver
ca2d3a1a7b Consolidated modal code
- Default modal passed down through the chain
2018-05-08 20:46:23 +10:00
Oliver
054892aea2 Cleaner handling of default modal param 2018-05-08 19:58:38 +10:00
Oliver
3f1c6e2059 Simplified modal calls
- Default modal target supplied (can be overridden in options)
2018-05-08 19:55:39 +10:00
Oliver
c5155d5ac7 Move modal JS file
- Loaded by base.
2018-05-08 19:40:29 +10:00
Oliver
ee0c664d28 Prevent modals from firing multiple events
- e.g. if the modal has been open and closed multiple times!
- Detach all previously attached events
2018-05-07 23:46:41 +10:00
Oliver
fdf214626c Further assorted updates
What, you need more commit details?! Pah
2018-05-07 23:40:17 +10:00
Oliver
b6944620dd Fixes for JSON API
- Set content type
- Stringify JSON data
- Finish API to stocktake multiple parts
2018-05-07 23:25:47 +10:00
Oliver
1363fa9f1f Prevent modals from automatically closing 2018-05-07 22:16:05 +10:00
Oliver
17ecb59dbb Move to using postgresql
- Need to write a shell script to automate db install
- For now:
   - https://gist.github.com/sirodoht/f598d14e9644e2d3909629a41e3522ad
   - https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-django-application-on-ubuntu-14-04
2018-05-07 22:03:13 +10:00
Oliver
425db5fd39 Tweaked part stock page 2018-05-07 21:51:08 +10:00
Oliver
2b286c3b83 Bulk stocktake API
- Pass list of pk/quantity dict objects
2018-05-07 21:17:19 +10:00
Oliver
e746ca6e0a Paginate company page 2018-05-07 18:16:12 +10:00
Oliver
deccdce6d9 Part view updates 2018-05-07 08:41:19 +10:00
Oliver
ce30cd7b4d add auto-doc for JSON API 2018-05-07 08:35:40 +10:00
Oliver
ee0cbdbb07 Skeleton for deleting multiple items
- Does not work yet! But opens a window...
2018-05-06 22:38:39 +10:00
Oliver
a7abf9731b Add link to stock-item in part-stock view 2018-05-06 22:28:50 +10:00
Oliver
c1e7e95fc0 UI improvements
Consolidated detail pages with OPTIONS drown down
(rather than multiple single buttons)
2018-05-06 22:09:15 +10:00
Oliver
a55f6a1c7b Improved stock movement modal
- Show which parts will be moved (and where they currently are)
2018-05-06 22:01:24 +10:00
Oliver
8a0db0e6df Updated stockitem detail page
- Consolidated buttons into dropdown
- Stock tracking now in collapsible list
2018-05-06 21:53:06 +10:00
Oliver
d8922aa9db Implemented API to move multiple items at once
- Added ability to override request method in inventreeUpdate
- Added inventree/script/stock.js to handle stock API js 
- Added StockMove API endpoint
2018-05-06 21:39:33 +10:00
Oliver
87f96d6b3c Add more modal form funcs
- Function to set the button text
2018-05-06 20:30:17 +10:00
Oliver
c2bc65f903 API improvements
- Add success and error callbacks
- Further improvements for modal forms
2018-05-06 20:20:39 +10:00
Oliver
fa04a9ae61 Abstracted modal code somewhat 2018-05-06 19:54:32 +10:00
Oliver
58cd933a5d Whoops, fixed the API callbacks 2018-05-06 19:33:43 +10:00
Oliver
366e03456e Hide 'tracking' tab for now 2018-05-06 19:27:34 +10:00
Oliver
890c9002aa Callback for API 2018-05-06 19:26:11 +10:00
Oliver
19ce05931c Re-added missing "New Part" button 2018-05-06 19:21:33 +10:00
James Newlands
01da57f0cf If part has no category, page rendered an extra curly brace in JS that caused syntax error. 2018-05-05 21:22:47 +10:00
Oliver
22e9290f54 Helper funcs for updating part and stock item 2018-05-05 01:37:21 +10:00
Oliver
24ece1b916 Merge branch 'api' 2018-05-05 01:27:24 +10:00
Oliver
8e7e784934 Remove test code 2018-05-05 01:27:15 +10:00
Oliver
11e7a34aa2 AJAX function to update a model endpoint
- Grabs the CSRF token cookie (required!)
- If final mode, adds '_is_final' parameter to request
2018-05-05 01:26:58 +10:00
Oliver
41e031d4b4 Draft API endpoint RUD class
- RUD = Retrieve / Update / Destroy
- When issuing an Update command, the validity is checked but the model object is only saved if the POST data has "_is_final": true
2018-05-05 01:26:01 +10:00
Oliver
ee347c6165 Further API calls
- getStock
- getStockLocation
- getCompanies
2018-05-05 00:00:48 +10:00
Oliver
7e4b0630b6 Part category API 2018-05-04 23:54:57 +10:00
Oliver
83dd068fec Initial commit for api.js
- GET JSON call with console output
- Provide filters
2018-05-04 23:43:41 +10:00