Skip to content

Commit 67965b2

Browse files
committed
fix wrong fixes
1 parent 3fae12a commit 67965b2

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

datahub-web-react/src/app/entity/glossaryTerm/profile/AddRelatedTermsModal.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ function AddRelatedTermsModal(props: Props) {
104104
const newUrns = [...selectedUrns, urn];
105105
setSelectedUrns(newUrns);
106106
const selectedSearchOption = tagSearchOptions.find((option) => option.props.value === urn);
107-
setSelectedTerms([...selectedTerms, { urn, component: <TermLabel name={selectedSearchOption?.props?.name} /> }]);
107+
setSelectedTerms([
108+
...selectedTerms,
109+
{ urn, component: <TermLabel name={selectedSearchOption?.props?.name} /> },
110+
]);
108111
};
109112

110113
// When a Tag or term search result is deselected, remove the urn from the Owners

datahub-web-react/src/app/entity/shared/containers/profile/sidebar/FormInfo/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function findPromptAssociation(prompt: FormPrompt, allPrompts: Array<Form
197197
// Get the prompts for a given form
198198
export function getPromptsForForm(formUrn: string, entityData: GenericEntityProperties | null) {
199199
const formAssociation = getFormAssociation(formUrn, entityData);
200-
return formAssociation?.form?.inf?o.prompts || [];
200+
return formAssociation?.form?.info?.prompts || [];
201201
}
202202

203203
/*
@@ -279,7 +279,7 @@ export function isVerificationComplete(entityData: GenericEntityProperties | nul
279279

280280
export function isFormVerificationType(entityData: GenericEntityProperties | null, formUrn: string) {
281281
const formAssociation = getFormAssociation(formUrn, entityData);
282-
return formAssociation?.form?.inf?o.type === FormType.Verification;
282+
return formAssociation?.form?.info?.type === FormType.Verification;
283283
}
284284

285285
/*
@@ -317,6 +317,6 @@ export function getVerificationAuditStamp(entityData: GenericEntityProperties |
317317
export function getBulkByQuestionPrompts(formUrn: string, entityData: GenericEntityProperties | null) {
318318
const formAssociation = getFormAssociation(formUrn, entityData);
319319
return (
320-
formAssociation?.form?.inf?o.prompts.filter((prompt) => !SCHEMA_FIELD_PROMPT_TYPES.includes(prompt.type)) || []
320+
formAssociation?.form?.info?.prompts.filter((prompt) => !SCHEMA_FIELD_PROMPT_TYPES.includes(prompt.type)) || []
321321
);
322322
}

datahub-web-react/src/app/entity/shared/entityForm/EntityFormContextProvider.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function EntityFormContextProvider({ children, formUrn }: Props)
1919
const { entityData, refetch: refetchEntityProfile, loading: profileLoading } = useEntityContext();
2020
const formAssociation = getFormAssociation(formUrn, entityData);
2121
const initialPromptId =
22-
formAssociation?.form?.inf?o.promp?ts.filter((prompt) => !SCHEMA_FIELD_PROMPT_TYPES.includes(prompt.type))[0]
22+
formAssociation?.form?.info?.prompts?.filter((prompt) => !SCHEMA_FIELD_PROMPT_TYPES.includes(prompt.type))[0]
2323
?.id || null;
2424
const isVerificationType = isFormVerificationType(entityData, formUrn);
2525
const [formView, setFormView] = useState<FormView>(FormView.BY_ENTITY);

datahub-web-react/src/app/entity/shared/entityForm/Form.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ function Form({ formUrn }: Props) {
5454
if (!hasRendered) return <Loading />;
5555

5656
const formAssociation = getFormAssociation(formUrn, entityData);
57-
const title = formAssociation?.form?.inf?o.name;
57+
const title = formAssociation?.form?.info?.name;
5858
const associatedUrn = formAssociation?.associatedUrn;
59-
const description = formAssociation?.form?.inf?o.description;
59+
const description = formAssociation?.form?.info?.description;
6060
const owners = formAssociation?.form.ownership?.owners;
6161

6262
return (

datahub-web-react/src/app/entity/shared/entityForm/useShouldShowVerificationPrompt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function useShouldShowVerificationPrompt(formUrn: string) {
2828
const { entityData } = useEntityData();
2929
const formVerification = getFormVerification(formUrn, entityData);
3030
const formAssociation = getFormAssociation(formUrn, entityData);
31-
const formType = formAssociation?.form?.inf?o.type;
31+
const formType = formAssociation?.form?.info?.type;
3232

3333
return shouldShowVerificationPrompt({
3434
formType,

datahub-web-react/src/app/entity/shared/tabs/Dataset/Validations/contract/builder/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export const createBuilderState = (contract?: DataContract | null): DataContract
99
return {
1010
schema:
1111
(contract?.properties?.schema?.length && {
12-
assertionUrn: contract?.properties?.schema[0]?.assertio?n.urn,
12+
assertionUrn: contract?.properties?.schema[0]?.assertion?.urn,
1313
}) ||
1414
undefined,
1515
freshness:
1616
(contract?.properties?.freshness?.length && {
17-
assertionUrn: contract?.properties?.freshness[0]?.assertio?n.urn,
17+
assertionUrn: contract?.properties?.freshness[0]?.assertion?.urn,
1818
}) ||
1919
undefined,
2020
dataQuality:

datahub-web-react/src/app/entity/view/builder/ViewBuilder.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export const ViewBuilder = ({ mode, urn, initialState, onSubmit, onCancel }: Pro
3232
const [createViewMutation] = useCreateViewMutation();
3333

3434
const emitTrackingEvent = (viewUrn: string, state: ViewBuilderState, isCreate: boolean) => {
35-
const filterFields = Array.from(new Set(state.definition?.filter?.filters?.map((filter) => filter.field) ?? []));
35+
const filterFields = Array.from(
36+
new Set(state.definition?.filter?.filters?.map((filter) => filter.field) ?? []),
37+
);
3638
const entityTypes = Array.from(new Set(state.definition?.entityTypes ?? []));
3739

3840
analytics.event({

0 commit comments

Comments
 (0)