From dacac11cc15ebbcbc0c9b6c18185ce0018a5e9d0 Mon Sep 17 00:00:00 2001 From: Taly Date: Wed, 18 Aug 2021 13:25:53 +0300 Subject: [PATCH] unblock wksp on plan changing --- src/models/workspace.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/workspace.ts b/src/models/workspace.ts index 1b5e52e3..d98be709 100644 --- a/src/models/workspace.ts +++ b/src/models/workspace.ts @@ -287,7 +287,10 @@ export default class WorkspaceModel extends AbstractModel imp /** * Change plan for current workspace - * Reset billing period events count, reset last charge date + * - set tariffPlanId + * - reset billing period events count + * - update last charge date + * - unblock workspace * * @param planId - id of plan to be enabled */ @@ -300,6 +303,7 @@ export default class WorkspaceModel extends AbstractModel imp $set: { tariffPlanId: new ObjectId(planId), billingPeriodEventsCount: 0, + isBlocked: false, lastChargeDate: new Date(), }, }