refactor: improve most booked & least booked (#23192)

* refactor: improve most booked & least booked

* add 2 new charts and trpc handlers

* update arg

* update comment

* completed booking filter

* update

* add change in component level and remove unused translations

* current time and accepted status logic handler

* resize some charts

* restore some i18n

* restore i18n

* restore i18n

---------

Co-authored-by: Eunjae Lee <[email protected]>
This commit is contained in:
Bandhan MajumderandEunjae Lee authored and GitHub committed 2025-08-25 11:17:07 +00:00
1 parent 28ff809739
commit efca90507b
9 files changed
+145 -9

No files matched your search

@@ -809,7 +809,7 @@ export class InsightsBookingBaseService {
}
async getMembersStatsWithCount(
type: "all" | "cancelled" | "noShow" = "all",
type: "all" | "accepted" | "cancelled" | "noShow" = "all",
sortOrder: "ASC" | "DESC" = "DESC"
): Promise<UserStatsData> {
const baseConditions = await this.getBaseConditions();
@@ -819,6 +819,8 @@ export class InsightsBookingBaseService {
additionalCondition = Prisma.sql`AND status = 'cancelled'`;
} else if (type === "noShow") {
additionalCondition = Prisma.sql`AND "noShowHost" = true`;
} else if (type === "accepted") {
additionalCondition = Prisma.sql`AND status = 'accepted'`;
}
const bookingsFromTeam = await this.prisma.$queryRaw<