Skip to content

Commit

Permalink
Merge branch 'staging' into speed-up-CI_CD
Browse files Browse the repository at this point in the history
  • Loading branch information
john681611 authored Oct 9, 2023
2 parents 3ffb305 + c463efa commit bea2da0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions application/frontend/src/pages/GapAnalysis/GapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { LoadingAndErrorIndicator } from '../../components/LoadingAndErrorIndica
import { useEnvironment } from '../../hooks';
import { GapAnalysisPathStart } from '../../types';
import { getDocumentDisplayName } from '../../utils';
import { getInternalUrl } from '../../utils/document';

const GetSegmentText = (segment, segmentID) => {
let textPart = segment.end;
Expand Down Expand Up @@ -66,7 +67,7 @@ const GetResultLine = (path, gapAnalysis, key) => {
let segmentID = gapAnalysis[key].start.id;
return (
<div key={path.end.id} style={{ marginBottom: '.25em', fontWeight: 'bold' }}>
<a href={`/node/standard/${path.end.name}/section/${path.end.section}`} target="_blank">
<a href={getInternalUrl(path.end)} target="_blank">
<Popup
wide="very"
size="large"
Expand Down Expand Up @@ -231,10 +232,7 @@ export const GapAnalysis = () => {
{Object.keys(gapAnalysis).map((key) => (
<Table.Row key={key}>
<Table.Cell textAlign="left" verticalAlign="top" selectable>
<a
href={`/node/standard/${gapAnalysis[key].start.name}/section/${gapAnalysis[key].start.section}`}
target="_blank"
>
<a href={getInternalUrl(gapAnalysis[key].start)} target="_blank">
<p>
<b>{getDocumentDisplayName(gapAnalysis[key].start, true)}</b>
</p>
Expand Down
2 changes: 1 addition & 1 deletion application/frontend/src/utils/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const groupBy = <T, K extends keyof any>(list: T[], getKey: (item: T) =>
return previous;
}, {} as Record<K, T[]>);

export const getInternalUrl = (doc: Document): String => {
export const getInternalUrl = (doc: Document): string => {
if (doc.doctype.toLowerCase() != 'cre') {
var standardAPIPath = `/node/${doc.doctype.toLowerCase()}/${doc.name}/`;
if (doc) {
Expand Down

0 comments on commit bea2da0

Please sign in to comment.