@colijnit/sharedcomponents 1.0.9 → 1.0.10
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 +44 -1438
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.d.ts +0 -7
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/colijnit-sharedcomponents.js +1 -8
- package/esm2015/public-api.js +1 -5
- package/fesm2015/colijnit-sharedcomponents.js +2 -1696
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/package.json +5 -6
- package/public-api.d.ts +0 -4
- package/esm2015/lib/components/send-method-dialog/enums/send-option.js +0 -8
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +0 -203
- package/esm2015/lib/components/send-method-dialog/send-method-dialog.module.js +0 -26
- package/esm2015/lib/components/stock/stock-information/stock-information.component.js +0 -57
- package/esm2015/lib/components/stock/stock-information-grid/stock-information-grid.component.js +0 -254
- package/esm2015/lib/components/stock/stock-location/stock-location.component.js +0 -62
- package/esm2015/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.js +0 -2
- package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +0 -98
- package/esm2015/lib/components/stock/stock.component.js +0 -67
- package/esm2015/lib/components/stock/stock.module.js +0 -44
- package/esm2015/lib/enum/icon.enum.js +0 -23
- package/esm2015/lib/factory/business-object-factory.js +0 -120
- package/esm2015/lib/factory/decorators/boolean.decorator.js +0 -102
- package/esm2015/lib/factory/decorators/complex-array.decorator.js +0 -55
- package/esm2015/lib/factory/decorators/complex-field.decorator.js +0 -57
- package/esm2015/lib/factory/decorators/date-field.decorator.js +0 -36
- package/esm2015/lib/factory/decorators/string-number.decorator.js +0 -43
- package/esm2015/lib/model/business-object.js +0 -81
- package/esm2015/lib/model/icon-svg.js +0 -22
- package/esm2015/lib/service/icon-cache.service.js +0 -51
- package/esm2015/lib/service/ione-connector-adapter.service.js +0 -117
- package/esm2015/lib/service/stock.service.js +0 -33
- package/esm2015/lib/utils/array-utils.js +0 -183
- package/esm2015/lib/utils/is-nill.function.js +0 -5
- package/lib/components/send-method-dialog/enums/send-option.d.ts +0 -6
- package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +0 -37
- package/lib/components/send-method-dialog/send-method-dialog.module.d.ts +0 -2
- package/lib/components/send-method-dialog/style/_layout.scss +0 -186
- package/lib/components/send-method-dialog/style/_material-definition.scss +0 -1
- package/lib/components/send-method-dialog/style/_theme.scss +0 -7
- package/lib/components/send-method-dialog/style/material.scss +0 -4
- package/lib/components/stock/stock-information/stock-information.component.d.ts +0 -8
- package/lib/components/stock/stock-information-grid/stock-information-grid.component.d.ts +0 -43
- package/lib/components/stock/stock-location/stock-location.component.d.ts +0 -12
- package/lib/components/stock/stock-transfer/co-drop-down-list-fields.interface.d.ts +0 -4
- package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +0 -20
- package/lib/components/stock/stock.component.d.ts +0 -19
- package/lib/components/stock/stock.module.d.ts +0 -2
- package/lib/components/stock/style/_layout.scss +0 -206
- package/lib/components/stock/style/_material-definition.scss +0 -20
- package/lib/components/stock/style/_theme.scss +0 -8
- package/lib/components/stock/style/material.scss +0 -4
- package/lib/enum/icon.enum.d.ts +0 -21
- package/lib/factory/business-object-factory.d.ts +0 -23
- package/lib/factory/decorators/boolean.decorator.d.ts +0 -43
- package/lib/factory/decorators/complex-array.decorator.d.ts +0 -25
- package/lib/factory/decorators/complex-field.decorator.d.ts +0 -25
- package/lib/factory/decorators/date-field.decorator.d.ts +0 -17
- package/lib/factory/decorators/string-number.decorator.d.ts +0 -22
- package/lib/model/business-object.d.ts +0 -7
- package/lib/model/icon-svg.d.ts +0 -4
- package/lib/service/icon-cache.service.d.ts +0 -18
- package/lib/service/ione-connector-adapter.service.d.ts +0 -21
- package/lib/service/stock.service.d.ts +0 -13
- package/lib/utils/array-utils.d.ts +0 -57
- package/lib/utils/is-nill.function.d.ts +0 -1
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
import { __awaiter } from 'tslib';
|
|
2
|
-
import
|
|
3
|
-
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule } from '@angular/core';
|
|
4
3
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
5
4
|
import { PDFDocument } from 'pdf-lib';
|
|
6
5
|
import * as PDFJS from 'pdfjs-dist/legacy/build/pdf';
|
|
7
6
|
import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry';
|
|
8
7
|
import { CommonModule } from '@angular/common';
|
|
9
8
|
import SignaturePad from 'signature_pad';
|
|
10
|
-
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
11
|
-
import { Sharedapi } from '@colijnit/sharedapi/build/sharedapi';
|
|
12
|
-
import { Printer } from '@colijnit/sharedapi/build/model/printer.bo';
|
|
13
|
-
import { notNill } from '@colijnit/articleapi/build/utils/function/not-nill.function';
|
|
14
|
-
import { ObjectUtils } from '@colijnit/articleapi/build/utils/object-utils';
|
|
15
|
-
import { GetYesNoDbBooleanValue } from '@colijnit/articleapi/build/enum/yes-no-db-type.enum';
|
|
16
|
-
import { GetTrueFalseDbBooleanValue } from '@colijnit/articleapi/build/enum/true-false-db-type.enum';
|
|
17
|
-
import { GetOneZeroDbBooleanValue } from '@colijnit/articleapi/build/enum/one-zero-bool-db-type.enum';
|
|
18
|
-
import { GetLogicalBooleanValue } from '@colijnit/articleapi/build/enum/db-boolean-value-type.enum';
|
|
19
|
-
import { DateUtils } from '@colijnit/articleapi/build/utils/date-utils';
|
|
20
|
-
import { NumberUtils } from '@colijnit/articleapi/build/utils/number-utils';
|
|
21
|
-
import { isNill as isNill$1 } from '@colijnit/articleapi/build/utils/function/is-nill.function';
|
|
22
|
-
import { MapPropertyDecorator } from '@colijnit/articleapi/build/factory/decorators/map-property.decorator';
|
|
23
|
-
import { BooleanTextDecorator as BooleanTextDecorator$1 } from '@colijnit/articleapi/build/factory/decorators/boolean.decorator';
|
|
24
|
-
import { JsonFieldFieldDecorator } from '@colijnit/articleapi/build/factory/decorators/json.decorator';
|
|
25
|
-
import { ComplexArrayDecorator as ComplexArrayDecorator$1 } from '@colijnit/articleapi/build/factory/decorators/complex-array.decorator';
|
|
26
|
-
import { PrintStockStickers } from '@colijnit/articleapi/build/model/print-stock-stickers';
|
|
27
|
-
import { ArticleFlat } from '@colijnit/articleapi/build/model/article-flat.bo';
|
|
28
|
-
import { ArticlesPublic } from '@colijnit/articleapi/build/articles-public';
|
|
29
|
-
import { CoDialogPromptModule, InputCheckboxModule, InputComboBoxModule, IconModule, InputNumberPickerModule, CoDialogWizardModule, CoGridModule, ButtonModule, InputRadioButtonModule, DropDownModule, SimpleGridModule, ImageModule, InputTextModule } from '@colijnit/corecomponents_v12';
|
|
30
|
-
import * as i1 from '@angular/platform-browser';
|
|
31
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
32
9
|
|
|
33
10
|
class DocsignComponent {
|
|
34
11
|
constructor() {
|
|
@@ -383,1677 +360,6 @@ DocsignModule.decorators = [
|
|
|
383
360
|
},] }
|
|
384
361
|
];
|
|
385
362
|
|
|
386
|
-
const PROP_META_KEY$3 = "complexField";
|
|
387
|
-
/**
|
|
388
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
389
|
-
*/
|
|
390
|
-
/**
|
|
391
|
-
* Property decorator for properties of businessobject classes that are other strongly typed businessobjects.
|
|
392
|
-
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
393
|
-
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
394
|
-
*
|
|
395
|
-
* Usage:
|
|
396
|
-
*
|
|
397
|
-
* @ComplexField(Transaction)
|
|
398
|
-
* public transaction: Transaction
|
|
399
|
-
*
|
|
400
|
-
* Also keeps track of a "complexFieldProps" metadata on the class-level, as a reflect-metadata workaround to be able to
|
|
401
|
-
* retrieve all properties that have the @ComplexField(..) decorator (impossible with current Reflect API).
|
|
402
|
-
*/
|
|
403
|
-
function ComplexField(type) {
|
|
404
|
-
return function (target, propertyKey) {
|
|
405
|
-
if (!target || !propertyKey) {
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
409
|
-
// to be immediately processed when a class is first imported
|
|
410
|
-
if (!type) {
|
|
411
|
-
// eslint-disable-next-line no-console
|
|
412
|
-
console.warn(`@ComplexField(type): type was UNDEFINED. Called on prop (${ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
413
|
-
`Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
414
|
-
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
Reflect.defineMetadata(PROP_META_KEY$3, type, target, propertyKey);
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
// Utility function holder of the ComplexFieldDecorator decorator.
|
|
421
|
-
class ComplexFieldDecorator {
|
|
422
|
-
/**
|
|
423
|
-
* Returns whether given property (as a string) on given object is a complex field. A complex field is a field that is decorated
|
|
424
|
-
* with the @ComplexField decorator.
|
|
425
|
-
*/
|
|
426
|
-
static IsComplexField(target, propertyKey) {
|
|
427
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
428
|
-
return false;
|
|
429
|
-
}
|
|
430
|
-
return (notNill(Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey)));
|
|
431
|
-
}
|
|
432
|
-
// Returns the VALUE of the @ComplexField(VALUE) property decorator on the given propertyKey on the given modelObject.
|
|
433
|
-
static GetComplexFieldType(target, propertyKey) {
|
|
434
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
435
|
-
return undefined;
|
|
436
|
-
}
|
|
437
|
-
return Reflect.getMetadata(PROP_META_KEY$3, target, propertyKey);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
const PROP_META_KEY$2 = "complexArray";
|
|
442
|
-
/**
|
|
443
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
444
|
-
*/
|
|
445
|
-
/**
|
|
446
|
-
* Property decorator for properties of businessobject classes that are an array of other strongly typed businessobjects.
|
|
447
|
-
* Ensures that the BusinessObjectFactoryService makes properly typed objects from incoming raw persistence data. Otherwise we couldn't add methods
|
|
448
|
-
* to our own businessobjects and use them, since all fields would be flat data without methods after BusinessObjectFactoryService creation.
|
|
449
|
-
*
|
|
450
|
-
* Usage:
|
|
451
|
-
*
|
|
452
|
-
* @ComplexArray(TransactionLine)
|
|
453
|
-
* public transactionLines: TransactionLine[]
|
|
454
|
-
*/
|
|
455
|
-
function ComplexArray(type) {
|
|
456
|
-
return function (target, propertyKey) {
|
|
457
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
// warn the programmer if given type was undefined; it's probably an import order glitch that caused this, because decorators seem
|
|
461
|
-
// to be immediately processed when a class is first imported
|
|
462
|
-
if (!type) {
|
|
463
|
-
console.warn(`@ComplexArray(type): type was UNDEFINED. Called on prop (${ObjectUtils.GetClassName(target)}, ${propertyKey}). ` +
|
|
464
|
-
`Class will not properly serialize and deserialize now. We've always been able to fix this by CHANGING IMPORT ORDERS ` +
|
|
465
|
-
`where both classes and their dependencies are used, e.g. factory, repository or models..`);
|
|
466
|
-
return;
|
|
467
|
-
}
|
|
468
|
-
Reflect.defineMetadata(PROP_META_KEY$2, type, target, propertyKey);
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
// Utility function holder of the ComplexArrayDecorator decorator.
|
|
472
|
-
class ComplexArrayDecorator {
|
|
473
|
-
/**
|
|
474
|
-
* Returns whether given property (as a string) on given object is a complex array. A complex array is an array field that is decorated
|
|
475
|
-
* with the @ComplexArray decorator.
|
|
476
|
-
*/
|
|
477
|
-
static IsComplexArray(target, propertyKey) {
|
|
478
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
479
|
-
return false;
|
|
480
|
-
}
|
|
481
|
-
return (notNill(Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey)));
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* Returns the VALUE of the @ComplexArray(VALUE) property decorator on the given propertyKey on the given modelobject.
|
|
485
|
-
*/
|
|
486
|
-
static GetComplexArrayType(target, propertyKey) {
|
|
487
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
488
|
-
return undefined;
|
|
489
|
-
}
|
|
490
|
-
return Reflect.getMetadata(PROP_META_KEY$2, target, propertyKey);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
const PROP_META_KEY_JN = "booleanTextJN";
|
|
495
|
-
const PROP_META_KEY_TF = "booleanTextTF";
|
|
496
|
-
const PROP_META_KEY_10 = "booleanText10";
|
|
497
|
-
/**
|
|
498
|
-
* There are 'J', 'T', 'N', 'F', 0 and 1 'boolean values' in the database. These should be translated to true and false boolean values in
|
|
499
|
-
* our client application.
|
|
500
|
-
*
|
|
501
|
-
* The values 'J' and 'N' seem to be most commonly used. This is the default setting when using this decorator.
|
|
502
|
-
* You can pass 'T' or 1 for the other variants as follows:
|
|
503
|
-
*
|
|
504
|
-
* Usage:
|
|
505
|
-
*
|
|
506
|
-
* @BooleanText() or @BooleanText("J") (the default, uses YesNoDbType char values)
|
|
507
|
-
* public foo: boolean // 'J' and 'N' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
508
|
-
*
|
|
509
|
-
* @BooleanText('T') (uses TrueFalseDbType char values)
|
|
510
|
-
* public bar: boolean // 'T' and 'F' become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
511
|
-
*
|
|
512
|
-
* @BooleanText(1)
|
|
513
|
-
* public baz: boolean // 1 and 0 become true and false after BusinessObjectFactoryService and -SerializerService processing
|
|
514
|
-
*/
|
|
515
|
-
function BooleanText(type) {
|
|
516
|
-
return function (target, propertyKey) {
|
|
517
|
-
if (!target || !propertyKey) {
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
// by default, it's a J N boolean text
|
|
521
|
-
if (!type || type === "J") {
|
|
522
|
-
Reflect.defineMetadata(PROP_META_KEY_JN, true, target, propertyKey);
|
|
523
|
-
}
|
|
524
|
-
else if (type === "T") {
|
|
525
|
-
Reflect.defineMetadata(PROP_META_KEY_TF, true, target, propertyKey);
|
|
526
|
-
}
|
|
527
|
-
else if (type === 1) {
|
|
528
|
-
Reflect.defineMetadata(PROP_META_KEY_10, true, target, propertyKey);
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
// Utility function holder of the BooleanTextDecorator decorator.
|
|
533
|
-
class BooleanTextDecorator {
|
|
534
|
-
/**
|
|
535
|
-
* Returns whether given property (as a string) on given object is a boolean text field. That is, it's a field that is decorated
|
|
536
|
-
* with the @BooleanText decorator.
|
|
537
|
-
*/
|
|
538
|
-
static IsBooleanTextField(target, propertyKey) {
|
|
539
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
540
|
-
return false;
|
|
541
|
-
}
|
|
542
|
-
return (Reflect.getMetadata(PROP_META_KEY_JN, target, propertyKey) === true
|
|
543
|
-
||
|
|
544
|
-
Reflect.getMetadata(PROP_META_KEY_TF, target, propertyKey) === true
|
|
545
|
-
||
|
|
546
|
-
Reflect.getMetadata(PROP_META_KEY_10, target, propertyKey) === true);
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Returns the logical true or false value of given character ('J', 'N', 'T' or 'F') or number (0 or 1).
|
|
550
|
-
* Returns UNDEFINED if given boolChar was not recognised as a boolean text.
|
|
551
|
-
*/
|
|
552
|
-
static GetLogicalBooleanValue(dbBoolChar) {
|
|
553
|
-
return GetLogicalBooleanValue(dbBoolChar);
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Returns the boolean character / number of given logical bool property on target object. Uses its @BooleanText() annotation to decide
|
|
557
|
-
* what character / number to return.
|
|
558
|
-
* Used in BusinessObjectSerializerServiceService to convert logical bools to their original boolean character.
|
|
559
|
-
* @returns {string|number} The original, reverse-engineered boolean character (or number) of given object property, or undefined.
|
|
560
|
-
*/
|
|
561
|
-
static GetDbBooleanValue(target, propertyKey) {
|
|
562
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
563
|
-
return undefined;
|
|
564
|
-
}
|
|
565
|
-
let dbBoolVal = undefined;
|
|
566
|
-
const curBoolVal = target[propertyKey];
|
|
567
|
-
if (BooleanTextDecorator._IsJaNeeProp(target, propertyKey)) {
|
|
568
|
-
dbBoolVal = GetYesNoDbBooleanValue(curBoolVal);
|
|
569
|
-
}
|
|
570
|
-
else if (BooleanTextDecorator._IsTrueFalseProp(target, propertyKey)) {
|
|
571
|
-
dbBoolVal = GetTrueFalseDbBooleanValue(curBoolVal);
|
|
572
|
-
}
|
|
573
|
-
else if (BooleanTextDecorator._IsZeroOneProp(target, propertyKey)) {
|
|
574
|
-
dbBoolVal = GetOneZeroDbBooleanValue(curBoolVal);
|
|
575
|
-
}
|
|
576
|
-
return dbBoolVal;
|
|
577
|
-
}
|
|
578
|
-
static _IsJaNeeProp(target, propertyKey) {
|
|
579
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_JN, target, propertyKey);
|
|
580
|
-
}
|
|
581
|
-
static _IsTrueFalseProp(target, propertyKey) {
|
|
582
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_TF, target, propertyKey);
|
|
583
|
-
}
|
|
584
|
-
static _IsZeroOneProp(target, propertyKey) {
|
|
585
|
-
return BooleanTextDecorator._IsProp(PROP_META_KEY_10, target, propertyKey);
|
|
586
|
-
}
|
|
587
|
-
static _IsProp(prop, target, propertyKey) {
|
|
588
|
-
return !!target && !!propertyKey && typeof target === "object" && Reflect.hasMetadata(prop, target, propertyKey);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
const PROP_META_KEY$1 = "dateField";
|
|
593
|
-
/**
|
|
594
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
595
|
-
*/
|
|
596
|
-
/**
|
|
597
|
-
* Property decorator for properties of businessobject classes that are of type Date, but are sent to us as strings.
|
|
598
|
-
* Ensures that the BusinessObjectFactory makes proper JavaScript Date objects from incoming strings for @DateField() decorated properties.
|
|
599
|
-
*
|
|
600
|
-
* Usage:
|
|
601
|
-
*
|
|
602
|
-
* @DateField()
|
|
603
|
-
* public expectedDeliveryDate: Date
|
|
604
|
-
*/
|
|
605
|
-
function DateField() {
|
|
606
|
-
return function (target, propertyKey) {
|
|
607
|
-
if (!target || !propertyKey) {
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
Reflect.defineMetadata(PROP_META_KEY$1, undefined, target, propertyKey);
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
// Utility function holder of the @DateField() decorator.
|
|
614
|
-
class DateFieldFieldDecorator {
|
|
615
|
-
// Returns whether given property (as a string) on given object is decorated with @DateField().
|
|
616
|
-
static IsDateField(target, propertyKey) {
|
|
617
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
618
|
-
return false;
|
|
619
|
-
}
|
|
620
|
-
return Reflect.hasMetadata(PROP_META_KEY$1, target, propertyKey);
|
|
621
|
-
}
|
|
622
|
-
static StringAsDate(str) {
|
|
623
|
-
return DateUtils.StringAsDate(str);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
const PROP_META_KEY = "stringNumber";
|
|
628
|
-
/**
|
|
629
|
-
* !! just a TAG DECORATOR for now, there is no code that uses this meta data within the ione connector lib itself.
|
|
630
|
-
*/
|
|
631
|
-
/**
|
|
632
|
-
* Decorator for properties of businessobjects that are sent to us as strings from the database, but which we want to use as a number in the client.
|
|
633
|
-
*
|
|
634
|
-
* Can be handy for incongruent backend api cases, where id data types are communicated wrongly via strings instead of numbers
|
|
635
|
-
* (e.g. on EmployeeFullObject.district, points to a District which has a number id, but in employee it's a string representation of that number...)
|
|
636
|
-
*
|
|
637
|
-
* Used by business object factory and -serializer.
|
|
638
|
-
*
|
|
639
|
-
* Usage:
|
|
640
|
-
*
|
|
641
|
-
* @StringNumber()
|
|
642
|
-
* public rights: UserRightType
|
|
643
|
-
*/
|
|
644
|
-
function StringNumber() {
|
|
645
|
-
return function (target, propertyKey) {
|
|
646
|
-
if (!target || !propertyKey) {
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
Reflect.defineMetadata(PROP_META_KEY, undefined, target, propertyKey);
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
// Utility function holder of the @StringNumber() decorator.
|
|
653
|
-
class StringNumberDecorator {
|
|
654
|
-
// Returns whether given property (as a string) on given object is decorated with @StringNumber().
|
|
655
|
-
static IsStringNumber(target, propertyKey) {
|
|
656
|
-
if (!target || !propertyKey || typeof target !== "object") {
|
|
657
|
-
return false;
|
|
658
|
-
}
|
|
659
|
-
return Reflect.hasMetadata(PROP_META_KEY, target, propertyKey);
|
|
660
|
-
}
|
|
661
|
-
static StringAsNumber(str) {
|
|
662
|
-
return NumberUtils.ParseFloatKeepPrecision(str);
|
|
663
|
-
}
|
|
664
|
-
static NumberAsString(nr) {
|
|
665
|
-
return "" + nr;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
// @returns true iff given value equals null or equals undefined
|
|
670
|
-
function isNill(value) {
|
|
671
|
-
return value === null || value === undefined;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
class ArrayUtils {
|
|
675
|
-
/**
|
|
676
|
-
* Returns whether at least one element in given array could be found by given finder function.
|
|
677
|
-
*
|
|
678
|
-
* @param {T[]} array
|
|
679
|
-
* @param {(element: T) => boolean} finder A finder function that takes an element of the array and returns a boolean that represents
|
|
680
|
-
* the 'found status' for that element; whether it should have been found or not.
|
|
681
|
-
*/
|
|
682
|
-
static ContainsAnElementFoundBy(array, finder) {
|
|
683
|
-
if (!array || !finder) {
|
|
684
|
-
return false;
|
|
685
|
-
}
|
|
686
|
-
return notNill(this.Find(array, finder));
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* Cross-browser Array.find() function. Returns the first item in given array for which the foundBy function returns true. Returns
|
|
690
|
-
* undefined when none was found.
|
|
691
|
-
*
|
|
692
|
-
* Example usage:
|
|
693
|
-
* const foundItem: BusinessObject = ArrayUtils.Find<BusinessObject>(modelArray, (modelItem: BusinessObject) => <br>
|
|
694
|
-
* (return modelItem.getId() === '1')
|
|
695
|
-
* * });
|
|
696
|
-
*
|
|
697
|
-
* @param array The array with items to search in.
|
|
698
|
-
* @param foundBy The finder function applied on each items of the array, when that returns true, the item is considered found.
|
|
699
|
-
*/
|
|
700
|
-
static Find(array, foundBy) {
|
|
701
|
-
if (!array || !foundBy) {
|
|
702
|
-
return undefined;
|
|
703
|
-
}
|
|
704
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
705
|
-
const itemCur = array[i];
|
|
706
|
-
if (foundBy(itemCur)) {
|
|
707
|
-
return itemCur;
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
return undefined;
|
|
711
|
-
}
|
|
712
|
-
// @returns empty array when nothing found, otherwise array with found items
|
|
713
|
-
static FindAll(array, foundBy) {
|
|
714
|
-
const answer = [];
|
|
715
|
-
if (!array || !foundBy) {
|
|
716
|
-
return answer;
|
|
717
|
-
}
|
|
718
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
719
|
-
const itemCur = array[i];
|
|
720
|
-
if (foundBy(itemCur)) {
|
|
721
|
-
answer.push(itemCur);
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
return answer;
|
|
725
|
-
}
|
|
726
|
-
// returns a simple clone of given array, using array.slice(0)
|
|
727
|
-
static CloneArray(array) {
|
|
728
|
-
let answer = [];
|
|
729
|
-
if (array) {
|
|
730
|
-
answer = array.slice(0);
|
|
731
|
-
}
|
|
732
|
-
return answer;
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* Returns a 'semi deep clone' of given array. Its first-level members are object-shallow-cloned (optionally with a strongly typed constructor),
|
|
736
|
-
* or just as plain object (see param arrayItemsClass).
|
|
737
|
-
* @param array
|
|
738
|
-
* @param arrayItemsClass If provided, the cloned array's first-level items will be strongly typed to / constructed as this class. Otherwise
|
|
739
|
-
* it'll be a plain object.
|
|
740
|
-
* @param deepClone Set to true if array items contain FUNCTIONS that need to be cloned..
|
|
741
|
-
* @returns {Array} semi-deep clone of given array
|
|
742
|
-
*/
|
|
743
|
-
static CloneArrayAndItsItems(array, arrayItemsClass, deepClone = false) {
|
|
744
|
-
const cloneArray = [];
|
|
745
|
-
if (array) {
|
|
746
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
747
|
-
if (deepClone) {
|
|
748
|
-
cloneArray.push(ObjectUtils.GetDeepClone(array[i]));
|
|
749
|
-
}
|
|
750
|
-
else {
|
|
751
|
-
cloneArray.push(ObjectUtils.GetShallowClone(array[i], arrayItemsClass));
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
else {
|
|
756
|
-
return [];
|
|
757
|
-
}
|
|
758
|
-
return cloneArray;
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* Removes element at given index from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really
|
|
762
|
-
* removes the element using splice().
|
|
763
|
-
*
|
|
764
|
-
* @param {number} index
|
|
765
|
-
* @param {any[]} array in-out
|
|
766
|
-
* @returns {boolean} True if and only if the element on given index is succesfully removed from given array.
|
|
767
|
-
*/
|
|
768
|
-
static RemoveElementAtIndex(index, array) {
|
|
769
|
-
if (NumberUtils.IsNaN(index) || index < 0 || !Array.isArray(array) || array.length === 0) {
|
|
770
|
-
return false;
|
|
771
|
-
}
|
|
772
|
-
if (index in array) {
|
|
773
|
-
array.splice(index, 1);
|
|
774
|
-
return true;
|
|
775
|
-
}
|
|
776
|
-
else {
|
|
777
|
-
return false;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* Removes given element from given array. Doesn't just set it to null like JavaScripts standard 'delete' does, but really removes the
|
|
782
|
-
* element using splice(). Also works on associative arrays.
|
|
783
|
-
*
|
|
784
|
-
* @param {T} element The element to remove.
|
|
785
|
-
* @param {T[]} array The array to remove the element from.
|
|
786
|
-
* @returns {boolean} True iff given element was truly successfully removed from given array.
|
|
787
|
-
*/
|
|
788
|
-
static RemoveElement(element, array) {
|
|
789
|
-
if (!Array.isArray(array)) {
|
|
790
|
-
return false;
|
|
791
|
-
}
|
|
792
|
-
const index = array.indexOf(element);
|
|
793
|
-
return ArrayUtils.RemoveElementAtIndex(index, array);
|
|
794
|
-
}
|
|
795
|
-
// Checks if given array is defined, and is an array, and has length > 0, and, optionally checks that the first element is of type given clazz.
|
|
796
|
-
static IsArrayWithElements(arrayToCheck, classItemsMustBeInstanceOf) {
|
|
797
|
-
if (isNill$1(arrayToCheck)) {
|
|
798
|
-
return false;
|
|
799
|
-
}
|
|
800
|
-
if (Array.isArray(arrayToCheck) && arrayToCheck.length > 0) {
|
|
801
|
-
if (classItemsMustBeInstanceOf) {
|
|
802
|
-
return arrayToCheck[0] instanceof classItemsMustBeInstanceOf;
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
return true;
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
else {
|
|
809
|
-
return false;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
// Removes all elements from given array for which given filter function holds true. Returns true if at least one removed, else false.
|
|
813
|
-
static RemoveElementsByFilter(array, filterFunction) {
|
|
814
|
-
if (!ArrayUtils.IsArrayWithElements(array) || !filterFunction) {
|
|
815
|
-
return false;
|
|
816
|
-
}
|
|
817
|
-
let atLeastOneRemoved = false;
|
|
818
|
-
const len = array.length;
|
|
819
|
-
for (let i = len - 1; i >= 0; i--) {
|
|
820
|
-
const item = array[i];
|
|
821
|
-
if (filterFunction.call(this, item) === true) {
|
|
822
|
-
array.splice(i, 1);
|
|
823
|
-
atLeastOneRemoved = true;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
return atLeastOneRemoved;
|
|
827
|
-
}
|
|
828
|
-
static MoveElement(element, toIndex, array) {
|
|
829
|
-
if (!Array.isArray(array) || isNill$1(toIndex)) {
|
|
830
|
-
return false;
|
|
831
|
-
}
|
|
832
|
-
const fromIndex = array.indexOf(element);
|
|
833
|
-
const toIndexCorrected = NumberUtils.GetNearestNumberWithinBounds(toIndex, 0, array.length - 1);
|
|
834
|
-
if (fromIndex === -1 || array[toIndexCorrected] === element) {
|
|
835
|
-
// element did not exist in given array, or already existed on given toIndex
|
|
836
|
-
return false;
|
|
837
|
-
}
|
|
838
|
-
array.splice(toIndexCorrected, 0, array.splice(fromIndex, 1)[0]);
|
|
839
|
-
return true;
|
|
840
|
-
}
|
|
841
|
-
// PRE: elements exists in given array. POST: given elementToPlace has a lower index than given afterThisElement. Array is in-out manipulated.
|
|
842
|
-
static PlaceElementAfterOther(array, elementToPlace, afterThisElement) {
|
|
843
|
-
if (array) {
|
|
844
|
-
const afterThisElIdx = array.indexOf(afterThisElement);
|
|
845
|
-
const elToPlaceIdx = array.indexOf(elementToPlace);
|
|
846
|
-
if (afterThisElIdx >= elToPlaceIdx) {
|
|
847
|
-
ArrayUtils.MoveElement(elementToPlace, afterThisElIdx + 1, array);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* This type represents the concept of a business object ID type. ID's of business objects can be a primary number, a simple string or a
|
|
855
|
-
* object for a composite key.
|
|
856
|
-
*
|
|
857
|
-
* Simply to prevent type declarations of 'number | string | Object' for BO ID data all over the application.
|
|
858
|
-
*/
|
|
859
|
-
class BusinessObject {
|
|
860
|
-
constructor() {
|
|
861
|
-
}
|
|
862
|
-
// Overridable. Returns the ID of the model. Concrete model classes often override this method to provide their specific ID getter.
|
|
863
|
-
getId() {
|
|
864
|
-
return this.id;
|
|
865
|
-
}
|
|
866
|
-
setOwnMappedPropsFromRawData(rawData = {}) {
|
|
867
|
-
if (!rawData) {
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
Object.keys(this).forEach((key) => {
|
|
871
|
-
// check if property needs to be mapped
|
|
872
|
-
if (MapPropertyDecorator.IsMapProperty(this, key)) {
|
|
873
|
-
const mapKeys = MapPropertyDecorator.GetMapProperty(this, key).split(",");
|
|
874
|
-
const len = mapKeys.length;
|
|
875
|
-
for (let i = 0; i < len; i++) {
|
|
876
|
-
// eslint-disable-next-line
|
|
877
|
-
const mapKey = mapKeys[i].trim();
|
|
878
|
-
const objProp = rawData[mapKey];
|
|
879
|
-
let decorated = false;
|
|
880
|
-
if (rawData.hasOwnProperty(mapKey)) {
|
|
881
|
-
if (BooleanTextDecorator$1.IsBooleanTextField(this, key)) {
|
|
882
|
-
this[key] = BooleanTextDecorator$1.GetLogicalBooleanValue(objProp);
|
|
883
|
-
decorated = true;
|
|
884
|
-
}
|
|
885
|
-
if (JsonFieldFieldDecorator.IsJsonField(this, key)) {
|
|
886
|
-
this[key] = JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
887
|
-
decorated = true;
|
|
888
|
-
}
|
|
889
|
-
if (ComplexArrayDecorator$1.IsComplexArray(this, key)) {
|
|
890
|
-
const arrayClass = ComplexArrayDecorator$1.GetComplexArrayType(this, key);
|
|
891
|
-
// eslint-disable-next-line
|
|
892
|
-
const origArray = this[key];
|
|
893
|
-
// eslint-disable-next-line
|
|
894
|
-
const newArray = [];
|
|
895
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
896
|
-
for (let j = 0; j < origArray.length; j++) {
|
|
897
|
-
// eslint-disable-next-line
|
|
898
|
-
const item = new arrayClass(origArray[j]);
|
|
899
|
-
newArray.push(item);
|
|
900
|
-
}
|
|
901
|
-
this[key] = newArray;
|
|
902
|
-
}
|
|
903
|
-
else {
|
|
904
|
-
if (!decorated) {
|
|
905
|
-
this[key] = objProp;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
break;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
913
|
-
if (rawData.hasOwnProperty(key)) {
|
|
914
|
-
const objProp = rawData[key];
|
|
915
|
-
if (BooleanTextDecorator$1.IsBooleanTextField(this, key)) {
|
|
916
|
-
this[key] = BooleanTextDecorator$1.GetLogicalBooleanValue(objProp);
|
|
917
|
-
}
|
|
918
|
-
else if (JsonFieldFieldDecorator.IsJsonField(this, key)) {
|
|
919
|
-
this[key] = JsonFieldFieldDecorator.StringAsJson(objProp);
|
|
920
|
-
}
|
|
921
|
-
else {
|
|
922
|
-
this[key] = objProp;
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
// Factory service creates businessobjects, using their decorators in the process.
|
|
931
|
-
class BusinessObjectFactory {
|
|
932
|
-
constructor() {
|
|
933
|
-
}
|
|
934
|
-
/**
|
|
935
|
-
* Creates and returns a new business data object instance of given class, with all given data properties applied to it in a
|
|
936
|
-
* complex-aware style. That is, all properties on given class that are decorated with @ComplexField(..) or @ComplexArray(..) decorators
|
|
937
|
-
* become strongly typed business objects, with methods that are usable and such.
|
|
938
|
-
*
|
|
939
|
-
* @param modelClass
|
|
940
|
-
* @param {Object} rawData The object with all (possibly raw/flat/not alive) data to be applied to the created model object
|
|
941
|
-
*/
|
|
942
|
-
makeWithRawBackendData(modelClass, rawData) {
|
|
943
|
-
if (!modelClass) {
|
|
944
|
-
return undefined;
|
|
945
|
-
}
|
|
946
|
-
if (typeof modelClass !== typeof BusinessObject) {
|
|
947
|
-
return undefined;
|
|
948
|
-
}
|
|
949
|
-
const model = new modelClass();
|
|
950
|
-
this._copyAllPropertiesDecoratorProcessedFrom(rawData, model);
|
|
951
|
-
return model;
|
|
952
|
-
}
|
|
953
|
-
// see makeWithRawBackendData, this is a loop-wrapper around that method
|
|
954
|
-
makeBOArrayFromRawBackendDataArray(modelClass, arrayOfRawDatas) {
|
|
955
|
-
if (!modelClass) {
|
|
956
|
-
return undefined;
|
|
957
|
-
}
|
|
958
|
-
const trueClientBos = [];
|
|
959
|
-
if (arrayOfRawDatas) {
|
|
960
|
-
for (let i = 0, len = arrayOfRawDatas.length; i < len; i++) {
|
|
961
|
-
trueClientBos.push(this.makeWithRawBackendData(modelClass, arrayOfRawDatas[i]));
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
return trueClientBos;
|
|
965
|
-
}
|
|
966
|
-
instantiateNewBo(modelClass) {
|
|
967
|
-
return this.makeWithRawBackendData(modelClass, {});
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* Applies all properties of given 'source' object to the given 'destination' businessobject, if destination has that property.
|
|
971
|
-
* Works with the @ComplexField(), @ComplexArray, @BooleanText, @CoInject and @DateField annotations of given destination model.
|
|
972
|
-
*
|
|
973
|
-
* @param sourceData Raw data to copy to destination model
|
|
974
|
-
* @param {BusinessObject} destinationModel InOut: The annotated businessobject to apply source properties to
|
|
975
|
-
*/
|
|
976
|
-
_copyAllPropertiesDecoratorProcessedFrom(sourceData, destinationModel) {
|
|
977
|
-
if (!sourceData || !destinationModel) {
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
// process all source data into destinationModel
|
|
981
|
-
for (const srcPropKey in sourceData) {
|
|
982
|
-
if (!sourceData.hasOwnProperty(srcPropKey)) {
|
|
983
|
-
continue;
|
|
984
|
-
}
|
|
985
|
-
const srcPropVal = sourceData[srcPropKey];
|
|
986
|
-
if (ComplexFieldDecorator.IsComplexField(destinationModel, srcPropKey)) {
|
|
987
|
-
const classOfField = ComplexFieldDecorator.GetComplexFieldType(destinationModel, srcPropKey);
|
|
988
|
-
destinationModel[srcPropKey] = this.makeWithRawBackendData(classOfField, srcPropVal);
|
|
989
|
-
}
|
|
990
|
-
else if (ComplexArrayDecorator.IsComplexArray(destinationModel, srcPropKey)) {
|
|
991
|
-
const sourceArray = srcPropVal;
|
|
992
|
-
if (!sourceArray) {
|
|
993
|
-
continue;
|
|
994
|
-
}
|
|
995
|
-
const classOfArrayItems = ComplexArrayDecorator.GetComplexArrayType(destinationModel, srcPropKey);
|
|
996
|
-
const tempArray = [];
|
|
997
|
-
for (let i = 0, len = sourceArray.length; i < len; i++) {
|
|
998
|
-
tempArray.push(this.makeWithRawBackendData(classOfArrayItems, sourceArray[i]));
|
|
999
|
-
}
|
|
1000
|
-
destinationModel[srcPropKey] = tempArray;
|
|
1001
|
-
}
|
|
1002
|
-
else if (BooleanTextDecorator.IsBooleanTextField(destinationModel, srcPropKey)) {
|
|
1003
|
-
// logical 'true' and 'false' also allowed as incoming values for @BooleanText() properties: then just copy their value
|
|
1004
|
-
if (typeof srcPropVal === "boolean") {
|
|
1005
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
1006
|
-
// here, it should be a 'J' or 'N' (or 'T' or 'F'): assign the associated boolean value
|
|
1007
|
-
}
|
|
1008
|
-
else {
|
|
1009
|
-
destinationModel[srcPropKey] = BooleanTextDecorator.GetLogicalBooleanValue(srcPropVal);
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
else if (DateFieldFieldDecorator.IsDateField(destinationModel, srcPropKey)) {
|
|
1013
|
-
destinationModel[srcPropKey] = DateFieldFieldDecorator.StringAsDate(srcPropVal);
|
|
1014
|
-
}
|
|
1015
|
-
else if (StringNumberDecorator.IsStringNumber(destinationModel, srcPropKey)) {
|
|
1016
|
-
destinationModel[srcPropKey] = StringNumberDecorator.StringAsNumber(srcPropVal);
|
|
1017
|
-
}
|
|
1018
|
-
// non-decorated prop
|
|
1019
|
-
else {
|
|
1020
|
-
if (isNill(srcPropVal)) {
|
|
1021
|
-
destinationModel[srcPropKey] = undefined;
|
|
1022
|
-
}
|
|
1023
|
-
else if (Array.isArray(srcPropVal)) {
|
|
1024
|
-
destinationModel[srcPropKey] = ArrayUtils.CloneArray(srcPropVal);
|
|
1025
|
-
}
|
|
1026
|
-
else if (typeof srcPropVal === "object") {
|
|
1027
|
-
if (srcPropVal instanceof Map) { //just copy the value in case of maps
|
|
1028
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
1029
|
-
}
|
|
1030
|
-
else {
|
|
1031
|
-
destinationModel[srcPropKey] = Object.assign({}, srcPropVal);
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
else {
|
|
1035
|
-
destinationModel[srcPropKey] = srcPropVal;
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
class IoneConnectorAdapterService {
|
|
1043
|
-
constructor() {
|
|
1044
|
-
this._boFactory = new BusinessObjectFactory();
|
|
1045
|
-
}
|
|
1046
|
-
connect(options) {
|
|
1047
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1048
|
-
if (this.options === undefined) {
|
|
1049
|
-
this.options = options;
|
|
1050
|
-
this.connector = new Articles(options);
|
|
1051
|
-
this.sharedConnector = new Sharedapi(options);
|
|
1052
|
-
this.options.session = this.connector.session && this.sharedConnector.session;
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
disconnect() {
|
|
1057
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1058
|
-
this.options = undefined;
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
getAllPrinters(showAll = true) {
|
|
1062
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1063
|
-
return new Promise((resolve, reject) => {
|
|
1064
|
-
return this.sharedConnector.getAllPrinters(showAll).then((result) => {
|
|
1065
|
-
if (result.validationResult && result.validationResult.success) {
|
|
1066
|
-
if (result.resultObject) {
|
|
1067
|
-
resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(Printer, result.resultObject));
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
else {
|
|
1071
|
-
reject(result.validationMessagesAsString);
|
|
1072
|
-
}
|
|
1073
|
-
});
|
|
1074
|
-
});
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
getPrintStockStickers(request) {
|
|
1078
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1079
|
-
return new Promise((resolve, reject) => {
|
|
1080
|
-
return this.sharedConnector.getPrintStockStickers(request).then((result) => {
|
|
1081
|
-
if (result.validationResult && result.validationResult.success) {
|
|
1082
|
-
if (result.resultObject) {
|
|
1083
|
-
resolve(this._boFactory.makeWithRawBackendData(PrintStockStickers, result.resultObject));
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
else {
|
|
1087
|
-
reject(result.validationMessagesAsString);
|
|
1088
|
-
}
|
|
1089
|
-
});
|
|
1090
|
-
});
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
getArticleFullObject(goodId) {
|
|
1094
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1095
|
-
return new Promise((resolve, reject) => {
|
|
1096
|
-
return this.connector.getArticleFullObject(goodId).then((result) => {
|
|
1097
|
-
// if (result.validationResult && result.validationResult.success) {
|
|
1098
|
-
// if (result.resultObject) {
|
|
1099
|
-
// resolve(this._boFactory.makeWithRawBackendData(ArticleExtended, result.resultObject));
|
|
1100
|
-
// }
|
|
1101
|
-
// } else {
|
|
1102
|
-
// reject(result.validationMessagesAsString);
|
|
1103
|
-
// }
|
|
1104
|
-
});
|
|
1105
|
-
});
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
getArticleFlatObject(goodId) {
|
|
1109
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1110
|
-
return new Promise((resolve, reject) => {
|
|
1111
|
-
return this.connector.getArticleFullObject(goodId).then((result) => {
|
|
1112
|
-
if (result.validationResult && result.validationResult.success) {
|
|
1113
|
-
if (result.resultObject) {
|
|
1114
|
-
resolve(this._boFactory.makeWithRawBackendData(ArticleFlat, result.resultObject));
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
else {
|
|
1118
|
-
reject(result.validationMessagesAsString);
|
|
1119
|
-
}
|
|
1120
|
-
});
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
getWarehouses(goodId) {
|
|
1125
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1126
|
-
return new Promise((resolve, reject) => {
|
|
1127
|
-
return this.connector.getWarehouses(goodId).then((result) => {
|
|
1128
|
-
if (result.validationResult && result.validationResult.success) {
|
|
1129
|
-
if (result.resultObject) {
|
|
1130
|
-
resolve(this._boFactory.makeWithRawBackendData(ArticlesPublic, result.resultObject));
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
else {
|
|
1134
|
-
reject(result.validationMessagesAsString);
|
|
1135
|
-
}
|
|
1136
|
-
});
|
|
1137
|
-
});
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
IoneConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IoneConnectorAdapterService_Factory() { return new IoneConnectorAdapterService(); }, token: IoneConnectorAdapterService, providedIn: "root" });
|
|
1142
|
-
IoneConnectorAdapterService.decorators = [
|
|
1143
|
-
{ type: Injectable, args: [{
|
|
1144
|
-
providedIn: "root"
|
|
1145
|
-
},] }
|
|
1146
|
-
];
|
|
1147
|
-
IoneConnectorAdapterService.ctorParameters = () => [];
|
|
1148
|
-
|
|
1149
|
-
class StockService {
|
|
1150
|
-
constructor(_connector) {
|
|
1151
|
-
this._connector = _connector;
|
|
1152
|
-
}
|
|
1153
|
-
connectConnector(options) {
|
|
1154
|
-
this._connector.connect(options);
|
|
1155
|
-
}
|
|
1156
|
-
getPrintStockStickers(data) {
|
|
1157
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1158
|
-
yield this._connector.getPrintStockStickers(data);
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
getAllPrinters(showAll = true) {
|
|
1162
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1163
|
-
return yield this._connector.getAllPrinters(showAll);
|
|
1164
|
-
});
|
|
1165
|
-
}
|
|
1166
|
-
loadStockLocations(goodId) {
|
|
1167
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1168
|
-
return yield this._connector.getArticleFlatObject(goodId);
|
|
1169
|
-
});
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
StockService.decorators = [
|
|
1173
|
-
{ type: Injectable }
|
|
1174
|
-
];
|
|
1175
|
-
StockService.ctorParameters = () => [
|
|
1176
|
-
{ type: IoneConnectorAdapterService }
|
|
1177
|
-
];
|
|
1178
|
-
|
|
1179
|
-
class StockComponent {
|
|
1180
|
-
constructor(stockService) {
|
|
1181
|
-
this.stockService = stockService;
|
|
1182
|
-
this.handleStickerClicked = new EventEmitter();
|
|
1183
|
-
this.showStockInformationGrid = true;
|
|
1184
|
-
this.showStockLocation = false;
|
|
1185
|
-
this.showStockTransfer = false;
|
|
1186
|
-
}
|
|
1187
|
-
set options(value) {
|
|
1188
|
-
this.stockService.connectConnector(value);
|
|
1189
|
-
}
|
|
1190
|
-
showClass() {
|
|
1191
|
-
return true;
|
|
1192
|
-
}
|
|
1193
|
-
backToStockLinesClicked() {
|
|
1194
|
-
this.showStockLocation = false;
|
|
1195
|
-
this.showStockInformationGrid = true;
|
|
1196
|
-
}
|
|
1197
|
-
handleStockTransferClick(event) {
|
|
1198
|
-
this.showStockTransfer = !this.showStockTransfer;
|
|
1199
|
-
this.showStockInformationGrid = !this.showStockInformationGrid;
|
|
1200
|
-
this.stockService.stockStickers = new PrintStockStickers();
|
|
1201
|
-
}
|
|
1202
|
-
backToStock() {
|
|
1203
|
-
this.showStockTransfer = !this.showStockTransfer;
|
|
1204
|
-
this.showStockInformationGrid = !this.showStockInformationGrid;
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
StockComponent.decorators = [
|
|
1208
|
-
{ type: Component, args: [{
|
|
1209
|
-
selector: "co-stock",
|
|
1210
|
-
template: `
|
|
1211
|
-
<div class="stock-info-container">
|
|
1212
|
-
<co-stock-information [article]="articleExtended"></co-stock-information>
|
|
1213
|
-
<hr>
|
|
1214
|
-
<co-stock-information-grid *ngIf="showStockInformationGrid" (transferIconClicked)="handleStockTransferClick($event)"></co-stock-information-grid>
|
|
1215
|
-
<co-stock-location *ngIf="showStockLocation" (backToStockLines)="backToStockLinesClicked()"></co-stock-location>
|
|
1216
|
-
<co-stock-transfer *ngIf="showStockTransfer"
|
|
1217
|
-
(handleCancelClicked)="backToStock()"
|
|
1218
|
-
[article]="articleExtended"
|
|
1219
|
-
[stockSticker]="stockService.stockStickers"
|
|
1220
|
-
(handleStickerClicked)="handleStickerClicked.emit($event)"
|
|
1221
|
-
[articleWarehouse]="articleWarehouse"
|
|
1222
|
-
[allWarehouses]="allWarehouses"
|
|
1223
|
-
>
|
|
1224
|
-
</co-stock-transfer>
|
|
1225
|
-
</div>
|
|
1226
|
-
`,
|
|
1227
|
-
encapsulation: ViewEncapsulation.None
|
|
1228
|
-
},] }
|
|
1229
|
-
];
|
|
1230
|
-
StockComponent.ctorParameters = () => [
|
|
1231
|
-
{ type: StockService }
|
|
1232
|
-
];
|
|
1233
|
-
StockComponent.propDecorators = {
|
|
1234
|
-
stock: [{ type: ViewChild, args: [StockComponent,] }],
|
|
1235
|
-
handleStickerClicked: [{ type: Output }],
|
|
1236
|
-
options: [{ type: Input }],
|
|
1237
|
-
articleExtended: [{ type: Input }],
|
|
1238
|
-
articleWarehouse: [{ type: Input }],
|
|
1239
|
-
allWarehouses: [{ type: Input }],
|
|
1240
|
-
showClass: [{ type: HostBinding, args: ["class.co-stock",] }]
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
class StockInformationComponent {
|
|
1244
|
-
constructor() {
|
|
1245
|
-
this.stockStatus = "medium";
|
|
1246
|
-
this.show = false;
|
|
1247
|
-
this.hideOrShowLocationTab = false;
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
StockInformationComponent.decorators = [
|
|
1251
|
-
{ type: Component, args: [{
|
|
1252
|
-
selector: "co-stock-information",
|
|
1253
|
-
template: `
|
|
1254
|
-
<div class="stock-info">
|
|
1255
|
-
<div class="stock-info-row">
|
|
1256
|
-
<div class="stock-info-row-image">
|
|
1257
|
-
<div class="stock-image">
|
|
1258
|
-
<co-image class="stock-image" [source]="article?.imageData"></co-image>
|
|
1259
|
-
</div>
|
|
1260
|
-
</div>
|
|
1261
|
-
<div class="stock-good-info">
|
|
1262
|
-
<div>
|
|
1263
|
-
<span [textContent]="article?.name"></span>
|
|
1264
|
-
</div>
|
|
1265
|
-
<div>
|
|
1266
|
-
<span [textContent]="article?.articleNumber"></span>
|
|
1267
|
-
</div>
|
|
1268
|
-
</div>
|
|
1269
|
-
</div>
|
|
1270
|
-
<div class="stock-status">
|
|
1271
|
-
<label [textContent]="article?.stockStatus"></label>
|
|
1272
|
-
</div>
|
|
1273
|
-
<div class="stock-status">
|
|
1274
|
-
<label [textContent]="'STOCK'"></label>
|
|
1275
|
-
<span></span>
|
|
1276
|
-
</div>
|
|
1277
|
-
<div class="stock-status">
|
|
1278
|
-
<label [textContent]="article?.stockAvailable"></label>
|
|
1279
|
-
<span>totalAmountAvailable</span>
|
|
1280
|
-
</div>
|
|
1281
|
-
<div class="stock-status">
|
|
1282
|
-
<label [textContent]="'ECONOMICAL_STOCK'"></label>
|
|
1283
|
-
<span></span>
|
|
1284
|
-
</div>
|
|
1285
|
-
<div class="stock-status">
|
|
1286
|
-
<label [textContent]="'PHYSICAL_STOCK'"></label>
|
|
1287
|
-
<span></span>
|
|
1288
|
-
</div>
|
|
1289
|
-
</div>
|
|
1290
|
-
`,
|
|
1291
|
-
encapsulation: ViewEncapsulation.None
|
|
1292
|
-
},] }
|
|
1293
|
-
];
|
|
1294
|
-
StockInformationComponent.ctorParameters = () => [];
|
|
1295
|
-
StockInformationComponent.propDecorators = {
|
|
1296
|
-
article: [{ type: Input }]
|
|
1297
|
-
};
|
|
1298
|
-
|
|
1299
|
-
class StockInformationGridComponent {
|
|
1300
|
-
constructor(_stockService) {
|
|
1301
|
-
this._stockService = _stockService;
|
|
1302
|
-
this.locationLineClicked = new EventEmitter();
|
|
1303
|
-
this.transferIconClicked = new EventEmitter();
|
|
1304
|
-
this.MAX_GRID_ROWS = 10;
|
|
1305
|
-
this.stockStatus = "medium";
|
|
1306
|
-
this.show = false;
|
|
1307
|
-
this.hideOrShowLocationTab = false;
|
|
1308
|
-
this.showStockHistory = false;
|
|
1309
|
-
this.data = [
|
|
1310
|
-
{ test: "test" }
|
|
1311
|
-
];
|
|
1312
|
-
this.stockInformation = [
|
|
1313
|
-
{ warehouseNumber: "1", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "test" },
|
|
1314
|
-
{ warehouseNumber: "2", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Test nummer 2" },
|
|
1315
|
-
{ warehouseNumber: "3", warehouseDescription: "Colijn IT Warehouse", amountInStock: "17", amountAvailable: "13", amountLaterAvailable: "4", location: "Amundsenweg" },
|
|
1316
|
-
];
|
|
1317
|
-
this.stockLocationInformation = [
|
|
1318
|
-
{ location: "title 1", batch: "1", serialNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1" },
|
|
1319
|
-
{ location: "title 2", amountInStock: "2" },
|
|
1320
|
-
{ location: "title 3", amountInStock: "3" },
|
|
1321
|
-
{ location: "title 4", amountInStock: "4" },
|
|
1322
|
-
{ location: "title 5", amountInStock: "5" },
|
|
1323
|
-
];
|
|
1324
|
-
this.inOrderInformation = [
|
|
1325
|
-
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1326
|
-
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1327
|
-
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1328
|
-
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1329
|
-
{ inOrder: "275432", customer: "Test customer", orderDate: "date", orderAmount: "2", warehouseNumber: "8", warehouseDescription: "A nice warehouse", amountInStock: "17", commission: "4014321" },
|
|
1330
|
-
];
|
|
1331
|
-
this.stockHistoryInformation = [];
|
|
1332
|
-
this.orderInformation = [];
|
|
1333
|
-
this.stockColumns = [];
|
|
1334
|
-
this.stockLocationColumns = [];
|
|
1335
|
-
this.inOrderColumns = [];
|
|
1336
|
-
this.orderColumns = [];
|
|
1337
|
-
this.hideOrShowTabs = true;
|
|
1338
|
-
this.dataWareHouseCode = 0;
|
|
1339
|
-
this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNumber" };
|
|
1340
|
-
this.tabs = [
|
|
1341
|
-
"STOCK",
|
|
1342
|
-
"IN_ORDER2",
|
|
1343
|
-
"ORDERS1"
|
|
1344
|
-
];
|
|
1345
|
-
this.activeTab = this.tabs[0];
|
|
1346
|
-
}
|
|
1347
|
-
get activeTabText() {
|
|
1348
|
-
switch (this.activeTab) {
|
|
1349
|
-
case this.tabs[0]:
|
|
1350
|
-
return "Voorraadregels";
|
|
1351
|
-
case this.tabs[1]:
|
|
1352
|
-
return "Gevonden in order(s)";
|
|
1353
|
-
case this.tabs[2]:
|
|
1354
|
-
return "Gevonden in bestellingen";
|
|
1355
|
-
default:
|
|
1356
|
-
return "Voorraadlocatie regels";
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
handleTabClick(tabData) {
|
|
1360
|
-
this.activeTab = tabData;
|
|
1361
|
-
}
|
|
1362
|
-
onLocationClick(event) {
|
|
1363
|
-
// this.locationLineClicked.emit(event[0].location);
|
|
1364
|
-
this.hideOrShowTabs = false;
|
|
1365
|
-
this.hideOrShowLocationTab = true;
|
|
1366
|
-
}
|
|
1367
|
-
onRowClick(args) {
|
|
1368
|
-
}
|
|
1369
|
-
onPopupClose() {
|
|
1370
|
-
this.show = false;
|
|
1371
|
-
}
|
|
1372
|
-
handleHistoryClick() {
|
|
1373
|
-
this.showStockHistory = true;
|
|
1374
|
-
}
|
|
1375
|
-
handleCloseClick() {
|
|
1376
|
-
this.onPopupClose();
|
|
1377
|
-
}
|
|
1378
|
-
handleStockTransferClick(event) {
|
|
1379
|
-
this.transferIconClicked.emit(event);
|
|
1380
|
-
}
|
|
1381
|
-
handleBackToStockClick() {
|
|
1382
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1383
|
-
this.activeTab = this.tabs[0];
|
|
1384
|
-
this.hideOrShowTabs = true;
|
|
1385
|
-
this.hideOrShowLocationTab = false;
|
|
1386
|
-
});
|
|
1387
|
-
}
|
|
1388
|
-
handleStickerClick() {
|
|
1389
|
-
}
|
|
1390
|
-
handleTransferClick() {
|
|
1391
|
-
}
|
|
1392
|
-
onOkClick() {
|
|
1393
|
-
}
|
|
1394
|
-
onCancelClick() {
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
StockInformationGridComponent.decorators = [
|
|
1398
|
-
{ type: Component, args: [{
|
|
1399
|
-
selector: "co-stock-information-grid",
|
|
1400
|
-
template: `
|
|
1401
|
-
<div class="tab-link show" *ngIf="hideOrShowTabs">
|
|
1402
|
-
<span class="tab-link-buttons"
|
|
1403
|
-
*ngFor="let tab of tabs"
|
|
1404
|
-
(click)="handleTabClick(tab)"
|
|
1405
|
-
[textContent]="tab"
|
|
1406
|
-
[class.active]="tab === activeTab"
|
|
1407
|
-
></span>
|
|
1408
|
-
</div>
|
|
1409
|
-
|
|
1410
|
-
<div class="stock-line">
|
|
1411
|
-
<div [textContent]="activeTabText"></div>
|
|
1412
|
-
|
|
1413
|
-
</div>
|
|
1414
|
-
|
|
1415
|
-
<div class="stock-grid">
|
|
1416
|
-
<co-simple-grid *ngIf="activeTab === tabs[0] && hideOrShowTabs"
|
|
1417
|
-
[data]="stockInformation"
|
|
1418
|
-
>
|
|
1419
|
-
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNumber'"></co-simple-grid-column>
|
|
1420
|
-
<co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseDescription'"></co-simple-grid-column>
|
|
1421
|
-
<co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
|
|
1422
|
-
<co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
|
|
1423
|
-
<co-simple-grid-column [headerText]="'ECONOMICAL_STOCK'" [field]="'amountLaterAvailable'"></co-simple-grid-column>
|
|
1424
|
-
<co-simple-grid-column [headerText]="'LOCATION'" [field]="'location'">
|
|
1425
|
-
<ng-template let-row="row">
|
|
1426
|
-
<a [textContent]="'bekijken'" (click)="onLocationClick($event)"></a>
|
|
1427
|
-
</ng-template>
|
|
1428
|
-
</co-simple-grid-column>
|
|
1429
|
-
</co-simple-grid>
|
|
1430
|
-
|
|
1431
|
-
<co-simple-grid *ngIf="activeTab === tabs[1]"
|
|
1432
|
-
[data]="inOrderInformation"
|
|
1433
|
-
>
|
|
1434
|
-
<co-simple-grid-column [headerText]="'IN_ORDER2'" [field]="'inOrder'"></co-simple-grid-column>
|
|
1435
|
-
<co-simple-grid-column [headerText]="'CUSTOMER'" [field]="'customer'"></co-simple-grid-column>
|
|
1436
|
-
<co-simple-grid-column [headerText]="'DATE'" [field]="'orderDate'"></co-simple-grid-column>
|
|
1437
|
-
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'orderAmount'"></co-simple-grid-column>
|
|
1438
|
-
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'warehouseNumber'"></co-simple-grid-column>
|
|
1439
|
-
<co-simple-grid-column [headerText]="'DESCRIPTION'" [field]="'warehouseDescription'"></co-simple-grid-column>
|
|
1440
|
-
<co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
|
|
1441
|
-
<co-simple-grid-column [headerText]="'COMMISSION2'" [field]="'commission'"></co-simple-grid-column>
|
|
1442
|
-
<co-simple-grid-column [headerText]="'TRANSFER'" [field]="'transfer'">
|
|
1443
|
-
<ng-template let-row="row">
|
|
1444
|
-
|
|
1445
|
-
</ng-template>
|
|
1446
|
-
</co-simple-grid-column>
|
|
1447
|
-
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1448
|
-
<ng-template let-row="row">
|
|
1449
|
-
|
|
1450
|
-
</ng-template>
|
|
1451
|
-
</co-simple-grid-column>
|
|
1452
|
-
</co-simple-grid>
|
|
1453
|
-
|
|
1454
|
-
<co-simple-grid *ngIf="activeTab === tabs[2]"
|
|
1455
|
-
[data]="orderInformation"
|
|
1456
|
-
>
|
|
1457
|
-
<co-simple-grid-column [headerText]="'PURCHASE_ORDER_NR'" [field]="'purchaseOrderNo'"></co-simple-grid-column>
|
|
1458
|
-
<co-simple-grid-column [headerText]="'DATE'" [field]="'orderDate'"></co-simple-grid-column>
|
|
1459
|
-
<co-simple-grid-column [headerText]="'AMOUNT'" [field]="'orderAmount'"></co-simple-grid-column>
|
|
1460
|
-
<co-simple-grid-column [headerText]="'RESERVED'" [field]="'reserved'"></co-simple-grid-column>
|
|
1461
|
-
<co-simple-grid-column [headerText]="'FREE_STOCK'" [field]="'freeStock'"></co-simple-grid-column>
|
|
1462
|
-
<co-simple-grid-column [headerText]="'DELIVERY_DATE1'" [field]="'deliveryDate'"></co-simple-grid-column>
|
|
1463
|
-
<co-simple-grid-column [headerText]="'RESERVE'" [field]="'reservation'"></co-simple-grid-column>
|
|
1464
|
-
</co-simple-grid>
|
|
1465
|
-
</div>
|
|
1466
|
-
|
|
1467
|
-
<div class="stock-grid" *ngIf="hideOrShowLocationTab">
|
|
1468
|
-
<div class="stock-location-group">
|
|
1469
|
-
<div class="stock-location-left-group">
|
|
1470
|
-
<span class="stock-button-back" [textContent]="'BACK_TO_STOCK_LINES'" (click)="handleBackToStockClick()"></span>
|
|
1471
|
-
</div>
|
|
1472
|
-
<div class="stock-location-right-group">
|
|
1473
|
-
<co-input-combo-box [(model)]="dataWareHouseCode"
|
|
1474
|
-
[fields]="dataWareHouseFields"
|
|
1475
|
-
[placeholder]="'WAREHOUSE'"
|
|
1476
|
-
[required]="true"
|
|
1477
|
-
></co-input-combo-box>
|
|
1478
|
-
</div>
|
|
1479
|
-
</div>
|
|
1480
|
-
|
|
1481
|
-
<co-simple-grid [data]="stockLocationInformation"
|
|
1482
|
-
>
|
|
1483
|
-
<div class="stock-location-group">
|
|
1484
|
-
<div class="stock-location-left-group">
|
|
1485
|
-
<co-button class="stock-lines-button" [textContent]="'BACK_TO_STOCK_LINES'" (click)="handleBackToStockClick()"></co-button>
|
|
1486
|
-
</div>
|
|
1487
|
-
</div>
|
|
1488
|
-
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'location'"></co-simple-grid-column>
|
|
1489
|
-
<co-simple-grid-column [headerText]="'BATCH'" [field]="'batch'"></co-simple-grid-column>
|
|
1490
|
-
<co-simple-grid-column [headerText]="'SERIAL_NO'" [field]="'serialNo'"></co-simple-grid-column>
|
|
1491
|
-
<co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
|
|
1492
|
-
<co-simple-grid-column [headerText]="'ALLOCATED'" [field]="'allocated'"></co-simple-grid-column>
|
|
1493
|
-
<co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
|
|
1494
|
-
<co-simple-grid-column [headerText]="'TRANSFER'" [field]="'transfer'">
|
|
1495
|
-
<ng-template let-row="row">
|
|
1496
|
-
<span [textContent]="'Transfer'" (click)="handleStockTransferClick($event)"></span>
|
|
1497
|
-
</ng-template>
|
|
1498
|
-
</co-simple-grid-column>
|
|
1499
|
-
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1500
|
-
<ng-template let-row="row">
|
|
1501
|
-
|
|
1502
|
-
</ng-template>
|
|
1503
|
-
</co-simple-grid-column>
|
|
1504
|
-
</co-simple-grid>
|
|
1505
|
-
</div>
|
|
1506
|
-
|
|
1507
|
-
<div class="stock-grid" *ngIf="showStockHistory">
|
|
1508
|
-
<co-simple-grid [data]="stockHistoryInformation"
|
|
1509
|
-
>
|
|
1510
|
-
<co-simple-grid-column [headerText]="'WAREHOUSE'" [field]="'location'"></co-simple-grid-column>
|
|
1511
|
-
<co-simple-grid-column [headerText]="'BATCH'" [field]="'batch'"></co-simple-grid-column>
|
|
1512
|
-
<co-simple-grid-column [headerText]="'SERIAL_NO'" [field]="'serialNo'"></co-simple-grid-column>
|
|
1513
|
-
<co-simple-grid-column [headerText]="'STOCK'" [field]="'amountInStock'"></co-simple-grid-column>
|
|
1514
|
-
<co-simple-grid-column [headerText]="'ALLOCATED'" [field]="'allocated'"></co-simple-grid-column>
|
|
1515
|
-
<co-simple-grid-column [headerText]="'AVAILABLE_STOCK'" [field]="'amountAvailable'"></co-simple-grid-column>
|
|
1516
|
-
<co-simple-grid-column [headerText]="'STICKER'" [field]="'sticker'">
|
|
1517
|
-
<ng-template let-row="row">
|
|
1518
|
-
|
|
1519
|
-
</ng-template>
|
|
1520
|
-
</co-simple-grid-column>
|
|
1521
|
-
</co-simple-grid>
|
|
1522
|
-
</div>
|
|
1523
|
-
|
|
1524
|
-
<div class="stock-button-toolbar">
|
|
1525
|
-
<div class="stock-button-left-group">
|
|
1526
|
-
<co-button [label]="'HISTORY'" (click)="handleHistoryClick()"></co-button>
|
|
1527
|
-
</div>
|
|
1528
|
-
<div class="stock-button-middle-group">
|
|
1529
|
-
<div class="button-left">
|
|
1530
|
-
<co-button [textContent]="'Ok'" (click)="onOkClick()"></co-button>
|
|
1531
|
-
</div>
|
|
1532
|
-
<div class="button-right">
|
|
1533
|
-
<co-button [textContent]="'Annuleren'" (click)="onCancelClick()"></co-button>
|
|
1534
|
-
</div>
|
|
1535
|
-
</div>
|
|
1536
|
-
</div>
|
|
1537
|
-
`,
|
|
1538
|
-
encapsulation: ViewEncapsulation.None
|
|
1539
|
-
},] }
|
|
1540
|
-
];
|
|
1541
|
-
StockInformationGridComponent.ctorParameters = () => [
|
|
1542
|
-
{ type: StockService }
|
|
1543
|
-
];
|
|
1544
|
-
StockInformationGridComponent.propDecorators = {
|
|
1545
|
-
stock: [{ type: ViewChild, args: [StockInformationGridComponent,] }],
|
|
1546
|
-
locationLineClicked: [{ type: Output }],
|
|
1547
|
-
transferIconClicked: [{ type: Output }]
|
|
1548
|
-
};
|
|
1549
|
-
|
|
1550
|
-
class StockLocationComponent {
|
|
1551
|
-
constructor() {
|
|
1552
|
-
this.backToStockLines = new EventEmitter();
|
|
1553
|
-
this.MAX_GRID_ROWS = 10;
|
|
1554
|
-
this.stockLocationColumns = [];
|
|
1555
|
-
this.stockLocation = [
|
|
1556
|
-
{ location: "title 1", batch: "1", serieNo: "1", amountInStock: "1", allocated: "1", amountAvailable: "1" },
|
|
1557
|
-
{ location: "title 2", amountInStock: "2" },
|
|
1558
|
-
{ location: "title 3", amountInStock: "3" },
|
|
1559
|
-
{ location: "title 4", amountInStock: "4" },
|
|
1560
|
-
{ location: "title 5", amountInStock: "5" },
|
|
1561
|
-
];
|
|
1562
|
-
this.stockLocationColumns.push({ field: "location", headerText: "WAREHOUSE", editType: "none" }, { field: "batch", headerText: "BATCH" }, { field: "serieNo", headerText: "SERIAL_NO" }, { field: "amountInStock", headerText: "STOCK", textAlign: "Right", editType: "numericEdit" }, { field: "allocated", headerText: "ALLOCATED", textAlign: "Right" }, { field: "amountAvailable", headerText: "AVAILABLE_STOCK", textAlign: "Right" }, { field: "PhysicalStock", headerText: "PHYSICAL_STOCK", textAlign: "Right" }, { field: "Valuta", headerText: "VALUTA", textAlign: "Right" }, { field: "PurchasePrice", headerText: "PURSCHASE_PRICE", textAlign: "Right" }, { field: "SupplierNo", headerText: "SUPPLIER_NO", textAlign: "Right" }, { field: "Transfer", headerText: "TRANSFER" }, { field: "sticker", headerText: "STICKER" });
|
|
1563
|
-
}
|
|
1564
|
-
backToStockInformation() {
|
|
1565
|
-
this.backToStockLines.emit();
|
|
1566
|
-
}
|
|
1567
|
-
onStickerClick(event) {
|
|
1568
|
-
console.log('test');
|
|
1569
|
-
}
|
|
1570
|
-
onOkClick() {
|
|
1571
|
-
}
|
|
1572
|
-
onCancelClick() {
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
StockLocationComponent.decorators = [
|
|
1576
|
-
{ type: Component, args: [{
|
|
1577
|
-
selector: "co-stock-location",
|
|
1578
|
-
template: `
|
|
1579
|
-
<div class="stock-location-wrapper">
|
|
1580
|
-
<div class="buttons-wrapper">
|
|
1581
|
-
<div class="stock-button-left-group">
|
|
1582
|
-
<span class="stock-button-back" [textContent]="'BACK_TO_STOCK_LINES'" (click)="backToStockInformation()"></span>
|
|
1583
|
-
</div>
|
|
1584
|
-
<div class="dropdown-wrapper">
|
|
1585
|
-
<co-drop-down-list></co-drop-down-list>
|
|
1586
|
-
</div>
|
|
1587
|
-
</div>
|
|
1588
|
-
|
|
1589
|
-
<div class="stock-grid">
|
|
1590
|
-
|
|
1591
|
-
</div>
|
|
1592
|
-
<div class="button-wrapper">
|
|
1593
|
-
<div class="button-left">
|
|
1594
|
-
<co-button (click)="onOkClick()"></co-button>
|
|
1595
|
-
</div>
|
|
1596
|
-
<div class="button-right">
|
|
1597
|
-
<co-button (click)="onCancelClick()"></co-button>
|
|
1598
|
-
</div>
|
|
1599
|
-
</div>
|
|
1600
|
-
</div>
|
|
1601
|
-
|
|
1602
|
-
`,
|
|
1603
|
-
encapsulation: ViewEncapsulation.None
|
|
1604
|
-
},] }
|
|
1605
|
-
];
|
|
1606
|
-
StockLocationComponent.ctorParameters = () => [];
|
|
1607
|
-
StockLocationComponent.propDecorators = {
|
|
1608
|
-
backToStockLines: [{ type: Output }]
|
|
1609
|
-
};
|
|
1610
|
-
|
|
1611
|
-
class StockTransferComponent {
|
|
1612
|
-
constructor(_stockService) {
|
|
1613
|
-
this._stockService = _stockService;
|
|
1614
|
-
this.handleCancelClicked = new EventEmitter();
|
|
1615
|
-
this.handleStickerClicked = new EventEmitter();
|
|
1616
|
-
this.allWarehousesDropdownFields = { value: "warehouseNo", text: "description" };
|
|
1617
|
-
this.showSendMethodDialog = false;
|
|
1618
|
-
}
|
|
1619
|
-
handleOkClick() {
|
|
1620
|
-
}
|
|
1621
|
-
handleCancelClick() {
|
|
1622
|
-
this.handleCancelClicked.emit();
|
|
1623
|
-
}
|
|
1624
|
-
handleSelectedWarehouse(event) {
|
|
1625
|
-
console.log(event);
|
|
1626
|
-
}
|
|
1627
|
-
handleStickerClick() {
|
|
1628
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1629
|
-
this.handleStickerClicked.emit();
|
|
1630
|
-
this.showSendMethodDialog = true;
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
StockTransferComponent.decorators = [
|
|
1635
|
-
{ type: Component, args: [{
|
|
1636
|
-
selector: "co-stock-transfer",
|
|
1637
|
-
template: `
|
|
1638
|
-
<div class="stock-transfer">
|
|
1639
|
-
<div class="stock-transfer-columns">
|
|
1640
|
-
<div *ngIf="article" class="stock-transfer-left-column">
|
|
1641
|
-
<co-input-text disabled
|
|
1642
|
-
[(model)]="article.standardWareHouse.description"
|
|
1643
|
-
[textContent]="article.standardWareHouse.description"
|
|
1644
|
-
[placeholder]="'Standaard magazijn'">
|
|
1645
|
-
</co-input-text>
|
|
1646
|
-
<co-input-text disabled
|
|
1647
|
-
[(model)]="article.standardLocation"
|
|
1648
|
-
[textContent]="article.standardLocation"
|
|
1649
|
-
[placeholder]="'Standaard locatie'">
|
|
1650
|
-
</co-input-text>
|
|
1651
|
-
<co-input-text disabled
|
|
1652
|
-
[(model)]="stockSticker.batch"
|
|
1653
|
-
[placeholder]="'Batch'">
|
|
1654
|
-
</co-input-text>
|
|
1655
|
-
<co-input-text disabled
|
|
1656
|
-
[(model)]="stockSticker.serial"
|
|
1657
|
-
[placeholder]="'Serie'">
|
|
1658
|
-
</co-input-text>
|
|
1659
|
-
<co-input-text
|
|
1660
|
-
[(model)]="article.amount"
|
|
1661
|
-
[placeholder]="'Aantal'">
|
|
1662
|
-
|
|
1663
|
-
</co-input-text>
|
|
1664
|
-
</div>
|
|
1665
|
-
|
|
1666
|
-
<div class="stock-transfer-right-column">
|
|
1667
|
-
<co-drop-down-list [collection]="allWarehouses"
|
|
1668
|
-
[fields]="allWarehousesDropdownFields"
|
|
1669
|
-
(modelChange)="handleSelectedWarehouse($event)"
|
|
1670
|
-
>
|
|
1671
|
-
</co-drop-down-list>
|
|
1672
|
-
<co-drop-down-list>
|
|
1673
|
-
|
|
1674
|
-
</co-drop-down-list>
|
|
1675
|
-
<co-input-text [placeholder]="'Voorraadstatus'">
|
|
1676
|
-
|
|
1677
|
-
</co-input-text>
|
|
1678
|
-
<co-input-text [placeholder]="'Omschrijving'">
|
|
1679
|
-
|
|
1680
|
-
</co-input-text>
|
|
1681
|
-
</div>
|
|
1682
|
-
</div>
|
|
1683
|
-
|
|
1684
|
-
<div class="ok-cancel-buttons">
|
|
1685
|
-
<co-button [textContent]="'Ok'" (click)="handleOkClick()"></co-button>
|
|
1686
|
-
<co-button [textContent]="'Annuleren'" (click)="handleCancelClick()"></co-button>
|
|
1687
|
-
<co-button [textContent]="'Sticker'" (click)="handleStickerClick()"></co-button>
|
|
1688
|
-
</div>
|
|
1689
|
-
</div>
|
|
1690
|
-
`,
|
|
1691
|
-
encapsulation: ViewEncapsulation.None
|
|
1692
|
-
},] }
|
|
1693
|
-
];
|
|
1694
|
-
StockTransferComponent.ctorParameters = () => [
|
|
1695
|
-
{ type: StockService }
|
|
1696
|
-
];
|
|
1697
|
-
StockTransferComponent.propDecorators = {
|
|
1698
|
-
stockSticker: [{ type: Input }],
|
|
1699
|
-
article: [{ type: Input }],
|
|
1700
|
-
articleWarehouse: [{ type: Input }],
|
|
1701
|
-
allWarehouses: [{ type: Input }],
|
|
1702
|
-
handleCancelClicked: [{ type: Output }],
|
|
1703
|
-
handleStickerClicked: [{ type: Output }]
|
|
1704
|
-
};
|
|
1705
|
-
|
|
1706
|
-
/** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
|
|
1707
|
-
var Icon;
|
|
1708
|
-
(function (Icon) {
|
|
1709
|
-
Icon["ArrowFatRight"] = "arrow_fat_right";
|
|
1710
|
-
Icon["ArrowPointDown"] = "arrow_point_down";
|
|
1711
|
-
Icon["ArrowPointLeft"] = "arrow_point_left";
|
|
1712
|
-
Icon["ArrowPointRight"] = "arrow_point_right";
|
|
1713
|
-
Icon["CalendarDay"] = "calendar_day";
|
|
1714
|
-
Icon["Cancel"] = "cancel";
|
|
1715
|
-
Icon["DeliveryTruck"] = "delivery_truck";
|
|
1716
|
-
Icon["EditPencil"] = "edit_pencil";
|
|
1717
|
-
Icon["Email"] = "email";
|
|
1718
|
-
Icon["Pdf"] = "pdf";
|
|
1719
|
-
Icon["PlusRound"] = "plus_round";
|
|
1720
|
-
Icon["Print"] = "print";
|
|
1721
|
-
Icon["SignatureField"] = "signature_field";
|
|
1722
|
-
Icon["Tag"] = "tag";
|
|
1723
|
-
Icon["ThickLines"] = "thick_lines";
|
|
1724
|
-
Icon["ThinLines"] = "thin_lines";
|
|
1725
|
-
Icon["Txt"] = "txt";
|
|
1726
|
-
Icon["Xml"] = "xml";
|
|
1727
|
-
})(Icon || (Icon = {}));
|
|
1728
|
-
|
|
1729
|
-
/** AUTO GENERATED FILE. DO NOT CHANGE.. OR YOU WILL SUFFER THE CONSEQUENCES OF YOUR ACTIONS **/
|
|
1730
|
-
const IconSvg = {
|
|
1731
|
-
"arrow_fat_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"37.5 25 25.2 12.7 25.2 20.35 12.5 20.35 12.5 29.66 25.2 29.66 25.2 37.3 37.5 25\" fill=\"#484f60\"/></svg>",
|
|
1732
|
-
"arrow_point_down": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-280 371 51 51\" enable-background=\"new -280 371 51 51\" ><path fill=\"#29363E\" d=\"M-248.3,392.2c0.3,0,0.6,0.1,0.8,0.3c0.5,0.5,0.5,1.2,0,1.6l-6.2,6.2c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3l-6.2-6.2c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.6,0.1,0.8,0.3l5.4,5.4l5.4-5.4C-248.9,392.4-248.6,392.2-248.3,392.2z\"/></svg>",
|
|
1733
|
-
"arrow_point_left": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M31.9,36.7l-14.7-9.6C17.1,27,17,26.9,17,26.7v-2.4c0-0.2,0.1-0.3,0.2-0.4l14.7-9.6c0.2-0.2,0.5-0.1,0.7,0.1l1.4,2.1c0.2,0.2,0.1,0.5-0.1,0.7l-12,7.8c-0.3,0.2-0.3,0.6,0,0.8l12,7.8c0.2,0.2,0.3,0.5,0.1,0.7l-1.4,2.1C32.4,36.8,32.1,36.8,31.9,36.7z\"/></svg>",
|
|
1734
|
-
"arrow_point_right": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 51 51\" enable-background=\"new 0 0 51 51\" ><path fill=\"#484F5F\" d=\"M19.1,14.3l14.7,9.6c0.1,0.1,0.2,0.2,0.2,0.4v2.4c0,0.2-0.1,0.3-0.2,0.4l-14.7,9.6c-0.2,0.2-0.5,0.1-0.7-0.1l-1.4-2.1c-0.2-0.2-0.1-0.5,0.1-0.7l12-7.8c0.3-0.2,0.3-0.6,0-0.8l-12-7.8c-0.2-0.2-0.3-0.5-0.1-0.7l1.4-2.1C18.6,14.2,18.9,14.2,19.1,14.3z\"/></svg>",
|
|
1735
|
-
"calendar_day": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path fill=\"#022D42\" d=\"M35.4,13.7H14.6c-0.6,0-1,0.5-1,1V20h22.9v-5.2C36.4,14.2,36,13.7,35.4,13.7z M19,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8c1,0,1.8,0.8,1.8,1.8C20.8,18,20,18.8,19,18.8z M31,18.8c-1,0-1.8-0.8-1.8-1.8c0-1,0.8-1.8,1.8-1.8s1.8,0.8,1.8,1.8C32.7,18,32,18.8,31,18.8z\"/><path fill=\"#022D42\" d=\"M35.4,22.3v12.6L31.3,39H14.6c0,0,0,0,0,0V22.3H35.4 M36.4,21.3H13.6V39c0,0.6,0.5,1,1,1h17.2l4.7-4.7V21.3L36.4,21.3z\"/><rect x=\"18.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"30.2\" y=\"10\" fill=\"#022D42\" width=\"1.6\" height=\"5.2\"/><rect x=\"18.6\" y=\"30.5\" fill=\"#022D42\" width=\"3.4\" height=\"3.4\"/><rect x=\"19.1\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"19.1\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"22.2\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"25.4\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"31.6\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"24.8\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"28.5\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"24.8\" opacity=\"0.1\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"27.9\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"31\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/><rect x=\"16\" y=\"34.1\" opacity=\"0.25\" fill=\"#022D42\" width=\"2.4\" height=\"2.4\"/></g></svg>",
|
|
1736
|
-
"cancel": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"36 35.16 30.45 35.16 14 14.84 19.55 14.84 36 35.16\" fill=\"#484f60\"/><polygon points=\"14 35.16 19.55 35.16 36 14.84 30.45 14.84 14 35.16\" fill=\"#484f60\"/></svg>",
|
|
1737
|
-
"delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"15.35\" y=\"16.56\" width=\"15.14\" height=\"10.94\" transform=\"translate(-1.83 2.08) rotate(-5)\" fill=\"#484f60\"/><path d=\"M38.5,18.1l-6.9.61L32.41,28l-7.63.67a3.76,3.76,0,0,1,1.43,2.25l7.25-.63A3.83,3.83,0,0,1,41,29.6l1-.1-.52-6Zm.29,5.84-3.91.34a.51.51,0,0,1-.55-.46L34,20.1a.49.49,0,0,1,.45-.54l2.27-.2a.5.5,0,0,1,.48.25l2,3.59A.5.5,0,0,1,38.79,23.94Z\" fill=\"#484f60\"/><path d=\"M19.66,29.09a3.8,3.8,0,0,0-1,2.46l-.74.07-1.82-.94L16,29.41Z\" fill=\"#484f60\"/><path d=\"M34.56,30.62a2.74,2.74,0,1,0,2.49-3A2.73,2.73,0,0,0,34.56,30.62Z\" fill=\"#484f60\"/><path d=\"M19.74,31.91a2.74,2.74,0,1,0,2.49-3A2.74,2.74,0,0,0,19.74,31.91Z\" fill=\"#484f60\"/><rect x=\"7.96\" y=\"17.63\" width=\"5\" height=\"1\" transform=\"translate(-1.54 0.98) rotate(-5)\" fill=\"#484f60\"/><rect x=\"11.02\" y=\"29.71\" width=\"3\" height=\"1\" transform=\"translate(-2.59 1.21) rotate(-5)\" fill=\"#484f60\"/><rect x=\"9.48\" y=\"23.53\" width=\"4\" height=\"1\" transform=\"matrix(1, -0.09, 0.09, 1, -2.05, 1.09)\" fill=\"#484f60\"/></svg>",
|
|
1738
|
-
"edit_pencil": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><polygon points=\"12.54 38.16 12 37.62 14.85 29.64 20.52 35.31 12.54 38.16\" fill=\"#484f60\"/><rect x=\"16.33\" y=\"20.52\" width=\"17.99\" height=\"8.64\" transform=\"translate(-10.15 25.18) rotate(-45)\" fill=\"#484f60\"/><path d=\"M37.54,18.73,36,20.32l-6.11-6.1,1.59-1.59a1.55,1.55,0,0,1,2.2,0l3.91,3.9A1.55,1.55,0,0,1,37.54,18.73Z\" fill=\"#484f60\"/></svg>",
|
|
1739
|
-
"email": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.79,38.45A17.82,17.82,0,0,1,23.86,40,13.09,13.09,0,0,1,10.41,26.42C10.41,17.63,16.83,10,26.53,10c7.63,0,13.06,5.21,13.06,12.46,0,6.33-3.53,10.3-8.19,10.3a3.42,3.42,0,0,1-3.71-3.32h-.08A6.5,6.5,0,0,1,22,32.76c-2.75,0-4.82-2.11-4.82-5.65a9.85,9.85,0,0,1,10.13-10,12.89,12.89,0,0,1,5.13,1l-1.3,8c-.43,2.54-.13,3.71,1.08,3.75,1.85.09,4.18-2.28,4.18-7.28,0-5.65-3.62-10-10.3-10S13.73,17.76,13.73,26c0,7.25,4.57,11.3,11,11.3A14.81,14.81,0,0,0,31,36ZM28,20.65a5.34,5.34,0,0,0-1.33-.18c-2.85,0-5.09,2.81-5.09,6.12,0,1.64.73,2.68,2.16,2.68,1.59,0,3.27-2,3.66-4.53Z\" fill=\"#484f60\"/></svg>",
|
|
1740
|
-
"pdf": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.88c-2.16,0-2.72-.56-2.72-2.72V12.88c0-2.15.56-2.71,2.72-2.71h11.6l8.66,8.88v3.43H32.8V19.6l-7.88-8.09h-11c-1.38,0-1.38,0-1.38,1.37V37.45c0,1.37,0,1.37,1.38,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M27.83,26.63v4.24h1a3.57,3.57,0,0,0,.78-.06,1.22,1.22,0,0,0,.52-.26,1.44,1.44,0,0,0,.34-.62,4.13,4.13,0,0,0,.13-1.18,3.79,3.79,0,0,0-.13-1.14,1.51,1.51,0,0,0-.37-.62,1.14,1.14,0,0,0-.6-.3,5.93,5.93,0,0,0-1.06-.06Z\" fill=\"#484f60\"/><path d=\"M21.86,26.63v1.82h.71a3.57,3.57,0,0,0,1-.1A.88.88,0,0,0,24,28a.84.84,0,0,0,.14-.5.8.8,0,0,0-.2-.57.88.88,0,0,0-.52-.29,6.36,6.36,0,0,0-.93,0Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.12,4.24a1.68,1.68,0,0,1-.54.63,1.9,1.9,0,0,1-.67.3,6.57,6.57,0,0,1-1.34.1h-.85V32H20.57V25.54h2.07a7.75,7.75,0,0,1,1.54.1,1.73,1.73,0,0,1,.93.63,2,2,0,0,1,.37,1.25A2,2,0,0,1,25.26,28.51Zm6.45,1.66A2.91,2.91,0,0,1,31,31.31a2.28,2.28,0,0,1-.91.51A4,4,0,0,1,29,32H26.54V25.54H28.9a4.21,4.21,0,0,1,1.22.13,2.08,2.08,0,0,1,1,.59,2.79,2.79,0,0,1,.61,1,4.76,4.76,0,0,1,.21,1.52A4.19,4.19,0,0,1,31.71,30.17Zm5.7-3.54h-3.1v1.52H37v1.08H34.31V32H33V25.54h4.39Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/></svg>",
|
|
1741
|
-
"plus_round": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-288 379 35 35\" enable-background=\"new -288 379 35 35\" ><path fill=\"#29363E\" d=\"M-270.5,381.5c-8.3,0-15,6.7-15,15c0,8.3,6.7,15,15,15s15-6.7,15-15C-255.5,388.2-262.2,381.5-270.5,381.5z M-261.1,397.3c0,0.9-0.7,1.6-1.6,1.6h-5.5v5.5c0,0.9-0.7,1.6-1.6,1.6h-1.6c-0.9,0-1.6-0.7-1.6-1.6v-5.5h-5.5c-0.9,0-1.6-0.7-1.6-1.6v-1.6c0-0.9,0.7-1.6,1.6-1.6h5.5v-5.5c0-0.9,0.7-1.6,1.6-1.6h1.6c0.9,0,1.6,0.7,1.6,1.6v5.5h5.5c0.9,0,1.6,0.7,1.6,1.6V397.3z\"/></svg>",
|
|
1742
|
-
"print": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M38,16.5H12a2,2,0,0,0-2,2v9a2,2,0,0,0,2,2h2v-5H36v5h2a2,2,0,0,0,2-2v-9A2,2,0,0,0,38,16.5ZM37,21a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,37,21Z\" fill=\"#484f60\"/><path d=\"M35,11.5v5H15v-5H35m1-1H14v7H36v-7Z\" fill=\"#484f60\"/><path d=\"M35,25.5v13H15v-13H35m1-1H14v15H36v-15Z\" fill=\"#484f60\"/><rect x=\"17\" y=\"28.3\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"31.5\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/><rect x=\"17\" y=\"34.7\" width=\"16\" height=\"0.8\" fill=\"#484f60\"/></svg>",
|
|
1743
|
-
"signature_field": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M20.1,25.42a1.1,1.1,0,1,1,1.27,1.45l-3.3,9.07A63.13,63.13,0,0,1,28,28.3l1.26-12-8.26-3-6.77,10A62.4,62.4,0,0,1,17,35.54l3.3-9.07A1.12,1.12,0,0,1,20.1,25.42Z\" fill=\"#484f60\"/><rect x=\"21.62\" y=\"11.43\" width=\"8.79\" height=\"2.34\" transform=\"translate(5.88 -8.14) rotate(20)\" fill=\"#484f60\"/><path d=\"M18.11,37.48c1.44,2.65,4.58,2.94,7.23,2.1,1.41-.44,2.2-1.49,3.44-2.06,2.42-1.1,3.13,1.2,5.36,1.37.42,0,2-.65,1.54-.68-2.55-.19-2.93-3.13-5.51-2.65a4.9,4.9,0,0,0-1.64.71c-.77.49-1.31,1.62-2.07,2l-4.61.56A3.38,3.38,0,0,1,20,37c-.22-.41-2,.28-1.85.5Z\" fill=\"#484f60\"/></svg>",
|
|
1744
|
-
"tag": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M40,29.15v-.68a5.28,5.28,0,0,0-1.34-3.25L24.78,11.34A5.34,5.34,0,0,0,21.53,10H11.9A1.91,1.91,0,0,0,10,11.9v9.63a5.28,5.28,0,0,0,1.34,3.25L25.22,38.66A5.28,5.28,0,0,0,28.47,40h.68a5.28,5.28,0,0,0,3.24-1.34l6.27-6.27A5.28,5.28,0,0,0,40,29.15ZM13.13,16.72a2.54,2.54,0,1,1,3.59,0A2.55,2.55,0,0,1,13.13,16.72Zm15.9,19L17.84,24.55l1.34-1.34L30.37,34.4Zm2.69-2.69L20.52,21.87l1.35-1.35,11.19,11.2Zm2.68-2.69L23.21,19.18l1.34-1.34L35.75,29Z\" fill=\"#484f60\"/></svg>",
|
|
1745
|
-
"thick_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"12.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"21.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/><rect x=\"10\" y=\"30.67\" width=\"30\" height=\"7\" fill=\"#484f60\"/></svg>",
|
|
1746
|
-
"thin_lines": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"14.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"20.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"26.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/><rect x=\"10\" y=\"32.17\" width=\"30\" height=\"4\" fill=\"#484f60\"/></svg>",
|
|
1747
|
-
"txt": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.87c-2.15,0-2.71-.56-2.71-2.72V12.88c0-2.15.56-2.71,2.71-2.71H25.48l8.66,8.88v3.43H32.8V19.6l-7.88-8.09H13.87c-1.37,0-1.37,0-1.37,1.37V37.45c0,1.37,0,1.37,1.37,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.68,2.36h-1.9V32h-1.3V26.63h-1.9V25.54h5.1ZM30.4,32,29,29.74,27.55,32H26l2.19-3.34-2-3.07h1.52L29,27.6l1.26-2.06h1.5l-2,3.12L32,32Zm6.86-5.32h-1.9V32H34.07V26.63H32.16V25.54h5.1Z\" fill=\"#484f60\"/></svg>",
|
|
1748
|
-
"xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.87c-2.15,0-2.71-.56-2.71-2.72V12.88c0-2.15.56-2.71,2.71-2.71H25.48l8.66,8.88v3.43H32.8V19.6l-7.88-8.09H13.87c-1.37,0-1.37,0-1.37,1.37V37.45c0,1.37,0,1.37,1.37,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm5.36,7.41-1.3-2-1.3,2H20.48l2-3.06-1.81-2.8h1.38l1.18,1.88,1.15-1.88h1.37l-1.83,2.85,2,3Zm7.67,0h-1.1V27.07l-1.16,4.61H28.77l-1.16-4.61v4.61H26.52V25.82h1.76l1.07,4,1-4h1.77Zm5.33,0H33.38V25.87h1.18v4.82H37.5Z\" fill=\"#484f60\"/></svg>"
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
|
-
class IconCacheService {
|
|
1752
|
-
constructor(_sanitizer) {
|
|
1753
|
-
this._sanitizer = _sanitizer;
|
|
1754
|
-
this._iconCache = {};
|
|
1755
|
-
this.setIconCache();
|
|
1756
|
-
}
|
|
1757
|
-
/**
|
|
1758
|
-
* All the icons as a large JSON object, from the all-icons.json file.
|
|
1759
|
-
* The object has property keys that are the icon names, and property values with the data string of the actual svg icon.
|
|
1760
|
-
*/
|
|
1761
|
-
get iconCache() {
|
|
1762
|
-
return this._iconCache;
|
|
1763
|
-
}
|
|
1764
|
-
getIcon(iconName) {
|
|
1765
|
-
if (iconName) {
|
|
1766
|
-
return this._iconCache[iconName.toLowerCase()];
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
getIconAsBase64(iconName) {
|
|
1770
|
-
const icon = IconSvg[iconName];
|
|
1771
|
-
const base64Data = window.btoa(icon);
|
|
1772
|
-
return this._sanitizer.bypassSecurityTrustUrl(`data:image/svg+xml;base64,${base64Data}`);
|
|
1773
|
-
}
|
|
1774
|
-
getRawIcon(iconName) {
|
|
1775
|
-
if (iconName) {
|
|
1776
|
-
return IconSvg[iconName.toLowerCase()];
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
setIconCache() {
|
|
1780
|
-
for (const key in IconSvg) {
|
|
1781
|
-
if (IconSvg.hasOwnProperty(key) && typeof IconSvg[key] !== "function") {
|
|
1782
|
-
this._iconCache[key.toLowerCase()] = this._sanitizer.bypassSecurityTrustHtml(IconSvg[key]);
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
IconCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(i0.ɵɵinject(i1.DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
|
|
1788
|
-
IconCacheService.decorators = [
|
|
1789
|
-
{ type: Injectable, args: [{
|
|
1790
|
-
providedIn: "root"
|
|
1791
|
-
},] }
|
|
1792
|
-
];
|
|
1793
|
-
IconCacheService.ctorParameters = () => [
|
|
1794
|
-
{ type: DomSanitizer }
|
|
1795
|
-
];
|
|
1796
|
-
|
|
1797
|
-
var SendOption;
|
|
1798
|
-
(function (SendOption) {
|
|
1799
|
-
SendOption[SendOption["Email"] = 0] = "Email";
|
|
1800
|
-
SendOption[SendOption["Print"] = 1] = "Print";
|
|
1801
|
-
SendOption[SendOption["Pdf"] = 2] = "Pdf";
|
|
1802
|
-
SendOption[SendOption["Xml"] = 3] = "Xml";
|
|
1803
|
-
})(SendOption || (SendOption = {}));
|
|
1804
|
-
|
|
1805
|
-
class SendMethodDialogComponent {
|
|
1806
|
-
constructor(iconCacheService, _stockService) {
|
|
1807
|
-
this.iconCacheService = iconCacheService;
|
|
1808
|
-
this._stockService = _stockService;
|
|
1809
|
-
this.icons = Icon;
|
|
1810
|
-
this.sendOption = SendOption;
|
|
1811
|
-
this.sendOptions = [
|
|
1812
|
-
{ option: SendOption.Email,
|
|
1813
|
-
iconName: this.icons.Email },
|
|
1814
|
-
{ option: SendOption.Print,
|
|
1815
|
-
iconName: this.icons.Print },
|
|
1816
|
-
{ option: SendOption.Pdf,
|
|
1817
|
-
iconName: this.icons.Pdf },
|
|
1818
|
-
{ option: SendOption.Xml,
|
|
1819
|
-
iconName: this.icons.Xml }
|
|
1820
|
-
];
|
|
1821
|
-
this.activeSendOption = SendOption.Email;
|
|
1822
|
-
this.amountToPrint = 1;
|
|
1823
|
-
this.showStandardPrinterOptions = false;
|
|
1824
|
-
this.showPrinterSelections = false;
|
|
1825
|
-
this.showExitButton = true;
|
|
1826
|
-
this.emails = ['lars.vdv@colijn-it.nl', 'david@colijn-it.nl', 'ruben@colijn-it.nl'];
|
|
1827
|
-
this.models = [false, false, true];
|
|
1828
|
-
this.layouts = ['Layout 1', 'Layout 2', 'Layout 3'];
|
|
1829
|
-
this.showDialog = false;
|
|
1830
|
-
this.startSignatureClicked = new EventEmitter();
|
|
1831
|
-
this.printButtonClicked = new EventEmitter();
|
|
1832
|
-
}
|
|
1833
|
-
showClass() {
|
|
1834
|
-
return true;
|
|
1835
|
-
}
|
|
1836
|
-
closeDialogClick() {
|
|
1837
|
-
this.showDialog = false;
|
|
1838
|
-
}
|
|
1839
|
-
handleSignatureStart() {
|
|
1840
|
-
this.startSignatureClicked.emit();
|
|
1841
|
-
}
|
|
1842
|
-
handlePrintClicked() {
|
|
1843
|
-
this.printButtonClicked.emit();
|
|
1844
|
-
}
|
|
1845
|
-
togglePrinterSelection() {
|
|
1846
|
-
if (!this.showPrinterSelections) {
|
|
1847
|
-
this.showPrinterSelections = true;
|
|
1848
|
-
this.headerTitle = 'Printer selectie';
|
|
1849
|
-
}
|
|
1850
|
-
else {
|
|
1851
|
-
this.showPrinterSelections = false;
|
|
1852
|
-
this.headerTitle = 'Verzendopties';
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
SendMethodDialogComponent.decorators = [
|
|
1857
|
-
{ type: Component, args: [{
|
|
1858
|
-
selector: "ione-send-method-dialog",
|
|
1859
|
-
template: `
|
|
1860
|
-
<div class="send-method-dialog-wrapper">
|
|
1861
|
-
<co-dialog-wizard id="sendOptionsDialog" *ngIf="showDialog" [showCloseIcon]="showExitButton" (closeClick)="closeDialogClick()">
|
|
1862
|
-
<ng-container header>
|
|
1863
|
-
<span [textContent]="headerTitle"></span>
|
|
1864
|
-
</ng-container>
|
|
1865
|
-
<div class="dialog-content-wrapper">
|
|
1866
|
-
<div class="main-content-container" *ngIf="!showPrinterSelections">
|
|
1867
|
-
<div class="send-options-wrapper">
|
|
1868
|
-
<div class="custom-button-wrapper" *ngFor="let sendOption of sendOptions"
|
|
1869
|
-
[class.selected-option]="sendOption.option === activeSendOption"
|
|
1870
|
-
(click)="activeSendOption = sendOption.option">
|
|
1871
|
-
<co-icon [iconData]="iconCacheService.getIcon(sendOption.iconName)"></co-icon>
|
|
1872
|
-
</div>
|
|
1873
|
-
</div>
|
|
1874
|
-
|
|
1875
|
-
<div class="email-option-content" *ngIf="activeSendOption === sendOption.Email || activeSendOption === sendOption.Pdf">
|
|
1876
|
-
<div class="emails-container" *ngIf="activeSendOption === sendOption.Email">
|
|
1877
|
-
<co-input-checkbox
|
|
1878
|
-
*ngFor="let email, let index of emails"
|
|
1879
|
-
[name]="email"
|
|
1880
|
-
[(model)]="models[index]"
|
|
1881
|
-
[label]="email"
|
|
1882
|
-
[cssClass]="'input-checkbox-wrapper'"
|
|
1883
|
-
></co-input-checkbox>
|
|
1884
|
-
</div>
|
|
1885
|
-
|
|
1886
|
-
<div class="lov-wrapper">
|
|
1887
|
-
<co-input-combo-box
|
|
1888
|
-
[(model)]="selectedLayout"
|
|
1889
|
-
[collection]="layouts"
|
|
1890
|
-
[forceReadonly]="true"
|
|
1891
|
-
placeholder="Layout"
|
|
1892
|
-
></co-input-combo-box>
|
|
1893
|
-
</div>
|
|
1894
|
-
|
|
1895
|
-
<div class="signature-button-wrapper">
|
|
1896
|
-
<div class="custom-button-wrapper signature-button" (click)="handleSignatureStart()">
|
|
1897
|
-
<co-icon [iconData]="iconCacheService.getIcon(icons.SignatureField)"></co-icon>
|
|
1898
|
-
</div>
|
|
1899
|
-
</div>
|
|
1900
|
-
</div>
|
|
1901
|
-
|
|
1902
|
-
<div class="email-option-content" *ngIf="activeSendOption === sendOption.Print">
|
|
1903
|
-
<div class="lov-wrapper">
|
|
1904
|
-
<co-input-combo-box
|
|
1905
|
-
[(model)]="selectedLayout"
|
|
1906
|
-
[collection]="layouts"
|
|
1907
|
-
[forceReadonly]="true"
|
|
1908
|
-
placeholder="Layout"
|
|
1909
|
-
></co-input-combo-box>
|
|
1910
|
-
</div>
|
|
1911
|
-
|
|
1912
|
-
<div class="lov-wrapper clickable" (click)="togglePrinterSelection()">
|
|
1913
|
-
<div class="selected-printer-wrapper">
|
|
1914
|
-
<div class="printer-option-list-item">
|
|
1915
|
-
<co-icon class="printer-icon" [iconData]="iconCacheService.getIcon(icons.Print)"></co-icon>
|
|
1916
|
-
<div class="printer-details">
|
|
1917
|
-
<span class="printer-name" [textContent]="defaultPrinter"></span>
|
|
1918
|
-
<span class="printer-status" [textContent]="'Online'"></span>
|
|
1919
|
-
</div>
|
|
1920
|
-
</div>
|
|
1921
|
-
<co-icon class="select-printer-arrow" [iconData]="iconCacheService.getIcon(icons.ArrowPointRight)"></co-icon>
|
|
1922
|
-
</div>
|
|
1923
|
-
</div>
|
|
1924
|
-
|
|
1925
|
-
<div class="standard-printer-wrapper">
|
|
1926
|
-
<div class="standard-printer-link" (click)="showStandardPrinterOptions = !showStandardPrinterOptions">
|
|
1927
|
-
<co-icon class="arrow-icon" [iconData]="iconCacheService.getIcon(icons.ArrowFatRight)"></co-icon>
|
|
1928
|
-
<span class="standard-printer-message" [textContent]="'Standaard printer voor lay-out instellen'"></span>
|
|
1929
|
-
</div>
|
|
1930
|
-
|
|
1931
|
-
<div class="standard-printer-selections" *ngIf="showStandardPrinterOptions">
|
|
1932
|
-
<co-input-checkbox
|
|
1933
|
-
[(model)]="models[0]"
|
|
1934
|
-
[label]="'Per gebruiker instellen'"
|
|
1935
|
-
[cssClass]="'input-checkbox-wrapper'"
|
|
1936
|
-
></co-input-checkbox>
|
|
1937
|
-
<co-input-checkbox
|
|
1938
|
-
[(model)]="models[1]"
|
|
1939
|
-
[label]="'Voor alle gebruikers instellen'"
|
|
1940
|
-
[cssClass]="'input-checkbox-wrapper'"
|
|
1941
|
-
></co-input-checkbox>
|
|
1942
|
-
</div>
|
|
1943
|
-
</div>
|
|
1944
|
-
|
|
1945
|
-
<div class="print-footer-wrapper">
|
|
1946
|
-
<div class="input-number-wrapper">
|
|
1947
|
-
<co-input-number-picker class="number-picker"
|
|
1948
|
-
[step]="1" [(model)]="amountToPrint" [min]="1"
|
|
1949
|
-
[ngModelOptions]="{debounce: 1}">
|
|
1950
|
-
</co-input-number-picker>
|
|
1951
|
-
</div>
|
|
1952
|
-
<div class="custom-button-wrapper print-button" (click)="handlePrintClicked()">
|
|
1953
|
-
<span [textContent]="'Print'"></span>
|
|
1954
|
-
</div>
|
|
1955
|
-
<div class="custom-button-wrapper signature-button" (click)="handleSignatureStart()">
|
|
1956
|
-
<co-icon [iconData]="iconCacheService.getIcon(icons.SignatureField)"></co-icon>
|
|
1957
|
-
</div>
|
|
1958
|
-
</div>
|
|
1959
|
-
</div>
|
|
1960
|
-
</div>
|
|
1961
|
-
|
|
1962
|
-
<div class="printer-content-container" @slideInOut *ngIf="showPrinterSelections">
|
|
1963
|
-
<div class="selected-printer-wrapper selection clickable" *ngFor="let printers of printerList" (click)="togglePrinterSelection()">
|
|
1964
|
-
<div class="printer-option-list-item">
|
|
1965
|
-
<co-icon class="printer-icon" [iconData]="iconCacheService.getIcon(icons.Print)"></co-icon>
|
|
1966
|
-
<div class="printer-details">
|
|
1967
|
-
<span class="printer-name" [textContent]="printers.name"></span>
|
|
1968
|
-
<span class="printer-status" [textContent]="'Online'"></span>
|
|
1969
|
-
</div>
|
|
1970
|
-
</div>
|
|
1971
|
-
<co-icon class="select-printer-arrow" *ngIf="!showPrinterSelections"
|
|
1972
|
-
[iconData]="iconCacheService.getIcon(icons.ArrowPointRight)"></co-icon>
|
|
1973
|
-
</div>
|
|
1974
|
-
</div>
|
|
1975
|
-
</div>
|
|
1976
|
-
</co-dialog-wizard>
|
|
1977
|
-
</div>
|
|
1978
|
-
`,
|
|
1979
|
-
encapsulation: ViewEncapsulation.None,
|
|
1980
|
-
animations: [
|
|
1981
|
-
trigger('slideInOut', [
|
|
1982
|
-
state('*', style({ transform: 'translateX(0%)', width: '100%', opacity: '1' })),
|
|
1983
|
-
state('void', style({ transform: 'translateX(150%)', opacity: '0' })),
|
|
1984
|
-
transition('void => *', animate(250))
|
|
1985
|
-
])
|
|
1986
|
-
]
|
|
1987
|
-
},] }
|
|
1988
|
-
];
|
|
1989
|
-
SendMethodDialogComponent.ctorParameters = () => [
|
|
1990
|
-
{ type: IconCacheService },
|
|
1991
|
-
{ type: StockService }
|
|
1992
|
-
];
|
|
1993
|
-
SendMethodDialogComponent.propDecorators = {
|
|
1994
|
-
showDialog: [{ type: Input }],
|
|
1995
|
-
headerTitle: [{ type: Input }],
|
|
1996
|
-
printerList: [{ type: Input }],
|
|
1997
|
-
startSignatureClicked: [{ type: Output }],
|
|
1998
|
-
printButtonClicked: [{ type: Output }],
|
|
1999
|
-
showClass: [{ type: HostBinding, args: ["class.ione-send-method-dialog",] }]
|
|
2000
|
-
};
|
|
2001
|
-
|
|
2002
|
-
class SendMethodDialogModule {
|
|
2003
|
-
}
|
|
2004
|
-
SendMethodDialogModule.decorators = [
|
|
2005
|
-
{ type: NgModule, args: [{
|
|
2006
|
-
declarations: [
|
|
2007
|
-
SendMethodDialogComponent
|
|
2008
|
-
],
|
|
2009
|
-
imports: [
|
|
2010
|
-
CommonModule,
|
|
2011
|
-
CoDialogPromptModule,
|
|
2012
|
-
InputCheckboxModule,
|
|
2013
|
-
InputComboBoxModule,
|
|
2014
|
-
IconModule,
|
|
2015
|
-
InputNumberPickerModule,
|
|
2016
|
-
CoDialogWizardModule
|
|
2017
|
-
],
|
|
2018
|
-
exports: [
|
|
2019
|
-
SendMethodDialogComponent
|
|
2020
|
-
]
|
|
2021
|
-
},] }
|
|
2022
|
-
];
|
|
2023
|
-
|
|
2024
|
-
class StockModule {
|
|
2025
|
-
}
|
|
2026
|
-
StockModule.decorators = [
|
|
2027
|
-
{ type: NgModule, args: [{
|
|
2028
|
-
imports: [
|
|
2029
|
-
InputComboBoxModule,
|
|
2030
|
-
CoGridModule,
|
|
2031
|
-
ButtonModule,
|
|
2032
|
-
CommonModule,
|
|
2033
|
-
InputRadioButtonModule,
|
|
2034
|
-
DropDownModule,
|
|
2035
|
-
SimpleGridModule,
|
|
2036
|
-
ImageModule,
|
|
2037
|
-
InputTextModule,
|
|
2038
|
-
SendMethodDialogModule
|
|
2039
|
-
],
|
|
2040
|
-
declarations: [
|
|
2041
|
-
StockComponent,
|
|
2042
|
-
StockInformationComponent,
|
|
2043
|
-
StockInformationGridComponent,
|
|
2044
|
-
StockLocationComponent,
|
|
2045
|
-
StockTransferComponent
|
|
2046
|
-
],
|
|
2047
|
-
exports: [
|
|
2048
|
-
StockComponent
|
|
2049
|
-
],
|
|
2050
|
-
providers: [
|
|
2051
|
-
StockService,
|
|
2052
|
-
IoneConnectorAdapterService
|
|
2053
|
-
]
|
|
2054
|
-
},] }
|
|
2055
|
-
];
|
|
2056
|
-
|
|
2057
363
|
/*
|
|
2058
364
|
* Public API Surface of sharedcomponents
|
|
2059
365
|
*/
|
|
@@ -2062,5 +368,5 @@ StockModule.decorators = [
|
|
|
2062
368
|
* Generated bundle index. Do not edit.
|
|
2063
369
|
*/
|
|
2064
370
|
|
|
2065
|
-
export { DocsignComponent, DocsignModule,
|
|
371
|
+
export { DocsignComponent, DocsignModule, SignatureComponent as ɵa, SignaturesComponent as ɵb };
|
|
2066
372
|
//# sourceMappingURL=colijnit-sharedcomponents.js.map
|