Commit Graph

15780 Commits

Author SHA1 Message Date
Oliver
e93d9c4a74
Batch code generation (#7000)
* Refactor framework for generating batch codes

- Provide additional kwargs to plugin
- Move into new file
- Error handling

* Implement API endpoint for generating a new batch code

* Fixes

* Refactor into stock.generators

* Fix API endpoint

* Pass time context through to plugins

* Generate batch code when receiving items

* Create useGenerator hook

- Build up a dataset and query server whenever it changes
- Look for result in response data
- For now, just used for generating batch codes
- may be used for more in the future

* Refactor PurchaseOrderForms to use new generator hook

* Refactor StockForms implementation

* Remove dead code

* add OAS diff

* fix ref

* fix ref again

* wrong branch, sorry

* Update src/frontend/src/hooks/UseGenerator.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Bump API version

* Do not override batch code if already generated

* Add serial number generator

- Move to /generate/ API endpoint
- Move batch code generator too

* Update PUI endpoints

* Add debouncing to useGenerator hook

* Refactor useGenerator func

* Add serial number generator to stock form

* Add batch code genereator to build order form

* Update buildfields

* Use build batch code when creating new output

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-05-20 23:56:45 +10:00
Oliver
5cb61d5ad0
Update part filters (#7264)
* Expose filter for "bom_valid" status

* Expose part filter for "starred" status

* Bump API version

* Add simple unit test

* Add unit test for "starred" filtering
2024-05-20 20:24:20 +10:00
Oliver
2ebe785a75
Remove dead code (#7265)
* Remove dead code

- Previously custom LIST was required
- Improvements render this unnecessary now

* Remove unused imports
2024-05-20 19:30:35 +10:00
Philipp Fruck
442bb73262
Docs: Update plugins and compose (#7263)
* docs: Update docker compose dev setup

* docs: Fix example plugin date

Date must be iso formatted, otherwise exception is raised

* docs: Update plugin paths to new folder structure

* docs: fix typo, remove temporary containers afterwards
2024-05-20 14:02:27 +10:00
Oliver
c540b12c97
Prevent deletion of part which is used in an assembly (#7260)
* Prevent deletion of part which is used in an assembly

* add 'validate_model_deletion' option to ValidationMixin plugun

* Add global setting to control part delete behaviour

* Update settings location

* Unit test updates

* Further unit test updates

* Fix typos
2024-05-20 12:51:56 +10:00
Philipp Fruck
b26640fb36
fix: SELinux labels for Caddyfile (#7261) 2024-05-20 07:56:31 +10:00
Oliver
e4dedb63f4
Plugin setting fix (#7258)
* Fix CUI URLs

* Fix for plugin setting API

- Fix conflict between "key" for PluginConfig and "key" for setting
- Needs to be "plugin" for plugin lookup, which accesses the "key" field in the PluginConfig model

* Fix for editing setting in PUI

* Add 'r' back in

* Remove debug code

* Update unit tests

* Bump API version

* Another unit test fix
2024-05-19 18:00:26 +10:00
Oliver
2431fc6d58
Fix for email template (#7249)
- Use `line.part` instead of `part`
2024-05-17 13:31:02 +10:00
Oliver
dc741b6183
Admin tweaks (#7248)
* Update admin site

- Implement 'autocomplete' for more fields
- Improves admin loading time

* Add "admin" buttons to the PUI interface

* Only allow superuser access
2024-05-17 12:25:47 +10:00
Oliver
acb1ec4c83
[PUI] Column Refactoring (#7242)
* Refactor column helpers

* Make reference column switchable in BomTable

* Make 'accessor' a required field againt

* Update props

* Fix c0d3
2024-05-17 11:38:55 +10:00
Oliver
2a83c19208
[PUI] Attachment table fix (#7232)
* Use modal hook for creating new attachments

* Add "edit" and "delete" modals for attachment table

* Fix for drag-and-drop zone

- Update to match mantine v7

* Fix link clicking

* Fix call to cancelEvent

* Add placeholder for more unit tests
2024-05-16 12:34:44 +10:00
Simon Quigley
e8f8f3b3ec
Add support for a Completed status (Fixes: #6434) (#6449)
* Add support for a Completed status (Fixes: #6434)

* Remove unnecessary validator

* Update sales order tests for the new model functions
2024-05-16 12:30:29 +10:00
Oliver
b7b320cf61
[PUI] Refactoring forms (#7239)
* Refactor "plugin activate" dialog

- Use hooked modal

* Remove actions from drawer

- Used dynamic modal code which is super buggy

* Update plugin drawer / table

* Refactor settings management:

- Use proper hooked form
- Reduce code duplication
- Run single callback for each <SettingList>

* Add error boundary

* Update ErrorTable

- Use useDeleteApiFormModal

* Refactor ManufacturerPartParameter table

- Use hooked modals

* Refactor existing tables

- Pass table state to forms

* Ensure table is reloaded

* Refactor ManufacturerPartTable

* Code cleanup

* More cleanup
2024-05-16 11:58:50 +10:00
Lukas
548ecf58a2
PUI location type (#7238)
* add location type to PUI

* fix add form bug where it contains the previous editing data when reusing the same fields

* fix sonarcloud issues
2024-05-16 08:57:11 +10:00
Michael
20dc0380bd
Add location type to location overview (#7202) 2024-05-16 08:35:32 +10:00
Oliver
516466bc50
[PUI] Test table tweaks (#7231)
* Adjust table columns

* Tweak for FilterSelectDrawer
2024-05-15 14:12:55 +10:00
Oliver
f8ef12f7bc
Plugin API lookup key (#7224)
* Lookup plugin by slug

- Adjust plugin API to use plugin key and not (variable) pk value

* Fix for plugin table in CUI (legacy interface)

* Fix API endpoint layout:

- Move special endpoints first
- Fix "metadata" endpoint
- Allow custom "lookup_field" attribute for MetadataView

* Add "active_plugins" count to RegistryStatusView

* Updates for PUI

- Plugin management now uses slug rather than pk

* Bump API version

* Remove unused code

* Adds index on 'key' field for PluginConfig model

* Fix URL structure

* Unit test updates

* Unit test updates

* More unit test fixes
2024-05-15 14:12:37 +10:00
Oliver
2265055785
Docker fix (#7228)
* Copy requirements file

* Test more files when building docker image

* Refactor install task

* Raise exception

* Run install task

* Fix typos

- The tests work!
2024-05-15 09:19:35 +10:00
Oliver
d99bc0bcf9
New Crowdin updates (#7206)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-15 08:49:23 +10:00
Oliver
3eae5096e3
Fix permissions for release.yaml (#7220)
* Fix permissions for release.yaml

- 0.15.0 release currently borked

* Move permissions to individual job targets
2024-05-14 22:04:03 +10:00
Oliver
5c0cd23bed
Mark as 0.16.0 dev version (#7218) 2024-05-14 21:45:50 +10:00
Oliver
34e43e29da
Update release.yml (#7216)
Add new release.yml tag for "dependency" tagged issued
2024-05-14 19:55:18 +10:00
Oliver
21209d6242
Running worker status (#7215)
* Add more information to the TaskManagement panel

- Overview of task counts
- Display alert if background worker is not running

* Add a divider
2024-05-14 13:59:06 +10:00
dependabot[bot]
90e15b6bf3
Bump the dependencies group with 2 updates (#7213)
Bumps the dependencies group with 2 updates: [ossf/scorecard-action](https://github.com/ossf/scorecard-action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `ossf/scorecard-action` from 2.3.1 to 2.3.3
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...dc50aa9510)

Updates `github/codeql-action` from 3.25.3 to 3.25.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d39d31e687...b7cec75265)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 09:49:06 +10:00
Oliver
6a9d833251
Nginx example (#7207)
* Add sample nginx config file

- Taken from 0.13.x branch

* Add alternative setup for nginx

* Add brief note in the docs
2024-05-13 14:15:45 +10:00
Oliver
b5a3e4aac4
[PUI] stock item delete (#7204)
* Handle stock item delete in PUI

* Support deletion of stock location

* Delete part category

* Some refactoring of the TableField approach

- Still needs some work
- Code can be made a lot cleaner here

* Use mantine components

* Fix incorrect import

* Update ServerInfoModal

* Further table refactoring

* Implement delete part function
2024-05-13 11:04:19 +10:00
Oliver
700a3612b7
New Crowdin updates (#7198)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-12 20:45:38 +10:00
Oliver
03ab4bb808
Revert "Fixed the app/app link to point to the latest app version. (#7195)" (#7201)
This reverts commit b88457a39e.
2024-05-11 14:11:23 +10:00
Oliver
b7da959dbd
Trackable build part fix (#7196)
* Build Order Page fix:

- Do not request test information for non trackable parts

* Typo fix
2024-05-10 15:36:35 +10:00
Oliver
29fa5cfafa
Transfer out of stock items (#7194)
* Use new setting to determine if item can be moved

* Add new setting to front-end

* Invert double inversion

* Prevent empty stock tracking entry

* Updated unit tests

* Fix rendering of FailedTasksTable
2024-05-10 12:04:26 +10:00
Peter Kopias
b88457a39e
Fixed the app/app link to point to the latest app version. (#7195) 2024-05-10 10:54:34 +10:00
Oliver
43fbd6dc78
New Crowdin updates (#7185)
* updated translation base

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-09 17:39:51 +10:00
dependabot[bot]
0fe0b25b8b
Bump eslint in /src/backend in the dependencies group (#7171)
Bumps the dependencies group in /src/backend with 1 update: [eslint](https://github.com/eslint/eslint).


Updates `eslint` from 9.1.1 to 9.2.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.1.1...v9.2.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-09 17:39:31 +10:00
Oliver
db1a2f9015
Fix for details links (#7184)
* Fix for details URl

- Do not open as a new link
- Instead, use internal 'navigate'
- Otherwise, triggers a login sequence again
- Major improvement in workflow

* Fix InvenTreeTable

* Refactor

* Handle case where no model available

* Fix default return type

* Use proper mantine table components

* Fix for BomTable click-through

* Details tweaks

* Fix labels

* Implement total price detail

* Cleanup

* Rendering tweaks

* Fix for Details.tsx
2024-05-09 12:15:07 +10:00
dependabot[bot]
770dbb9c35
Bump the dependencies group with 2 updates (#7169)
Bumps the dependencies group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/checkout` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](0ad4b8fada...44c2b7a8a4)

Updates `codecov/codecov-action` from 4.3.0 to 4.3.1
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](84508663e9...5ecb98a3c6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-09 07:04:38 +10:00
dependabot[bot]
3d444b2bb2
Bump mkdocs-material from 9.5.19 to 9.5.21 in /docs (#7177)
* Bump mkdocs-material from 9.5.19 to 9.5.21 in /docs

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.19 to 9.5.21.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.19...9.5.21)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix req

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-09 07:04:15 +10:00
Matthias Mair
6700a4625d
WIP [PUI] Migrate to Mantine v7 (#7028)
* bump deps

* upgrade all deps

* adapt theme context

* add vanilla extract

* add basic theme

* reformat global state

* fix imports

* fix spotlight

* update args

* adapt arg names

* fix more arg renames

* fix italic

* switch sx to style

* fix types

* fix theme refs

* misc fixes

* misc fixes

* fix type

* fix selects

* misc fixes

* bug fix

* update to new style

* set text args

* fix spotlight

* dumb spotlight down

* change ActionIcons back to default

* fix name

* fix test

* adjust test to new spotlight

* package fix

* fix new code to v7

* fix building

* fix group aligment

* remove unneeded imports

* add new type

* import cleanups

* add notification style

* move context to loadable

* reorder contexts

* make test less flaky

* fix missing theming

* fix color schema switcher

* increase timeouts

* update package refs

* add missing style for datatables

* fix missing nesting

* organize imports

* move language context around

* make sure license keys are unique

* add keys to badges

* fix import

* fix missing keys

* fix missing key issue in badge section

* update packages

* fix new code to v7 style

* dummy change

* fix up test

* fix btn style

* fix merge issues

* remove placeholders

* fix color schema usage

* fix usage of ColorScheme

* fix style issues

* fix test

* fix choice field to fit stricter validation

* make test more reproducible

* wait for dash before proceeding

* bump deps

* add missing style

* do loops

* fix css

* change carousel sizing

* fix merge for v7

* fix image ratio

* Revert "bump deps"

This reverts commit 91cdae5a3e.

* fix userstate to ensure it always renders

* await dashboard loading before resuming wiht wuick login

* fix spotlight and remove testing changes

* Catch API error

* Update breadcrumb list

* Update panel icon

* Cleanup notification drawer

* Some more tweaks

* Fix for notification count indicator

* Fix stack prop

* fix type error

* fix double timeout key

* use div instead of text

---------

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2024-05-08 17:42:57 +10:00
Oliver
08b1bdb564
Add more fields to BuildDetail page (#7183)
* Add more fields to BuildDetail page

* Prevent badges from flickering
2024-05-08 16:37:16 +10:00
Oliver
6d620c713a
Updates to StockOperationsRow (#7182)
- Allow custom parameters to be passed
- Add memo
2024-05-08 14:38:35 +10:00
Oliver
d16ee6755e
Refactor PanelMixin class into its own file (#7181)
* Refactor PanelMixin class into its own file

* Fix unit test
2024-05-08 14:22:24 +10:00
Oliver
c72dc2b8e4
[PUI] Tweaks (#7180)
* Table: Add loading state

* Update BOM pricing panel

* Fix for TableStringValue

- Order of operations
2024-05-08 13:13:19 +10:00
Oliver
fc9c75e4ca
Fix BuildItem with empty BuildLine reference (#7178) 2024-05-08 12:19:53 +10:00
Oliver
e24c4c56fa
[PUI] part stock (#7179)
* [PUI] Update PartDetail page

- Cleanup details fields
- Add extra badge

* Update StockItem table

- Display items which are not "in stock" as red
2024-05-08 12:19:09 +10:00
Oliver
108bd28102
[PUI] Error boundary (#7176)
* Create error boundary component

- Ref: https://docs.sentry.io/platforms/javascript/guides/react/features/error-boundary/
- Keeps errors container to local components
- Will be critical for plugin support

* Add boundary to API forms
2024-05-08 07:32:01 +10:00
dependabot[bot]
c7351c4064
Bump jinja2 from 3.1.3 to 3.1.4 in /src/backend (#7172)
* Bump jinja2 from 3.1.3 to 3.1.4 in /src/backend

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix req

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-07 23:57:41 +10:00
dependabot[bot]
c8f8f7d6c2
Bump jinja2 from 3.1.3 to 3.1.4 in /docs (#7173)
* Bump jinja2 from 3.1.3 to 3.1.4 in /docs

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix ref

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-07 23:57:26 +10:00
Matthias Mair
f51a5d799c
Bump django and adjacent deps (#7174)
* bump django and adjacent deps

* adjust test to bot be so specific
2024-05-07 23:57:00 +10:00
Oliver
289af4e924
Refactor login state management (#7158)
* Refactor login state management

- Previously relied only on presence of cookie
- Cookie may not actually be *valid*
- Inspect actual login state by looking at userState values
- Ensures better sequencing of global state API requests
- Login state is now correctly preseed across browsers

* Ignore errors for user/me/ API endpoint in playwright test

* Do not request notifications unless logged in

* Prevent duplicate licenses

* Update src/frontend/src/views/DesktopAppView.tsx

Co-authored-by: Matthias Mair <code@mjmair.com>

* Simplify checkLoginState

* Fix bug in return types

* Update playwright tests

* linting

* Remove error msg

* Use token auth for API calls

- Will (hopefully) allow us to bypass csrfmiddle request handling?

* Refetch token if not available

* Use cache for DISPLAY_FULL_NAMES setting

* Update src/frontend/tests/baseFixtures.ts

Co-authored-by: Matthias Mair <code@mjmair.com>

* PUI test updates

* Tweak doLogout function

* Revert change to baseFixtures.ts

* Cleanup

* Fix highlighted property

* Test cleanup

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-05-07 23:11:38 +10:00
Matthias Mair
6c944c73dd
[PUI] Add testing for Scanning page (#7165)
* use state to handle rerenders

* use setItem to cause rerenders on point

* add scan tests

* increase timeout

* fix name for test file

* renmae testcases

* Add ADA texts to help with testins / screen readers

* Add general function tests for scan page

* more coverage

* Revert "more coverage"

This reverts commit 67f600fb5e.
2024-05-07 17:36:35 +10:00
Oliver
ecc3b25464
Build default location (#7160)
* Set build default location on save

* Update destination location in PUI form

* Set location for generated stock outputs

* Construct buildorderoutput fieldset

* Add "location" field to BuildOrderOutput serializer

* Create new build outputs from PUI

* Refacator StockItemTable

* Support serial_numbers field

* Add new API endpoints for build order operations

* Implement "build output complete" form

* Refactor common table

* Implement ScrapBuildOutput form

* Implement BuildOutputCancel form

* Update API version
2024-05-05 19:34:35 +10:00