Skip to content

Reworked average calculator#18

Open
corentin703 wants to merge 14 commits intobde-isima:stagingfrom
corentin703:develop
Open

Reworked average calculator#18
corentin703 wants to merge 14 commits intobde-isima:stagingfrom
corentin703:develop

Conversation

@corentin703
Copy link
Copy Markdown

No description provided.

@corentin703 corentin703 force-pushed the develop branch 2 times, most recently from b0eee11 to 166de89 Compare November 6, 2021 21:40
@corentin703
Copy link
Copy Markdown
Author

I added a feature to export data to Excel with articles, users and promotions.

Comment thread app/components/dashboard/articles/ExportArticles.tsx
Comment thread app/components/dashboard/articles/ExportArticles.tsx Outdated
Comment thread app/components/dashboard/articles/ExportArticles.tsx Outdated
Comment thread app/components/dashboard/articles/ExportArticles.tsx Outdated
Comment thread app/components/dashboard/articles/ExportArticles.tsx Outdated
Comment thread app/components/dashboard/articles/ExportArticles.tsx Outdated
todayDate.getDate()
)

const articles = await db.$queryRaw<any>`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai pas encore de suggestion à faire mais faut rework la query pour utiliser les modèles prisma et avoir un retour typé

Copy link
Copy Markdown
Author

@corentin703 corentin703 Feb 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ma solution temporaire : je n'ai pas trouvé mieux, ni comment la faire directement avec prisma.

interface ArticleWithStatsPayload extends Prisma.ArticleGetPayload<{}> {
  weekCount: number,
  monthCount: number,
  yearCount: number,
  totalCount: number,
}

export type ArticleWithStatsOutputType = {
  articles: ArticleWithStatsPayload[],
}

Comment thread app/entities/articles/queries/getArticlesWithStats.ts Outdated
Comment thread app/pages/dashboard/articles.tsx Outdated
Comment thread app/pages/dashboard/promotions.tsx Outdated
Comment thread app/pages/dashboard/users.tsx Outdated
@corentin703 corentin703 force-pushed the develop branch 2 times, most recently from 6bdc8c4 to 85c09f8 Compare February 20, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants