mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 09:41:35 +10:00
chore: wip
This commit is contained in:
@ -19,6 +19,7 @@ export type SigningVolume = {
|
|||||||
signingVolume: number;
|
signingVolume: number;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
planId: string;
|
planId: string;
|
||||||
|
customerId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type LeaderboardTableProps = {
|
type LeaderboardTableProps = {
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { kyselyPrisma, sql } from '@documenso/prisma';
|
|||||||
import { DocumentStatus, SubscriptionStatus } from '@documenso/prisma/client';
|
import { DocumentStatus, SubscriptionStatus } from '@documenso/prisma/client';
|
||||||
|
|
||||||
export type SigningVolume = {
|
export type SigningVolume = {
|
||||||
id: string;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
signingVolume: number;
|
signingVolume: number;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
@ -52,6 +52,7 @@ export async function getSigningVolume({
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
.select([
|
.select([
|
||||||
|
's.id as id',
|
||||||
's.planId as planId',
|
's.planId as planId',
|
||||||
's.createdAt as createdAt',
|
's.createdAt as createdAt',
|
||||||
sql<string>`COALESCE(u."customerId", t."customerId")`.as('customerId'),
|
sql<string>`COALESCE(u."customerId", t."customerId")`.as('customerId'),
|
||||||
@ -59,6 +60,7 @@ export async function getSigningVolume({
|
|||||||
sql<number>`COUNT(DISTINCT d.id)`.as('signingVolume'),
|
sql<number>`COUNT(DISTINCT d.id)`.as('signingVolume'),
|
||||||
])
|
])
|
||||||
.groupBy([
|
.groupBy([
|
||||||
|
's.id',
|
||||||
's.planId',
|
's.planId',
|
||||||
's.createdAt',
|
's.createdAt',
|
||||||
'u.customerId',
|
'u.customerId',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user