diff --git a/clients/banking/src/components/MerchantProfileArea.tsx b/clients/banking/src/components/MerchantProfileArea.tsx index efd08e7f6..8060cbc67 100644 --- a/clients/banking/src/components/MerchantProfileArea.tsx +++ b/clients/banking/src/components/MerchantProfileArea.tsx @@ -13,6 +13,7 @@ import { MerchantProfileDocument } from "../graphql/partner"; import { NotFoundPage } from "../pages/NotFoundPage"; import { t } from "../utils/i18n"; import { Router } from "../utils/routes"; +import { useTgglFlag } from "../utils/tggl"; import { ErrorView } from "./ErrorView"; import { MerchantProfilePaymentLinkArea } from "./MerchantProfilePaymentLinkArea"; import { MerchantProfileSettings } from "./MerchantProfileSettings"; @@ -50,6 +51,9 @@ export const AccountMerchantsProfileArea = ({ ]); const [merchantProfile, { refresh }] = useQuery(MerchantProfileDocument, { merchantProfileId }); + const isPaymentLinksTabFlagActive = useTgglFlag( + "frontendActivateMerchantPaymentLinksTabInWebBanking", + ).getOr(false); useCrumb( useMemo(() => { @@ -67,20 +71,23 @@ export const AccountMerchantsProfileArea = ({ const tabs = useMemo( () => [ - { - label: t("merchantProfile.tab.paymentLinks"), - url: Router.AccountMerchantsProfilePaymentLinkList({ - accountMembershipId, - merchantProfileId, - }), - }, - + ...(isPaymentLinksTabFlagActive + ? [ + { + label: t("merchantProfile.tab.paymentLinks"), + url: Router.AccountMerchantsProfilePaymentLinkList({ + accountMembershipId, + merchantProfileId, + }), + }, + ] + : []), { label: t("merchantProfile.tab.settings"), url: Router.AccountMerchantsProfileSettings({ accountMembershipId, merchantProfileId }), }, ], - [accountMembershipId, merchantProfileId], + [accountMembershipId, isPaymentLinksTabFlagActive, merchantProfileId], ); return ( diff --git a/types/tggl/index.d.ts b/types/tggl/index.d.ts index c7dd0ae3f..2125f9899 100644 --- a/types/tggl/index.d.ts +++ b/types/tggl/index.d.ts @@ -4,124 +4,129 @@ import 'tggl-client' declare module 'tggl-client' { export interface TgglContext { - userId: string + accountCountry: "DEU" | "ESP" | "FRA" | "ITA" | "NLD" + capitalDepositCaseId: string + cardToken: string + countryCode: string email: string - timestamp: string | number - referer?: string + environment: "development" | "master" | "preprod" | "prod" + environmentType: "admin" | "live" | "sandbox" + iban: string ip?: string projectId: string - accountCountry: "FRA" | "NLD" | "DEU" | "ESP" | "ITA" - environment: "master" | "preprod" | "prod" | "development" - environmentType: "sandbox" | "live" | "admin" + referer?: string serviceName: string - countryCode: string - cardToken: string - iban: string - capitalDepositCaseId: string + timestamp: string | number + userId: string } export interface TgglFlags { - merchantDashboard: true - enableIdentityTheftPreventionPage: true - SepaDirectDebitV2ActivationFlag: true - notificationManagerCardPaymentRefusedNotification: true - use_fourthine_workflow_api: true + account_contract_enable_maestro_provider: boolean + account_contract_enable_maestro_provider_in_print_physical_card: boolean + account_contract_monext_openapi_enabled: boolean + account_contract_send_tcu_notifications: null | true + account_contract_use_swan_tcu_templates_for_disabled_projects: true + account_contract_use_swan_templates_for_tcu_notifications: true + account_membership_optional_phone_number: true + activateCardPaymentMethod: true + addInternationalBeneficiary: boolean + addSepaBeneficiary: boolean asset_freeze_approve_list_enabled: true - checks: true - webhookSubscriptionLimit: true - cms_call_cema_carte_for_choose_pin: true - swan_account_membership_migration: true + b2b_membership_id_verification: true back_office_bank_verlag_event_generation_improvements: true - use_mailjet_subaccount_for_mass_emailing: true - sepaDirectDebitInV2: true - merchantWebBanking: true - sepaGatewayPublishSctInstEventsThroughFastKafkaTopics: true - international_gateway_nats_consumer_enabled: true - frontendActivateMerchantProfileInWebBanking: true - teamManagementV2: true - isPusherFixed: true - account_contract_use_swan_tcu_templates_for_disabled_projects: true - paymentLink: true bankingBulkTransfer: true - requestCardPaymentMethod: true beneficiaries: true - KYCUseInternalSystemToCollectSupportingDocuments: true - merchantPaymentMethodRequestUpdate: true - account_contract_choose_pin_code_enabled: true - kycUseNewAmlLevelThreshold: true - account_contract_use_swan_templates_for_tcu_notifications: true - kycAccountHoldersVerificationsView: true + bill_card_acquiring_enabled: boolean + billing_check_return_enabled: boolean + billing_v2_enabled: boolean + can_manage_beneficiary_for_untrusted_beneficiary: boolean + checks: true + ciao_es_enabled: boolean + closure_subscription_enabled: boolean + cms_call_cema_carte_for_choose_pin: true + cms_choose_pin_token_always_valid: true + complete_capital_deposit_case_enabled: boolean + dashboardAccountClosingLink: true + dashboardProjectMemberToken: true + dataExportAccount: boolean + dataExportAccountHolder: boolean + dataExportCards: boolean + dataExportOnboarding: boolean + dataExportTransactions: boolean + dataExportUser: boolean deactivateUser: true - KYCAllowGraphQLRequests: true - swan_generate_missing_bank_details: true - activateCardPaymentMethod: true - useTwilioVerifyServiceSidAlan: true + disable_emails_for_capital_deposit_case: boolean + enable_document_generation_by_document_convertor: boolean + enable_transaction_statements: boolean + enableForestV2: boolean + enableIdentityTheftPreventionPage: true + end_customer_billing_enabled: boolean + end_customer_ict_billing_enabled: boolean + end_customer_usage_payment_v2_enabled: boolean + frontendActivateMerchantPaymentLinksTabInWebBanking: true + frontendActivateMerchantProfileInWebBanking: true + full_text_search_feature_enabled: boolean + identityBirthDataCollection: true + ignore_identification_provider_birth_data: true incomingForeignTransferScreeningEnabled: true - card_management_system_activate_jobs_with_monext_call: boolean - sandboxIdentification: boolean - mutationAddSepaTrustedBeneficiary: boolean - testFrontEnd: boolean - new_physical_card_model_enabled: boolean - dataExportTransactions: boolean - ciao_es_enabled: boolean - setIssuingProcessorCardProductOnRenewFeature: boolean + incomingForeignTransferScreeningLimit: 50 incomingTransferInstScreeningEnabled: boolean - end_customer_billing_enabled: boolean - billing_v2_enabled: boolean - addInternationalBeneficiary: boolean - closure_subscription_enabled: boolean - use_enriched_transaction_data: boolean - use_optimized_count_in_paginate: boolean + incomingTransferScreeningDualRunEnabled: boolean + incomingTransferScreeningEnabled: boolean + incomingTransferScreeningLimit: 50 + initiate_international_credit_transfer_outgoing: boolean international_credit_transfer_outgoing_remittance_settlement_enabled: boolean - return_transaction_mutation: boolean - account_contract_enable_maestro_provider_in_print_physical_card: boolean - billing_v2_account_invoice_updated_event_enabled: boolean + international_gateway_nats_consumer_enabled: true + isBlockRequestIfUserIsBlocked: true + isCustomerPasswordResetAvailable: true + isPhoneNumberCountryCodeBlocked: boolean + isPusherFixed: true isScaDelegationEnabled: boolean - account_contract_enable_maestro_provider: boolean - notificationServiceUsageRatio: 0.8 | 1 | 0.5 | 0 | 0.2 - card_management_system_outboxer_enabled: boolean - card_management_system_schedules_enabled: boolean + kycAccountHoldersVerificationsView: true + kycActivateComplyAdvantageMonitoredSync: boolean + KYCAllowGraphQLRequests: boolean + kYCPreventAHToBeVerifiedWithUnresolvedScreenings: boolean + KYCUseInternalSystemToCollectSupportingDocuments: true lago_end_customer_enabled: boolean - account_contract_monext_openapi_enabled: boolean - incomingTransferScreeningEnabled: boolean - account_contract_card_jobs_activated: boolean - account_contract_card_services_activated: boolean - isNotificationsServiceEnabled: boolean - handle_triple_webhook: boolean - swan_supports_local_italian_iban: true + lago_revenue_sharing_enabled: boolean + lockRecomputeEnableB2B: true + merchantDashboard: true + merchantPaymentMethodRequestUpdate: true + merchantWebBanking: true mutationAddInternationalTrustedBeneficiary: boolean - card_management_system_create_default_card_product_when_new_project: boolean - end_customer_usage_payment_v2_enabled: boolean - kycUseKycServiceForCompanyWorkflow: boolean - end_customer_ict_billing_enabled: boolean - testScalaFeatureFlag: "ASBABSBSDBAA" - account_contract_send_tcu_notifications: true | null - initiate_international_credit_transfer_outgoing: boolean - useInternationalBeneficiary: boolean - return_ict_in_enabled: boolean - disable_emails_for_capital_deposit_case: boolean - complete_capital_deposit_case_enabled: boolean - incomingForeignTransferScreeningLimit: 50 - switch_simulate_to_invoice_v2: boolean - international_credit_transfer_swift_markup_enabled: boolean + mutationAddSepaTrustedBeneficiaries: boolean + mutationAddSepaTrustedBeneficiary: boolean name_matching_use_valid_names_enabled: boolean - twilioRatio: 0.8 | 1 | 0.5 | 0 | 0.95 | 0.6 - incomingTransferScreeningLimit: 50 - dataExportUser: boolean - monextNewRejectionCodeActivation: boolean - enable_document_generation_by_document_convertor: boolean - incomingTransferScreeningDualRunEnabled: boolean - send_transaction_enriched_webhook: boolean - enable_transaction_statements: boolean - isPhoneNumberCountryCodeBlocked: boolean - card_management_system_cance_cards_on_account_closed: boolean - dataExportCards: boolean - dataExportAccount: boolean - dataExportAccountHolder: boolean - dataExportOnboarding: boolean - screeningSctInAndFctInWithNats: boolean - card_management_system_activate_finalize_saga_use_case: boolean + new_physical_card_model_enabled: boolean + notificationManagerCardPaymentRefusedNotification: true + notificationManagerEnableCardPermanentlyBlockedNotification: boolean + notificationManagerEnableCardSpendingLimitNotification: boolean + partner_billing_v1_5_enabled: boolean + paymentLink: true processed_identification_requires_valid_redirect_verification_status: boolean - addSepaBeneficiary: boolean + requestCardPaymentMethod: true + retry_settlement_fct_out_enabled: boolean + return_ict_in_enabled: boolean + return_transaction_mutation_ict_in: boolean + scaIAMDailyMaximumNumberOfSignInPerPhoneNumber: 10 | 100 | 1000 + sCAIAMEnableTransactionOptionsToPreventRaceConditions: true + screeningSctInAndFctInWithNats: boolean + sendCreditAndZeroAmountAuthorization: boolean + sepaDirectDebitInV2: true + SepaDirectDebitV2ActivationFlag: true + sepaGatewayPublishSctInstEventsThroughFastKafkaTopics: true + setIssuingProcessorCardProductOnRenewFeature: boolean + swan_account_membership_migration: true + swan_generate_missing_bank_details: true + swan_supports_local_italian_iban: true + trusted_beneficiary_transfers_consent_free_enabled: boolean + twilioRatio: 0 | 0.2 | 0.5 | 0.6 | 0.8 | 0.95 | 1 + update_account_range_on_business_cards: true + use_checkout_identification_api: true + use_fourthine_workflow_api: true + use_mailjet_subaccount_for_mass_emailing: true + useInternationalBeneficiary: boolean + useTwilioVerifyServiceSidAlan: true + webhookSubscriptionLimit: boolean } } \ No newline at end of file