From 9927587a4dd266330f75f16b6e2690fe19e50497 Mon Sep 17 00:00:00 2001 From: ajithsimons Date: Wed, 7 Feb 2024 13:59:03 +0530 Subject: [PATCH] bug fix --- src/utils/constants.ts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 3ad32f44..6d9c21d4 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -20,7 +20,7 @@ import { theme } from 'cx-portal-shared-components'; -import { IDefaultObject } from '../models/Common'; +import { IDefaultObject, ISelectList } from '../models/Common'; import { PolicyModel } from '../models/RecurringUpload.models'; import { Config } from './config'; @@ -53,6 +53,36 @@ const USER_TYPE_SWITCH: IDefaultObject = { consumer: 'provider', }; +const DURATION_UNITS: ISelectList[] = [ + { + id: 0, + title: 'Hour', + value: 'HOUR', + }, + { + id: 1, + title: 'Day', + value: 'DAY', + }, + { + id: 2, + title: 'Month', + value: 'MONTH', + }, + { + id: 3, + title: 'Year', + value: 'YEAR', + }, +]; + +const DURATION_UNIT_MAPPING = { + HOUR: 'hours', + DAY: 'days', + MONTH: 'months', + YEAR: 'years', +}; + const BPN_TYPE_FIELDS = [ { id: 1, @@ -166,6 +196,8 @@ export { CHECKBOXES, CONTRACT_STATES, DEFAULT_POLICY_DATA, + DURATION_UNIT_MAPPING, + DURATION_UNITS, FRAMEWORKS, MAX_CONTRACTS_AGREEMENTS, ONLY_NUM_REGEX,