Skip to content

Commit 6f191d8

Browse files
Merge pull request #1189 from topcoder-platform/PM-1616
Limit other payment type field to 8 char
2 parents 56c237d + f3f9a97 commit 6f191d8

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
104104
label: 'Payment',
105105
propertyName: 'paymentType',
106106
renderer: (copilotOpportunity: CopilotOpportunity) => (
107-
<div>
107+
<div className={styles.payment}>
108108
{copilotOpportunity.paymentType === 'standard'
109-
? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType}
109+
? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType.slice(0, 8)}
110110
</div>
111111
),
112112
type: 'element',

src/apps/copilots/src/pages/copilot-opportunity-list/styles.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@
3939
.type {
4040
white-space: nowrap;
4141
}
42+
43+
.payment {
44+
white-space: nowrap;
45+
}
46+

src/apps/copilots/src/pages/copilot-request-form/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ const CopilotRequestForm: FC<{}> = () => {
276276
key: 'otherPaymentType',
277277
message: 'Field cannot be left empty',
278278
},
279+
{
280+
condition: formValues.otherPaymentType.trim().length > 8,
281+
key: 'otherPaymentType',
282+
message: 'Field only allows 8 characters',
283+
},
279284
]
280285

281286
fieldValidations.forEach(

0 commit comments

Comments
 (0)