BREAKING CHANGE: Fix broken support button (#12648)
## Context Support button was missing for configuration having support enabled (FrontApp) <img width="1253" alt="image" src="https://github.com/user-attachments/assets/930e3e0c-05a1-4a5b-820b-bb257f19fdde" /> ## How Recently, we changed some enums from lowercase to uppercase in graphql ## Problem resolution supportDriver was typed as a string where we could have used SupportDriver type. I'm exposing it in the graphql generated files to re-use in the front so this issue cannot happen anymore
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
|
||||
import { SupportDriver } from 'src/engine/core-modules/twenty-config/interfaces/support.interface';
|
||||
|
||||
import { ClientConfigService } from 'src/engine/core-modules/client-config/services/client-config.service';
|
||||
|
||||
import { ClientConfigController } from './client-config.controller';
|
||||
@ -56,7 +58,7 @@ describe('ClientConfigController', () => {
|
||||
frontDomain: 'localhost',
|
||||
debugMode: true,
|
||||
support: {
|
||||
supportDriver: 'none',
|
||||
supportDriver: SupportDriver.NONE,
|
||||
supportFrontChatId: undefined,
|
||||
},
|
||||
sentry: {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { SupportDriver } from 'src/engine/core-modules/twenty-config/interfaces/support.interface';
|
||||
|
||||
import { BillingTrialPeriodDTO } from 'src/engine/core-modules/billing/dtos/billing-trial-period.dto';
|
||||
import { CaptchaDriverType } from 'src/engine/core-modules/captcha/interfaces';
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
@ -23,8 +25,8 @@ class Billing {
|
||||
|
||||
@ObjectType()
|
||||
class Support {
|
||||
@Field(() => String)
|
||||
supportDriver: string;
|
||||
@Field(() => SupportDriver)
|
||||
supportDriver: SupportDriver;
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
supportFrontChatId?: string;
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
export enum SupportDriver {
|
||||
NONE = 'NONE',
|
||||
FRONT = 'FRONT',
|
||||
}
|
||||
|
||||
registerEnumType(SupportDriver, {
|
||||
name: 'SupportDriver',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user