refactor: migrate services (estimate) from apps/web to @plane/services

This commit is contained in:
Rahulcheryala
2026-06-04 12:42:08 +05:30
parent 5cebdab9c8
commit 9ae465178c
4 changed files with 10 additions and 4 deletions

View File

@@ -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<IEstimateType, "points"> {
) => Promise<IEstimatePointType | undefined>;
}
const estimateService = new EstimateService();
export class Estimate implements IEstimate {
// data model observables
id: string | undefined = undefined;

View File

@@ -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<IEstimatePointType | undefined>;
}
const estimateService = new EstimateService();
export class EstimatePoint implements IEstimatePoint {
// data model observables
id: string | undefined = undefined;

View File

@@ -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<void>;
}
const estimateService = new EstimateService();
export class ProjectEstimateStore implements IProjectEstimateStore {
// observables
loader: TEstimateLoader = undefined;

View File

@@ -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() {