Skip to content

Commit

Permalink
add contentReadyVisionsTotal (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudmoravej authored Feb 12, 2024
1 parent ac666fd commit c078cdf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions app/@types/graphql/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type Advice = {
aiEngineId: Scalars['Int']['output'];
analyzedActivitiesTotal: Scalars['Int']['output'];
analyzedAt: Scalars['ISO8601DateTime']['output'];
contentReadyVisionsTotal: Scalars['Int']['output'];
cycle?: Maybe<Cycle>;
cycleId: Scalars['Int']['output'];
id: Scalars['Int']['output'];
Expand Down Expand Up @@ -979,16 +980,16 @@ export type GenerateCycleAdviceMutationVariables = Exact<{
}>;


export type GenerateCycleAdviceMutation = { __typename?: 'Mutation', generateCycleAdvice?: { __typename?: 'GenerateCycleAdvicePayload', advice: { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number } } | null };
export type GenerateCycleAdviceMutation = { __typename?: 'Mutation', generateCycleAdvice?: { __typename?: 'GenerateCycleAdvicePayload', advice: { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number } } | null };

export type AdviceFragmentFragment = { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number };
export type AdviceFragmentFragment = { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number };

export type CoachIndividualQueryVariables = Exact<{
id: Scalars['ID']['input'];
}>;


export type CoachIndividualQuery = { __typename?: 'Query', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean, activeCycles?: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } | null> | null } | null }, adviceList: { __typename?: 'AdviceConnection', nodes?: Array<{ __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number } | null> | null } };
export type CoachIndividualQuery = { __typename?: 'Query', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean, activeCycles?: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } | null> | null } | null }, adviceList: { __typename?: 'AdviceConnection', nodes?: Array<{ __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number } | null> | null } };

export type FindIndividualQueryVariables = Exact<{
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -1130,6 +1131,7 @@ export const AdviceFragmentFragmentDoc = gql`
activitiesTotal
analyzedActivitiesTotal
visionsTotal
contentReadyVisionsTotal
}
`;
export const IndividualFragmentFragmentDoc = gql`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ fragment AdviceFragment on Advice {
activitiesTotal
analyzedActivitiesTotal
visionsTotal
contentReadyVisionsTotal
}
7 changes: 5 additions & 2 deletions app/routes/_dashboard.individuals.$id.coach/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,18 @@ export default function IndividualCoach() {
<Tooltip
content={
"This summary is based on " +
cycle.advice?.contentReadyVisionsTotal.toString() +
" content ready visions out of " +
cycle.advice?.visionsTotal.toString() +
" analyzed visions. Click to see more details..."
"total. Click to see more details..."
}
>
<Link
to={`/individuals/${id}/visions?cycleid=${cycle.id}`}
className="flex items-center gap-1 hover:underline"
>
Expectations ({cycle.advice?.visionsTotal})
Expectations ({cycle.advice?.contentReadyVisionsTotal}/
{cycle.advice?.visionsTotal})
</Link>
</Tooltip>
</Typography>
Expand Down

0 comments on commit c078cdf

Please sign in to comment.