From f3f9a9790615eca6a4bb72688018293ac1a30ffb Mon Sep 17 00:00:00 2001 From: himaniraghav3 Date: Mon, 18 Aug 2025 19:05:41 +0530 Subject: [PATCH] Limit other payment type field to 8 char --- .../copilots/src/pages/copilot-opportunity-list/index.tsx | 4 ++-- .../src/pages/copilot-opportunity-list/styles.module.scss | 5 +++++ src/apps/copilots/src/pages/copilot-request-form/index.tsx | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx b/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx index 045ff0192..290bed7e8 100644 --- a/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx +++ b/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx @@ -104,9 +104,9 @@ const tableColumns: TableColumn[] = [ label: 'Payment', propertyName: 'paymentType', renderer: (copilotOpportunity: CopilotOpportunity) => ( -
+
{copilotOpportunity.paymentType === 'standard' - ? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType} + ? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType.slice(0, 8)}
), type: 'element', diff --git a/src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss b/src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss index ed569a42f..76fd34f5f 100644 --- a/src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss +++ b/src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss @@ -39,3 +39,8 @@ .type { white-space: nowrap; } + +.payment { + white-space: nowrap; +} + diff --git a/src/apps/copilots/src/pages/copilot-request-form/index.tsx b/src/apps/copilots/src/pages/copilot-request-form/index.tsx index 7bb898494..8fb9fcbb3 100644 --- a/src/apps/copilots/src/pages/copilot-request-form/index.tsx +++ b/src/apps/copilots/src/pages/copilot-request-form/index.tsx @@ -276,6 +276,11 @@ const CopilotRequestForm: FC<{}> = () => { key: 'otherPaymentType', message: 'Field cannot be left empty', }, + { + condition: formValues.otherPaymentType.trim().length > 8, + key: 'otherPaymentType', + message: 'Field only allows 8 characters', + }, ] fieldValidations.forEach(