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 7f3be943d..7ba5eb598 100644 --- a/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx +++ b/src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx @@ -102,7 +102,13 @@ const tableColumns: TableColumn[] = [ { label: 'Payment', propertyName: 'paymentType', - type: 'text', + renderer: (copilotOpportunity: CopilotOpportunity) => ( +
+ {copilotOpportunity.paymentType === 'standard' + ? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType} +
+ ), + type: 'element', }, ] 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 6901a8171..17d345f66 100644 --- a/src/apps/copilots/src/pages/copilot-request-form/index.tsx +++ b/src/apps/copilots/src/pages/copilot-request-form/index.tsx @@ -116,7 +116,12 @@ const CopilotRequestForm: FC<{}> = () => { oldFormValues[key] = Array.isArray(value) ? [...value] : [] break default: - value = event.target.value + if (event.type === 'blur') { + value = event.target.value?.trim() + } else { + value = event.target.value + } + break } @@ -169,7 +174,7 @@ const CopilotRequestForm: FC<{}> = () => { const fieldValidations: { condition: boolean; key: string; message: string }[] = [ { - condition: !formValues.opportunityTitle || formValues.opportunityTitle.length < 7, + condition: (formValues.opportunityTitle?.trim().length ?? 0) < 7, key: 'opportunityTitle', message: 'The title for the opportunity must be at least 7 characters', }, @@ -322,6 +327,7 @@ const CopilotRequestForm: FC<{}> = () => { placeholder='Enter a title for the opportunity' value={formValues.opportunityTitle?.toString()} onChange={bind(handleFormValueChange, this, 'opportunityTitle')} + onBlur={bind(handleFormValueChange, this, 'opportunityTitle')} error={formErrors.opportunityTitle} tabIndex={0} forceUpdateValue diff --git a/src/apps/copilots/src/pages/copilot-requests/CopilotRequestsPage.module.scss b/src/apps/copilots/src/pages/copilot-requests/CopilotRequestsPage.module.scss index b36172f28..bde7159db 100644 --- a/src/apps/copilots/src/pages/copilot-requests/CopilotRequestsPage.module.scss +++ b/src/apps/copilots/src/pages/copilot-requests/CopilotRequestsPage.module.scss @@ -22,3 +22,8 @@ color: $turq-140; } } + +.opportunityTitle > * { + display: block; + white-space: pre-wrap; +} diff --git a/src/apps/copilots/src/pages/copilot-requests/index.tsx b/src/apps/copilots/src/pages/copilot-requests/index.tsx index e98cadd50..648b420fd 100644 --- a/src/apps/copilots/src/pages/copilot-requests/index.tsx +++ b/src/apps/copilots/src/pages/copilot-requests/index.tsx @@ -183,6 +183,7 @@ const CopilotRequestsPage: FC = () => { type: 'element', }, { + className: styles.opportunityTitle, label: 'Title', propertyName: 'opportunityTitle', type: 'text',