@colijnit/sharedcomponents 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-sharedcomponents.umd.js +567 -120
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +9 -7
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +10 -8
- package/esm2015/lib/assets/dictionary/text.properties.js +11 -0
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +125 -31
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +1 -1
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +36 -30
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +1 -1
- package/esm2015/lib/components/stock/stock.component.js +18 -5
- package/esm2015/lib/components/stock/stock.module.js +3 -3
- package/esm2015/lib/enum/icon.enum.js +1 -1
- package/esm2015/lib/enum/language-code.enum.js +8 -0
- package/esm2015/lib/model/icon-svg.js +1 -1
- package/esm2015/lib/service/dictionary.service.js +76 -0
- package/esm2015/lib/service/options.service.js +71 -0
- package/esm2015/lib/service/shared-connector.service.js +279 -0
- package/esm2015/lib/service/shared.service.js +30 -0
- package/esm2015/lib/service/stock.service.js +44 -30
- package/esm2015/lib/utils/string-utils.js +64 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/colijnit-sharedcomponents.js +503 -115
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/lib/assets/dictionary/text.properties.d.ts +3 -0
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +29 -9
- package/lib/components/send-method-dialog/style/_layout.scss +5 -0
- package/lib/components/stock/stock-information/stock-information.component.d.ts +1 -1
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +6 -6
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +1 -1
- package/lib/components/stock/stock.component.d.ts +6 -2
- package/lib/components/stock/style/_layout.scss +6 -0
- package/lib/enum/language-code.enum.d.ts +6 -0
- package/lib/service/dictionary.service.d.ts +21 -0
- package/lib/service/options.service.d.ts +13 -0
- package/lib/service/{ione-connector-adapter.service.d.ts → shared-connector.service.d.ts} +13 -9
- package/lib/service/shared.service.d.ts +8 -0
- package/lib/service/stock.service.d.ts +14 -10
- package/lib/utils/string-utils.d.ts +22 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/3rdpartylicenses.txt +0 -1116
- package/esm2015/lib/service/ione-connector-adapter.service.js +0 -251
- package/favicon.ico +0 -0
- package/index.html +0 -12
- package/main.5240c1941fea0abc7a9c.js +0 -1
- package/polyfills.4a44032b137d291298c3.js +0 -1
- package/runtime.f2046bab7c02026dc21f.js +0 -1
- package/styles.b3b98643e0f0f94bdd12.css +0 -110
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, HostListener } from '@angular/core';
|
|
3
|
+
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, ChangeDetectorRef, HostListener } from '@angular/core';
|
|
4
4
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
5
5
|
import { PDFDocument } from 'pdf-lib';
|
|
6
6
|
import * as PDFJS from 'pdfjs-dist/legacy/build/pdf';
|
|
7
7
|
import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import SignaturePad from 'signature_pad';
|
|
10
|
+
import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
|
|
10
11
|
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
11
12
|
import { Sharedapi } from '@colijnit/sharedapi/build/sharedapi';
|
|
12
13
|
import { Printer } from '@colijnit/sharedapi/build/model/report/printer.bo';
|
|
@@ -23,21 +24,23 @@ import { MapPropertyDecorator } from '@colijnit/articleapi/build/factory/decorat
|
|
|
23
24
|
import { BooleanTextDecorator as BooleanTextDecorator$1 } from '@colijnit/articleapi/build/factory/decorators/boolean.decorator';
|
|
24
25
|
import { JsonFieldFieldDecorator } from '@colijnit/articleapi/build/factory/decorators/json.decorator';
|
|
25
26
|
import { ComplexArrayDecorator as ComplexArrayDecorator$1 } from '@colijnit/articleapi/build/factory/decorators/complex-array.decorator';
|
|
26
|
-
import {
|
|
27
|
-
import { ArticleStockBo } from '@colijnit/articleapi/build/model/article-stock.bo';
|
|
27
|
+
import { ArticleStock } from '@colijnit/articleapi/build/model/article-stock.bo';
|
|
28
28
|
import { StockHistoryBo } from '@colijnit/articleapi/build/model/stock-history.bo';
|
|
29
|
-
import {
|
|
29
|
+
import { StockStickersPrintLayouts } from '@colijnit/sharedapi/build/model/report/stock-stickers-print-layouts.bo';
|
|
30
30
|
import { ArticleDetailsBo } from '@colijnit/articleapi/build/model/article-details.bo';
|
|
31
31
|
import { StockStatus } from '@colijnit/articleapi/build/model/stock-status.bo';
|
|
32
32
|
import { StockManagementWarehouses } from '@colijnit/articleapi/build/model/stock-management-warehouses.bo';
|
|
33
33
|
import { StockLocation } from '@colijnit/articleapi/build/model/stock-location.bo';
|
|
34
|
-
import {
|
|
34
|
+
import { ArticleTransaction } from '@colijnit/articleapi/build/model/article-transaction.bo';
|
|
35
|
+
import { BehaviorSubject } from 'rxjs';
|
|
36
|
+
import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
|
|
35
37
|
import { GetStockHistoryRequest } from '@colijnit/articleapi/build/model/get-stock-history-request';
|
|
36
|
-
import { ArticleStock } from '@colijnit/articleapi/build/model/article-stock';
|
|
38
|
+
import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
|
|
37
39
|
import { CoDialogPromptModule, InputCheckboxModule, InputComboBoxModule, IconModule, InputNumberPickerModule, CoDialogWizardModule, ButtonModule, CoGridModule, InputRadioButtonModule, DropDownModule, SimpleGridModule, ImageModule, InputTextModule, InputTextareaModule } from '@colijnit/corecomponents_v12';
|
|
38
40
|
import * as i1 from '@angular/platform-browser';
|
|
39
41
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
40
42
|
import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
|
|
43
|
+
import { ArticleTransaction as ArticleTransaction$1 } from '@colijnit/articleapi/build/model/article-transaction';
|
|
41
44
|
|
|
42
45
|
class DocsignComponent {
|
|
43
46
|
constructor() {
|
|
@@ -1048,23 +1051,234 @@ class BusinessObjectFactory {
|
|
|
1048
1051
|
}
|
|
1049
1052
|
}
|
|
1050
1053
|
|
|
1051
|
-
|
|
1054
|
+
var LanguageCode;
|
|
1055
|
+
(function (LanguageCode) {
|
|
1056
|
+
LanguageCode["Dutch"] = "nl-NL";
|
|
1057
|
+
LanguageCode["English"] = "en-GB";
|
|
1058
|
+
LanguageCode["German"] = "de-DE";
|
|
1059
|
+
LanguageCode["French"] = "fr-FR";
|
|
1060
|
+
})(LanguageCode || (LanguageCode = {}));
|
|
1061
|
+
|
|
1062
|
+
// Static utility functions holder related to strings.
|
|
1063
|
+
class StringUtils {
|
|
1064
|
+
/**
|
|
1065
|
+
* Returns a new string where given placeholder in given source string are replaced by given replacement texts.
|
|
1066
|
+
*
|
|
1067
|
+
* Example usage:
|
|
1068
|
+
*
|
|
1069
|
+
* source = "ABCDABCD"
|
|
1070
|
+
* placeholder = "BC"
|
|
1071
|
+
* replacementTexts = "Z", "Z" (REST arguments)
|
|
1072
|
+
* OUTPUT = "AZDAZD"
|
|
1073
|
+
*
|
|
1074
|
+
* @param {string} source
|
|
1075
|
+
* @param {string} placeholder
|
|
1076
|
+
* @param {string} replacementTexts If only one is given, this function replaces all placeholders with that single replacementText.
|
|
1077
|
+
* If more are given, placeholders without a corresponding replacementText will remain their original placeholder characters.
|
|
1078
|
+
*/
|
|
1079
|
+
static ReplaceOccurrencesIn(source, placeholder, ...replacementTexts) {
|
|
1080
|
+
// parameter guards
|
|
1081
|
+
if (!(source)) {
|
|
1082
|
+
return undefined;
|
|
1083
|
+
}
|
|
1084
|
+
if (!placeholder || replacementTexts.length === 0) {
|
|
1085
|
+
return source;
|
|
1086
|
+
}
|
|
1087
|
+
let outString = source;
|
|
1088
|
+
// one replacementText means replace for all
|
|
1089
|
+
if (replacementTexts.length === 1) {
|
|
1090
|
+
// "g" is the g flag to replace globally
|
|
1091
|
+
outString = outString.replace(placeholder, replacementTexts[0]);
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
// replace occurence i by replacementTexts[i], one at a time in loop (there might be a faster way..)
|
|
1095
|
+
for (let i = 0, len = replacementTexts.length; i < len; i++) {
|
|
1096
|
+
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
return outString;
|
|
1100
|
+
}
|
|
1101
|
+
// Returns the given argument as a string. Returns given defaultValue if conversion of argument to string was impossible.
|
|
1102
|
+
static ParseString(arg, defaultValue = "") {
|
|
1103
|
+
if (!StringUtils.IsString(arg)) {
|
|
1104
|
+
if (arg && typeof arg.toString === "function") {
|
|
1105
|
+
arg = arg.toString();
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
arg = defaultValue;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return arg;
|
|
1112
|
+
}
|
|
1113
|
+
static IsString(str) {
|
|
1114
|
+
return typeof str === 'string';
|
|
1115
|
+
}
|
|
1116
|
+
// Returns whether given str is a string and has a length > 0.
|
|
1117
|
+
static IsStringWithLength(str) {
|
|
1118
|
+
return str && StringUtils.IsString(str) && str.length > 0;
|
|
1119
|
+
}
|
|
1120
|
+
// Returns given string, escaped for use as string literal in regular expressions.
|
|
1121
|
+
static _escapeRegExp(str) {
|
|
1122
|
+
return str; // .replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
class Dictionary {
|
|
1052
1127
|
constructor() {
|
|
1053
|
-
this.
|
|
1128
|
+
this.strings = {
|
|
1129
|
+
"nl": {},
|
|
1130
|
+
"de": {},
|
|
1131
|
+
"fr": {},
|
|
1132
|
+
"en": {},
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
// The localization service, providing peers with text translation functionality.
|
|
1138
|
+
class DictionaryService {
|
|
1139
|
+
constructor() {
|
|
1140
|
+
this.dictionaryUrl = "js/browser/res/dictionary/";
|
|
1141
|
+
// private _dictionaryPromise: Map<LanguageCode, Promise<{ [key: string]: string }>> = new Map<LanguageCode, Promise<{ [key: string]: string }>>();
|
|
1142
|
+
this._dictionaries = new Map();
|
|
1143
|
+
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
1144
|
+
this._placeholder = "|~";
|
|
1145
|
+
}
|
|
1146
|
+
get language() {
|
|
1147
|
+
return this._language;
|
|
1054
1148
|
}
|
|
1055
|
-
|
|
1149
|
+
set rootUrl(value) {
|
|
1150
|
+
this._rootUrl = value;
|
|
1151
|
+
this._dictBasePath = this._rootUrl + "/" + this.dictionaryUrl;
|
|
1152
|
+
}
|
|
1153
|
+
// Loads the dictionary for given language in memory.
|
|
1154
|
+
setDictionary(language) {
|
|
1056
1155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1156
|
+
this._language = language || LanguageCode.Dutch;
|
|
1157
|
+
this._loadDictionary();
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
_loadDictionary() {
|
|
1161
|
+
if (!this._dictionaries.has(this._language)) {
|
|
1162
|
+
const dictionary = new Dictionary();
|
|
1163
|
+
// eslint-disable-next-line no-magic-numbers
|
|
1164
|
+
if (dictionary.strings[this._language.substr(0, 2).toLowerCase()] !== undefined) {
|
|
1165
|
+
// eslint-disable-next-line no-magic-numbers
|
|
1166
|
+
this._dictionaries.set(this._language, dictionary.strings[this._language.substr(0, 2).toLowerCase()]);
|
|
1062
1167
|
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* Returns the localized text for the given dictionary key.
|
|
1172
|
+
* @param {string} key
|
|
1173
|
+
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
1174
|
+
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
1175
|
+
* @returns {string} The translated text for given dictionary key
|
|
1176
|
+
*/
|
|
1177
|
+
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
1178
|
+
if (!StringUtils.IsStringWithLength(key)) {
|
|
1179
|
+
return key || "";
|
|
1180
|
+
}
|
|
1181
|
+
if (this.language === undefined) {
|
|
1182
|
+
this._language = LanguageCode.Dutch;
|
|
1183
|
+
this._loadDictionary();
|
|
1184
|
+
}
|
|
1185
|
+
let text = this._dictionaries.get(this.language)[key];
|
|
1186
|
+
text = StringUtils.IsStringWithLength(text) ? text : key;
|
|
1187
|
+
if (upperCaseFirst) {
|
|
1188
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
text = text.charAt(0).toLowerCase() + text.slice(1);
|
|
1192
|
+
}
|
|
1193
|
+
if (replacementTexts.length > 0) {
|
|
1194
|
+
text = StringUtils.ReplaceOccurrencesIn(text, this._placeholder, ...replacementTexts);
|
|
1195
|
+
}
|
|
1196
|
+
return text;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
DictionaryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DictionaryService_Factory() { return new DictionaryService(); }, token: DictionaryService, providedIn: "root" });
|
|
1200
|
+
DictionaryService.decorators = [
|
|
1201
|
+
{ type: Injectable, args: [{
|
|
1202
|
+
providedIn: "root"
|
|
1203
|
+
},] }
|
|
1204
|
+
];
|
|
1205
|
+
DictionaryService.ctorParameters = () => [];
|
|
1206
|
+
|
|
1207
|
+
class OptionsService {
|
|
1208
|
+
constructor(_dictionary) {
|
|
1209
|
+
this._dictionary = _dictionary;
|
|
1210
|
+
this.optionsInitialized = new BehaviorSubject(false);
|
|
1211
|
+
this.optionsLoaded = new BehaviorSubject(false);
|
|
1212
|
+
}
|
|
1213
|
+
set options(value) {
|
|
1214
|
+
this._options = value;
|
|
1215
|
+
}
|
|
1216
|
+
get options() {
|
|
1217
|
+
return this._options;
|
|
1218
|
+
}
|
|
1219
|
+
createSettingsFromObject(obj) {
|
|
1220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1221
|
+
this.options = new Object();
|
|
1222
|
+
if (obj.hasOwnProperty("url")) {
|
|
1223
|
+
this.options.url = obj["url"];
|
|
1224
|
+
}
|
|
1225
|
+
if (obj.hasOwnProperty("schema")) {
|
|
1226
|
+
this.options.schema = obj["schema"];
|
|
1227
|
+
}
|
|
1228
|
+
if (obj.hasOwnProperty("version")) {
|
|
1229
|
+
this.options.version = obj["version"];
|
|
1230
|
+
}
|
|
1231
|
+
if (obj.hasOwnProperty("languageCode")) {
|
|
1232
|
+
this.options.languageCode = obj["languageCode"];
|
|
1233
|
+
}
|
|
1234
|
+
else {
|
|
1235
|
+
this.options.languageCode = "NL";
|
|
1236
|
+
}
|
|
1237
|
+
if (obj.hasOwnProperty("username")) {
|
|
1238
|
+
this.options.username = obj["username"];
|
|
1239
|
+
}
|
|
1240
|
+
if (obj.hasOwnProperty("password")) {
|
|
1241
|
+
this.options.password = obj["password"];
|
|
1242
|
+
}
|
|
1243
|
+
if (obj.hasOwnProperty("session")) {
|
|
1244
|
+
this.options.session = obj["session"];
|
|
1245
|
+
}
|
|
1246
|
+
if (obj.hasOwnProperty("useLoginEncryption")) {
|
|
1247
|
+
this.options.useLoginEncryption = obj["useLoginEncryption"];
|
|
1248
|
+
}
|
|
1249
|
+
this.optionsLoaded.next(true);
|
|
1063
1250
|
});
|
|
1064
1251
|
}
|
|
1065
|
-
|
|
1252
|
+
initialize(options) {
|
|
1066
1253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1067
|
-
|
|
1254
|
+
if (options) {
|
|
1255
|
+
yield this.createSettingsFromObject(options);
|
|
1256
|
+
yield this._dictionary.setDictionary(this.options.languageCode);
|
|
1257
|
+
this.optionsInitialized.next(true);
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
OptionsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function OptionsService_Factory() { return new OptionsService(i0.ɵɵinject(DictionaryService)); }, token: OptionsService, providedIn: "root" });
|
|
1263
|
+
OptionsService.decorators = [
|
|
1264
|
+
{ type: Injectable, args: [{
|
|
1265
|
+
providedIn: "root"
|
|
1266
|
+
},] }
|
|
1267
|
+
];
|
|
1268
|
+
OptionsService.ctorParameters = () => [
|
|
1269
|
+
{ type: DictionaryService }
|
|
1270
|
+
];
|
|
1271
|
+
|
|
1272
|
+
class SharedConnectorService {
|
|
1273
|
+
constructor(_optionsService) {
|
|
1274
|
+
this._optionsService = _optionsService;
|
|
1275
|
+
this._boFactory = new BusinessObjectFactory();
|
|
1276
|
+
}
|
|
1277
|
+
connect() {
|
|
1278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1279
|
+
this.connector = new Articles(this._optionsService.options);
|
|
1280
|
+
this.sharedConnector = new Sharedapi(this._optionsService.options);
|
|
1281
|
+
this._optionsService.options.session = this.connector.session && this.sharedConnector.session;
|
|
1068
1282
|
});
|
|
1069
1283
|
}
|
|
1070
1284
|
getAllPrinters(showAll = true) {
|
|
@@ -1099,13 +1313,13 @@ class IoneConnectorAdapterService {
|
|
|
1099
1313
|
});
|
|
1100
1314
|
});
|
|
1101
1315
|
}
|
|
1102
|
-
|
|
1316
|
+
getPrintPriceStickers(request) {
|
|
1103
1317
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1104
1318
|
return new Promise((resolve, reject) => {
|
|
1105
|
-
return this.sharedConnector.
|
|
1319
|
+
return this.sharedConnector.printPriceStickers(request).then((result) => {
|
|
1106
1320
|
if (result.validationResult && result.validationResult.success) {
|
|
1107
1321
|
if (result.resultObject) {
|
|
1108
|
-
resolve(this._boFactory.makeWithRawBackendData(
|
|
1322
|
+
resolve(this._boFactory.makeWithRawBackendData(PrintPriceStickers, result.resultObject));
|
|
1109
1323
|
}
|
|
1110
1324
|
}
|
|
1111
1325
|
else {
|
|
@@ -1115,6 +1329,19 @@ class IoneConnectorAdapterService {
|
|
|
1115
1329
|
});
|
|
1116
1330
|
});
|
|
1117
1331
|
}
|
|
1332
|
+
// public async getStockStickerPrintLayouts(stockStickersPrintLayouts: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1333
|
+
// return new Promise((resolve: Function, reject: Function) => {
|
|
1334
|
+
// return this.sharedConnector.getStockStickerPrintLayouts(stockStickersPrintLayouts).then((result: DataServiceResponse) => {
|
|
1335
|
+
// if (result.validationResult && result.validationResult.success) {
|
|
1336
|
+
// if (result.resultObject) {
|
|
1337
|
+
// resolve(this._boFactory.makeWithRawBackendData(stockStickersPrintLayouts, result.resultObject));
|
|
1338
|
+
// }
|
|
1339
|
+
// } else {
|
|
1340
|
+
// reject(result.validationMessagesAsString);
|
|
1341
|
+
// }
|
|
1342
|
+
// })
|
|
1343
|
+
// })
|
|
1344
|
+
// }
|
|
1118
1345
|
getArticleFullObject(goodId) {
|
|
1119
1346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1120
1347
|
return new Promise((resolve, reject) => {
|
|
@@ -1152,7 +1379,7 @@ class IoneConnectorAdapterService {
|
|
|
1152
1379
|
return this.connector.getStockInformation(data).then((result) => {
|
|
1153
1380
|
if (result.validationResult && result.validationResult.success) {
|
|
1154
1381
|
if (result.resultObjects) {
|
|
1155
|
-
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(
|
|
1382
|
+
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleStock, result.resultObjects));
|
|
1156
1383
|
}
|
|
1157
1384
|
}
|
|
1158
1385
|
else {
|
|
@@ -1262,7 +1489,23 @@ class IoneConnectorAdapterService {
|
|
|
1262
1489
|
return this.sharedConnector.getStockStickerPrintLayouts(data).then((result) => {
|
|
1263
1490
|
if (result.validationResult && result.validationResult.success) {
|
|
1264
1491
|
if (result.resultObject) {
|
|
1265
|
-
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(
|
|
1492
|
+
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockStickersPrintLayouts, result.resultObject));
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
else {
|
|
1496
|
+
reject(result.validationMessagesAsString);
|
|
1497
|
+
}
|
|
1498
|
+
});
|
|
1499
|
+
});
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
getArticleTransaction(data) {
|
|
1503
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1504
|
+
return new Promise((resolve, reject) => {
|
|
1505
|
+
return this.connector.getArticleTransaction(data).then((result) => {
|
|
1506
|
+
if (result.validationResult && result.validationResult.success) {
|
|
1507
|
+
if (result.resultObjects) {
|
|
1508
|
+
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(ArticleTransaction, result.resultObjects));
|
|
1266
1509
|
}
|
|
1267
1510
|
}
|
|
1268
1511
|
else {
|
|
@@ -1276,102 +1519,147 @@ class IoneConnectorAdapterService {
|
|
|
1276
1519
|
return this.connector.commit();
|
|
1277
1520
|
}
|
|
1278
1521
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1522
|
+
SharedConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedConnectorService_Factory() { return new SharedConnectorService(i0.ɵɵinject(OptionsService)); }, token: SharedConnectorService, providedIn: "root" });
|
|
1523
|
+
SharedConnectorService.decorators = [
|
|
1281
1524
|
{ type: Injectable, args: [{
|
|
1282
1525
|
providedIn: "root"
|
|
1283
1526
|
},] }
|
|
1284
1527
|
];
|
|
1285
|
-
|
|
1528
|
+
SharedConnectorService.ctorParameters = () => [
|
|
1529
|
+
{ type: OptionsService }
|
|
1530
|
+
];
|
|
1286
1531
|
|
|
1287
|
-
class
|
|
1288
|
-
constructor(
|
|
1289
|
-
this.
|
|
1532
|
+
class SharedService {
|
|
1533
|
+
constructor(options, connector) {
|
|
1534
|
+
this.options = options;
|
|
1535
|
+
this.connector = connector;
|
|
1290
1536
|
}
|
|
1291
|
-
|
|
1292
|
-
this
|
|
1537
|
+
init(options) {
|
|
1538
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1539
|
+
yield this.options.initialize(options);
|
|
1540
|
+
this.connector.connect();
|
|
1541
|
+
});
|
|
1293
1542
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1543
|
+
}
|
|
1544
|
+
SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
|
|
1545
|
+
SharedService.decorators = [
|
|
1546
|
+
{ type: Injectable, args: [{
|
|
1547
|
+
providedIn: "root"
|
|
1548
|
+
},] }
|
|
1549
|
+
];
|
|
1550
|
+
SharedService.ctorParameters = () => [
|
|
1551
|
+
{ type: OptionsService },
|
|
1552
|
+
{ type: SharedConnectorService }
|
|
1553
|
+
];
|
|
1554
|
+
|
|
1555
|
+
class StockService extends SharedService {
|
|
1556
|
+
constructor() {
|
|
1557
|
+
super(...arguments);
|
|
1558
|
+
this.printSticker = new PrintStockStickers();
|
|
1559
|
+
this.printPriceSticker = new PrintPriceStickers();
|
|
1560
|
+
}
|
|
1561
|
+
getPrintStockStickers(data) {
|
|
1298
1562
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1299
|
-
|
|
1563
|
+
yield this.connector.getPrintStockStickers(data);
|
|
1300
1564
|
});
|
|
1301
1565
|
}
|
|
1302
|
-
|
|
1566
|
+
getPrintPriceStickers(data) {
|
|
1303
1567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1304
|
-
|
|
1568
|
+
yield this.connector.getPrintPriceStickers(data);
|
|
1305
1569
|
});
|
|
1306
1570
|
}
|
|
1307
|
-
|
|
1571
|
+
getAllPrinters(showAll = true) {
|
|
1308
1572
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1309
|
-
return yield this.
|
|
1573
|
+
return yield this.connector.getAllPrinters(showAll);
|
|
1310
1574
|
});
|
|
1311
1575
|
}
|
|
1312
|
-
|
|
1576
|
+
getStockHistory(data) {
|
|
1313
1577
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1314
|
-
return yield this.
|
|
1578
|
+
return yield this.connector.getStockHistory(data);
|
|
1315
1579
|
});
|
|
1316
1580
|
}
|
|
1581
|
+
getStockInformation(data) {
|
|
1582
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1583
|
+
return yield this.connector.getStockInformation(data);
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
// public async getStockStickerPrintLayouts(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
|
|
1587
|
+
// return await this._connector.getStockStickerPrintLayouts(data);
|
|
1588
|
+
// }
|
|
1317
1589
|
getArticleDetails(data) {
|
|
1318
1590
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1319
|
-
return yield this.
|
|
1591
|
+
return yield this.connector.getArticleDetails(data);
|
|
1320
1592
|
});
|
|
1321
1593
|
}
|
|
1322
1594
|
updateArticleDetails(data) {
|
|
1323
1595
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1324
|
-
return yield this.
|
|
1596
|
+
return yield this.connector.updateArticleDetails(data);
|
|
1325
1597
|
});
|
|
1326
1598
|
}
|
|
1327
1599
|
getStockState() {
|
|
1328
1600
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1329
|
-
return yield this.
|
|
1601
|
+
return yield this.connector.getStockStatus();
|
|
1330
1602
|
});
|
|
1331
1603
|
}
|
|
1332
1604
|
getStockStickerTemplates(data) {
|
|
1333
1605
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1334
|
-
return yield this.
|
|
1606
|
+
return yield this.connector.getStockStickerTemplates(data);
|
|
1335
1607
|
});
|
|
1336
1608
|
}
|
|
1337
1609
|
getStockManagementWarehouses() {
|
|
1338
1610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1339
|
-
return yield this.
|
|
1611
|
+
return yield this.connector.getStockManagementWarehouses();
|
|
1340
1612
|
});
|
|
1341
1613
|
}
|
|
1342
1614
|
getStockManagementLocations(warehouseNo) {
|
|
1343
1615
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1344
|
-
return yield this.
|
|
1616
|
+
return yield this.connector.getStockManagementLocations(warehouseNo);
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
getArticleTransaction(data) {
|
|
1620
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1621
|
+
return yield this.connector.getArticleTransaction(data);
|
|
1345
1622
|
});
|
|
1346
1623
|
}
|
|
1347
1624
|
lockArticleDetails(data) {
|
|
1348
1625
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1349
|
-
return yield this.
|
|
1626
|
+
return yield this.connector.lockArticleDetails(data);
|
|
1350
1627
|
});
|
|
1351
1628
|
}
|
|
1352
1629
|
commit() {
|
|
1353
|
-
return this.
|
|
1630
|
+
return this.connector.commit();
|
|
1354
1631
|
}
|
|
1355
1632
|
}
|
|
1633
|
+
StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
|
|
1356
1634
|
StockService.decorators = [
|
|
1357
|
-
{ type: Injectable
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
{ type: IoneConnectorAdapterService }
|
|
1635
|
+
{ type: Injectable, args: [{
|
|
1636
|
+
providedIn: 'root',
|
|
1637
|
+
},] }
|
|
1361
1638
|
];
|
|
1362
1639
|
|
|
1363
1640
|
class StockComponent {
|
|
1364
|
-
constructor(stockService) {
|
|
1641
|
+
constructor(stockService, _optionsService) {
|
|
1365
1642
|
this.stockService = stockService;
|
|
1643
|
+
this._optionsService = _optionsService;
|
|
1366
1644
|
this.handleStickerClicked = new EventEmitter();
|
|
1367
1645
|
this.showStockInformationGrid = true;
|
|
1368
1646
|
this.showStockLocation = false;
|
|
1369
1647
|
this.showStockTransfer = false;
|
|
1370
1648
|
this.allAvailableStock = 0;
|
|
1371
1649
|
this.allTechnicalStock = 0;
|
|
1650
|
+
this._publicOptions = true;
|
|
1372
1651
|
}
|
|
1373
1652
|
set options(value) {
|
|
1374
|
-
|
|
1653
|
+
if (value) {
|
|
1654
|
+
if (typeof value === "string") {
|
|
1655
|
+
this._options = JSON.parse(value);
|
|
1656
|
+
}
|
|
1657
|
+
else {
|
|
1658
|
+
this._options = value;
|
|
1659
|
+
}
|
|
1660
|
+
this._publicOptions = true;
|
|
1661
|
+
this._optionsService.initialize(this._options).then();
|
|
1662
|
+
}
|
|
1375
1663
|
}
|
|
1376
1664
|
set article(article) {
|
|
1377
1665
|
this.articleExtended = article;
|
|
@@ -1389,7 +1677,7 @@ class StockComponent {
|
|
|
1389
1677
|
this.stockTransferArticleDetails = event;
|
|
1390
1678
|
this.showStockTransfer = !this.showStockTransfer;
|
|
1391
1679
|
this.showStockInformationGrid = !this.showStockInformationGrid;
|
|
1392
|
-
this.stockService.stockStickers = new PrintStockStickers
|
|
1680
|
+
this.stockService.stockStickers = new PrintStockStickers();
|
|
1393
1681
|
}
|
|
1394
1682
|
backToStock() {
|
|
1395
1683
|
this.showStockTransfer = !this.showStockTransfer;
|
|
@@ -1405,7 +1693,7 @@ class StockComponent {
|
|
|
1405
1693
|
}
|
|
1406
1694
|
getStockInformation(data) {
|
|
1407
1695
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1408
|
-
const articleData = new ArticleStock();
|
|
1696
|
+
const articleData = new ArticleStock$1();
|
|
1409
1697
|
articleData.goodId = data.goodId.toString();
|
|
1410
1698
|
articleData.viewKind = "M";
|
|
1411
1699
|
this.stockInformation = yield this.stockService.getStockInformation(articleData);
|
|
@@ -1454,7 +1742,8 @@ StockComponent.decorators = [
|
|
|
1454
1742
|
},] }
|
|
1455
1743
|
];
|
|
1456
1744
|
StockComponent.ctorParameters = () => [
|
|
1457
|
-
{ type: StockService }
|
|
1745
|
+
{ type: StockService },
|
|
1746
|
+
{ type: OptionsService }
|
|
1458
1747
|
];
|
|
1459
1748
|
StockComponent.propDecorators = {
|
|
1460
1749
|
stock: [{ type: ViewChild, args: [StockComponent,] }],
|
|
@@ -1611,7 +1900,7 @@ class StockInformationGridComponent {
|
|
|
1611
1900
|
this.showSendMethodDialog = false;
|
|
1612
1901
|
this.hideOrShowTabs = true;
|
|
1613
1902
|
this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
|
|
1614
|
-
this.articleStockSearchInfo = new ArticleStock();
|
|
1903
|
+
this.articleStockSearchInfo = new ArticleStock$1();
|
|
1615
1904
|
this.showChangeStockDetails = false;
|
|
1616
1905
|
this.articleDetailsInformation = new ArticleStockManagement();
|
|
1617
1906
|
this.tabs = [
|
|
@@ -1634,7 +1923,6 @@ class StockInformationGridComponent {
|
|
|
1634
1923
|
}
|
|
1635
1924
|
}
|
|
1636
1925
|
handleTabClick(tabData) {
|
|
1637
|
-
console.log(tabData);
|
|
1638
1926
|
this.activeTab = tabData;
|
|
1639
1927
|
if (this.activeTab === "IN_ORDER2") {
|
|
1640
1928
|
this.getInOrderData();
|
|
@@ -1647,13 +1935,13 @@ class StockInformationGridComponent {
|
|
|
1647
1935
|
this.articleStockSearchInfo.goodId = data.goodId.toString();
|
|
1648
1936
|
this.articleStockSearchInfo.wareHouseNo = data.warehouseNo.toString();
|
|
1649
1937
|
this.articleStockSearchInfo.viewKind = "D";
|
|
1938
|
+
this.selectedWarehouse = data.warehouseNo;
|
|
1650
1939
|
if (!this.dataWareHouseCode) {
|
|
1651
1940
|
this.getStockManagementWarehouses(data);
|
|
1652
1941
|
}
|
|
1653
1942
|
this.getArticleDetails(data);
|
|
1654
1943
|
this.hideOrShowTabs = false;
|
|
1655
1944
|
this.hideOrShowLocationTab = true;
|
|
1656
|
-
console.log(this.articleDetailsInformation);
|
|
1657
1945
|
this._stockService.lockArticleDetails(this.articleDetailsInformation);
|
|
1658
1946
|
}
|
|
1659
1947
|
handleHistoryClick() {
|
|
@@ -1675,15 +1963,16 @@ class StockInformationGridComponent {
|
|
|
1675
1963
|
this.activeTab = this.tabs[0];
|
|
1676
1964
|
this.hideOrShowTabs = true;
|
|
1677
1965
|
this.hideOrShowLocationTab = false;
|
|
1966
|
+
this.articleDetails = undefined;
|
|
1678
1967
|
});
|
|
1679
1968
|
}
|
|
1680
|
-
openSendMethodDialog() {
|
|
1969
|
+
openSendMethodDialog(data) {
|
|
1970
|
+
this._stockService.printSticker.goodId = data.goodId;
|
|
1971
|
+
this._stockService.printSticker.warehouse = data.warehouseNo;
|
|
1681
1972
|
this.showSendMethodDialog = !this.showSendMethodDialog;
|
|
1682
1973
|
}
|
|
1683
1974
|
printStockStickers() {
|
|
1684
|
-
this.printSticker
|
|
1685
|
-
this.printSticker.goodId = 10;
|
|
1686
|
-
// this._stockService.getPrintStockStickers(this.printSticker);
|
|
1975
|
+
this._stockService.getPrintStockStickers(this._stockService.printSticker);
|
|
1687
1976
|
}
|
|
1688
1977
|
onOkClick() {
|
|
1689
1978
|
}
|
|
@@ -1710,8 +1999,7 @@ class StockInformationGridComponent {
|
|
|
1710
1999
|
}
|
|
1711
2000
|
onSelectWarehouse(event) {
|
|
1712
2001
|
this.articleDetailsInformation.warehouseNumber = event;
|
|
1713
|
-
|
|
1714
|
-
if (this.dataWareHouseCode != null) {
|
|
2002
|
+
if (this.selectedWarehouse || this.selectedWarehouse === 0) {
|
|
1715
2003
|
this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
|
|
1716
2004
|
this.articleDetails = details;
|
|
1717
2005
|
});
|
|
@@ -1719,22 +2007,22 @@ class StockInformationGridComponent {
|
|
|
1719
2007
|
}
|
|
1720
2008
|
getInOrderData() {
|
|
1721
2009
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1722
|
-
const inOrderData = new
|
|
1723
|
-
inOrderData.type = "
|
|
2010
|
+
const inOrderData = new ArticleTransaction$1();
|
|
2011
|
+
inOrderData.type = "V";
|
|
1724
2012
|
inOrderData.goodId = this.articleStockInformation[0].goodId.toString();
|
|
1725
|
-
|
|
1726
|
-
this.inOrderInformation = yield this._stockService.getStockHistory(inOrderData);
|
|
2013
|
+
this.inOrderInformation = yield this._stockService.getArticleTransaction(inOrderData);
|
|
1727
2014
|
});
|
|
1728
2015
|
}
|
|
1729
2016
|
getOrderData() {
|
|
1730
2017
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
this.orderInformation = yield this._stockService.getStockHistory(inOrderData);
|
|
2018
|
+
const orderData = new ArticleTransaction$1();
|
|
2019
|
+
orderData.type = "V";
|
|
2020
|
+
orderData.goodId = this.articleStockInformation[0].goodId.toString();
|
|
2021
|
+
this.orderInformation = yield this._stockService.getArticleTransaction(orderData);
|
|
1736
2022
|
});
|
|
1737
2023
|
}
|
|
2024
|
+
addNewRow() {
|
|
2025
|
+
}
|
|
1738
2026
|
}
|
|
1739
2027
|
StockInformationGridComponent.decorators = [
|
|
1740
2028
|
{ type: Component, args: [{
|
|
@@ -1757,6 +2045,11 @@ StockInformationGridComponent.decorators = [
|
|
|
1757
2045
|
<div class="stock-grid">
|
|
1758
2046
|
<co-simple-grid *ngIf="activeTab === tabs[0] && hideOrShowTabs"
|
|
1759
2047
|
[data]="articleStockInformation"
|
|
2048
|
+
class="simple-grid"
|
|
2049
|
+
[showAdd]="true"
|
|
2050
|
+
[showToolbar]="true"
|
|
2051
|
+
(addRow)="addNewRow()"
|
|
2052
|
+
[inlineEdit]="true"
|
|
1760
2053
|
>
|
|
1761
2054
|
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNo'" [order]="10"></co-simple-grid-column>
|
|
1762
2055
|
<co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseName'" [order]="11"></co-simple-grid-column>
|
|
@@ -1772,15 +2065,15 @@ StockInformationGridComponent.decorators = [
|
|
|
1772
2065
|
|
|
1773
2066
|
<co-simple-grid *ngIf="activeTab === tabs[1]"
|
|
1774
2067
|
[data]="inOrderInformation"
|
|
2068
|
+
class="simple-grid"
|
|
1775
2069
|
>
|
|
1776
|
-
<co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'
|
|
2070
|
+
<co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'transactionNr'"></co-simple-grid-column>
|
|
1777
2071
|
<co-simple-grid-column [headerText]="'CUSTOMER'" [field]="'user'"></co-simple-grid-column>
|
|
1778
|
-
<co-simple-grid-column [headerText]="'DATE'" [field]="'
|
|
1779
|
-
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'
|
|
2072
|
+
<co-simple-grid-column [headerText]="'DATE'" [field]="'transactionDate'"></co-simple-grid-column>
|
|
2073
|
+
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'amountInOrder'"></co-simple-grid-column>
|
|
1780
2074
|
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'wareHouseNr'"></co-simple-grid-column>
|
|
1781
2075
|
<co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'locationNr'"></co-simple-grid-column>
|
|
1782
2076
|
<co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
|
|
1783
|
-
<co-simple-grid-column [headerText]="'COMMISSION2'" [field]="'commission'"></co-simple-grid-column>
|
|
1784
2077
|
<co-simple-grid-column [headerText]="'TRANSFER'" [field]="'transfer'">
|
|
1785
2078
|
<ng-template #template let-row="row">
|
|
1786
2079
|
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.DeliveryTruck)" (click)="handleStockTransferClick($event)"></co-icon>
|
|
@@ -1788,17 +2081,18 @@ StockInformationGridComponent.decorators = [
|
|
|
1788
2081
|
</co-simple-grid-column>
|
|
1789
2082
|
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1790
2083
|
<ng-template #template let-row="row">
|
|
1791
|
-
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog()"></co-icon>
|
|
2084
|
+
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog(row)"></co-icon>
|
|
1792
2085
|
</ng-template>
|
|
1793
2086
|
</co-simple-grid-column>
|
|
1794
2087
|
</co-simple-grid>
|
|
1795
2088
|
|
|
1796
2089
|
<co-simple-grid *ngIf="activeTab === tabs[2]"
|
|
1797
2090
|
[data]="orderInformation"
|
|
2091
|
+
class="simple-grid"
|
|
1798
2092
|
>
|
|
1799
|
-
<co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'
|
|
1800
|
-
<co-simple-grid-column [headerText]="'DATE'" [field]="'
|
|
1801
|
-
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'
|
|
2093
|
+
<co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'transactionNr'"></co-simple-grid-column>
|
|
2094
|
+
<co-simple-grid-column [headerText]="'DATE'" [field]="'transactionDate'"></co-simple-grid-column>
|
|
2095
|
+
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'amountInOrder'"></co-simple-grid-column>
|
|
1802
2096
|
<co-simple-grid-column [headerText]="'RESERVED'" [field]="'reserved'"></co-simple-grid-column>
|
|
1803
2097
|
<co-simple-grid-column [headerText]="'FREE_STOCK'" [field]="'freeStock'"></co-simple-grid-column>
|
|
1804
2098
|
<co-simple-grid-column [headerText]="'DELIVERY_DATE1'" [field]="'deliveryDate'"></co-simple-grid-column>
|
|
@@ -1824,6 +2118,7 @@ StockInformationGridComponent.decorators = [
|
|
|
1824
2118
|
|
|
1825
2119
|
<!-- TODO move to own component stock-location-->
|
|
1826
2120
|
<co-simple-grid [data]="articleDetails"
|
|
2121
|
+
class="simple-grid"
|
|
1827
2122
|
>
|
|
1828
2123
|
<div class="stock-location-group">
|
|
1829
2124
|
<div class="stock-location-left-group">
|
|
@@ -1853,7 +2148,7 @@ StockInformationGridComponent.decorators = [
|
|
|
1853
2148
|
</co-simple-grid-column>
|
|
1854
2149
|
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1855
2150
|
<ng-template #template let-row="row">
|
|
1856
|
-
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog()"></co-icon>
|
|
2151
|
+
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog(row)"></co-icon>
|
|
1857
2152
|
</ng-template>
|
|
1858
2153
|
</co-simple-grid-column>
|
|
1859
2154
|
</co-simple-grid>
|
|
@@ -1870,6 +2165,7 @@ StockInformationGridComponent.decorators = [
|
|
|
1870
2165
|
<span class="stock-button-back" [textContent]="'BACK_TO_STOCK_LINES'" (click)="backToStockInformation()"></span>
|
|
1871
2166
|
</div>
|
|
1872
2167
|
<co-simple-grid [data]="stockHistoryInformation"
|
|
2168
|
+
class="simple-grid"
|
|
1873
2169
|
>
|
|
1874
2170
|
<co-simple-grid-column [headerText]="'MUTATION_DATE'" [field]="'mutationDate'"></co-simple-grid-column>
|
|
1875
2171
|
<co-simple-grid-column [headerText]="'MUTATION_TIME'" [field]="'mutationTime'"></co-simple-grid-column>
|
|
@@ -1887,7 +2183,7 @@ StockInformationGridComponent.decorators = [
|
|
|
1887
2183
|
<co-simple-grid-column [headerText]="'MUTATION_TYPE'" [field]="'mutationType'"></co-simple-grid-column>
|
|
1888
2184
|
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1889
2185
|
<ng-template #template let-row="row">
|
|
1890
|
-
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog()"></co-icon>
|
|
2186
|
+
<co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)" (click)="openSendMethodDialog(row)"></co-icon>
|
|
1891
2187
|
</ng-template>
|
|
1892
2188
|
</co-simple-grid-column>
|
|
1893
2189
|
</co-simple-grid>
|
|
@@ -2124,46 +2420,80 @@ var SendOption;
|
|
|
2124
2420
|
})(SendOption || (SendOption = {}));
|
|
2125
2421
|
|
|
2126
2422
|
class SendMethodDialogComponent {
|
|
2127
|
-
constructor(iconCacheService,
|
|
2423
|
+
constructor(iconCacheService, stockService, _optionsService, _dictionary, _changeDetector) {
|
|
2128
2424
|
this.iconCacheService = iconCacheService;
|
|
2129
|
-
this.
|
|
2425
|
+
this.stockService = stockService;
|
|
2426
|
+
this._optionsService = _optionsService;
|
|
2427
|
+
this._dictionary = _dictionary;
|
|
2428
|
+
this._changeDetector = _changeDetector;
|
|
2130
2429
|
this.icons = Icon;
|
|
2131
2430
|
this.sendOption = SendOption;
|
|
2431
|
+
this.showEmailOption = true;
|
|
2432
|
+
this.showPrintOption = true;
|
|
2433
|
+
this.showPdfOption = true;
|
|
2434
|
+
this.showXmlOption = true;
|
|
2435
|
+
this.showPrintPriceStickers = false;
|
|
2436
|
+
this.showPrintStockStickers = true;
|
|
2132
2437
|
this.sendOptions = [
|
|
2133
2438
|
{ option: SendOption.Email,
|
|
2134
|
-
iconName: this.icons.Email
|
|
2439
|
+
iconName: this.icons.Email,
|
|
2440
|
+
},
|
|
2135
2441
|
{ option: SendOption.Print,
|
|
2136
|
-
iconName: this.icons.Print
|
|
2442
|
+
iconName: this.icons.Print,
|
|
2443
|
+
},
|
|
2137
2444
|
{ option: SendOption.Pdf,
|
|
2138
|
-
iconName: this.icons.Pdf
|
|
2445
|
+
iconName: this.icons.Pdf,
|
|
2446
|
+
},
|
|
2139
2447
|
{ option: SendOption.Xml,
|
|
2140
|
-
iconName: this.icons.Xml
|
|
2448
|
+
iconName: this.icons.Xml,
|
|
2449
|
+
}
|
|
2141
2450
|
];
|
|
2142
2451
|
this.activeSendOption = SendOption.Email;
|
|
2143
|
-
this.amountToPrint = 1;
|
|
2144
2452
|
this.showStandardPrinterOptions = false;
|
|
2145
2453
|
this.showPrinterSelections = false;
|
|
2146
2454
|
this.showExitButton = true;
|
|
2147
|
-
this.printTemplatesField = { text: "name", value: "
|
|
2455
|
+
this.printTemplatesField = { text: "name", value: "reportId" };
|
|
2456
|
+
this.priceListDataField = { text: "name", value: "priceListCode" };
|
|
2457
|
+
this.upAndLoaded = false;
|
|
2148
2458
|
this.emails = ['lars.vdv@colijn-it.nl', 'david@colijn-it.nl', 'ruben@colijn-it.nl'];
|
|
2149
2459
|
this.models = [false, false, true];
|
|
2150
2460
|
this.layouts = ['Layout 1', 'Layout 2', 'Layout 3'];
|
|
2151
2461
|
this.showDialog = false;
|
|
2152
2462
|
this.startSignatureClicked = new EventEmitter();
|
|
2153
2463
|
this.printButtonClicked = new EventEmitter();
|
|
2464
|
+
this._subscriptions = [];
|
|
2465
|
+
this._publicOptions = true;
|
|
2466
|
+
this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
|
|
2154
2467
|
}
|
|
2155
2468
|
set options(value) {
|
|
2156
|
-
|
|
2469
|
+
if (value) {
|
|
2470
|
+
if (typeof value === "string") {
|
|
2471
|
+
this._options = JSON.parse(value);
|
|
2472
|
+
}
|
|
2473
|
+
else {
|
|
2474
|
+
this._options = value;
|
|
2475
|
+
}
|
|
2476
|
+
this._publicOptions = true;
|
|
2477
|
+
this._optionsService.initialize(this._options).then();
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
get options() {
|
|
2481
|
+
return this._options;
|
|
2482
|
+
}
|
|
2483
|
+
set articleData(data) {
|
|
2484
|
+
this.stockService.printSticker.goodId = data.goodId;
|
|
2485
|
+
this.stockService.printSticker.warehouse = data.warehouseNo;
|
|
2157
2486
|
}
|
|
2487
|
+
;
|
|
2158
2488
|
showClass() {
|
|
2159
2489
|
return true;
|
|
2160
2490
|
}
|
|
2161
|
-
|
|
2162
|
-
this.
|
|
2491
|
+
ngOnDestroy() {
|
|
2492
|
+
this._subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
2163
2493
|
}
|
|
2164
2494
|
getPrinters() {
|
|
2165
2495
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2166
|
-
return this.
|
|
2496
|
+
return this.stockService.getAllPrinters(true).then((list) => {
|
|
2167
2497
|
this.printerList = list;
|
|
2168
2498
|
});
|
|
2169
2499
|
});
|
|
@@ -2175,7 +2505,10 @@ class SendMethodDialogComponent {
|
|
|
2175
2505
|
this.startSignatureClicked.emit();
|
|
2176
2506
|
}
|
|
2177
2507
|
handlePrintClicked() {
|
|
2178
|
-
this.printButtonClicked.emit();
|
|
2508
|
+
// this.printButtonClicked.emit();
|
|
2509
|
+
if (this.stockService.printSticker.printerName) {
|
|
2510
|
+
this.stockService.getPrintStockStickers(this.stockService.printSticker);
|
|
2511
|
+
}
|
|
2179
2512
|
}
|
|
2180
2513
|
togglePrinterSelection() {
|
|
2181
2514
|
this.getPrinters();
|
|
@@ -2190,12 +2523,35 @@ class SendMethodDialogComponent {
|
|
|
2190
2523
|
}
|
|
2191
2524
|
onPrinterClicked(printer) {
|
|
2192
2525
|
this.defaultPrinter = printer.name;
|
|
2526
|
+
this.stockService.printSticker.printerName = printer.name;
|
|
2193
2527
|
this.showPrinterSelections = !this.showPrinterSelections;
|
|
2194
2528
|
}
|
|
2195
2529
|
getPrintTemplates() {
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
this.
|
|
2530
|
+
if (!this.printTemplates) {
|
|
2531
|
+
const data = new StockStickersPrintLayouts();
|
|
2532
|
+
this.stockService.getStockStickerTemplates(data).then((templates) => {
|
|
2533
|
+
this.printTemplates = templates;
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
_handleSettingsLoaded(loaded) {
|
|
2538
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2539
|
+
if (loaded) {
|
|
2540
|
+
yield this._initConnection().then();
|
|
2541
|
+
this.upAndLoaded = true;
|
|
2542
|
+
}
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2545
|
+
_initConnection() {
|
|
2546
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2547
|
+
// await this._connector.connect(this._optionsService.options);
|
|
2548
|
+
if (this._optionsService.options.url) {
|
|
2549
|
+
this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
|
|
2550
|
+
}
|
|
2551
|
+
yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
|
|
2552
|
+
setTimeout(() => {
|
|
2553
|
+
this._changeDetector.detectChanges();
|
|
2554
|
+
});
|
|
2199
2555
|
});
|
|
2200
2556
|
}
|
|
2201
2557
|
}
|
|
@@ -2211,7 +2567,8 @@ SendMethodDialogComponent.decorators = [
|
|
|
2211
2567
|
<div class="dialog-content-wrapper">
|
|
2212
2568
|
<div class="main-content-container" *ngIf="!showPrinterSelections">
|
|
2213
2569
|
<div class="send-options-wrapper">
|
|
2214
|
-
<div class="custom-button-wrapper"
|
|
2570
|
+
<div class="custom-button-wrapper"
|
|
2571
|
+
*ngFor="let sendOption of sendOptions"
|
|
2215
2572
|
[class.selected-option]="sendOption.option === activeSendOption"
|
|
2216
2573
|
(click)="activeSendOption = sendOption.option">
|
|
2217
2574
|
<co-icon [iconData]="iconCacheService.getIcon(sendOption.iconName)"></co-icon>
|
|
@@ -2245,15 +2602,35 @@ SendMethodDialogComponent.decorators = [
|
|
|
2245
2602
|
</div>
|
|
2246
2603
|
</div>
|
|
2247
2604
|
|
|
2248
|
-
<div class="email-option-content" *ngIf="activeSendOption === sendOption.Print">
|
|
2249
|
-
<div
|
|
2250
|
-
<
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2605
|
+
<div class="email-option-content" *ngIf="activeSendOption === sendOption.Print" (click)="getPrintTemplates()">
|
|
2606
|
+
<div *ngIf="showPrintPriceStickers">
|
|
2607
|
+
<div class="lov-wrapper">
|
|
2608
|
+
<co-input-combo-box
|
|
2609
|
+
[(model)]="stockService.printPriceSticker.reportId"
|
|
2610
|
+
[collection]="printTemplates"
|
|
2611
|
+
[fields]="printTemplatesField"
|
|
2612
|
+
placeholder="Layout"
|
|
2613
|
+
></co-input-combo-box>
|
|
2614
|
+
</div>
|
|
2615
|
+
<div class="lov-wrapper" *ngIf="priceListCodeData">
|
|
2616
|
+
<co-input-combo-box
|
|
2617
|
+
[(model)]="stockService.printPriceSticker.priceListCode"
|
|
2618
|
+
[collection]="priceListCodeData"
|
|
2619
|
+
[fields]="priceListDataField"
|
|
2620
|
+
placeholder="Layout"
|
|
2621
|
+
></co-input-combo-box>
|
|
2622
|
+
</div>
|
|
2623
|
+
</div>
|
|
2624
|
+
|
|
2625
|
+
<div *ngIf="showPrintStockStickers">
|
|
2626
|
+
<div class="lov-wrapper">
|
|
2627
|
+
<co-input-combo-box
|
|
2628
|
+
[(model)]="stockService.printSticker.reportId"
|
|
2629
|
+
[collection]="printTemplates"
|
|
2630
|
+
[fields]="printTemplatesField"
|
|
2631
|
+
placeholder="Layout"
|
|
2632
|
+
></co-input-combo-box>
|
|
2633
|
+
</div>
|
|
2257
2634
|
</div>
|
|
2258
2635
|
|
|
2259
2636
|
<div class="lov-wrapper clickable" (click)="togglePrinterSelection()">
|
|
@@ -2292,7 +2669,7 @@ SendMethodDialogComponent.decorators = [
|
|
|
2292
2669
|
<div class="print-footer-wrapper">
|
|
2293
2670
|
<div class="input-number-wrapper">
|
|
2294
2671
|
<co-input-number-picker class="number-picker"
|
|
2295
|
-
[step]="1" [(model)]="
|
|
2672
|
+
[step]="1" [(model)]="stockService.printSticker.amount" [min]="1"
|
|
2296
2673
|
[ngModelOptions]="{debounce: 1}">
|
|
2297
2674
|
</co-input-number-picker>
|
|
2298
2675
|
</div>
|
|
@@ -2335,13 +2712,24 @@ SendMethodDialogComponent.decorators = [
|
|
|
2335
2712
|
];
|
|
2336
2713
|
SendMethodDialogComponent.ctorParameters = () => [
|
|
2337
2714
|
{ type: IconCacheService },
|
|
2338
|
-
{ type: StockService }
|
|
2715
|
+
{ type: StockService },
|
|
2716
|
+
{ type: OptionsService },
|
|
2717
|
+
{ type: DictionaryService },
|
|
2718
|
+
{ type: ChangeDetectorRef }
|
|
2339
2719
|
];
|
|
2340
2720
|
SendMethodDialogComponent.propDecorators = {
|
|
2721
|
+
showEmailOption: [{ type: Input }],
|
|
2722
|
+
showPrintOption: [{ type: Input }],
|
|
2723
|
+
showPdfOption: [{ type: Input }],
|
|
2724
|
+
showXmlOption: [{ type: Input }],
|
|
2725
|
+
showPrintPriceStickers: [{ type: Input }],
|
|
2726
|
+
showPrintStockStickers: [{ type: Input }],
|
|
2727
|
+
priceListCodeData: [{ type: Input }],
|
|
2341
2728
|
options: [{ type: Input }],
|
|
2342
2729
|
showDialog: [{ type: Input }],
|
|
2343
2730
|
headerTitle: [{ type: Input }],
|
|
2344
2731
|
printerList: [{ type: Input }],
|
|
2732
|
+
articleData: [{ type: Input }],
|
|
2345
2733
|
startSignatureClicked: [{ type: Output }],
|
|
2346
2734
|
printButtonClicked: [{ type: Output }],
|
|
2347
2735
|
showClass: [{ type: HostBinding, args: ["class.ione-send-method-dialog",] }]
|
|
@@ -2471,7 +2859,7 @@ StockModule.decorators = [
|
|
|
2471
2859
|
],
|
|
2472
2860
|
providers: [
|
|
2473
2861
|
StockService,
|
|
2474
|
-
|
|
2862
|
+
SharedConnectorService
|
|
2475
2863
|
]
|
|
2476
2864
|
},] }
|
|
2477
2865
|
];
|
|
@@ -2807,5 +3195,5 @@ LayoutSwitcherModule.decorators = [
|
|
|
2807
3195
|
* Generated bundle index. Do not edit.
|
|
2808
3196
|
*/
|
|
2809
3197
|
|
|
2810
|
-
export { DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc,
|
|
3198
|
+
export { DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StockComponent, StockModule, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockService as ɵc, OptionsService as ɵd, DictionaryService as ɵe, SharedConnectorService as ɵf, IconCacheService as ɵg, StockInformationComponent as ɵh, StockInformationGridComponent as ɵi, StockLocationComponent as ɵj, StockTransferComponent as ɵk, StockChangeAmountComponent as ɵl };
|
|
2811
3199
|
//# sourceMappingURL=colijnit-sharedcomponents.js.map
|