mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
HIMA-702 fix issues up to 9
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 = 142;
|
||||
export const SYNC_DATA_VERSION = 144;
|
||||
|
||||
export class AppStateModel {
|
||||
currentProcesssId: number;
|
||||
|
||||
@@ -303,11 +303,19 @@ export class RemissionListCreateComponent implements OnInit, OnDestroy {
|
||||
capacitiesBinder = (capacities: CapacityType[]) => {
|
||||
this.capacities = [];
|
||||
capacities.forEach(capacity => {
|
||||
if (capacity && capacity.utilized && capacity.available) {
|
||||
const percentage = capacity.utilized === 0 || capacity.available === 0 ? 0 : (capacity.utilized / capacity.available) * 100;
|
||||
if (capacity && !isNullOrUndefined(capacity.utilized) && !isNullOrUndefined(capacity.available)) {
|
||||
let percentage;
|
||||
const { available, utilized } = capacity;
|
||||
if (utilized === 0 && available === 0) {
|
||||
percentage = 100;
|
||||
} else if (available === 0) {
|
||||
percentage = 0;
|
||||
} else {
|
||||
percentage = (utilized / available) * 100;
|
||||
}
|
||||
this.capacities.push(<CapacityTypeClientWrapper>{
|
||||
percentage: percentage,
|
||||
capacity: capacity
|
||||
percentage,
|
||||
capacity
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -287,11 +287,19 @@ export class RemissionListStartedComponent implements OnInit, OnDestroy {
|
||||
capacitiesBinder = (capacities: CapacityType[]) => {
|
||||
this.capacities = [];
|
||||
capacities.forEach(capacity => {
|
||||
if (capacity && capacity.utilized && capacity.available) {
|
||||
const percentage = capacity.utilized === 0 || capacity.available === 0 ? 0 : (capacity.utilized / capacity.available) * 100;
|
||||
if (capacity && !isNullOrUndefined(capacity.utilized) && !isNullOrUndefined(capacity.available)) {
|
||||
let percentage;
|
||||
const { available, utilized } = capacity;
|
||||
if (utilized === 0 && available === 0) {
|
||||
percentage = 100;
|
||||
} else if (available === 0) {
|
||||
percentage = 0;
|
||||
} else {
|
||||
percentage = (utilized / available) * 100;
|
||||
}
|
||||
this.capacities.push(<CapacityTypeClientWrapper>{
|
||||
percentage: percentage,
|
||||
capacity: capacity
|
||||
percentage,
|
||||
capacity
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -6,13 +6,14 @@ import { Router } from '@angular/router';
|
||||
import { DeleteLastPreviousPath, UpdateActiveCrumb } from '../../../core/store/actions/breadcrumb.actions';
|
||||
import { SharedSelectors } from '../../../core/store/selectors/shared.selectors';
|
||||
import { ResetFilters } from '../../../core/store/actions/filter.actions';
|
||||
import { SetRemissionCompleted } from './../../../core/store/actions/remission.actions';
|
||||
import { ModuleSwitcher } from '../../../core/models/app-switcher.enum';
|
||||
import { SetBranchProcessCurrentPath } from '../../../core/store/actions/branch-process.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-back-arrow',
|
||||
templateUrl: './back-arrow.component.html',
|
||||
styleUrls: ['./back-arrow.component.scss'],
|
||||
styleUrls: ['./back-arrow.component.scss']
|
||||
})
|
||||
export class BackArrowComponent implements OnInit {
|
||||
@Output() back = new EventEmitter();
|
||||
@@ -35,6 +36,9 @@ export class BackArrowComponent implements OnInit {
|
||||
}
|
||||
this.store.dispatch(new DeleteLastPreviousPath());
|
||||
this.store.dispatch(new UpdateActiveCrumb(previousRoute.crumb));
|
||||
if (previousRoute.path === '/remission/create') {
|
||||
this.store.dispatch(new SetRemissionCompleted(true));
|
||||
}
|
||||
if (this.checkIfPathHasQueryParams(previousRoute.path)) {
|
||||
const cleanPath = this.getCleanPath(previousRoute.path);
|
||||
const queryParams = this.getParams(previousRoute.path);
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -1095,9 +1095,9 @@
|
||||
}
|
||||
},
|
||||
"@isa/remission": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remission/-/remission-0.2.9.tgz",
|
||||
"integrity": "sha1-LfhzQpZaN87ywmCGtJgyPPfuU38=",
|
||||
"version": "0.2.11",
|
||||
"resolved": "https://pkgs.dev.azure.com/hugendubel/_packaging/hugendubel/npm/registry/@isa/remission/-/remission-0.2.11.tgz",
|
||||
"integrity": "sha1-2t9yqwHM4a2RS58dXijYtVuPXv8=",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"@isa/catsearch-api": "^0.0.38",
|
||||
"@isa/print-api": "^0.0.38",
|
||||
"@isa/remi-api": "^0.0.38",
|
||||
"@isa/remission": "^0.2.8",
|
||||
"@isa/remission": "^0.2.11",
|
||||
"@ng-idle/core": "^8.0.0-beta.4",
|
||||
"@ng-idle/keepalive": "^8.0.0-beta.4",
|
||||
"@ngxs/store": "^3.4.1",
|
||||
|
||||
Reference in New Issue
Block a user