feat: integrate consumption metrics into plan usage cycle tracking and UI display
This commit is contained in:
@@ -58,7 +58,6 @@ export class PlanUsageCycleAdapterMongoose implements IPlanUsageCycleAdapter {
|
||||
planId: data.planId,
|
||||
cycleStart: data.cycleStart,
|
||||
cycleEnd: data.cycleEnd,
|
||||
appointmentsCount: 0,
|
||||
creationDate: now,
|
||||
},
|
||||
$set: { updateDate: now },
|
||||
@@ -85,7 +84,6 @@ export class PlanUsageCycleAdapterMongoose implements IPlanUsageCycleAdapter {
|
||||
planId: data.planId,
|
||||
cycleStart: data.cycleStart,
|
||||
cycleEnd: data.cycleEnd,
|
||||
appointmentsCount: 0,
|
||||
creationDate: now,
|
||||
},
|
||||
$inc: { appointmentsCount: data.quantity },
|
||||
|
||||
@@ -49,6 +49,11 @@ export type SysAdminRecalculatePlanUsageCycleResult = {
|
||||
planId: string;
|
||||
cycleStart: Date;
|
||||
cycleEnd: Date;
|
||||
organizationsCount: number;
|
||||
employeesCount: number;
|
||||
servicesCount: number;
|
||||
clientsCount: number;
|
||||
repeatsCount: number;
|
||||
appointmentsCount: number;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user