forked from github/plane
fix: estimate order not maintained in create/ update modal. (#3326)
* fix: estimate order not maintained in create/ update modal. * fix: estimate points mutation on update.
This commit is contained in:
committed by
sriram veeraghanta
parent
b62a1b11b1
commit
12a3392722
@@ -172,7 +172,7 @@ export class EstimateStore implements IEstimateStore {
|
||||
updateEstimate = async (workspaceSlug: string, projectId: string, estimateId: string, data: IEstimateFormData) =>
|
||||
await this.estimateService.patchEstimate(workspaceSlug, projectId, estimateId, data).then((response) => {
|
||||
const updatedEstimates = (this.estimates?.[projectId] ?? []).map((estimate) =>
|
||||
estimate.id === estimateId ? { ...estimate, ...data.estimate } : estimate
|
||||
estimate.id === estimateId ? { ...estimate, ...data.estimate, points: [...data.estimate_points] } : estimate
|
||||
);
|
||||
runInAction(() => {
|
||||
set(this.estimates, projectId, updatedEstimates);
|
||||
|
||||
Reference in New Issue
Block a user