@contrail/flexplm 1.1.67-alpha.3 → 1.2.0-alpha.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.
|
@@ -193,12 +193,22 @@ class TypeConversionUtils {
|
|
|
193
193
|
}
|
|
194
194
|
static async isOutboundCreatableFromEntity(fileId, mapFileUtil, entity, context) {
|
|
195
195
|
let isOutboundCreatable = true;
|
|
196
|
-
if (fileId) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
if (!fileId) {
|
|
197
|
+
return isOutboundCreatable;
|
|
198
|
+
}
|
|
199
|
+
let mapKey;
|
|
200
|
+
try {
|
|
201
|
+
mapKey = await this.getMapKey(fileId, mapFileUtil, entity, TypeConversionUtils.VIBE2FLEX_DIRECTION);
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
return isOutboundCreatable;
|
|
205
|
+
}
|
|
206
|
+
if (!mapKey) {
|
|
207
|
+
return isOutboundCreatable;
|
|
208
|
+
}
|
|
209
|
+
const mapData = await map_utils_1.MapUtil.getFullMapSection(fileId, mapFileUtil, mapKey);
|
|
210
|
+
if (mapData && mapData['isOutboundCreatable']) {
|
|
211
|
+
isOutboundCreatable = await mapData['isOutboundCreatable'](entity, context);
|
|
202
212
|
}
|
|
203
213
|
return isOutboundCreatable;
|
|
204
214
|
}
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@ export enum EventShortMessageStatus {
|
|
|
2
2
|
SUCCESS = 'Success',
|
|
3
3
|
FAILURE = 'Failure',
|
|
4
4
|
CREATED = 'Created',
|
|
5
|
-
ITEM_FAMILY_ID_MISSING =
|
|
6
|
-
ITEM_FAMILY_NOT_FOUND =
|
|
7
|
-
PROJECT_ITEM_NOT_FOUND =
|
|
5
|
+
ITEM_FAMILY_ID_MISSING = 'Item_family_id_missing',
|
|
6
|
+
ITEM_FAMILY_NOT_FOUND = 'Item_family_not_found',
|
|
7
|
+
PROJECT_ITEM_NOT_FOUND = 'Project_item_not_found',
|
|
8
8
|
MISSING_IDENTIFIER_PROPERTIES = 'Missing_identifier_properties',
|
|
9
9
|
MISSING_INPUT = 'Missing_input',
|
|
10
10
|
NOT_CREATABLE = 'Not_creatable',
|
|
@@ -354,15 +354,26 @@ export class TypeConversionUtils {
|
|
|
354
354
|
static async isOutboundCreatableFromEntity(fileId: string, mapFileUtil: MapFileUtil, entity: any, context?: any): Promise<boolean> {
|
|
355
355
|
|
|
356
356
|
let isOutboundCreatable = true;
|
|
357
|
-
if(fileId){
|
|
358
|
-
const mapKey = await this.getMapKey(fileId, mapFileUtil, entity, TypeConversionUtils.VIBE2FLEX_DIRECTION);
|
|
359
357
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
358
|
+
if (!fileId) {
|
|
359
|
+
return isOutboundCreatable;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
let mapKey: string | undefined;
|
|
363
|
+
try {
|
|
364
|
+
mapKey = await this.getMapKey(fileId, mapFileUtil, entity, TypeConversionUtils.VIBE2FLEX_DIRECTION);
|
|
365
|
+
} catch {
|
|
366
|
+
return isOutboundCreatable;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (!mapKey) {
|
|
370
|
+
return isOutboundCreatable;
|
|
364
371
|
}
|
|
365
372
|
|
|
373
|
+
const mapData = await MapUtil.getFullMapSection(fileId, mapFileUtil, mapKey);
|
|
374
|
+
if (mapData && mapData['isOutboundCreatable']) {
|
|
375
|
+
isOutboundCreatable = await mapData['isOutboundCreatable'](entity, context);
|
|
376
|
+
}
|
|
366
377
|
return isOutboundCreatable;
|
|
367
378
|
}
|
|
368
379
|
|