From b02619aa65adbe2bae70ed8b22bb43386646b838 Mon Sep 17 00:00:00 2001 From: Michael Liu Date: Wed, 25 Oct 2023 10:38:24 -0700 Subject: [PATCH] Registered operationDetails widget (#2323) --- .../operationDetails.publish.module.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/operations/operation-details/operationDetails.publish.module.ts b/src/components/operations/operation-details/operationDetails.publish.module.ts index 6792bd4d0..9013fd5d4 100644 --- a/src/components/operations/operation-details/operationDetails.publish.module.ts +++ b/src/components/operations/operation-details/operationDetails.publish.module.ts @@ -1,11 +1,25 @@ import { IInjectorModule, IInjector } from "@paperbits/common/injection"; import { OperationDetailsModelBinder } from "./operationDetailsModelBinder"; import { OperationDetailsViewModelBinder } from "./ko/operationDetailsViewModelBinder"; +import { OperationDetailsModel } from "./operationDetailsModel"; +import { KnockoutComponentBinder } from "@paperbits/core/ko"; +import { OperationDetailsViewModel } from "./ko/operationDetailsViewModel"; +import { IWidgetService } from "@paperbits/common/widgets"; export class OperationDetailsPublishModule implements IInjectorModule { public register(injector: IInjector): void { injector.bindToCollection("modelBinders", OperationDetailsModelBinder); injector.bindToCollection("viewModelBinders", OperationDetailsViewModelBinder); + + const widgetService = injector.resolve("widgetService"); + + widgetService.registerWidget("operationDetails", { + modelDefinition: OperationDetailsModel, + componentBinder: KnockoutComponentBinder, + componentDefinition: OperationDetailsViewModel, + modelBinder: OperationDetailsModelBinder, + viewModelBinder: OperationDetailsViewModelBinder + }); } } \ No newline at end of file