mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-15 16:58:14 +00:00
Merge branch 'master' into generic-parameters
This commit is contained in:
2
.github/workflows/check_translations.yaml
vendored
2
.github/workflows/check_translations.yaml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/docker.yaml
vendored
8
.github/workflows/docker.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
docker: ${{ steps.filter.outputs.docker }}
|
docker: ${{ steps.filter.outputs.docker }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
|
||||||
@@ -67,7 +67,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Test Docker Image
|
- name: Test Docker Image
|
||||||
@@ -129,7 +129,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Run Migration Tests
|
- name: Run Migration Tests
|
||||||
@@ -153,7 +153,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo
|
- name: Check out repo
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Set Up Python ${{ env.python_version }}
|
- name: Set Up Python ${{ env.python_version }}
|
||||||
|
|||||||
32
.github/workflows/qc_checks.yaml
vendored
32
.github/workflows/qc_checks.yaml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
requirements: ${{ steps.filter.outputs.requirements }}
|
requirements: ${{ steps.filter.outputs.requirements }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3.0.2
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
if: needs.paths-filter.outputs.cicd == 'true' || needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.requirements == 'true' || needs.paths-filter.outputs.force == 'true'
|
if: needs.paths-filter.outputs.cicd == 'true' || needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.frontend == 'true' || needs.paths-filter.outputs.requirements == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Set up Python ${{ env.python_version }}
|
- name: Set up Python ${{ env.python_version }}
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.requirements == 'true' || needs.paths-filter.outputs.force == 'true'
|
if: needs.paths-filter.outputs.server == 'true' || needs.paths-filter.outputs.requirements == 'true' || needs.paths-filter.outputs.force == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -126,7 +126,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Set up Python ${{ env.python_version }}
|
- name: Set up Python ${{ env.python_version }}
|
||||||
@@ -164,7 +164,7 @@ jobs:
|
|||||||
version: ${{ steps.version.outputs.version }}
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -249,7 +249,7 @@ jobs:
|
|||||||
version: ${{ needs.schema.outputs.version }}
|
version: ${{ needs.schema.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
name: Checkout Code
|
name: Checkout Code
|
||||||
with:
|
with:
|
||||||
repository: inventree/schema
|
repository: inventree/schema
|
||||||
@@ -302,7 +302,7 @@ jobs:
|
|||||||
INVENTREE_LOG_LEVEL: WARNING
|
INVENTREE_LOG_LEVEL: WARNING
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -346,7 +346,7 @@ jobs:
|
|||||||
python_version: ${{ matrix.python_version }}
|
python_version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -410,7 +410,7 @@ jobs:
|
|||||||
- 6379:6379
|
- 6379:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -458,7 +458,7 @@ jobs:
|
|||||||
- 3306:3306
|
- 3306:3306
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -500,7 +500,7 @@ jobs:
|
|||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -534,7 +534,7 @@ jobs:
|
|||||||
INVENTREE_PLUGINS_ENABLED: false
|
INVENTREE_PLUGINS_ENABLED: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
name: Checkout Code
|
name: Checkout Code
|
||||||
@@ -613,7 +613,7 @@ jobs:
|
|||||||
VITE_COVERAGE_BUILD: true
|
VITE_COVERAGE_BUILD: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -663,7 +663,7 @@ jobs:
|
|||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -696,7 +696,7 @@ jobs:
|
|||||||
security-events: write
|
security-events: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # pin@v2
|
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # pin@v2
|
||||||
@@ -705,7 +705,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Upload SARIF file
|
- name: Upload SARIF file
|
||||||
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # pin@v3
|
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # pin@v3
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
category: zizmor
|
category: zizmor
|
||||||
|
|||||||
14
.github/workflows/release.yaml
vendored
14
.github/workflows/release.yaml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Version Check
|
- name: Version Check
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
attestations: write
|
attestations: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
run: cd src/frontend && npm run compile && npm run build
|
run: cd src/frontend && npm run compile && npm run build
|
||||||
- name: Create SBOM for frontend
|
- name: Create SBOM for frontend
|
||||||
uses: anchore/sbom-action@8e94d75ddd33f69f691467e42275782e4bfefe84 # pin@v0
|
uses: anchore/sbom-action@fbfd9c6c189226748411491745178e0c2017392d # pin@v0
|
||||||
with:
|
with:
|
||||||
artifact-name: frontend-build.spdx
|
artifact-name: frontend-build.spdx
|
||||||
path: src/frontend
|
path: src/frontend
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
subject-path: "${{ github.workspace }}/src/backend/InvenTree/web/static/frontend-build.zip"
|
subject-path: "${{ github.workspace }}/src/backend/InvenTree/web/static/frontend-build.zip"
|
||||||
|
|
||||||
- name: Upload frontend
|
- name: Upload frontend
|
||||||
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # pin@2.11.2
|
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # pin@2.11.3
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: src/backend/InvenTree/web/static/frontend-build.zip
|
file: src/backend/InvenTree/web/static/frontend-build.zip
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
- name: Upload Attestation
|
- name: Upload Attestation
|
||||||
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # pin@2.11.2
|
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # pin@2.11.3
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
asset_name: frontend-build.intoto.jsonl
|
asset_name: frontend-build.intoto.jsonl
|
||||||
@@ -107,7 +107,7 @@ jobs:
|
|||||||
INVENTREE_DEBUG: true
|
INVENTREE_DEBUG: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
@@ -127,7 +127,7 @@ jobs:
|
|||||||
cd docs/site
|
cd docs/site
|
||||||
zip -r docs-html.zip *
|
zip -r docs-html.zip *
|
||||||
- name: Publish documentation
|
- name: Publish documentation
|
||||||
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # pin@2.11.2
|
uses: svenstaro/upload-release-action@6b7fa9f267e90b50a19fef07b3596790bb941741 # pin@2.11.3
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: docs/site/docs-html.zip
|
file: docs/site/docs-html.zip
|
||||||
|
|||||||
4
.github/workflows/scorecard.yaml
vendored
4
.github/workflows/scorecard.yaml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -67,6 +67,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
2
.github/workflows/translations.yaml
vendored
2
.github/workflows/translations.yaml
vendored
@@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # pin@v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: true
|
persist-credentials: true
|
||||||
- name: Environment Setup
|
- name: Environment Setup
|
||||||
|
|||||||
@@ -1482,9 +1482,9 @@ pynacl==1.6.0 \
|
|||||||
--hash=sha256:f46386c24a65383a9081d68e9c2de909b1834ec74ff3013271f1bca9c2d233eb \
|
--hash=sha256:f46386c24a65383a9081d68e9c2de909b1834ec74ff3013271f1bca9c2d233eb \
|
||||||
--hash=sha256:f4b3824920e206b4f52abd7de621ea7a44fd3cb5c8daceb7c3612345dfc54f2e
|
--hash=sha256:f4b3824920e206b4f52abd7de621ea7a44fd3cb5c8daceb7c3612345dfc54f2e
|
||||||
# via paramiko
|
# via paramiko
|
||||||
pypdf==6.3.0 \
|
pypdf==6.4.0 \
|
||||||
--hash=sha256:2d5f9741e851e378908692d571374b3cbd94582fdd1c740fcf7c029ec35ac0e6 \
|
--hash=sha256:4769d471f8ddc3341193ecc5d6560fa44cf8cd0abfabf21af4e195cc0c224072 \
|
||||||
--hash=sha256:d066a2fdf8195e1811ae5a9d5a2f97f5bed0e1e7954297295eadee6357e76c5d
|
--hash=sha256:55ab9837ed97fd7fcc5c131d52fcc2223bc5c6b8a1488bbf7c0e27f1f0023a79
|
||||||
# via -r src/backend/requirements.in
|
# via -r src/backend/requirements.in
|
||||||
pyphen==0.17.2 \
|
pyphen==0.17.2 \
|
||||||
--hash=sha256:3a07fb017cb2341e1d9ff31b8634efb1ae4dc4b130468c7c39dd3d32e7c3affd \
|
--hash=sha256:3a07fb017cb2341e1d9ff31b8634efb1ae4dc4b130468c7c39dd3d32e7c3affd \
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { t } from '@lingui/core/macro';
|
import { t } from '@lingui/core/macro';
|
||||||
import { Table } from '@mantine/core';
|
import { Alert, Table, Text } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconAddressBook,
|
IconAddressBook,
|
||||||
IconCalendar,
|
IconCalendar,
|
||||||
|
IconCircleCheck,
|
||||||
|
IconCircleX,
|
||||||
IconCoins,
|
IconCoins,
|
||||||
IconUser,
|
IconUser,
|
||||||
IconUsers
|
IconUsers
|
||||||
@@ -23,8 +25,9 @@ import type {
|
|||||||
ApiFormFieldType
|
ApiFormFieldType
|
||||||
} from '@lib/types/Forms';
|
} from '@lib/types/Forms';
|
||||||
import type { TableFieldRowProps } from '../components/forms/fields/TableField';
|
import type { TableFieldRowProps } from '../components/forms/fields/TableField';
|
||||||
import { useCreateApiFormModal } from '../hooks/UseForm';
|
import { useCreateApiFormModal, useEditApiFormModal } from '../hooks/UseForm';
|
||||||
import { useGlobalSettingsState } from '../states/SettingsStates';
|
import { useGlobalSettingsState } from '../states/SettingsStates';
|
||||||
|
import { useUserState } from '../states/UserState';
|
||||||
import { RenderPartColumn } from '../tables/ColumnRenderers';
|
import { RenderPartColumn } from '../tables/ColumnRenderers';
|
||||||
|
|
||||||
export function useSalesOrderFields({
|
export function useSalesOrderFields({
|
||||||
@@ -190,6 +193,64 @@ export function useSalesOrderLineItemFields({
|
|||||||
}, [salePrice, partCurrency, orderId, create]);
|
}, [salePrice, partCurrency, orderId, create]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function useCheckShipmentForm({
|
||||||
|
shipmentId,
|
||||||
|
onSuccess
|
||||||
|
}: {
|
||||||
|
shipmentId: number;
|
||||||
|
onSuccess: (response: any) => void;
|
||||||
|
}) {
|
||||||
|
const user = useUserState();
|
||||||
|
|
||||||
|
return useEditApiFormModal({
|
||||||
|
url: ApiEndpoints.sales_order_shipment_list,
|
||||||
|
pk: shipmentId,
|
||||||
|
title: t`Check Shipment`,
|
||||||
|
preFormContent: (
|
||||||
|
<Alert color='green' icon={<IconCircleCheck />} title={t`Check Shipment`}>
|
||||||
|
<Text>{t`Marking the shipment as checked indicates that you have verified that all items included in this shipment are correct`}</Text>
|
||||||
|
</Alert>
|
||||||
|
),
|
||||||
|
fetchInitialData: false,
|
||||||
|
fields: {
|
||||||
|
checked_by: {
|
||||||
|
hidden: true,
|
||||||
|
value: user.getUser()?.pk
|
||||||
|
}
|
||||||
|
},
|
||||||
|
successMessage: t`Shipment marked as checked`,
|
||||||
|
onFormSuccess: onSuccess
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useUncheckShipmentForm({
|
||||||
|
shipmentId,
|
||||||
|
onSuccess
|
||||||
|
}: {
|
||||||
|
shipmentId: number;
|
||||||
|
onSuccess: (response: any) => void;
|
||||||
|
}) {
|
||||||
|
return useEditApiFormModal({
|
||||||
|
url: ApiEndpoints.sales_order_shipment_list,
|
||||||
|
pk: shipmentId,
|
||||||
|
title: t`Uncheck Shipment`,
|
||||||
|
preFormContent: (
|
||||||
|
<Alert color='red' icon={<IconCircleX />} title={t`Uncheck Shipment`}>
|
||||||
|
<Text>{t`Marking the shipment as unchecked indicates that the shipment requires further verification`}</Text>
|
||||||
|
</Alert>
|
||||||
|
),
|
||||||
|
fetchInitialData: false,
|
||||||
|
fields: {
|
||||||
|
checked_by: {
|
||||||
|
hidden: true,
|
||||||
|
value: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
successMessage: t`Shipment marked as unchecked`,
|
||||||
|
onFormSuccess: onSuccess
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function SalesOrderAllocateLineRow({
|
function SalesOrderAllocateLineRow({
|
||||||
props,
|
props,
|
||||||
record,
|
record,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { t } from '@lingui/core/macro';
|
import { t } from '@lingui/core/macro';
|
||||||
import { Alert, Grid, Skeleton, Stack, Text } from '@mantine/core';
|
import { Grid, Skeleton, Stack, Text } from '@mantine/core';
|
||||||
import {
|
import {
|
||||||
IconBookmark,
|
IconBookmark,
|
||||||
IconCircleCheck,
|
IconCircleCheck,
|
||||||
@@ -39,8 +39,10 @@ import { RenderAddress } from '../../components/render/Company';
|
|||||||
import { RenderUser } from '../../components/render/User';
|
import { RenderUser } from '../../components/render/User';
|
||||||
import { formatDate } from '../../defaults/formatters';
|
import { formatDate } from '../../defaults/formatters';
|
||||||
import {
|
import {
|
||||||
|
useCheckShipmentForm,
|
||||||
useSalesOrderShipmentCompleteFields,
|
useSalesOrderShipmentCompleteFields,
|
||||||
useSalesOrderShipmentFields
|
useSalesOrderShipmentFields,
|
||||||
|
useUncheckShipmentForm
|
||||||
} from '../../forms/SalesOrderForms';
|
} from '../../forms/SalesOrderForms';
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
@@ -320,44 +322,14 @@ export default function SalesOrderShipmentDetail() {
|
|||||||
onFormSuccess: refreshShipment
|
onFormSuccess: refreshShipment
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkShipment = useEditApiFormModal({
|
const checkShipment = useCheckShipmentForm({
|
||||||
url: ApiEndpoints.sales_order_shipment_list,
|
shipmentId: shipment.pk,
|
||||||
pk: shipment.pk,
|
onSuccess: refreshShipment
|
||||||
title: t`Check Shipment`,
|
|
||||||
preFormContent: (
|
|
||||||
<Alert color='green' icon={<IconCircleCheck />} title={t`Check Shipment`}>
|
|
||||||
<Text>{t`Marking the shipment as checked indicates that you have verified that all items included in this shipment are correct`}</Text>
|
|
||||||
</Alert>
|
|
||||||
),
|
|
||||||
fetchInitialData: false,
|
|
||||||
fields: {
|
|
||||||
checked_by: {
|
|
||||||
hidden: true,
|
|
||||||
value: userId
|
|
||||||
}
|
|
||||||
},
|
|
||||||
successMessage: t`Shipment marked as checked`,
|
|
||||||
onFormSuccess: refreshShipment
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const uncheckShipment = useEditApiFormModal({
|
const uncheckShipment = useUncheckShipmentForm({
|
||||||
url: ApiEndpoints.sales_order_shipment_list,
|
shipmentId: shipment.pk,
|
||||||
pk: shipment.pk,
|
onSuccess: refreshShipment
|
||||||
title: t`Uncheck Shipment`,
|
|
||||||
preFormContent: (
|
|
||||||
<Alert color='red' icon={<IconCircleX />} title={t`Uncheck Shipment`}>
|
|
||||||
<Text>{t`Marking the shipment as unchecked indicates that the shipment requires further verification`}</Text>
|
|
||||||
</Alert>
|
|
||||||
),
|
|
||||||
fetchInitialData: false,
|
|
||||||
fields: {
|
|
||||||
checked_by: {
|
|
||||||
hidden: true,
|
|
||||||
value: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
successMessage: t`Shipment marked as unchecked`,
|
|
||||||
onFormSuccess: refreshShipment
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const shipmentBadges = useMemo(() => {
|
const shipmentBadges = useMemo(() => {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { t } from '@lingui/core/macro';
|
import { t } from '@lingui/core/macro';
|
||||||
import { IconTruckDelivery } from '@tabler/icons-react';
|
import {
|
||||||
|
IconCircleCheck,
|
||||||
|
IconCircleX,
|
||||||
|
IconTruckDelivery
|
||||||
|
} from '@tabler/icons-react';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
@@ -19,8 +23,10 @@ import type { TableFilter } from '@lib/types/Filters';
|
|||||||
import type { TableColumn } from '@lib/types/Tables';
|
import type { TableColumn } from '@lib/types/Tables';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import {
|
import {
|
||||||
|
useCheckShipmentForm,
|
||||||
useSalesOrderShipmentCompleteFields,
|
useSalesOrderShipmentCompleteFields,
|
||||||
useSalesOrderShipmentFields
|
useSalesOrderShipmentFields,
|
||||||
|
useUncheckShipmentForm
|
||||||
} from '../../forms/SalesOrderForms';
|
} from '../../forms/SalesOrderForms';
|
||||||
import {
|
import {
|
||||||
useCreateApiFormModal,
|
useCreateApiFormModal,
|
||||||
@@ -91,6 +97,20 @@ export default function SalesOrderShipmentTable({
|
|||||||
table: table
|
table: table
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const checkShipment = useCheckShipmentForm({
|
||||||
|
shipmentId: selectedShipment.pk,
|
||||||
|
onSuccess: () => {
|
||||||
|
table.refreshTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const uncheckShipment = useUncheckShipmentForm({
|
||||||
|
shipmentId: selectedShipment.pk,
|
||||||
|
onSuccess: () => {
|
||||||
|
table.refreshTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const completeShipment = useCreateApiFormModal({
|
const completeShipment = useCreateApiFormModal({
|
||||||
url: ApiEndpoints.sales_order_shipment_complete,
|
url: ApiEndpoints.sales_order_shipment_complete,
|
||||||
pk: selectedShipment.pk,
|
pk: selectedShipment.pk,
|
||||||
@@ -188,6 +208,30 @@ export default function SalesOrderShipmentTable({
|
|||||||
const shipped: boolean = !!record.shipment_date;
|
const shipped: boolean = !!record.shipment_date;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
{
|
||||||
|
hidden:
|
||||||
|
!!record.checked_by || !user.hasChangeRole(UserRoles.sales_order),
|
||||||
|
title: t`Check Shipment`,
|
||||||
|
color: 'blue',
|
||||||
|
icon: <IconCircleCheck />,
|
||||||
|
onClick: () => {
|
||||||
|
setSelectedShipment(record);
|
||||||
|
checkShipment.open();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hidden:
|
||||||
|
shipped ||
|
||||||
|
!record.checked_by ||
|
||||||
|
!user.hasChangeRole(UserRoles.sales_order),
|
||||||
|
title: t`Uncheck Shipment`,
|
||||||
|
color: 'red',
|
||||||
|
icon: <IconCircleX />,
|
||||||
|
onClick: () => {
|
||||||
|
setSelectedShipment(record);
|
||||||
|
uncheckShipment.open();
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
hidden: shipped || !user.hasChangeRole(UserRoles.sales_order),
|
hidden: shipped || !user.hasChangeRole(UserRoles.sales_order),
|
||||||
title: t`Complete Shipment`,
|
title: t`Complete Shipment`,
|
||||||
@@ -271,7 +315,9 @@ export default function SalesOrderShipmentTable({
|
|||||||
<>
|
<>
|
||||||
{newShipment.modal}
|
{newShipment.modal}
|
||||||
{editShipment.modal}
|
{editShipment.modal}
|
||||||
|
{checkShipment.modal}
|
||||||
{deleteShipment.modal}
|
{deleteShipment.modal}
|
||||||
|
{uncheckShipment.modal}
|
||||||
{completeShipment.modal}
|
{completeShipment.modal}
|
||||||
<InvenTreeTable
|
<InvenTreeTable
|
||||||
url={apiUrl(ApiEndpoints.sales_order_shipment_list)}
|
url={apiUrl(ApiEndpoints.sales_order_shipment_list)}
|
||||||
|
|||||||
Reference in New Issue
Block a user