diff --git a/apps/web/ce/store/estimates/estimate.ts b/apps/web/ce/store/estimates/estimate.ts index 805c00df8d..36fe1ea9c2 100644 --- a/apps/web/ce/store/estimates/estimate.ts +++ b/apps/web/ce/store/estimates/estimate.ts @@ -14,7 +14,7 @@ import type { TEstimateSystemKeys, } from "@plane/types"; // plane web services -import estimateService from "@/services/estimate.service"; +import { EstimateService } from "@plane/services"; // store import type { IEstimatePoint } from "@/store/estimates/estimate-point"; import { EstimatePoint } from "@/store/estimates/estimate-point"; @@ -41,6 +41,8 @@ export interface IEstimate extends Omit { ) => Promise; } +const estimateService = new EstimateService(); + export class Estimate implements IEstimate { // data model observables id: string | undefined = undefined; diff --git a/apps/web/core/store/estimates/estimate-point.ts b/apps/web/core/store/estimates/estimate-point.ts index 3671a02ca7..f303beaf56 100644 --- a/apps/web/core/store/estimates/estimate-point.ts +++ b/apps/web/core/store/estimates/estimate-point.ts @@ -11,7 +11,7 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx" // types import type { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types"; // plane web services -import estimateService from "@/services/estimate.service"; +import { EstimateService } from "@plane/services"; // store import type { CoreRootStore } from "@/store/root.store"; @@ -35,6 +35,8 @@ export interface IEstimatePoint extends IEstimatePointType { ) => Promise; } +const estimateService = new EstimateService(); + export class EstimatePoint implements IEstimatePoint { // data model observables id: string | undefined = undefined; diff --git a/apps/web/core/store/estimates/project-estimate.store.ts b/apps/web/core/store/estimates/project-estimate.store.ts index 519e0805cf..a554659135 100644 --- a/apps/web/core/store/estimates/project-estimate.store.ts +++ b/apps/web/core/store/estimates/project-estimate.store.ts @@ -10,7 +10,7 @@ import { computedFn } from "mobx-utils"; // types import type { IEstimate as IEstimateType, IEstimateFormData, TEstimateSystemKeys } from "@plane/types"; // plane web services -import estimateService from "@/services/estimate.service"; +import { EstimateService } from "@plane/services"; // plane web store import type { IEstimate } from "@/plane-web/store/estimates/estimate"; import { Estimate } from "@/plane-web/store/estimates/estimate"; @@ -53,6 +53,8 @@ export interface IProjectEstimateStore { deleteEstimate: (workspaceSlug: string, projectId: string, estimateId: string) => Promise; } +const estimateService = new EstimateService(); + export class ProjectEstimateStore implements IProjectEstimateStore { // observables loader: TEstimateLoader = undefined; diff --git a/apps/web/core/services/estimate.service.ts b/packages/services/src/estimate/estimate.service.ts similarity index 98% rename from apps/web/core/services/estimate.service.ts rename to packages/services/src/estimate/estimate.service.ts index 343d4b0168..28c6a3f308 100644 --- a/apps/web/core/services/estimate.service.ts +++ b/packages/services/src/estimate/estimate.service.ts @@ -11,7 +11,7 @@ import { API_BASE_URL } from "@plane/constants"; import type { IEstimate, IEstimateFormData, IEstimatePoint } from "@plane/types"; // helpers // services -import { APIService } from "@/services/api.service"; +import { APIService } from "../api.service"; export class EstimateService extends APIService { constructor() {