mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 1462: Implementierung Packstück Kontolle
This commit is contained in:
committed by
Nino Righi
parent
bf18b83a75
commit
ae08e46b30
754
angular.json
754
angular.json
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/adapter/scan'),
|
|
||||||
subdir: '.',
|
|
||||||
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
5
apps/adapter/scan/src/lib/dummy.spec.ts
Normal file
5
apps/adapter/scan/src/lib/dummy.spec.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
describe('Dummy', () => {
|
||||||
|
it('should work', () => {
|
||||||
|
expect(true).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/cdn/product-image'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,16 +1,20 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { Config } from '@core/config';
|
||||||
|
import { createServiceFactory, SpectatorService } from '@ngneat/spectator';
|
||||||
|
|
||||||
import { ProductImageService } from './product-image.service';
|
import { ProductImageService } from './product-image.service';
|
||||||
|
|
||||||
describe('ProductImageService', () => {
|
describe('ProductImageService', () => {
|
||||||
let service: ProductImageService;
|
let spectator: SpectatorService<ProductImageService>;
|
||||||
|
const createService = createServiceFactory({
|
||||||
|
service: ProductImageService,
|
||||||
|
mocks: [Config],
|
||||||
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({});
|
spectator = createService();
|
||||||
service = TestBed.inject(ProductImageService);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be created', () => {
|
it('should be created', () => {
|
||||||
expect(service).toBeTruthy();
|
expect(spectator.service).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
const customLaunchers = require('../../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../../karma/junit-reporter')('core-application');
|
|
||||||
const coverageReporter = require('../../../karma/coverage-reporter')('core-application');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter,
|
|
||||||
junitReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
const customLaunchers = require('../../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../../karma/junit-reporter')('core-auth');
|
|
||||||
const coverageReporter = require('../../../karma/coverage-reporter')('core-auth');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter,
|
|
||||||
junitReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/breadcrumb'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
32
apps/core/cache/karma.conf.js
vendored
32
apps/core/cache/karma.conf.js
vendored
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/cache'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
11
apps/core/cache/src/test.ts
vendored
11
apps/core/cache/src/test.ts
vendored
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
5
apps/core/cache/tsconfig.spec.json
vendored
5
apps/core/cache/tsconfig.spec.json
vendored
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/command'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
const customLaunchers = require('../../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../../karma/junit-reporter')('core-config');
|
|
||||||
const coverageReporter = require('../../../karma/coverage-reporter')('core-config');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter,
|
|
||||||
junitReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/environment'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
const customLaunchers = require('../../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../../karma/junit-reporter')('core-logger');
|
|
||||||
const coverageReporter = require('../../../karma/coverage-reporter')('core-logger');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
junitReporter,
|
|
||||||
coverageReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/signalr'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/core/toast'),
|
|
||||||
subdir: '.',
|
|
||||||
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/availability'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
AvailabilityType,
|
AvailabilityType,
|
||||||
} from '@swagger/availability';
|
} from '@swagger/availability';
|
||||||
import { AvailabilityDTO as CatAvailabilityDTO } from '@swagger/cat';
|
import { AvailabilityDTO as CatAvailabilityDTO } from '@swagger/cat';
|
||||||
import { map, shareReplay, switchMap, withLatestFrom, mergeMap, timeout } from 'rxjs/operators';
|
import { map, shareReplay, switchMap, withLatestFrom, mergeMap, timeout, first } from 'rxjs/operators';
|
||||||
import { isArray, memorize } from '@utils/common';
|
import { isArray, memorize } from '@utils/common';
|
||||||
import { LogisticianDTO, LogisticianService } from '@swagger/oms';
|
import { LogisticianDTO, LogisticianService } from '@swagger/oms';
|
||||||
import { ResponseArgsOfIEnumerableOfStockInfoDTO, StockDTO, StockInfoDTO, StockService } from '@swagger/remi';
|
import { ResponseArgsOfIEnumerableOfStockInfoDTO, StockDTO, StockInfoDTO, StockService } from '@swagger/remi';
|
||||||
@@ -38,7 +38,7 @@ export class DomainAvailabilityService {
|
|||||||
getSuppliers(): Observable<SupplierDTO[]> {
|
getSuppliers(): Observable<SupplierDTO[]> {
|
||||||
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
|
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
|
||||||
map((response) => response.result),
|
map((response) => response.result),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ export class DomainAvailabilityService {
|
|||||||
getTakeAwaySupplier(): Observable<SupplierDTO> {
|
getTakeAwaySupplier(): Observable<SupplierDTO> {
|
||||||
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
|
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
|
||||||
map(({ result }) => result?.find((supplier) => supplier?.supplierNumber === 'F')),
|
map(({ result }) => result?.find((supplier) => supplier?.supplierNumber === 'F')),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ export class DomainAvailabilityService {
|
|||||||
getBranches(): Observable<BranchDTO[]> {
|
getBranches(): Observable<BranchDTO[]> {
|
||||||
return this._branchService.StoreCheckoutBranchGetBranches({}).pipe(
|
return this._branchService.StoreCheckoutBranchGetBranches({}).pipe(
|
||||||
map((response) => response.result),
|
map((response) => response.result),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export class DomainAvailabilityService {
|
|||||||
getCurrentStock(): Observable<StockDTO> {
|
getCurrentStock(): Observable<StockDTO> {
|
||||||
return this._stockService.StockCurrentStock().pipe(
|
return this._stockService.StockCurrentStock().pipe(
|
||||||
map((response) => response.result),
|
map((response) => response.result),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export class DomainAvailabilityService {
|
|||||||
status: response.result.status,
|
status: response.result.status,
|
||||||
version: response.result.version,
|
version: response.result.version,
|
||||||
})),
|
})),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ export class DomainAvailabilityService {
|
|||||||
getLogisticians(): Observable<LogisticianDTO> {
|
getLogisticians(): Observable<LogisticianDTO> {
|
||||||
return this._logisticanService.LogisticianGetLogisticians({}).pipe(
|
return this._logisticanService.LogisticianGetLogisticians({}).pipe(
|
||||||
map((response) => response.result?.find((l) => l.logisticianNumber === '2470')),
|
map((response) => response.result?.find((l) => l.logisticianNumber === '2470')),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ export class DomainAvailabilityService {
|
|||||||
});
|
});
|
||||||
return availabilities;
|
return availabilities;
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ export class DomainAvailabilityService {
|
|||||||
const price = item?.price;
|
const price = item?.price;
|
||||||
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ export class DomainAvailabilityService {
|
|||||||
map(([response, supplier]) => {
|
map(([response, supplier]) => {
|
||||||
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ export class DomainAvailabilityService {
|
|||||||
map(([response, supplier, branch]) => {
|
map(([response, supplier, branch]) => {
|
||||||
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
return this._mapToTakeAwayAvailability({ response, supplier, branch, quantity, price });
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ export class DomainAvailabilityService {
|
|||||||
switchMap((s) => this._stockService.StockInStockByEAN({ eans: eansFiltered, stockId: s.id })),
|
switchMap((s) => this._stockService.StockInStockByEAN({ eans: eansFiltered, stockId: s.id })),
|
||||||
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
|
withLatestFrom(this.getTakeAwaySupplier(), this.getCurrentBranch()),
|
||||||
map((response) => response[0].result),
|
map((response) => response[0].result),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ export class DomainAvailabilityService {
|
|||||||
])
|
])
|
||||||
.pipe(
|
.pipe(
|
||||||
map((r) => this._mapToPickUpAvailability(r.result)?.find((_) => true)),
|
map((r) => this._mapToPickUpAvailability(r.result)?.find((_) => true)),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ export class DomainAvailabilityService {
|
|||||||
.pipe(
|
.pipe(
|
||||||
timeout(5000),
|
timeout(5000),
|
||||||
map((r) => this._mapToShippingAvailability(r.result)?.find((_) => true)),
|
map((r) => this._mapToShippingAvailability(r.result)?.find((_) => true)),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +277,7 @@ export class DomainAvailabilityService {
|
|||||||
};
|
};
|
||||||
return availability;
|
return availability;
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ export class DomainAvailabilityService {
|
|||||||
map((logistician) => ({ ...(availability?.length > 0 ? availability[0] : []), logistician: { id: logistician.id } }))
|
map((logistician) => ({ ...(availability?.length > 0 ? availability[0] : []), logistician: { id: logistician.id } }))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -333,7 +333,7 @@ export class DomainAvailabilityService {
|
|||||||
};
|
};
|
||||||
return availability;
|
return availability;
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ export class DomainAvailabilityService {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ export class DomainAvailabilityService {
|
|||||||
switchMap((availability) =>
|
switchMap((availability) =>
|
||||||
logistician$.pipe(map((logistician) => ({ availability: [...availability], logistician: { id: logistician.id } })))
|
logistician$.pipe(map((logistician) => ({ availability: [...availability], logistician: { id: logistician.id } })))
|
||||||
),
|
),
|
||||||
shareReplay()
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,4 +547,38 @@ export class DomainAvailabilityService {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getInStockByEan(params: { eans: string[]; branchId?: number }): Observable<Record<string, StockInfoDTO>> {
|
||||||
|
let branchId$ = of(params.branchId);
|
||||||
|
|
||||||
|
if (!params.branchId) {
|
||||||
|
branchId$ = this.getCurrentBranch().pipe(
|
||||||
|
first(),
|
||||||
|
map((b) => b.id)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const stock$ = branchId$.pipe(
|
||||||
|
mergeMap((branchId) => this._stockService.StockGetStocksByBranch({ branchId }).pipe(map((response) => response.result?.[0])))
|
||||||
|
);
|
||||||
|
|
||||||
|
return stock$.pipe(
|
||||||
|
mergeMap((stock) =>
|
||||||
|
this._stockService.StockInStockByEAN({ eans: params.eans, stockId: stock.id }).pipe(
|
||||||
|
map((response) => {
|
||||||
|
const result = response.result ?? [];
|
||||||
|
|
||||||
|
for (const stockInfo of result) {
|
||||||
|
stockInfo.ean = stockInfo.ean;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.reduce<Record<string, StockInfoDTO>>((acc, stockInfo) => {
|
||||||
|
acc[stockInfo.ean] = stockInfo;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/cart'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/catalog'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/checkout'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"node"
|
"node"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/crm'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"node"
|
"node"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/defs'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/isa'),
|
|
||||||
subdir: '.',
|
|
||||||
reporters: [{ type: 'html' }, { type: 'text-summary' }],
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/oms'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
25
apps/domain/package-inspection/README.md
Normal file
25
apps/domain/package-inspection/README.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# PackageInspection
|
||||||
|
|
||||||
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.
|
||||||
|
|
||||||
|
## Code scaffolding
|
||||||
|
|
||||||
|
Run `ng generate component component-name --project package-inspection` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project package-inspection`.
|
||||||
|
|
||||||
|
> Note: Don't forget to add `--project package-inspection` or else it will be added to the default project in your `angular.json` file.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
Run `ng build package-inspection` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||||
|
|
||||||
|
## Publishing
|
||||||
|
|
||||||
|
After building your library with `ng build package-inspection`, go to the dist folder `cd dist/package-inspection` and run `npm publish`.
|
||||||
|
|
||||||
|
## Running unit tests
|
||||||
|
|
||||||
|
Run `ng test package-inspection` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||||
|
|
||||||
|
## Further help
|
||||||
|
|
||||||
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||||
7
apps/domain/package-inspection/ng-package.json
Normal file
7
apps/domain/package-inspection/ng-package.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
|
||||||
|
"dest": "../../../dist/domain/package-inspection",
|
||||||
|
"lib": {
|
||||||
|
"entryFile": "src/public-api.ts"
|
||||||
|
}
|
||||||
|
}
|
||||||
11
apps/domain/package-inspection/package.json
Normal file
11
apps/domain/package-inspection/package.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "@domain/package-inspection",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^15.0.0",
|
||||||
|
"@angular/core": "^15.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
|
@NgModule({})
|
||||||
|
export class PackageInspectionModule {}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PackageInspectionService } from './package-inspection.service';
|
||||||
|
|
||||||
|
describe('PackageInspectionService', () => {
|
||||||
|
let service: PackageInspectionService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(PackageInspectionService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import {
|
||||||
|
ListResponseArgsOfPackageDTO,
|
||||||
|
PackageArrivalStatusDTO,
|
||||||
|
PackageDetailResponseDTO,
|
||||||
|
PackageDTO,
|
||||||
|
QuerySettingsDTO,
|
||||||
|
QueryTokenDTO,
|
||||||
|
ResponseArgsOfPackageArrivalStatusDTO,
|
||||||
|
ResponseArgsOfPackageDetailResponseDTO,
|
||||||
|
ResponseArgsOfQuerySettingsDTO,
|
||||||
|
WareneingangService,
|
||||||
|
} from '@swagger/wws';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class DomainPackageInspectionService {
|
||||||
|
constructor(private _wareneingang: WareneingangService) {}
|
||||||
|
|
||||||
|
getQuerySettingsResponse(): Observable<ResponseArgsOfQuerySettingsDTO> {
|
||||||
|
return this._wareneingang.WareneingangQueryPackagesSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
getQuerySettings(): Observable<QuerySettingsDTO> {
|
||||||
|
return this.getQuerySettingsResponse().pipe(map((response) => response.result));
|
||||||
|
}
|
||||||
|
|
||||||
|
queryPackagesResponse(queryToken: QueryTokenDTO): Observable<ListResponseArgsOfPackageDTO> {
|
||||||
|
return this._wareneingang.WareneingangQueryPackages(queryToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryPackages(queryToken: QueryTokenDTO): Observable<PackageDTO[]> {
|
||||||
|
return this.queryPackagesResponse(queryToken).pipe(map((response) => response.result));
|
||||||
|
}
|
||||||
|
|
||||||
|
getPackageDetailsResponse(id: string): Observable<ResponseArgsOfPackageDetailResponseDTO> {
|
||||||
|
return this._wareneingang.WareneingangGetPackageDetails(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
getPackageDetails(id: string): Observable<PackageDetailResponseDTO> {
|
||||||
|
return this.getPackageDetailsResponse(id).pipe(map((response) => response.result));
|
||||||
|
}
|
||||||
|
|
||||||
|
changePackageStatusResponse(pkg: PackageDTO, modifier: string): Observable<ResponseArgsOfPackageArrivalStatusDTO> {
|
||||||
|
return this._wareneingang.WareneingangChangePackageStatus({
|
||||||
|
packageId: pkg.id,
|
||||||
|
payload: {
|
||||||
|
id: pkg.id,
|
||||||
|
annotation: pkg.annotation,
|
||||||
|
area: pkg.area,
|
||||||
|
arrivalChecked: pkg.arrivalChecked,
|
||||||
|
arrivalStatus: pkg.arrivalStatus,
|
||||||
|
deliveryNoteNumber: pkg.deliveryNoteNumber,
|
||||||
|
deliveryTarget: pkg.deliveryTarget,
|
||||||
|
estimatedDeliveryDate: pkg.estimatedDeliveryDate,
|
||||||
|
packageNumber: pkg.packageNumber,
|
||||||
|
supplier: pkg.supplier,
|
||||||
|
trackingNumber: pkg.trackingNumber,
|
||||||
|
},
|
||||||
|
modifier,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
changePackageStatus(pkg: PackageDTO, modifier: string): Observable<PackageArrivalStatusDTO> {
|
||||||
|
return this.changePackageStatusResponse(pkg, modifier).pipe(map((response) => response.result));
|
||||||
|
}
|
||||||
|
}
|
||||||
6
apps/domain/package-inspection/src/public-api.ts
Normal file
6
apps/domain/package-inspection/src/public-api.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* Public API Surface of package-inspection
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from './lib/package-inspection.service';
|
||||||
|
export * from './lib/package-inspection.module';
|
||||||
14
apps/domain/package-inspection/tsconfig.lib.json
Normal file
14
apps/domain/package-inspection/tsconfig.lib.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "../../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../../out-tsc/lib",
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"inlineSources": true,
|
||||||
|
"types": []
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
10
apps/domain/package-inspection/tsconfig.lib.prod.json
Normal file
10
apps/domain/package-inspection/tsconfig.lib.prod.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.lib.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declarationMap": false
|
||||||
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"compilationMode": "partial"
|
||||||
|
}
|
||||||
|
}
|
||||||
14
apps/domain/package-inspection/tsconfig.spec.json
Normal file
14
apps/domain/package-inspection/tsconfig.spec.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "../../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../../out-tsc/spec",
|
||||||
|
"types": [
|
||||||
|
"jasmine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/printer'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
const customLaunchers = require('../../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../../karma/junit-reporter')('domain-remission');
|
|
||||||
const coverageReporter = require('../../../karma/coverage-reporter')('domain-remission');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter,
|
|
||||||
junitReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } });
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/domain/task-calendar'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage-istanbul-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
coverageIstanbulReporter: {
|
|
||||||
dir: require('path').join(__dirname, '../../../coverage/hub/notifications'),
|
|
||||||
reports: ['html', 'lcovonly', 'text-summary'],
|
|
||||||
fixWebpackSourcePaths: true,
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
||||||
|
|
||||||
import 'zone.js';
|
|
||||||
import 'zone.js/testing';
|
|
||||||
import { getTestBed } from '@angular/core/testing';
|
|
||||||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
|
||||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
||||||
teardown: { destroyAfterEach: false },
|
|
||||||
});
|
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
"jasmine"
|
"jasmine"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"files": [
|
|
||||||
"src/test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.d.ts"
|
"**/*.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
// Karma configuration file, see link for more information
|
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
||||||
|
|
||||||
const customLaunchers = require('../../karma/custom-launchers');
|
|
||||||
const junitReporter = require('../../karma/junit-reporter')('isa-app');
|
|
||||||
const coverageReporter = require('../../karma/coverage-reporter')('isa-app');
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
|
||||||
config.set({
|
|
||||||
basePath: '',
|
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
||||||
plugins: [
|
|
||||||
require('karma-jasmine'),
|
|
||||||
require('karma-chrome-launcher'),
|
|
||||||
require('karma-jasmine-html-reporter'),
|
|
||||||
require('karma-coverage'),
|
|
||||||
require('karma-junit-reporter'),
|
|
||||||
require('@angular-devkit/build-angular/plugins/karma'),
|
|
||||||
],
|
|
||||||
client: {
|
|
||||||
jasmine: {
|
|
||||||
// you can add configuration options for Jasmine here
|
|
||||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
||||||
// for example, you can disable the random execution with `random: false`
|
|
||||||
// or set a specific seed with `seed: 4321`
|
|
||||||
},
|
|
||||||
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
||||||
},
|
|
||||||
jasmineHtmlReporter: {
|
|
||||||
suppressAll: true, // removes the duplicated traces
|
|
||||||
},
|
|
||||||
coverageReporter,
|
|
||||||
junitReporter,
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
|
||||||
port: 9876,
|
|
||||||
colors: true,
|
|
||||||
logLevel: config.LOG_INFO,
|
|
||||||
autoWatch: true,
|
|
||||||
browsers: ['Chrome'],
|
|
||||||
customLaunchers,
|
|
||||||
singleRun: false,
|
|
||||||
restartOnFileChange: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
CanActivateTaskCalendarGuard,
|
CanActivateTaskCalendarGuard,
|
||||||
IsAuthenticatedGuard,
|
IsAuthenticatedGuard,
|
||||||
} from './guards';
|
} from './guards';
|
||||||
|
import { CanActivatePackageInspectionGuard } from './guards/can-activate-package-inspection.guard';
|
||||||
import { BranchSectionResolver, CustomerSectionResolver, ProcessIdResolver } from './resolvers';
|
import { BranchSectionResolver, CustomerSectionResolver, ProcessIdResolver } from './resolvers';
|
||||||
import { ShellComponent, ShellModule } from './shell';
|
import { ShellComponent, ShellModule } from './shell';
|
||||||
import { TokenLoginComponent, TokenLoginModule } from './token-login';
|
import { TokenLoginComponent, TokenLoginModule } from './token-login';
|
||||||
@@ -108,6 +109,11 @@ const routes: Routes = [
|
|||||||
loadChildren: () => import('@page/remission').then((m) => m.PageRemissionModule),
|
loadChildren: () => import('@page/remission').then((m) => m.PageRemissionModule),
|
||||||
canActivate: [CanActivateRemissionGuard],
|
canActivate: [CanActivateRemissionGuard],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'package-inspection',
|
||||||
|
loadChildren: () => import('@page/package-inspection').then((m) => m.PackageInspectionModule),
|
||||||
|
canActivate: [CanActivatePackageInspectionGuard],
|
||||||
|
},
|
||||||
{ path: '**', redirectTo: 'task-calendar', pathMatch: 'full' },
|
{ path: '**', redirectTo: 'task-calendar', pathMatch: 'full' },
|
||||||
],
|
],
|
||||||
resolve: { section: BranchSectionResolver },
|
resolve: { section: BranchSectionResolver },
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { IsaConfiguration } from '@swagger/isa';
|
|||||||
import { OmsConfiguration } from '@swagger/oms';
|
import { OmsConfiguration } from '@swagger/oms';
|
||||||
import { PrintConfiguration } from '@swagger/print';
|
import { PrintConfiguration } from '@swagger/print';
|
||||||
import { RemiConfiguration } from '@swagger/remi';
|
import { RemiConfiguration } from '@swagger/remi';
|
||||||
|
import { WwsConfiguration } from '@swagger/wws';
|
||||||
|
|
||||||
export function createConfigurationFactory(name: string) {
|
export function createConfigurationFactory(name: string) {
|
||||||
return function (config: Config): { rootUrl: string } {
|
return function (config: Config): { rootUrl: string } {
|
||||||
@@ -27,6 +28,7 @@ export function createConfigurationFactory(name: string) {
|
|||||||
{ provide: OmsConfiguration, useFactory: createConfigurationFactory('oms'), deps: [Config] },
|
{ provide: OmsConfiguration, useFactory: createConfigurationFactory('oms'), deps: [Config] },
|
||||||
{ provide: PrintConfiguration, useFactory: createConfigurationFactory('print'), deps: [Config] },
|
{ provide: PrintConfiguration, useFactory: createConfigurationFactory('print'), deps: [Config] },
|
||||||
{ provide: RemiConfiguration, useFactory: createConfigurationFactory('remi'), deps: [Config] },
|
{ provide: RemiConfiguration, useFactory: createConfigurationFactory('remi'), deps: [Config] },
|
||||||
|
{ provide: WwsConfiguration, useFactory: createConfigurationFactory('wws'), deps: [Config] },
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class AppSwaggerModule {}
|
export class AppSwaggerModule {}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
:host {
|
:host {
|
||||||
@apply block box-border;
|
@apply block box-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
@apply fixed bottom-4 right-2 bg-blue-500 text-white font-bold py-2 px-4 rounded z-tooltip;
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import packageInfo from 'package';
|
|||||||
import { interval, Observable, Subscription } from 'rxjs';
|
import { interval, Observable, Subscription } from 'rxjs';
|
||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
import { Platform } from '@angular/cdk/platform';
|
import { Platform } from '@angular/cdk/platform';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@@ -38,7 +39,8 @@ export class AppComponent implements OnInit {
|
|||||||
private readonly _renderer: Renderer2,
|
private readonly _renderer: Renderer2,
|
||||||
private readonly _swUpdate: SwUpdate,
|
private readonly _swUpdate: SwUpdate,
|
||||||
private readonly _notifications: NotificationsHub,
|
private readonly _notifications: NotificationsHub,
|
||||||
private readonly _platform: Platform
|
private readonly _platform: Platform,
|
||||||
|
private router: Router
|
||||||
) {
|
) {
|
||||||
this.updateClient();
|
this.updateClient();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router';
|
||||||
|
import { ApplicationService } from '@core/application';
|
||||||
|
import { Config } from '@core/config';
|
||||||
|
import { first } from 'rxjs/operators';
|
||||||
|
|
||||||
|
@Injectable({ providedIn: 'root' })
|
||||||
|
export class CanActivatePackageInspectionGuard implements CanActivate {
|
||||||
|
constructor(private readonly _applicationService: ApplicationService, private readonly _config: Config) {}
|
||||||
|
|
||||||
|
async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||||
|
const process = await this._applicationService
|
||||||
|
.getProcessById$(this._config.get('process.ids.packageInspection'))
|
||||||
|
.pipe(first())
|
||||||
|
.toPromise();
|
||||||
|
if (!process) {
|
||||||
|
await this._applicationService.createProcess({
|
||||||
|
id: this._config.get('process.ids.packageInspection'),
|
||||||
|
type: 'package-inspection',
|
||||||
|
section: 'branch',
|
||||||
|
name: 'Packstück-Kontrolle',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this._applicationService.activateProcess(this._config.get('process.ids.packageInspection'));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -65,6 +65,10 @@
|
|||||||
<ui-icon icon="documents_refresh" size="24px"></ui-icon>
|
<ui-icon icon="documents_refresh" size="24px"></ui-icon>
|
||||||
Remission
|
Remission
|
||||||
</a>
|
</a>
|
||||||
|
<a [routerLink]="['/filiale/package-inspection']" routerLinkActive="active">
|
||||||
|
<ui-icon icon="box_return" size="24px"></ui-icon>
|
||||||
|
Wareneingang
|
||||||
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</shell-footer>
|
</shell-footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, ChangeDetectionStrategy, ViewChildren, QueryList, TrackByFunction } from '@angular/core';
|
import { Component, ChangeDetectionStrategy, ViewChildren, QueryList, TrackByFunction, NgZone } from '@angular/core';
|
||||||
import { ApplicationProcess, ApplicationService } from '@core/application';
|
import { ApplicationProcess, ApplicationService } from '@core/application';
|
||||||
import { first, map, shareReplay, switchMap, tap } from 'rxjs/operators';
|
import { first, map, shareReplay, switchMap, take, tap } from 'rxjs/operators';
|
||||||
import { NotificationsHub } from '@hub/notifications';
|
import { NotificationsHub } from '@hub/notifications';
|
||||||
import { ModalNotificationsComponent } from '@modal/notifications';
|
import { ModalNotificationsComponent } from '@modal/notifications';
|
||||||
import { UiModalService } from '@ui/modal';
|
import { UiModalService } from '@ui/modal';
|
||||||
@@ -82,7 +82,8 @@ export class ShellComponent {
|
|||||||
private readonly _router: Router,
|
private readonly _router: Router,
|
||||||
private readonly _breadcrumbService: BreadcrumbService,
|
private readonly _breadcrumbService: BreadcrumbService,
|
||||||
private readonly _authService: AuthService,
|
private readonly _authService: AuthService,
|
||||||
private readonly _availabilityService: DomainAvailabilityService
|
private readonly _availabilityService: DomainAvailabilityService,
|
||||||
|
private readonly _zone: NgZone
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async setSection(section: 'customer' | 'branch') {
|
async setSection(section: 'customer' | 'branch') {
|
||||||
@@ -103,12 +104,16 @@ export class ShellComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async activateProcess(activatedProcessId: number) {
|
async activateProcess(activatedProcessId: number) {
|
||||||
const latestCrumb = await this._breadcrumbService?.getLastActivatedBreadcrumbByKey$(activatedProcessId)?.pipe(first()).toPromise();
|
try {
|
||||||
if (latestCrumb) {
|
const latestCrumb = await this._breadcrumbService?.getLastActivatedBreadcrumbByKey$(activatedProcessId)?.pipe(take(1)).toPromise();
|
||||||
await this._router.navigate([latestCrumb.path], { queryParams: latestCrumb.params });
|
await this._zone.run(async () => {
|
||||||
} else {
|
if (latestCrumb) {
|
||||||
await this._router.navigate(['/kunde', activatedProcessId, 'product']);
|
await this._router.navigate([latestCrumb.path], { queryParams: latestCrumb.params });
|
||||||
}
|
} else {
|
||||||
|
await this._router.navigate(['/kunde', activatedProcessId, 'product']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
async closeProcess(processId: number) {
|
async closeProcess(processId: number) {
|
||||||
|
|||||||
4
apps/isa-app/src/assets/images/Icon_UNKNOWN.svg
Normal file
4
apps/isa-app/src/assets/images/Icon_UNKNOWN.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="19px" height="18px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 191 B |
@@ -40,6 +40,9 @@
|
|||||||
"@swagger/remi": {
|
"@swagger/remi": {
|
||||||
"rootUrl": "https://isa-test.paragon-data.net/inv/v1"
|
"rootUrl": "https://isa-test.paragon-data.net/inv/v1"
|
||||||
},
|
},
|
||||||
|
"@swagger/wws": {
|
||||||
|
"rootUrl": "https://isa-test.paragon-data.net/wws/v1"
|
||||||
|
},
|
||||||
"hubs": {
|
"hubs": {
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"url": "https://isa-test.paragon-data.net/isa/v1/rt",
|
"url": "https://isa-test.paragon-data.net/isa/v1/rt",
|
||||||
@@ -56,7 +59,8 @@
|
|||||||
"goodsOut": 1000,
|
"goodsOut": 1000,
|
||||||
"goodsIn": 2000,
|
"goodsIn": 2000,
|
||||||
"taskCalendar": 3000,
|
"taskCalendar": 3000,
|
||||||
"remission": 4000
|
"remission": 4000,
|
||||||
|
"packageInspection": 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkForUpdates": 3600000,
|
"checkForUpdates": 3600000,
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
"@swagger/remi": {
|
"@swagger/remi": {
|
||||||
"rootUrl": "https://isa-integration.paragon-data.net/inv/v1"
|
"rootUrl": "https://isa-integration.paragon-data.net/inv/v1"
|
||||||
},
|
},
|
||||||
|
"@swagger/wws": {
|
||||||
|
"rootUrl": "https://isa-integration.paragon-data.net/wws/v1"
|
||||||
|
},
|
||||||
"hubs": {
|
"hubs": {
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"url": "https://isa-integration.paragon-data.net/isa/v1/rt",
|
"url": "https://isa-integration.paragon-data.net/isa/v1/rt",
|
||||||
@@ -56,7 +59,8 @@
|
|||||||
"goodsOut": 1000,
|
"goodsOut": 1000,
|
||||||
"goodsIn": 2000,
|
"goodsIn": 2000,
|
||||||
"taskCalendar": 3000,
|
"taskCalendar": 3000,
|
||||||
"remission": 4000
|
"remission": 4000,
|
||||||
|
"packageInspection": 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkForUpdates": 3600000,
|
"checkForUpdates": 3600000,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"clientId": "hug-isa",
|
"clientId": "hug-isa",
|
||||||
"responseType": "id_token token",
|
"responseType": "id_token token",
|
||||||
"oidc": true,
|
"oidc": true,
|
||||||
"scope": "openid profile cmf_user isa-isa-webapi isa-checkout-webapi isa-cat-webapi isa-ava-webapi isa-crm-webapi isa-review-webapi isa-kpi-webapi isa-oms-webapi isa-nbo-webapi isa-print-webapi eis-service isa-inv-webapi"
|
"scope": "openid profile cmf_user isa-isa-webapi isa-checkout-webapi isa-cat-webapi isa-ava-webapi isa-crm-webapi isa-review-webapi isa-kpi-webapi isa-oms-webapi isa-nbo-webapi isa-print-webapi eis-service isa-inv-webapi isa-wws-webapi"
|
||||||
},
|
},
|
||||||
"@core/logger": {
|
"@core/logger": {
|
||||||
"logLevel": "debug"
|
"logLevel": "debug"
|
||||||
@@ -40,6 +40,9 @@
|
|||||||
"@swagger/remi": {
|
"@swagger/remi": {
|
||||||
"rootUrl": "https://isa-test.paragon-data.net/inv/v1"
|
"rootUrl": "https://isa-test.paragon-data.net/inv/v1"
|
||||||
},
|
},
|
||||||
|
"@swagger/wws": {
|
||||||
|
"rootUrl": "https://isa-test.paragon-data.net/wws/v1"
|
||||||
|
},
|
||||||
"hubs": {
|
"hubs": {
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"url": "https://isa-test.paragon-data.net/isa/v1/rt",
|
"url": "https://isa-test.paragon-data.net/isa/v1/rt",
|
||||||
@@ -56,7 +59,8 @@
|
|||||||
"goodsOut": 1000,
|
"goodsOut": 1000,
|
||||||
"goodsIn": 2000,
|
"goodsIn": 2000,
|
||||||
"taskCalendar": 3000,
|
"taskCalendar": 3000,
|
||||||
"remission": 4000
|
"remission": 4000,
|
||||||
|
"packageInspection": 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkForUpdates": 3600000,
|
"checkForUpdates": 3600000,
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
"@swagger/remi": {
|
"@swagger/remi": {
|
||||||
"rootUrl": "https://isa.paragon-systems.de/inv/v1"
|
"rootUrl": "https://isa.paragon-systems.de/inv/v1"
|
||||||
},
|
},
|
||||||
|
"@swagger/wws": {
|
||||||
|
"rootUrl": "https://isa.paragon-data.net/wws/v1"
|
||||||
|
},
|
||||||
"hubs": {
|
"hubs": {
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"url": "https://isa.paragon-systems.de/isa/v1/rt",
|
"url": "https://isa.paragon-systems.de/isa/v1/rt",
|
||||||
@@ -56,7 +59,8 @@
|
|||||||
"goodsOut": 1000,
|
"goodsOut": 1000,
|
||||||
"goodsIn": 2000,
|
"goodsIn": 2000,
|
||||||
"taskCalendar": 3000,
|
"taskCalendar": 3000,
|
||||||
"remission": 4000
|
"remission": 4000,
|
||||||
|
"packageInspection": 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkForUpdates": 3600000,
|
"checkForUpdates": 3600000,
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
"@swagger/remi": {
|
"@swagger/remi": {
|
||||||
"rootUrl": "https://isa-staging.paragon-systems.de/inv/v1"
|
"rootUrl": "https://isa-staging.paragon-systems.de/inv/v1"
|
||||||
},
|
},
|
||||||
|
"@swagger/wws": {
|
||||||
|
"rootUrl": "https://isa-staging.paragon-data.net/wws/v1"
|
||||||
|
},
|
||||||
"hubs": {
|
"hubs": {
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"url": "https://isa-staging.paragon-systems.de/isa/v1/rt",
|
"url": "https://isa-staging.paragon-systems.de/isa/v1/rt",
|
||||||
@@ -56,7 +59,8 @@
|
|||||||
"goodsOut": 1000,
|
"goodsOut": 1000,
|
||||||
"goodsIn": 2000,
|
"goodsIn": 2000,
|
||||||
"taskCalendar": 3000,
|
"taskCalendar": 3000,
|
||||||
"remission": 4000
|
"remission": 4000,
|
||||||
|
"packageInspection": 5000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkForUpdates": 3600000,
|
"checkForUpdates": 3600000,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user