Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endpoint to set the definition of a spare #413

Closed
4 tasks done
joelvdavies opened this issue Nov 7, 2024 · 0 comments · Fixed by #421
Closed
4 tasks done

Add endpoint to set the definition of a spare #413

joelvdavies opened this issue Nov 7, 2024 · 0 comments · Fixed by #421
Assignees
Labels
enhancement New feature or request

Comments

@joelvdavies
Copy link
Collaborator

joelvdavies commented Nov 7, 2024

The definition of a spare is effectively a list of usage statuses that a spare would have. We need an endpoint that allows the front end to assign this definition. Endpoint should:

  • Be a PUT at /settings/spares_definition
  • Take a list of usage statuses that constitute a spare e.g.
    {
     "usage_statuses": [
       { "id": "6723a734ae807034e53cdd13" },
       { "id": "6723a734ae807034e53cdd14" }
     ]
    }
    
  • Store these usage statuses for later retrieval
    • Use a settings database collection with an _id: "spares_definition"
    • Either store the values like properties or we can insert them later (e.g. aggregation)
  • This task should also ensure ensure a usage status cannot be deleted while it is in the definition
@joelvdavies joelvdavies added the enhancement New feature or request label Nov 7, 2024
@joelvdavies joelvdavies self-assigned this Nov 19, 2024
@joelvdavies joelvdavies moved this from Backlog to In Progress in Inventory Management System Nov 19, 2024
joelvdavies added a commit that referenced this issue Nov 19, 2024
joelvdavies added a commit that referenced this issue Nov 20, 2024
@joelvdavies joelvdavies moved this from In Progress to In Review in Inventory Management System Nov 22, 2024
joelvdavies added a commit that referenced this issue Dec 2, 2024
joelvdavies added a commit that referenced this issue Dec 3, 2024
joelvdavies added a commit that referenced this issue Dec 5, 2024
…-#413

Add endpoint to set spares definition #413
@github-project-automation github-project-automation bot moved this from In Review to Done in Inventory Management System Dec 5, 2024
@VKTB VKTB moved this from Done to Archive in Inventory Management System Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Archive
Development

Successfully merging a pull request may close this issue.

1 participant