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

Feat: add order position reference to stockview #155

Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
import org.eclipse.tractusx.puris.backend.masterdata.logic.service.MaterialService;
import org.eclipse.tractusx.puris.backend.masterdata.logic.service.PartnerService;
import org.eclipse.tractusx.puris.backend.stock.logic.dto.FrontendMaterialDto;
import org.eclipse.tractusx.puris.backend.stock.logic.service.MaterialStockService;
import org.eclipse.tractusx.puris.backend.stock.logic.service.PartnerProductStockService;
import org.eclipse.tractusx.puris.backend.stock.logic.service.ProductStockRequestApiService;
import org.eclipse.tractusx.puris.backend.stock.logic.service.ProductStockService;
import org.eclipse.tractusx.puris.backend.stock.logic.service.*;
import org.junit.jupiter.api.Test;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -66,6 +63,9 @@ class StockViewControllerTest {
@MockBean
private ProductStockService productStockService;

@MockBean
private ProductItemStockService productItemStockService;

@MockBean
private MaterialStockService materialStockService;

Expand Down
50 changes: 45 additions & 5 deletions frontend/src/views/StockView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
SPDX-License-Identifier: Apache-2.0
-->
<template>
<main class="flex flex-col">
<main class="flex flex-col mb-7">
<h1 class="w-full text-center bold text-5xl mb-6 pb-6">
View and Manage Stocks
</h1>

<div>
<div class="divide-y-4">
<form
@submit.prevent="addOrUpdateStock(this.changedStock)"
class="flex flex-row"
>
<!-- First Column -->
<div class="basis-1/3 mr-28 flex flex-col">
<div class="basis-1/2 mr-28 flex flex-col">
<div class="flex flex-row justify-start space-x-3">
<div class="space-x-2">
<input
Expand Down Expand Up @@ -126,7 +126,7 @@
</div>

<!-- Second Column -->
<div class="basis-1/3 flex flex-col justify-end">
<div class="basis-1/2 flex flex-col justify-end">
<div>
<input
type="checkbox"
Expand Down Expand Up @@ -176,6 +176,41 @@
</option>
</select>
</div>
<div class="flex flex-row justify-between">
<div class="grow mr-4">
<label for="customerOrderNumber"
>Customer Order Number</label
>
<input
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
id="customerOrderNumber"
v-model="this.changedStock.customerOrderNumber"
/>
</div>
<div class="grow">
<label for="customerOrderPositionNumber"
>Customer Order Position Number</label
>
<input
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
id="customerOrderPositionNumber"
v-model="
this.changedStock
.customerOrderPositionNumber
"
/>
</div>
</div>
<div>
<label for="supplierOrderNumber"
>Supplier Order Number</label
>
<input
class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
id="supplierOrderNumber"
v-model="this.changedStock.supplierOrderNumber"
/>
</div>
<!-- Empty div -->
<div style="height: 54.5px"></div>
</div>
Expand All @@ -184,16 +219,18 @@
<!-- separator -->
<div
id="materialAndProductStockTables"
class="flex flex-col space-y-2 max-w-max"
class="flex flex-col space-y-2 max-w-max divide-y-4"
>
<StockTableSFC
title="Material Stocks"
:stocks="this.bdMaterialStocks"
:ownRole="'customer'"
:partnerRole="'supplier'"
/>
<StockTableSFC
title="Product Stocks"
:stocks="this.bdProductStocks"
:ownRole="'supplier'"
:partnerRole="'customer'"
/>
</div>
Expand Down Expand Up @@ -238,6 +275,9 @@ export default {
isBlocked: false,
bpns: "",
bpna: "",
customerOrderNumber: "",
customerOrderPositionNumber: "",
supplierOrderNumber: "",
},
site: {
bpns: "BPNS12345678910ZZZ",
Expand Down
Loading
Loading