diff --git a/pages/hold/request/[id]/edd.tsx b/pages/hold/request/[id]/edd.tsx index 7c03d38b..334d5939 100644 --- a/pages/hold/request/[id]/edd.tsx +++ b/pages/hold/request/[id]/edd.tsx @@ -74,7 +74,7 @@ export default function EDDRequestPage({ const [eddFormState, setEddFormState] = useState({ ...initialEDDFormState, patronId, - source: item.holdRequestSource, + source: item.formattedSourceForHoldRequest, }) const [formPosting, setFormPosting] = useState(false) diff --git a/pages/hold/request/[id]/index.tsx b/pages/hold/request/[id]/index.tsx index e959aabe..1313e5c2 100644 --- a/pages/hold/request/[id]/index.tsx +++ b/pages/hold/request/[id]/index.tsx @@ -180,7 +180,7 @@ export default function HoldRequestPage({ handleSubmit={handleSubmit} holdId={holdId} patronId={patronId} - source={item.holdRequestSource} + source={item.formattedSourceForHoldRequest} /> ) : null} diff --git a/src/models/Item.ts b/src/models/Item.ts index ca01359c..ae4e81a8 100644 --- a/src/models/Item.ts +++ b/src/models/Item.ts @@ -82,7 +82,7 @@ export default class Item { .includes("all") } - get holdRequestSource(): string { + get formattedSourceForHoldRequest(): string { return convertCamelToShishKabobCase(this.source) } diff --git a/src/models/modelTests/Item.test.ts b/src/models/modelTests/Item.test.ts index 4d050bae..d07e9290 100644 --- a/src/models/modelTests/Item.test.ts +++ b/src/models/modelTests/Item.test.ts @@ -106,7 +106,7 @@ describe("Item model", () => { }) it("returns the source in kebabcase for use in hold requests", () => { - expect(item.holdRequestSource).toBe("sierra-nypl") + expect(item.formattedSourceForHoldRequest).toBe("sierra-nypl") }) })