Commit 42a441aa by kevalbhatt Committed by Madhan Neethiraj

ATLAS-1640: fix - entity update UI does not shows empty value for array-entity attributes

parent 543a85d7
......@@ -438,6 +438,9 @@ define(['require',
} else {
splitTypeName = value.typeName;
}
if (!this.guid) {
disabled = value.isOptional;
}
return '<select class="form-control row-margin-bottom entityInputBox ' + (value.isOptional === true ? "false" : "true") + '" data-type="' + value.typeName +
'" data-key="' + value.name + '" ' + (disabled ? 'disabled data-skip="true"' : "") + ' data-id="entitySelectData" data-queryData="' + splitTypeName + '">' + (this.guid ? entityValue : "") + '</select>';
}
......@@ -504,7 +507,7 @@ define(['require',
++this.asyncFetchLOVCounter;
this.searchCollection.fetch({ reset: true });
}
return this.getSelect(value, entityValue, value.isOptional);
return this.getSelect(value, entityValue, true);
}
}
return this.getSelect(value, entityValue, false); // Don't disable select for non entity attributes.
......@@ -766,7 +769,7 @@ define(['require',
var storeEntity = that.selectStoreCollection.findWhere({ guid: dataValue.guid });
var refEntiyFound = referredEntities[dataValue.guid]
if (storeEntity) {
var name = Utils.getName(storeEntity, 'displayText');
var name = Utils.getName(storeEntity.toJSON(), 'displayText');
} else if (!storeEntity && refEntiyFound && refEntiyFound.typeName) {
that.selectStoreCollection.push(refEntiyFound);
var name = Utils.getName(refEntiyFound, 'displayText');
......
......@@ -291,7 +291,7 @@ define(['require',
if (Globals.taxonomy) {
multiAssignDataTerm = '<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i>' + " " + 'Assign Term</a>';
}
if (Globals.entityCreate && Globals.entityTypeConfList) {
if (Globals.entityCreate && Globals.entityTypeConfList && Utils.getUrlState.isSearchTab()) {
createEntityTag = "<p>If you do not find the entity in search result below then you can" + '<a href="javascript:void(0)" data-id="createEntity"> create new entity</a></p>';
}
that.$('.searchResult').html(resultData + multiAssignDataTag + multiAssignDataTerm + createEntityTag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment