TP-34630 | UAT Fixes
This commit is contained in:
@@ -19,7 +19,7 @@ const CashCollectedGraph = () => {
|
||||
<>
|
||||
<View style={styles.graphWrapper}>
|
||||
<Text style={styles.cashCollectedText}>
|
||||
Cash Collected as of <Text style={styles.currentMonth}>{currentMonth}</Text>
|
||||
Cash Collected in <Text style={styles.currentMonth}>{currentMonth}</Text>
|
||||
</Text>
|
||||
<View style={GenericStyles.pt12}>
|
||||
<View style={GenericStyles.row}>
|
||||
|
||||
@@ -89,6 +89,13 @@ export const CurrentAllocationStatsMap = {
|
||||
[CurrentAllocationStats.BROKEN_PTP]: 'broken PTP',
|
||||
};
|
||||
|
||||
export const CurrentAllocationStatsUIMap = {
|
||||
unvsited: 'Unvisited',
|
||||
'non contactable': 'Non contactable',
|
||||
'non PTP': 'Non PTP',
|
||||
'broken PTP': 'Broken PTP',
|
||||
};
|
||||
|
||||
export const CurrentAllocationStatsFilterMap = {
|
||||
[CurrentAllocationStats.UNVSIITED]: CurrentAllocationStatsFilter.VISIT_STATUS,
|
||||
[CurrentAllocationStats.NON_CONTACTABLE]: CurrentAllocationStatsFilter.CONTACTABILITY,
|
||||
|
||||
@@ -40,7 +40,7 @@ const CaseListHeader: React.FC<ICaseListHeader> = ({
|
||||
GenericStyles.row,
|
||||
GenericStyles.alignCenter,
|
||||
GenericStyles.spaceBetween,
|
||||
GenericStyles.ph16,
|
||||
!isAgentDashboard && GenericStyles.ph16,
|
||||
GenericStyles.pv10,
|
||||
]}
|
||||
>
|
||||
@@ -49,7 +49,7 @@ const CaseListHeader: React.FC<ICaseListHeader> = ({
|
||||
<TouchableHighlight
|
||||
underlayColor={COLORS.HIGHLIGHTER.LIGHT_BUTTON}
|
||||
activeOpacity={1}
|
||||
style={GenericStyles.pr8}
|
||||
style={[GenericStyles.iconContainerButton]}
|
||||
onPress={goBack}
|
||||
>
|
||||
<BackArrowIcon fillColor={COLORS.BACKGROUND.PRIMARY} />
|
||||
@@ -59,6 +59,7 @@ const CaseListHeader: React.FC<ICaseListHeader> = ({
|
||||
setShowAgentSelectionBottomSheet={setShowAgentSelectionBottomSheet}
|
||||
filteredListCount={filteredListCount}
|
||||
isVisitPlan={isVisitPlan}
|
||||
isAgentDashboard={isAgentDashboard}
|
||||
/>
|
||||
</View>
|
||||
<NotificationMenu />
|
||||
|
||||
@@ -250,7 +250,7 @@ const CasesList: React.FC<ICasesList> = ({
|
||||
dispatch(
|
||||
setFilteredListToast({
|
||||
showToast: false,
|
||||
caseType: '',
|
||||
caseType,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,16 +10,18 @@ import { MY_CASE_ITEM, VisitPlanStatus } from '../../reducer/userSlice';
|
||||
import { dateFormat, DAY_MONTH_DATE_FORMAT } from '../../../RN-UI-LIB/src/utlis/dates';
|
||||
import { addClickstreamEvent } from '../../services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES } from '../../common/Constants';
|
||||
import { CurrentAllocationStatsUIMap } from '@screens/Dashboard/interface';
|
||||
|
||||
interface HeaderLabelProps {
|
||||
setShowAgentSelectionBottomSheet: (val: boolean) => void;
|
||||
filteredListCount: number;
|
||||
isVisitPlan?: boolean;
|
||||
isAgentDashboard?: boolean;
|
||||
}
|
||||
|
||||
const HeaderLabel: React.FC<HeaderLabelProps> = (props) => {
|
||||
const { setShowAgentSelectionBottomSheet, filteredListCount, isVisitPlan } = props;
|
||||
|
||||
const { setShowAgentSelectionBottomSheet, filteredListCount, isVisitPlan, isAgentDashboard } =
|
||||
props;
|
||||
const {
|
||||
isLockedVisitPlanStatus,
|
||||
selectedAgent = MY_CASE_ITEM,
|
||||
@@ -30,6 +32,9 @@ const HeaderLabel: React.FC<HeaderLabelProps> = (props) => {
|
||||
loading: state.allCases.loading,
|
||||
}));
|
||||
const isTeamLead = useAppSelector((state) => state.user.isTeamLead);
|
||||
const { caseType = 'My Cases' } = useAppSelector(
|
||||
(state: RootState) => state.allCases.filteredListToast
|
||||
);
|
||||
|
||||
const handleAgentSelectionCTAClick = () => {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_AGENT_LIST_DROPDOWN_CLICKED);
|
||||
@@ -45,6 +50,11 @@ const HeaderLabel: React.FC<HeaderLabelProps> = (props) => {
|
||||
const formattedDate = dateFormat(currentDate, DAY_MONTH_DATE_FORMAT);
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
if (isAgentDashboard) {
|
||||
return `${CurrentAllocationStatsUIMap[caseType]} cases (${filteredListCount})`;
|
||||
}
|
||||
|
||||
return `${selectedAgent.name}${!loading ? ` (${filteredListCount})` : ''}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user