NTP-22476 | Training module UAT feedbacks
This commit is contained in:
8
src/common/NewTag.tsx
Normal file
8
src/common/NewTag.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
|
||||
import { GenericStyles } from '@rn-ui-lib/styles';
|
||||
|
||||
const NewTag = () => {
|
||||
return <Tag style={GenericStyles.mr10} variant={TagVariant.blue} text="New" />;
|
||||
};
|
||||
|
||||
export default NewTag;
|
||||
@@ -11,6 +11,7 @@ import { Alert } from 'react-native';
|
||||
import { ProfileScreenStackEnum } from '../ProfileStack';
|
||||
import CountComponent from '../CountComponent';
|
||||
import BookIcon from '@assets/icons/BookIcon';
|
||||
import NewTag from '@common/NewTag';
|
||||
|
||||
export const getNavigationLinks = () => {
|
||||
const { isTeamLead, selectedAgent, featureFlags } = store?.getState().user;
|
||||
@@ -46,6 +47,7 @@ export const getNavigationLinks = () => {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_PROFILE_PAGE_TRAINING_MATERIAL_CLICKED);
|
||||
navigateToScreen(ProfileScreenStackEnum.TRAINING_MATERIAL);
|
||||
},
|
||||
NewComponent: NewTag
|
||||
},
|
||||
{
|
||||
name: 'Logout',
|
||||
|
||||
@@ -12,6 +12,7 @@ import { navigateToScreen } from '@components/utlis/navigationUtlis';
|
||||
import { ProfileScreenStackEnum } from '@screens/Profile/ProfileStack';
|
||||
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
|
||||
import { pluralise } from '@components/utlis/commonFunctions';
|
||||
|
||||
const TrainingMaterialListItem: React.FC<ITrainingMaterialListItem> = ({
|
||||
trainingMaterialData,
|
||||
@@ -47,7 +48,7 @@ const TrainingMaterialListItem: React.FC<ITrainingMaterialListItem> = ({
|
||||
<View style={[GenericStyles.row, GenericStyles.fill]}>
|
||||
{icon}
|
||||
<View style={GenericStyles.ml8}>
|
||||
<Text dark style={styles.lh14}>
|
||||
<Text dark style={styles.lh14} numberOfLines={3}>
|
||||
{title}
|
||||
</Text>
|
||||
<View style={GenericStyles.row}>
|
||||
@@ -58,7 +59,7 @@ const TrainingMaterialListItem: React.FC<ITrainingMaterialListItem> = ({
|
||||
</Text>
|
||||
<Text small>
|
||||
{fileType === TrainingMaterialContentType.PDF
|
||||
? `${metadataValue} pages`
|
||||
? `${metadataValue} ${pluralise(metadataValue as number, 'page', 'pages')}`
|
||||
: metadataValue}
|
||||
</Text>
|
||||
<Text style={styles.bullet} small>
|
||||
@@ -92,7 +93,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
lh14: {
|
||||
lineHeight: 14,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
export default TrainingMaterialListItem;
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface ITrainingMaterial {
|
||||
fileType: TrainingMaterialContentType;
|
||||
createdAt: string;
|
||||
isNewMaterial: boolean;
|
||||
metadata: Record<string, string>;
|
||||
metadata: Record<string, string | number>;
|
||||
}
|
||||
|
||||
export interface ITrainingMaterialListItem {
|
||||
|
||||
Reference in New Issue
Block a user