mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged in bugfixes/remission (pull request #972)
Remission improvements
This commit is contained in:
@@ -22,7 +22,7 @@ import { ReloadGoodsIn } from '../actions/goods-in.actions';
|
||||
import { ReloadBranchProcess } from '../actions/branch-process.actions';
|
||||
import { ReloadRemission } from '../actions/remission.actions';
|
||||
|
||||
export const SYNC_DATA_VERSION = 176;
|
||||
export const SYNC_DATA_VERSION = 177;
|
||||
|
||||
export class AppStateModel {
|
||||
currentProcesssId: number;
|
||||
|
||||
@@ -120,8 +120,8 @@ export class RemissionState {
|
||||
) {
|
||||
const state = ctx.getState();
|
||||
const currentRemission = state.remission;
|
||||
const { remissionProcess, target } = currentRemission;
|
||||
let remission: Remission;
|
||||
const target = currentRemission.target;
|
||||
const selectedFilters: any = {
|
||||
[filterId]: {
|
||||
filterGroups,
|
||||
@@ -132,28 +132,32 @@ export class RemissionState {
|
||||
remission = {
|
||||
...currentRemission,
|
||||
remissionProcess: {
|
||||
...currentRemission.remissionProcess,
|
||||
zentral: {
|
||||
...currentRemission.remissionProcess.zentral,
|
||||
[target]: {
|
||||
...currentRemission.remissionProcess.zentral[target],
|
||||
...selectedFilters
|
||||
}
|
||||
}
|
||||
...remissionProcess,
|
||||
zentral: remissionProcess.zentral
|
||||
? {
|
||||
...remissionProcess.zentral,
|
||||
[target]: {
|
||||
...remissionProcess.zentral[target],
|
||||
...selectedFilters
|
||||
}
|
||||
}
|
||||
: initialTargetValue
|
||||
}
|
||||
};
|
||||
} else {
|
||||
remission = {
|
||||
...currentRemission,
|
||||
remissionProcess: {
|
||||
...currentRemission.remissionProcess,
|
||||
ueberlauf: {
|
||||
...currentRemission.remissionProcess.ueberlauf,
|
||||
[target]: {
|
||||
...currentRemission.remissionProcess.ueberlauf[target],
|
||||
...selectedFilters
|
||||
}
|
||||
}
|
||||
...remissionProcess,
|
||||
ueberlauf: remissionProcess.ueberlauf
|
||||
? {
|
||||
...remissionProcess.ueberlauf,
|
||||
[target]: {
|
||||
...remissionProcess.ueberlauf[target],
|
||||
...selectedFilters
|
||||
}
|
||||
}
|
||||
: initialTargetValue
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ $tablet-height: 283px;
|
||||
}
|
||||
|
||||
.option-name {
|
||||
margin-left: 14px;
|
||||
margin-top: 3px;
|
||||
padding-left: 14px;
|
||||
padding-top: 3px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@
|
||||
<ng-container *ngTemplateOutlet="supplierAndFilter"></ng-container
|
||||
></ng-container>
|
||||
<ng-template #spinner>
|
||||
<div class="spinner"></div>
|
||||
<div class="content-container">
|
||||
<div class="first-row"></div>
|
||||
<div class="second-row"></div>
|
||||
<div class="third-row"></div>
|
||||
<div class="fourth-row"></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<ng-template #supplierAndFilter>
|
||||
|
||||
@@ -151,3 +151,46 @@
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.content-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
opacity: 1;
|
||||
margin-top: 20px;
|
||||
animation: load 0.75s linear infinite;
|
||||
|
||||
.first-row {
|
||||
height: 20px;
|
||||
width: 135px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.second-row {
|
||||
height: 20px;
|
||||
width: 150px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.third-row {
|
||||
height: 20px;
|
||||
width: 90px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.fourth-row {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ export class RemissionListCreateComponent implements OnInit, OnDestroy {
|
||||
this.remissionProcessStatuses = remissionProcessStatuses;
|
||||
this.remissionProcess$ = !this.remissionProcessStatuses.created ? this.createProcess() : this.continueProcess();
|
||||
this.remissionProcess$.pipe(takeUntil(this.destroy$)).subscribe(remissionProcess => {
|
||||
console.log('remissionProcess', remissionProcess);
|
||||
(!isNullOrUndefined(remissionProcess.capacities)).ifTrue(() => this.capacitiesBinder(remissionProcess.capacities));
|
||||
});
|
||||
|
||||
@@ -480,7 +481,7 @@ export class RemissionListCreateComponent implements OnInit, OnDestroy {
|
||||
this.remissionService
|
||||
.searchProduct({ ean: input })
|
||||
.pipe(take(1))
|
||||
.subscribe(this.searchProductResultHandler);
|
||||
.subscribe(this.searchProductResultHandler, () => this.invalidBarcodeDialog.openDialog());
|
||||
}
|
||||
|
||||
searchProductResultHandler = (remissionProduct: RemissionProduct) => {
|
||||
@@ -490,6 +491,7 @@ export class RemissionListCreateComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
this.store.dispatch(new SetRemissionSearchedProduct(remissionProduct));
|
||||
this.searchedRemissionProduct = remissionProduct;
|
||||
this.resourceTypeChange(RESOURCE_TYPE_SWITCH);
|
||||
setTimeout(() => {
|
||||
this.addProductToRemissionDialog.openDialog();
|
||||
}, 40);
|
||||
|
||||
@@ -54,7 +54,12 @@
|
||||
<ng-container *ngTemplateOutlet="supplierAndFilter"></ng-container>
|
||||
</ng-container>
|
||||
<ng-template #spinner>
|
||||
<div class="spinner"></div>
|
||||
<div class="content-container">
|
||||
<div class="first-row"></div>
|
||||
<div class="second-row"></div>
|
||||
<div class="third-row"></div>
|
||||
<div class="fourth-row"></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
<ng-template #supplierAndFilter>
|
||||
|
||||
@@ -227,3 +227,46 @@
|
||||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
opacity: 1;
|
||||
margin-top: 20px;
|
||||
animation: load 0.75s linear infinite;
|
||||
|
||||
.first-row {
|
||||
height: 20px;
|
||||
width: 135px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.second-row {
|
||||
height: 20px;
|
||||
width: 150px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.third-row {
|
||||
height: 20px;
|
||||
width: 90px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.fourth-row {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
background-color: #ffffff;
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user