Skip to content

Commit

Permalink
Fixup naming of *toRef() helper functions
Browse files Browse the repository at this point in the history
Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Sep 28, 2023
1 parent d8d5cb8 commit 05f0f8a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ export const ApplicationForm: React.FC<ApplicationFormProps> = ({
const {
existingApplications,
businessServices,
businessServicesToRef,
businessServiceToRef,
stakeholders,
stakeholdersToRef,
stakeholderToRef,
stakeholdersToRefs,
tags,
tagsToRefs,
Expand Down Expand Up @@ -263,9 +263,9 @@ export const ApplicationForm: React.FC<ApplicationFormProps> = ({
description: formValues.description.trim(),
comments: formValues.comments.trim(),

businessService: businessServicesToRef(formValues.businessServiceName),
businessService: businessServiceToRef(formValues.businessServiceName),
tags,
owner: stakeholdersToRef(formValues.owner),
owner: stakeholderToRef(formValues.owner),
contributors: stakeholdersToRefs(formValues.contributors),

repository: formValues.sourceRepository
Expand Down Expand Up @@ -609,10 +609,10 @@ const useApplicationFormData = ({
const tagsToRefs = (names: string[] | undefined | null) =>
matchItemsToRefs(tags, (i) => i.name, names);

Check warning on line 610 in client/src/app/pages/applications/components/application-form/application-form.tsx

View check run for this annotation

Codecov / codecov/patch

client/src/app/pages/applications/components/application-form/application-form.tsx#L610

Added line #L610 was not covered by tests

const businessServicesToRef = (name: string | undefined | null) =>
const businessServiceToRef = (name: string | undefined | null) =>
matchItemsToRef(businessServices, (i) => i.name, name);

Check warning on line 613 in client/src/app/pages/applications/components/application-form/application-form.tsx

View check run for this annotation

Codecov / codecov/patch

client/src/app/pages/applications/components/application-form/application-form.tsx#L613

Added line #L613 was not covered by tests

const stakeholdersToRef = (name: string | undefined | null) =>
const stakeholderToRef = (name: string | undefined | null) =>
matchItemsToRef(stakeholders, (i) => i.name, name);

Check warning on line 616 in client/src/app/pages/applications/components/application-form/application-form.tsx

View check run for this annotation

Codecov / codecov/patch

client/src/app/pages/applications/components/application-form/application-form.tsx#L616

Added line #L616 was not covered by tests

const stakeholdersToRefs = (names: string[] | undefined | null) =>
Expand Down Expand Up @@ -663,9 +663,9 @@ const useApplicationFormData = ({
// Send back source data and action that are needed by the ApplicationForm
return {
businessServices,
businessServicesToRef,
businessServiceToRef,
stakeholders,
stakeholdersToRef,
stakeholderToRef,
stakeholdersToRefs,
existingApplications,
tagCategories,
Expand Down

0 comments on commit 05f0f8a

Please sign in to comment.