Go to file
Oliver baa9f3660b
Modal api forms (#5355)
* Very basic form implementation

* Fetch field definition data via AP

* Add cancel and submit buttons

* Render basic field stack, and extract field data from API

* Extract specific field definition

* Handle text fields

* Add some more fields

* Implement boolean and number fields

* Add callback for value changes

* Use form state to update values

* Add skeleton for a 'related field'

* Framework for related field query manager

* Handle date type fields

* Make date input clearable

* Fix error messae

* Fix for optional callback function

* Use LoadingOverlay component

* Support url and email fields

* Add icon support

- Cannot hash react nodes!

* Create components for different form types

- Create
- Edit
- Delete

* Split ApiFormField into separate file

* Add support for pre-form and post-form content

* Don't render hidden fields

* Smaller spacing

* More demo data

* Add icon to clear text input value

* Account for "read only" property

* Framework for a submit data query

* Return 404 on API requests other than GET

- Other request methods need love too!

* Starting work on dynamically opening forms

* Check validity of OPTIONS response

* refactor

* Launch modal form with provided props

* Refactor tractor:

- Handle simple form submission
- Handle simple error messages

* Improve support for content pre and post form

* Allow custom content to be inserted between fields

* Pass form props down to individual fields

* Update playground page with API forms functionality

* Simplify form submission to handle different methods

* Handle passing of initial form data values

* Improve docstrings

* Code cleanup and add translations

* Add comment

* Ignore icon for checkbox input

* Add custom callback function for individual form fields

* Use Switch instead of Checkbox

* Add react-select

* Implement very simple related field select input

- No custom rendering yet
- Simple pk / name combination

* FIrst pass at retrieving data from API

* Updates:

- Implement "filters" for each form field
- Prevent duplicate searches from doing weird things

* Rearrange files

* Load initial values for related fields from the API

- Requires cleanup

* Display error message for related field

* Create some basic functions for construction field sets

* Display non-field-errors in form

* Improved error rendering

* Change field definition from list to Record type

- In line with current (javascript) implementation
- Cleaner / simpler to work with

* Correctly use default values on first form load

* Improve date input

* define a set of stockitem fields

* Implement "Choice" field using mantine.select

* Implement useForm hook for better performance

* Show permission denied error

* Improved callback "onChangeValue" functionality

- Define proper return type
- Access all form data

* Cleanup

* Implement components for rendering database model instance

- Not fully featured yet (still a lot of work to go)
- Porting code across from existing "model_renderers.js"

* Update packages

* Handle file input fields

* Improved loading overlay for form submission

* Utilize modal renderers in search results

* SearchDrawer cleanup

* Temporary fix for image pathing issue

* Cleanup table action buttons

- Now use a dropdown menu
- Implement "edit part" directly from the table
- This is only as an example for now

* Fix playground

* Generate random ID with useId hook

* Fix abortController to use ref

* Use AbortController for search panel

* Fix TableColumn type definition

* Improved generation of unique form ID values
2023-09-08 21:24:06 +10:00
.devcontainer P UI: Added frontend publishing for bare-metal (git) (#5277) 2023-07-20 10:12:08 +10:00
.devops Add azure pipelines (#4453) 2023-04-03 16:55:27 +10:00
.github [WIP] Mantine datatables (#5218) 2023-07-27 10:10:07 +10:00
.vscode Docs/devcontainer (#4787) 2023-05-12 17:13:48 +10:00
ci Fix common spelling mistakes (#4956) 2023-06-04 00:04:52 +10:00
contrib Packages - force python 3.9 (#5206) 2023-08-06 21:50:38 +10:00
deploy fix endline 2022-05-20 13:35:07 +02:00
docker Skip ready functions if not in main thread or plugins are not loaded yet (#5005) 2023-07-26 08:33:13 +10:00
docs Typo Fixed (#5501) 2023-09-04 23:44:45 +10:00
images/logo Export large version of the logo 2020-05-12 00:06:26 +10:00
InvenTree Issued by filter (#5515) 2023-09-08 09:10:42 +10:00
src/frontend Modal api forms (#5355) 2023-09-08 21:24:06 +10:00
.djlintrc Replace mklint with djlint (#4746) 2023-05-02 20:03:52 +10:00
.eslintrc.yml Fix JS linting workflow (#4915) 2023-05-30 22:55:53 +10:00
.gitattributes fix endline 2022-05-20 13:35:07 +02:00
.gitignore React tweaks (#5300) 2023-07-21 09:46:44 +10:00
.pkgr.yml Packages - force python 3.9 (#5206) 2023-08-06 21:50:38 +10:00
.pre-commit-config.yaml New Crowdin updates (#5437) 2023-08-15 12:47:19 +10:00
backportrc.json Add workflow for backporting PRs (#4912) 2023-05-28 18:55:06 +10:00
CONTRIBUTING.md Platform UI - React integration (#5011) 2023-07-18 22:45:49 +10:00
crowdin.yml P-UI: Adapt translation CI (#5299) 2023-07-21 09:00:37 +10:00
docker-compose.yml Remove container-name:s from Compose file (#5339) 2023-07-25 12:51:37 +10:00
docker.dev.env update INVENTREE_LOG_LEVEL param (#4058) 2022-12-14 07:17:24 +11:00
Dockerfile Increase yarn timeout in dockerfile (#5505) 2023-09-05 13:10:00 +10:00
LICENSE Update LICENSE 2022-02-21 22:31:10 +11:00
package-lock.json [WIP] Mantine datatables (#5218) 2023-07-27 10:10:07 +10:00
package.json [WIP] Mantine datatables (#5218) 2023-07-27 10:10:07 +10:00
Procfile fix cli on 22.04 (#5204) 2023-07-09 08:40:27 +10:00
README.md Add netlify for fast previews (#5353) 2023-07-27 11:17:44 +10:00
readthedocs.yml Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
RELEASE.md Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
requirements-dev.in Slow tests (#4435) 2023-03-02 13:51:52 +11:00
requirements-dev.txt Bump deps (#5487) 2023-09-07 09:02:31 +10:00
requirements.in Bump deps (#5487) 2023-09-07 09:02:31 +10:00
requirements.txt Bump deps (#5487) 2023-09-07 09:02:31 +10:00
runtime.txt Add package-based install method (#3743) 2022-10-16 10:14:18 +11:00
SECURITY.md Spelling fix: dates -> days (#3193) 2022-06-14 10:07:48 +10:00
setup.cfg Code style improvements (#4683) 2023-04-28 20:49:53 +10:00
tasks.py Added install step to trans (#5327) 2023-07-24 08:31:19 +10:00
yarn.lock [WIP] Mantine datatables (#5218) 2023-07-27 10:10:07 +10:00

InvenTree logo

InvenTree

Open Source Inventory Management System

License: MITGitHub tag (latest SemVer) CI Documentation Status Docker Build OpenSSF Best Practices Netlify Status

Coveralls Crowdin GitHub commit activity Docker Pulls

GitHub Org's stars Twitter Follow Subreddit subscribers

View Demo · Documentation · Report Bug · Request Feature

🌟 About the Project

InvenTree is an open-source Inventory Management System which provides powerful low-level stock control and part tracking. The core of the InvenTree system is a Python/Django database backend which provides an admin interface (web-based) and a REST API for interaction with external interfaces and applications. A powerful plugin system provides support for custom applications and extensions.

Check out our website for more details.

🧭 Roadmap

Want to see what we are working on? Check out the roadmap tag and horizon milestone.

🛠️ Integration

InvenTree is designed to be extensible, and provides multiple options for integration with external applications or addition of custom plugins:

👾 Tech Stack

Server
Database
Client
DevOps

🧰 Deployment / Getting Started

There are several options to deploy InvenTree.

Single line install - read the docs for supported distros and details about the function:

wget -qO install.sh https://get.inventree.org && bash install.sh

Refer to the getting started guide for a full set of installation and setup instructions.

📱 Mobile App

InvenTree is supported by a companion mobile app which allows users access to stock control information and functionality.

👋 Contributing

Contributions are welcomed and encouraged. Please help to make this project even better! Refer to the contribution page.

📜 Translation

Native language translation of the InvenTree web application is community contributed via crowdin. Contributions are welcomed and encouraged.

💸 Sponsor

If you use InvenTree and find it to be useful, please consider sponsoring the project.

💎 Acknowledgements

We would like to acknowledge a few special projects:

Find a full list of used third-party libraries in our documentation.

This project is supported by:

Deploys by Netlify

⚠️ License

Distributed under the MIT License. See LICENSE.txt for more information.