@ironcode/vas-lib 2.0.0 → 2.2.0
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/cjs/lib/entity/vas-control.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.dto.js.map +1 -1
- package/cjs/lib/entity/vas-control.model.d.ts +2 -1
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.model.js +7 -4
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-job-email.model.d.ts +1 -2
- package/cjs/lib/entity/vas-job-email.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job-email.model.js.map +1 -1
- package/cjs/lib/entity/vas-report.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-report.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report.dto.js.map +1 -1
- package/cjs/lib/entity/vas-report.model.d.ts +3 -3
- package/cjs/lib/entity/vas-report.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report.model.js +4 -2
- package/cjs/lib/entity/vas-report.model.js.map +1 -1
- package/cjs/lib/utils/only.d.ts +2 -1
- package/cjs/lib/utils/only.d.ts.map +1 -1
- package/cjs/lib/utils/only.js +6 -10
- package/cjs/lib/utils/only.js.map +1 -1
- package/fesm2022/ironcode-vas-lib.mjs +20 -16
- package/fesm2022/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/vas-control.dto.d.ts +1 -0
- package/lib/entity/vas-control.model.d.ts +2 -1
- package/lib/entity/vas-job-email.model.d.ts +1 -2
- package/lib/entity/vas-report.dto.d.ts +1 -0
- package/lib/entity/vas-report.model.d.ts +3 -3
- package/lib/utils/only.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,6BAA6B;IAClE,WAAW,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-control.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,6BAA6B;IAClE,WAAW,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\nimport { VasControlTypeDto } from './vas-control-type.dto';\n\nexport interface VasControlDto extends VasRestrictedAccountObjectDto {\n controlType: VasControlTypeDto;\n group: string;\n validators: string[];\n name: string;\n title: string;\n linkable: boolean;\n sequence: number;\n description: string;\n descriptionImage: string;\n defaultValue: string;\n config: string;\n portalEnabled: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-control.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\nimport { VasControlTypeDto } from './vas-control-type.dto';\n\nexport interface VasControlDto extends VasRestrictedAccountObjectDto {\n controlType: VasControlTypeDto;\n group: string;\n validators: string[];\n name: string;\n title: string;\n linkable: boolean;\n sequence: number;\n description: string;\n descriptionImage: string;\n defaultValue: string;\n config: string;\n portalEnabled: boolean;\n portalListVisible: boolean;\n}\n"]}
|
|
@@ -30,8 +30,9 @@ export declare class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
30
30
|
config: Record<string, any>;
|
|
31
31
|
descriptionImage: string;
|
|
32
32
|
portalEnabled: boolean;
|
|
33
|
+
portalListVisible: boolean;
|
|
33
34
|
protected controlTypeId: string;
|
|
34
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, controlType: VasControlTypeModel, group: string, validators: string[], name: string, title: string, linkable: boolean, sequence: number, description: string, defaultValue: string, config: Record<string, any>, descriptionImage: string, portalEnabled: boolean);
|
|
35
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, controlType: VasControlTypeModel, group: string, validators: string[], name: string, title: string, linkable: boolean, sequence: number, description: string, defaultValue: string, config: Record<string, any>, descriptionImage: string, portalEnabled: boolean, portalListVisible: boolean);
|
|
35
36
|
get controlTypeName(): string;
|
|
36
37
|
/**
|
|
37
38
|
* The defaultValue property is returned from the api as a string or number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,CAAC,OAAO,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,+BAA+B;IAIhD,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IAC5B,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,MAAM,EAAE;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3B,gBAAgB,EAAE,MAAM;IACxB,aAAa,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"vas-control.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,CAAC,OAAO,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,+BAA+B;IAIhD,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IAC5B,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,MAAM,EAAE;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3B,gBAAgB,EAAE,MAAM;IACxB,aAAa,EAAE,OAAO;IACtB,iBAAiB,EAAE,OAAO;IA1BnC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAM;gBAGnB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EAC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("../utils/only");
|
|
|
9
9
|
* ControlModel
|
|
10
10
|
*/
|
|
11
11
|
class VasControlModel extends vas_restricted_account_object_model_1.VasRestrictedAccountObjectModel {
|
|
12
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled) {
|
|
12
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled, portalListVisible) {
|
|
13
13
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
14
14
|
this.id = id;
|
|
15
15
|
this.created = created;
|
|
@@ -34,6 +34,7 @@ class VasControlModel extends vas_restricted_account_object_model_1.VasRestricte
|
|
|
34
34
|
this.config = config;
|
|
35
35
|
this.descriptionImage = descriptionImage;
|
|
36
36
|
this.portalEnabled = portalEnabled;
|
|
37
|
+
this.portalListVisible = portalListVisible;
|
|
37
38
|
this.controlTypeId = '';
|
|
38
39
|
if (typeof controlType === 'string') {
|
|
39
40
|
this.controlTypeId = controlType;
|
|
@@ -111,7 +112,7 @@ class VasControlModel extends vas_restricted_account_object_model_1.VasRestricte
|
|
|
111
112
|
// eslint-disable-next-line new-cap
|
|
112
113
|
dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', handleControlType(dto.controlType), dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', typeof dto.config === 'string' ?
|
|
113
114
|
JSON.parse(dto.config || '{}') :
|
|
114
|
-
dto.config, dto.descriptionImage || '', dto.portalEnabled || false);
|
|
115
|
+
dto.config, dto.descriptionImage || '', dto.portalEnabled || false, dto.portalListVisible || false);
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* @param {any} value the value to be parsed
|
|
@@ -155,11 +156,12 @@ class VasControlModel extends vas_restricted_account_object_model_1.VasRestricte
|
|
|
155
156
|
defaultValue: this.defaultValue,
|
|
156
157
|
config: JSON.stringify(this.config),
|
|
157
158
|
descriptionImage: this.descriptionImage,
|
|
158
|
-
portalEnabled: this.portalEnabled
|
|
159
|
+
portalEnabled: this.portalEnabled,
|
|
160
|
+
portalListVisible: this.portalListVisible
|
|
159
161
|
};
|
|
160
162
|
}
|
|
161
163
|
toApiDto(options) {
|
|
162
|
-
return Object.assign(Object.assign({}, super.toApiDto()), { title: this.title || '~', name: this.name || '~', portalEnabled: this.portalEnabled, sequence: this.sequence, description: this.description || '~', defaultValue: this.defaultValue, config: JSON.stringify(this.config), controlType: this.controlType.id, group: this.group, validators: this.validators, linkable: this.linkable });
|
|
164
|
+
return Object.assign(Object.assign({}, super.toApiDto()), { title: this.title || '~', name: this.name || '~', portalEnabled: this.portalEnabled, sequence: this.sequence, description: this.description || '~', defaultValue: this.defaultValue, config: JSON.stringify(this.config), controlType: this.controlType.id, group: this.group, validators: this.validators, linkable: this.linkable, portalListVisible: this.portalListVisible });
|
|
163
165
|
}
|
|
164
166
|
static toApiPatchDto(item) {
|
|
165
167
|
return (0, only_1.only)(item, [
|
|
@@ -176,6 +178,7 @@ class VasControlModel extends vas_restricted_account_object_model_1.VasRestricte
|
|
|
176
178
|
'group',
|
|
177
179
|
'validators',
|
|
178
180
|
'linkable',
|
|
181
|
+
'portalListVisible'
|
|
179
182
|
]);
|
|
180
183
|
}
|
|
181
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAE/D,iDAAqC;AAErC,+FAAwF;AAExF,wCAAqC;AAIrC;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B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;IAEQ,QAAQ,CAAC,OAAa;QAC7B,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,GAAG,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,GAAG,EACtB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,GAAG,EACpC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EACnC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,EAChC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACvB;IACJ,CAAC;IAEM,MAAM,CAAC,aAAa,CACzB,IAA4B;QAE5B,OAAO,IAAA,WAAI,EACT,IAAI,EACJ;YACE,SAAS;YACT,UAAU;YACV,OAAO;YACP,MAAM;YACN,eAAe;YACf,UAAU;YACV,aAAa;YACb,cAAc;YACd,QAAQ;YACR,aAAa;YACb,OAAO;YACP,YAAY;YACZ,UAAU;SACX,CACF,CAAC;IACJ,CAAC;CACF;AA5OD,0CA4OC","sourcesContent":["import { VasControlTypeModel } from './vas-control-type.model';\nimport { VasControlDto } from './vas-control.dto';\nimport { UUID } from 'angular2-uuid';\nimport { VasControlTypeDto } from './vas-control-type.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { VasFieldDtoValue } from './vas-field.dto';\nimport { only } from '../utils/only';\n\nexport declare type VasControlModelDefaultValueType = string | number | object;\n\n/**\n * ControlModel\n */\nexport class VasControlModel extends VasRestrictedAccountObjectModel {\n protected controlTypeId: string = '';\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public controlType: VasControlTypeModel,\n public group: string,\n public validators: string[],\n public name: string,\n public title: string,\n public linkable: boolean,\n public sequence: number,\n public description: string,\n public defaultValue: string,\n public config: Record<string, any>,\n public descriptionImage: string,\n public portalEnabled: boolean\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n if (typeof controlType === 'string') {\n this.controlTypeId = controlType;\n } else {\n this.controlTypeId = controlType.id;\n }\n }\n\n get controlTypeName(): string {\n return this.controlType?.name || '';\n }\n\n /**\n * The defaultValue property is returned from the api as a string or number,\n * in the case of string, it maybe a json. This getter will return an\n * object if the value is a json string\n */\n get defaultValueDecoded(): VasFieldDtoValue {\n if (this.defaultValue === '' && this.controlType) {\n switch (this.controlTypeName) {\n case 'branch':\n case 'camera':\n case 'contact': {\n return {};\n }\n case 'toggle': {\n return {\n checked: false, comment: ''\n };\n }\n }\n }\n\n return this.parseMaybeJson(this.defaultValue);\n }\n\n /**\n * Returns the name of this control to be used in the report templates\n * i.e. fields.foo -> foo\n * @return {string}\n */\n get reportTemplateName(): string {\n return this.name.replace(/^fields\\./, '');\n }\n\n /**\n * @return {string}\n */\n get safeName(): string {\n return this.name;\n }\n\n /**\n * @return {VasControlModel}\n */\n static empty(): VasControlModel {\n return VasControlModel.fromDto({\n // eslint-disable-next-line new-cap\n id: UUID.UUID()\n });\n }\n\n /**\n * @param {VasControlDto} dto\n * @return {VasControlModel}\n */\n static override fromDto(\n dto: Partial<VasControlDto>\n ): VasControlModel {\n\n const handleControlType = (c: string | VasControlTypeDto | undefined) => {\n if (c === undefined) {\n return VasControlTypeModel.empty();\n } else if (typeof c === 'string') {\n return VasControlTypeModel.fromDto({id: c});\n } else {\n return VasControlTypeModel.fromDto(c);\n }\n };\n\n return new VasControlModel(\n // eslint-disable-next-line new-cap\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n handleControlType(dto.controlType) as any,\n dto.group || '',\n dto.validators || [],\n dto.name || '',\n dto.title || '',\n dto.linkable || false,\n dto.sequence || 0,\n dto.description || '',\n dto.defaultValue || '',\n typeof dto.config === 'string' ?\n JSON.parse(dto.config || '{}') :\n dto.config,\n dto.descriptionImage || '',\n dto.portalEnabled || false\n );\n }\n\n /**\n * @param {any} value the value to be parsed\n * @return {VasFieldDtoValue} the parsed value\n */\n protected parseMaybeJson(value: any): VasFieldDtoValue {\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n return value;\n }\n }\n\n /**\n * @return {VasControlDto}\n */\n toDto(): VasControlDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n controlType: this.controlType.toDto(),\n group: this.group,\n validators: this.validators,\n name: this.name,\n title: this.title,\n linkable: this.linkable,\n sequence: this.sequence,\n description: this.description,\n defaultValue: this.defaultValue,\n config: JSON.stringify(this.config),\n descriptionImage: this.descriptionImage,\n portalEnabled: this.portalEnabled\n };\n }\n\n override toApiDto(options?: any): Record<string, any> {\n return {\n ...super.toApiDto(),\n title: this.title || '~',\n name: this.name || '~',\n portalEnabled: this.portalEnabled,\n sequence: this.sequence,\n description: this.description || '~',\n defaultValue: this.defaultValue,\n config: JSON.stringify(this.config),\n controlType: this.controlType.id,\n group: this.group,\n validators: this.validators,\n linkable: this.linkable\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasControlDto>\n ): Partial<VasControlDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'title',\n 'name',\n 'portalEnabled',\n 'sequence',\n 'description',\n 'defaultValue',\n 'config',\n 'controlType',\n 'group',\n 'validators',\n 'linkable',\n ]\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-control.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":";;;AAAA,qEAA+D;AAE/D,iDAAqC;AAErC,+FAAwF;AAExF,wCAAqC;AAIrC;;GAEG;AACH,MAAa,eAAgB,SAAQ,qEAA+B;IAGlE,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,WAAmB,EAC5B,WAAgC,EAChC,KAAa,EACb,UAAoB,EACpB,IAAY,EACZ,KAAa,EACb,QAAiB,EACjB,QAAgB,EAChB,WAAmB,EACnB,YAAoB,EACpB,MAA2B,EAC3B,gBAAwB,EACxB,aAAsB,EACtB,iBAA0B;QAEjC,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,WAAW,CACZ,CAAC;QArCc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ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nC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,EAChC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,IACzC;IACJ,CAAC;IAEM,MAAM,CAAC,aAAa,CACzB,IAA4B;QAE5B,OAAO,IAAA,WAAI,EACT,IAAI,EACJ;YACE,SAAS;YACT,UAAU;YACV,OAAO;YACP,MAAM;YACN,eAAe;YACf,UAAU;YACV,aAAa;YACb,cAAc;YACd,QAAQ;YACR,aAAa;YACb,OAAO;YACP,YAAY;YACZ,UAAU;YACV,mBAAmB;SACpB,CACF,CAAC;IACJ,CAAC;CACF;AAjPD,0CAiPC","sourcesContent":["import { VasControlTypeModel } from './vas-control-type.model';\nimport { VasControlDto } from './vas-control.dto';\nimport { UUID } from 'angular2-uuid';\nimport { VasControlTypeDto } from './vas-control-type.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { VasFieldDtoValue } from './vas-field.dto';\nimport { only } from '../utils/only';\n\nexport declare type VasControlModelDefaultValueType = string | number | object;\n\n/**\n * ControlModel\n */\nexport class VasControlModel extends VasRestrictedAccountObjectModel {\n protected controlTypeId: string = '';\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public controlType: VasControlTypeModel,\n public group: string,\n public validators: string[],\n public name: string,\n public title: string,\n public linkable: boolean,\n public sequence: number,\n public description: string,\n public defaultValue: string,\n public config: Record<string, any>,\n public descriptionImage: string,\n public portalEnabled: boolean,\n public portalListVisible: boolean\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n if (typeof controlType === 'string') {\n this.controlTypeId = controlType;\n } else {\n this.controlTypeId = controlType.id;\n }\n }\n\n get controlTypeName(): string {\n return this.controlType?.name || '';\n }\n\n /**\n * The defaultValue property is returned from the api as a string or number,\n * in the case of string, it maybe a json. This getter will return an\n * object if the value is a json string\n */\n get defaultValueDecoded(): VasFieldDtoValue {\n if (this.defaultValue === '' && this.controlType) {\n switch (this.controlTypeName) {\n case 'branch':\n case 'camera':\n case 'contact': {\n return {};\n }\n case 'toggle': {\n return {\n checked: false, comment: ''\n };\n }\n }\n }\n\n return this.parseMaybeJson(this.defaultValue);\n }\n\n /**\n * Returns the name of this control to be used in the report templates\n * i.e. fields.foo -> foo\n * @return {string}\n */\n get reportTemplateName(): string {\n return this.name.replace(/^fields\\./, '');\n }\n\n /**\n * @return {string}\n */\n get safeName(): string {\n return this.name;\n }\n\n /**\n * @return {VasControlModel}\n */\n static empty(): VasControlModel {\n return VasControlModel.fromDto({\n // eslint-disable-next-line new-cap\n id: UUID.UUID()\n });\n }\n\n /**\n * @param {VasControlDto} dto\n * @return {VasControlModel}\n */\n static override fromDto(\n dto: Partial<VasControlDto>\n ): VasControlModel {\n\n const handleControlType = (c: string | VasControlTypeDto | undefined) => {\n if (c === undefined) {\n return VasControlTypeModel.empty();\n } else if (typeof c === 'string') {\n return VasControlTypeModel.fromDto({id: c});\n } else {\n return VasControlTypeModel.fromDto(c);\n }\n };\n\n return new VasControlModel(\n // eslint-disable-next-line new-cap\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n handleControlType(dto.controlType) as any,\n dto.group || '',\n dto.validators || [],\n dto.name || '',\n dto.title || '',\n dto.linkable || false,\n dto.sequence || 0,\n dto.description || '',\n dto.defaultValue || '',\n typeof dto.config === 'string' ?\n JSON.parse(dto.config || '{}') :\n dto.config,\n dto.descriptionImage || '',\n dto.portalEnabled || false,\n dto.portalListVisible || false\n );\n }\n\n /**\n * @param {any} value the value to be parsed\n * @return {VasFieldDtoValue} the parsed value\n */\n protected parseMaybeJson(value: any): VasFieldDtoValue {\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n return value;\n }\n }\n\n /**\n * @return {VasControlDto}\n */\n toDto(): VasControlDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n controlType: this.controlType.toDto(),\n group: this.group,\n validators: this.validators,\n name: this.name,\n title: this.title,\n linkable: this.linkable,\n sequence: this.sequence,\n description: this.description,\n defaultValue: this.defaultValue,\n config: JSON.stringify(this.config),\n descriptionImage: this.descriptionImage,\n portalEnabled: this.portalEnabled,\n portalListVisible: this.portalListVisible\n };\n }\n\n override toApiDto(options?: any): Record<string, any> {\n return {\n ...super.toApiDto(),\n title: this.title || '~',\n name: this.name || '~',\n portalEnabled: this.portalEnabled,\n sequence: this.sequence,\n description: this.description || '~',\n defaultValue: this.defaultValue,\n config: JSON.stringify(this.config),\n controlType: this.controlType.id,\n group: this.group,\n validators: this.validators,\n linkable: this.linkable,\n portalListVisible: this.portalListVisible\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasControlDto>\n ): Partial<VasControlDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'title',\n 'name',\n 'portalEnabled',\n 'sequence',\n 'description',\n 'defaultValue',\n 'config',\n 'controlType',\n 'group',\n 'validators',\n 'linkable',\n 'portalListVisible'\n ]\n );\n }\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VasJobDataModel } from './vas-job-data.model';
|
|
2
2
|
import { VasJobEmailDto } from './vas-job-email.dto';
|
|
3
|
-
import { VasNoteDto } from './vas-note.dto';
|
|
4
3
|
export declare class VasJobEmailModel extends VasJobDataModel {
|
|
5
4
|
id: string;
|
|
6
5
|
created: string;
|
|
@@ -28,6 +27,6 @@ export declare class VasJobEmailModel extends VasJobDataModel {
|
|
|
28
27
|
static fromDto(dto: Partial<VasJobEmailDto>): VasJobEmailModel;
|
|
29
28
|
toDto(): VasJobEmailDto;
|
|
30
29
|
toApiDto(options?: any): Record<string, any>;
|
|
31
|
-
static toApiPatchDto(item: Partial<
|
|
30
|
+
static toApiPatchDto(item: Partial<VasJobEmailDto>): Partial<VasJobEmailDto>;
|
|
32
31
|
}
|
|
33
32
|
//# sourceMappingURL=vas-job-email.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job-email.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-email.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-job-email.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-email.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD,qBAAa,gBAAiB,SAAQ,eAAe;IAGjC,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,MAAM;IACpB,IAAI,EAAE,MAAM;IACZ,EAAE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.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-email.model.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;
|
|
1
|
+
{"version":3,"file":"vas-job-email.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-email.model.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAEvD,wCAAqC;AAGrC,MAAa,gBAAiB,SAAQ,oCAAe;IAEnD,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,GAAW,EACpB,IAAY,EACZ,EAAiB,EACjB,KAAoB,EACpB,OAAe,EACf,UAAyB,EACzB,OAAe,EACf,OAAsB,EACtB,MAAc,EACd,QAAgB,EAChB,OAAe,EACf,SAAkB;QAEzB,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,GAAG,CACJ,CAAC;QAnCc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAQ;QACf,QAAG,GAAH,GAAG,CAAQ;QACpB,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAe;QACjB,UAAK,GAAL,KAAK,CAAe;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,eAAU,GAAV,UAAU,CAAe;QACzB,YAAO,GAAP,OAAO,CAAQ;QACf,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,4CA+HC","sourcesContent":["import { VasJobDataModel } from './vas-job-data.model';\nimport { VasJobEmailDto } from './vas-job-email.dto';\nimport { only } from '../utils/only';\n\n\nexport class VasJobEmailModel extends VasJobDataModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override job: string,\n public body: string,\n public cc: Array<string>,\n public files: Array<string>,\n public message: string,\n public recipients: Array<string>,\n public replyTo: string,\n public reports: Array<string>,\n public sender: string,\n public sentTime: string,\n public subject: string,\n public succeeded: boolean,\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n job,\n );\n }\n\n static override fromDto(dto: Partial<VasJobEmailDto>): VasJobEmailModel {\n return new VasJobEmailModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.job || '',\n dto.body || '',\n dto.cc || [],\n dto.files || [],\n dto.message || '',\n dto.recipients || [],\n dto.replyTo || '',\n dto.reports || [],\n dto.sender || '',\n dto.sentTime || '',\n dto.subject || '',\n dto.succeeded || false\n );\n }\n\n toDto(): VasJobEmailDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n job: this.job,\n body: this.body,\n cc: this.cc,\n files: this.files,\n message: this.message,\n recipients: this.recipients,\n replyTo: this.replyTo,\n reports: this.reports,\n sender: this.sender,\n sentTime: this.sentTime,\n subject: this.subject,\n succeeded: this.succeeded,\n };\n }\n\n override toApiDto(options?: any): Record<string, any> {\n return {\n // id: this.id,\n created: this.created,\n modified: this.modified,\n body: this.body,\n cc: this.cc,\n files: this.files,\n recipients: this.recipients,\n reports: this.reports,\n subject: this.subject,\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasJobEmailDto>\n ): Partial<VasJobEmailDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'body',\n 'cc',\n 'files',\n 'message',\n 'recipients',\n 'reports',\n 'subject',\n ]\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-report.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
|
1
|
+
{"version":3,"file":"vas-report.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-report.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasJobDataDto } from './vas-job-data.dto';\n\nexport interface VasReportDto extends VasJobDataDto {\n reportLayout: string;\n title: string;\n sendEmail: string;\n message: string;\n attempted: string;\n completed: string;\n succeeded: string;\n attempts: number;\n notificationId: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-report.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasJobDataDto } from './vas-job-data.dto';\n\nexport interface VasReportDto extends VasJobDataDto {\n reportLayout: string;\n title: string;\n sendEmail: string;\n message: string;\n attempted: string;\n completed: string;\n succeeded: string;\n attempts: number;\n notificationId: string;\n portalVisible: boolean;\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { VasJobDataModel } from './vas-job-data.model';
|
|
2
2
|
import { VasReportDto } from './vas-report.dto';
|
|
3
|
-
import { VasTaskDto } from './vas-task.dto';
|
|
4
3
|
export declare class VasReportModel extends VasJobDataModel implements VasReportDto {
|
|
5
4
|
id: string;
|
|
6
5
|
created: string;
|
|
@@ -22,11 +21,12 @@ export declare class VasReportModel extends VasJobDataModel implements VasReport
|
|
|
22
21
|
succeeded: string;
|
|
23
22
|
attempts: number;
|
|
24
23
|
notificationId: string;
|
|
25
|
-
|
|
24
|
+
portalVisible: boolean;
|
|
25
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, job: string, reportLayout: string, title: string, sendEmail: string, message: string, attempted: string, completed: string, succeeded: string, attempts: number, notificationId: string, portalVisible: boolean);
|
|
26
26
|
static empty(): VasReportModel;
|
|
27
27
|
static fromDto(dto: Partial<VasReportModel>): VasReportModel;
|
|
28
28
|
toDto(): VasReportDto;
|
|
29
29
|
toApiDto(options?: any): Record<string, any>;
|
|
30
|
-
static toApiPatchDto(item: Partial<
|
|
30
|
+
static toApiPatchDto(item: Partial<VasReportDto>): Partial<VasReportDto>;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=vas-report.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-report.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-report.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,cAAe,SAAQ,eAAgB,YAAW,YAAY;IAGvD,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,MAAM;IACpB,YAAY,EAAE,MAAM;IACpB,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,aAAa,EAAE,OAAO;gBApBb,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,OAAO;IAiB/B,MAAM,CAAC,KAAK,IAAI,cAAc;WAId,OAAO,CACrB,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,GAC3B,cAAc;IA0BjB,KAAK,IAAI,YAAY;IA0BL,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WAQ9C,aAAa,CACzB,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAC1B,OAAO,CAAC,YAAY,CAAC;CAUzB"}
|
|
@@ -4,7 +4,7 @@ exports.VasReportModel = void 0;
|
|
|
4
4
|
const vas_job_data_model_1 = require("./vas-job-data.model");
|
|
5
5
|
const only_1 = require("../utils/only");
|
|
6
6
|
class VasReportModel extends vas_job_data_model_1.VasJobDataModel {
|
|
7
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, reportLayout, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId) {
|
|
7
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, reportLayout, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId, portalVisible) {
|
|
8
8
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
9
9
|
this.id = id;
|
|
10
10
|
this.created = created;
|
|
@@ -26,12 +26,13 @@ class VasReportModel extends vas_job_data_model_1.VasJobDataModel {
|
|
|
26
26
|
this.succeeded = succeeded;
|
|
27
27
|
this.attempts = attempts;
|
|
28
28
|
this.notificationId = notificationId;
|
|
29
|
+
this.portalVisible = portalVisible;
|
|
29
30
|
}
|
|
30
31
|
static empty() {
|
|
31
32
|
return VasReportModel.fromDto({});
|
|
32
33
|
}
|
|
33
34
|
static fromDto(dto) {
|
|
34
|
-
return new VasReportModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.reportLayout || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '');
|
|
35
|
+
return new VasReportModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.reportLayout || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '', dto.portalVisible || false);
|
|
35
36
|
}
|
|
36
37
|
toDto() {
|
|
37
38
|
return {
|
|
@@ -55,6 +56,7 @@ class VasReportModel extends vas_job_data_model_1.VasJobDataModel {
|
|
|
55
56
|
succeeded: this.succeeded,
|
|
56
57
|
attempts: this.attempts,
|
|
57
58
|
notificationId: this.notificationId,
|
|
59
|
+
portalVisible: this.portalVisible
|
|
58
60
|
};
|
|
59
61
|
}
|
|
60
62
|
toApiDto(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-report.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.model.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,wCAAqC;AAErC,MAAa,cAAe,SAAQ,oCAAe;IAEjD,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,GAAW,EACpB,YAAoB,EACpB,KAAa,EACb,SAAiB,EACjB,OAAe,EACf,SAAiB,EACjB,SAAiB,EACjB,SAAiB,EACjB,QAAgB,EAChB,cAAsB;QAE7B,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,GAAG,CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-report.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report.model.ts"],"names":[],"mappings":";;;AAAA,6DAAuD;AAGvD,wCAAqC;AAErC,MAAa,cAAe,SAAQ,oCAAe;IAEjD,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,GAAW,EACpB,YAAoB,EACpB,KAAa,EACb,SAAiB,EACjB,OAAe,EACf,SAAiB,EACjB,SAAiB,EACjB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,aAAsB;QAE7B,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,GAAG,CACJ,CAAC;QAlCc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAA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C/B;IACJ,CAAC;IAEM,MAAM,CAAC,aAAa,CACzB,IAA2B;QAE3B,OAAO,IAAA,WAAI,EACT,IAAI,EACJ;YACE,SAAS;YACT,UAAU;YACV,eAAe;SAChB,CACF,CAAC;IACJ,CAAC;CACF;AAtHD,wCAsHC","sourcesContent":["import { VasJobDataModel } from './vas-job-data.model';\nimport { VasReportDto } from './vas-report.dto';\nimport { VasTaskDto } from './vas-task.dto';\nimport { only } from '../utils/only';\n\nexport class VasReportModel extends VasJobDataModel implements VasReportDto {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override job: string,\n public reportLayout: string,\n public title: string,\n public sendEmail: string,\n public message: string,\n public attempted: string,\n public completed: string,\n public succeeded: string,\n public attempts: number,\n public notificationId: string,\n public portalVisible: boolean\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n job,\n );\n }\n\n static empty(): VasReportModel {\n return VasReportModel.fromDto({});\n }\n\n static override fromDto(\n dto: Partial<VasReportModel>\n ): VasReportModel {\n return new VasReportModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.job || '',\n dto.reportLayout || '',\n dto.title || '',\n dto.sendEmail || '',\n dto.message || '',\n dto.attempted || '',\n dto.completed || '',\n dto.succeeded || '',\n dto.attempts || 0,\n dto.notificationId || '',\n dto.portalVisible || false\n );\n }\n\n toDto(): VasReportDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n job: this.job,\n reportLayout: this.reportLayout,\n title: this.title,\n sendEmail: this.sendEmail,\n message: this.message,\n attempted: this.attempted,\n completed: this.completed,\n succeeded: this.succeeded,\n attempts: this.attempts,\n notificationId: this.notificationId,\n portalVisible: this.portalVisible\n };\n }\n\n public override toApiDto(options?: any): Record<string, any> {\n return {\n ...super.toApiDto(options),\n job: this.job,\n reportLayout: this.reportLayout\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasReportDto>\n ): Partial<VasReportDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'portalVisible',\n ]\n );\n }\n}\n"]}
|
package/cjs/lib/utils/only.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param obj object to be processed
|
|
5
5
|
* @param omitKey key or array of keys to be kept
|
|
6
|
+
* @param transform optional function used to transform each value
|
|
6
7
|
*/
|
|
7
|
-
export declare const only: <T extends Record<string, any>>(obj: T, omitKey:
|
|
8
|
+
export declare const only: <T extends Record<string, any>>(obj: T, omitKey: keyof T | Array<keyof T>, transform?: (obj: T, key: keyof T) => any) => Partial<T>;
|
|
8
9
|
//# sourceMappingURL=only.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"only.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/utils/only.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"only.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/utils/only.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAC3C,CAAC,WACG,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,cACrB,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,KAAK,GAAG,KACxC,OAAO,CAAC,CAAC,CASX,CAAC"}
|
package/cjs/lib/utils/only.js
CHANGED
|
@@ -6,18 +6,14 @@ exports.only = void 0;
|
|
|
6
6
|
*
|
|
7
7
|
* @param obj object to be processed
|
|
8
8
|
* @param omitKey key or array of keys to be kept
|
|
9
|
+
* @param transform optional function used to transform each value
|
|
9
10
|
*/
|
|
10
|
-
const only = (obj, omitKey) => {
|
|
11
|
+
const only = (obj, omitKey, transform) => {
|
|
12
|
+
const t = transform || ((obj, key) => obj[key]);
|
|
13
|
+
const omitKeys = Array.isArray(omitKey) ? omitKey : [omitKey];
|
|
11
14
|
return Object.keys(obj).reduce((result, key) => {
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
result[key] = obj[key];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
if (omitKey === key) {
|
|
19
|
-
result[key] = obj[key];
|
|
20
|
-
}
|
|
15
|
+
if (omitKeys.includes(key)) {
|
|
16
|
+
result[key] = t(obj, key);
|
|
21
17
|
}
|
|
22
18
|
return result;
|
|
23
19
|
}, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"only.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/utils/only.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"only.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/utils/only.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACI,MAAM,IAAI,GAAG,CAClB,GAAM,EACN,OAAiC,EACjC,SAAyC,EAC7B,EAAE;IACd,MAAM,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC,GAAM,EAAE,GAAY,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QAC7C,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAS,CAAC,CAAC;AAChB,CAAC,CAAC;AAbW,QAAA,IAAI,QAaf","sourcesContent":["/**\n * Return an object with only the properties specified by key(s)\n *\n * @param obj object to be processed\n * @param omitKey key or array of keys to be kept\n * @param transform optional function used to transform each value\n */\nexport const only = <T extends Record<string, any>>(\n obj: T,\n omitKey: keyof T | Array<keyof T>,\n transform?: (obj: T, key: keyof T) => any\n): Partial<T> => {\n const t = transform || ((obj: T, key: keyof T) => obj[key]);\n const omitKeys = Array.isArray(omitKey) ? omitKey : [omitKey];\n return Object.keys(obj).reduce((result, key) => {\n if (omitKeys.includes(key)) {\n result[key] = t(obj, key);\n }\n return result;\n }, {} as any);\n};\n"]}
|
|
@@ -860,18 +860,14 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
|
860
860
|
*
|
|
861
861
|
* @param obj object to be processed
|
|
862
862
|
* @param omitKey key or array of keys to be kept
|
|
863
|
+
* @param transform optional function used to transform each value
|
|
863
864
|
*/
|
|
864
|
-
const only = (obj, omitKey) => {
|
|
865
|
+
const only = (obj, omitKey, transform) => {
|
|
866
|
+
const t = transform || ((obj, key) => obj[key]);
|
|
867
|
+
const omitKeys = Array.isArray(omitKey) ? omitKey : [omitKey];
|
|
865
868
|
return Object.keys(obj).reduce((result, key) => {
|
|
866
|
-
if (
|
|
867
|
-
|
|
868
|
-
result[key] = obj[key];
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
else {
|
|
872
|
-
if (omitKey === key) {
|
|
873
|
-
result[key] = obj[key];
|
|
874
|
-
}
|
|
869
|
+
if (omitKeys.includes(key)) {
|
|
870
|
+
result[key] = t(obj, key);
|
|
875
871
|
}
|
|
876
872
|
return result;
|
|
877
873
|
}, {});
|
|
@@ -1088,8 +1084,9 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1088
1084
|
config;
|
|
1089
1085
|
descriptionImage;
|
|
1090
1086
|
portalEnabled;
|
|
1087
|
+
portalListVisible;
|
|
1091
1088
|
controlTypeId = '';
|
|
1092
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled) {
|
|
1089
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled, portalListVisible) {
|
|
1093
1090
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
1094
1091
|
this.id = id;
|
|
1095
1092
|
this.created = created;
|
|
@@ -1114,6 +1111,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1114
1111
|
this.config = config;
|
|
1115
1112
|
this.descriptionImage = descriptionImage;
|
|
1116
1113
|
this.portalEnabled = portalEnabled;
|
|
1114
|
+
this.portalListVisible = portalListVisible;
|
|
1117
1115
|
if (typeof controlType === 'string') {
|
|
1118
1116
|
this.controlTypeId = controlType;
|
|
1119
1117
|
}
|
|
@@ -1189,7 +1187,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1189
1187
|
// eslint-disable-next-line new-cap
|
|
1190
1188
|
dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', handleControlType(dto.controlType), dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', typeof dto.config === 'string' ?
|
|
1191
1189
|
JSON.parse(dto.config || '{}') :
|
|
1192
|
-
dto.config, dto.descriptionImage || '', dto.portalEnabled || false);
|
|
1190
|
+
dto.config, dto.descriptionImage || '', dto.portalEnabled || false, dto.portalListVisible || false);
|
|
1193
1191
|
}
|
|
1194
1192
|
/**
|
|
1195
1193
|
* @param {any} value the value to be parsed
|
|
@@ -1233,7 +1231,8 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1233
1231
|
defaultValue: this.defaultValue,
|
|
1234
1232
|
config: JSON.stringify(this.config),
|
|
1235
1233
|
descriptionImage: this.descriptionImage,
|
|
1236
|
-
portalEnabled: this.portalEnabled
|
|
1234
|
+
portalEnabled: this.portalEnabled,
|
|
1235
|
+
portalListVisible: this.portalListVisible
|
|
1237
1236
|
};
|
|
1238
1237
|
}
|
|
1239
1238
|
toApiDto(options) {
|
|
@@ -1249,7 +1248,8 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1249
1248
|
controlType: this.controlType.id,
|
|
1250
1249
|
group: this.group,
|
|
1251
1250
|
validators: this.validators,
|
|
1252
|
-
linkable: this.linkable
|
|
1251
|
+
linkable: this.linkable,
|
|
1252
|
+
portalListVisible: this.portalListVisible
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
1255
|
static toApiPatchDto(item) {
|
|
@@ -1267,6 +1267,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
|
|
|
1267
1267
|
'group',
|
|
1268
1268
|
'validators',
|
|
1269
1269
|
'linkable',
|
|
1270
|
+
'portalListVisible'
|
|
1270
1271
|
]);
|
|
1271
1272
|
}
|
|
1272
1273
|
}
|
|
@@ -2318,7 +2319,8 @@ class VasReportModel extends VasJobDataModel {
|
|
|
2318
2319
|
succeeded;
|
|
2319
2320
|
attempts;
|
|
2320
2321
|
notificationId;
|
|
2321
|
-
|
|
2322
|
+
portalVisible;
|
|
2323
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, reportLayout, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId, portalVisible) {
|
|
2322
2324
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
2323
2325
|
this.id = id;
|
|
2324
2326
|
this.created = created;
|
|
@@ -2340,12 +2342,13 @@ class VasReportModel extends VasJobDataModel {
|
|
|
2340
2342
|
this.succeeded = succeeded;
|
|
2341
2343
|
this.attempts = attempts;
|
|
2342
2344
|
this.notificationId = notificationId;
|
|
2345
|
+
this.portalVisible = portalVisible;
|
|
2343
2346
|
}
|
|
2344
2347
|
static empty() {
|
|
2345
2348
|
return VasReportModel.fromDto({});
|
|
2346
2349
|
}
|
|
2347
2350
|
static fromDto(dto) {
|
|
2348
|
-
return new VasReportModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.reportLayout || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '');
|
|
2351
|
+
return new VasReportModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.reportLayout || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '', dto.portalVisible || false);
|
|
2349
2352
|
}
|
|
2350
2353
|
toDto() {
|
|
2351
2354
|
return {
|
|
@@ -2369,6 +2372,7 @@ class VasReportModel extends VasJobDataModel {
|
|
|
2369
2372
|
succeeded: this.succeeded,
|
|
2370
2373
|
attempts: this.attempts,
|
|
2371
2374
|
notificationId: this.notificationId,
|
|
2375
|
+
portalVisible: this.portalVisible
|
|
2372
2376
|
};
|
|
2373
2377
|
}
|
|
2374
2378
|
toApiDto(options) {
|