diff --git a/web/app/components/document/sidebar/related-resources/list-item/resource.ts b/web/app/components/document/sidebar/related-resources/list-item/resource.ts index 4a4838881..ab395a135 100644 --- a/web/app/components/document/sidebar/related-resources/list-item/resource.ts +++ b/web/app/components/document/sidebar/related-resources/list-item/resource.ts @@ -26,7 +26,7 @@ export default class DocumentSidebarRelatedResourcesListItemResourceComponent ex */ protected get docType() { this.assertResourceIsDocument(this.args.resource); - return this.args.resource.type; + return this.args.resource.documentType; } /** @@ -73,7 +73,7 @@ export default class DocumentSidebarRelatedResourcesListItemResourceComponent ex * with the correct data model. */ private assertResourceIsDocument( - document: RelatedResource + document: RelatedResource, ): asserts document is RelatedHermesDocument { if (!("googleFileID" in document)) { throw new Error("resource must be a document"); diff --git a/web/app/components/related-resources.ts b/web/app/components/related-resources.ts index e52429699..1e88642fa 100644 --- a/web/app/components/related-resources.ts +++ b/web/app/components/related-resources.ts @@ -23,7 +23,7 @@ export interface RelatedHermesDocument { id: number; googleFileID: string; title: string; - type: string; + documentType: string; documentNumber: string; sortOrder: number; } diff --git a/web/app/components/related-resources/add.ts b/web/app/components/related-resources/add.ts index 809421b57..0cecadb95 100644 --- a/web/app/components/related-resources/add.ts +++ b/web/app/components/related-resources/add.ts @@ -33,7 +33,7 @@ interface RelatedResourcesAddComponentSignature { dd: XDropdownListAnchorAPI | null, query: string, shouldIgnoreDelay?: boolean, - options?: SearchOptions + options?: SearchOptions, ) => Promise; getObject: (dd: XDropdownListAnchorAPI | null, id: string) => Promise; headerTitle: string; @@ -329,7 +329,7 @@ export default class RelatedResourcesAddComponent extends Component { assert( "full url format expected", - this.firstPartyURLFormat === FirstPartyURLFormat.FullURL + this.firstPartyURLFormat === FirstPartyURLFormat.FullURL, ); this.checkForDuplicate(id, true); diff --git a/web/mirage/factories/related-hermes-document.ts b/web/mirage/factories/related-hermes-document.ts index 6ca3c75a9..2afce3fd6 100644 --- a/web/mirage/factories/related-hermes-document.ts +++ b/web/mirage/factories/related-hermes-document.ts @@ -13,7 +13,7 @@ export default Factory.extend({ title() { return `Related Document ${this.id}`; }, - type: "RFC", + documentType: "RFC", documentNumber() { return `LAB-00${this.id}`; }, diff --git a/web/tests/integration/components/document/sidebar/related-resources/list-item-test.ts b/web/tests/integration/components/document/sidebar/related-resources/list-item-test.ts index 19648e93c..38b964ae3 100644 --- a/web/tests/integration/components/document/sidebar/related-resources/list-item-test.ts +++ b/web/tests/integration/components/document/sidebar/related-resources/list-item-test.ts @@ -36,7 +36,7 @@ module( setupMirage(hooks); hooks.beforeEach(async function ( - this: DocumentSidebarRelatedResourcesListItemTestContext + this: DocumentSidebarRelatedResourcesListItemTestContext, ) { this.server.create("document"); @@ -44,7 +44,7 @@ module( this.set("document", { googleFileID: documentAttrs.objectID, title: documentAttrs.title, - type: documentAttrs.docType, + documentType: documentAttrs.docType, documentNumber: documentAttrs.docNumber, sortOrder: 1, }); @@ -166,7 +166,7 @@ module( .exists({ count: 2 }, "two buttons are present for external resources"); const editButton = htmlElement( - `${DROPDOWN_LIST_ITEM_SELECTOR}:nth-child(1) button` + `${DROPDOWN_LIST_ITEM_SELECTOR}:nth-child(1) button`, ); assert.dom(editButton).hasText("Edit", "edit button is present"); @@ -187,7 +187,7 @@ module( await click(OVERFLOW_BUTTON_SELECTOR); const removeButton = htmlElement( - `${DROPDOWN_LIST_ITEM_SELECTOR}:nth-child(2) button` + `${DROPDOWN_LIST_ITEM_SELECTOR}:nth-child(2) button`, ); assert.dom(removeButton).hasText("Remove", "remove button is present"); @@ -195,5 +195,5 @@ module( assert.equal(count, 2, "remove button was clicked"); }); - } + }, );