Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dashboard/src/api/apiUrlLinks/glossaryUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const glossaryImportUrl = () => {
};

const glossaryTypeUrl = (glossaryType: string, guid: string) => {
if (glossaryType == "glossary") {
return `${glossaryUrl()}/${guid}`;
}
return `${glossaryUrl()}/${glossaryType}/${guid}`;
};

Expand Down Expand Up @@ -90,5 +93,5 @@ export {
assignTermtoEntitiesUrl,
assignTermtoCategoryUrl,
assignGlossaryTypeUrl,
removeTermorCatgeoryUrl,
removeTermorCatgeoryUrl
};
3 changes: 3 additions & 0 deletions dashboard/src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export const CustomModal: React.FC<CustomModalProps> = ({
aria-labelledby="customized-dialog-title"
aria-busy={isLoading}
open={open}
disableEnforceFocus
disableAutoFocus
disableRestoreFocus
sx={{
"& .MuiDialog-paper": {
// maxWidth: "80% !important",
Expand Down
67 changes: 34 additions & 33 deletions dashboard/src/components/ShowMore/ShowMoreView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ const ShowMoreView = ({
} else if (title == "Terms" || title == "Category") {
let selectedTerm = !isEmpty(data)
? data?.find(
(obj: {
qualifiedName: string;
displayText: string;
termGuid: string;
}) => {
if (
(obj.qualifiedName || obj.displayText) ==
currentValue.selectedValue
) {
return obj;
}
(obj: {
qualifiedName: string;
displayText: string;
termGuid: string;
}) => {
if (
(obj.qualifiedName || obj.displayText) ==
currentValue.selectedValue
) {
return obj;
}
)
}
)
: {};

if (isEmpty(gType)) {
Expand Down Expand Up @@ -190,8 +190,8 @@ const ShowMoreView = ({
const checkSuperTypes = (classificationName: string) => {
var tagObj = !isEmpty(classificationDefs)
? classificationDefs.find((obj: { name: string }) => {
return obj.name == classificationName;
})
return obj.name == classificationName;
})
: {};

return !isEmpty(tagObj?.superTypes)
Expand All @@ -203,10 +203,10 @@ const ShowMoreView = ({

const getTagParentList = (name: string) => {
let tagObj = !isEmpty(classificationDefs)
? classificationDefs?.find((obj: { name: string }) => {
return obj.name == name;
})
: {},
? classificationDefs?.find((obj: { name: string }) => {
return obj.name == name;
})
: {},
tagParents = tagObj ? tagObj?.["superTypes"] : null,
parentName = name;
if (tagParents && tagParents.length) {
Expand Down Expand Up @@ -255,14 +255,16 @@ const ShowMoreView = ({

if (title == "Terms" || title == "Category") {
const { termGuid, categoryGuid }: any = data || {};
const searchParams = new URLSearchParams(location.search);
const searchParams = new URLSearchParams();

let gTypeGuid =
(title == "Terms" ? termGuid : categoryGuid) || data?.guid;

searchParams.set("gid", gTypeGuid);
searchParams.set("gtype", title == "Terms" ? "term" : "category");
searchParams.set("viewType", title == "Terms" ? "term" : "category");
searchParams.set("fromView", "entity");

let gTypeGuid =
(title == "Terms" ? termGuid : categoryGuid) || data?.guid;
searchParams.set("searchType", "basic");

return (
<Link
Expand Down Expand Up @@ -312,12 +314,12 @@ const ShowMoreView = ({
onDelete={
!isEmpty(removeApiMethod) && !isDeleteIcon
? () => {
// Handle undefined displayKey by extracting a string value
const deleteValue = obj[displayKey] || obj.displayText || obj.text || obj.name || '';
handleDelete(deleteValue);
}
// Handle undefined displayKey by extracting a string value
const deleteValue = obj[displayKey] || obj.displayText || obj.text || obj.name || '';
handleDelete(deleteValue);
}
: isDeleteIcon && obj.count > 1
? () => {
? () => {
const searchParams = new URLSearchParams();
searchParams.set("tabActive", "classification");
searchParams.set("filter", obj.typeName);
Expand All @@ -326,7 +328,7 @@ const ShowMoreView = ({
search: searchParams.toString()
});
}
: undefined
: undefined
}
size="small"
variant="outlined"
Expand Down Expand Up @@ -407,11 +409,10 @@ const ShowMoreView = ({
sx={{ fontWeight: 600 }}
>
{!isEmpty(currentEntity)
? `${currentValue.assetName} ${
!isEmpty(currentEntity?.typeName)
? `(${currentEntity.typeName})`
: ""
}`
? `${currentValue.assetName} ${!isEmpty(currentEntity?.typeName)
? `(${currentEntity.typeName})`
: ""
}`
: ""}
</Typography>{" "}
?
Expand Down
Loading