NTP-6457| DPD cycle for 16 to 30 field
This commit is contained in:
@@ -77,6 +77,7 @@ export interface IUserSlice extends IUser {
|
||||
isCallRecordingCosmosExotelEnabled: boolean;
|
||||
};
|
||||
employeeId: string;
|
||||
is16To30FieldAgent: boolean;
|
||||
}
|
||||
|
||||
const initialState: IUserSlice = {
|
||||
@@ -105,6 +106,7 @@ const initialState: IUserSlice = {
|
||||
isCallRecordingCosmosExotelEnabled: false,
|
||||
},
|
||||
employeeId: '',
|
||||
is16To30FieldAgent: false,
|
||||
};
|
||||
|
||||
export const userSlice = createSlice({
|
||||
@@ -142,8 +144,14 @@ export const userSlice = createSlice({
|
||||
state.agentAttendance = action.payload;
|
||||
},
|
||||
setUserAccessData: (state, action) => {
|
||||
const { roles, isExternalAgent, isFieldTeamLeadOrAgencyManager, featureFlags, employeeId } =
|
||||
action.payload || {};
|
||||
const {
|
||||
roles,
|
||||
isExternalAgent,
|
||||
is16To30FieldAgent,
|
||||
isFieldTeamLeadOrAgencyManager,
|
||||
featureFlags,
|
||||
employeeId,
|
||||
} = action.payload || {};
|
||||
if (roles?.length) {
|
||||
state.isTeamLead = isFieldTeamLeadOrAgencyManager;
|
||||
} else {
|
||||
@@ -153,6 +161,7 @@ export const userSlice = createSlice({
|
||||
state.agentRoles = roles;
|
||||
state.featureFlags = featureFlags;
|
||||
state.employeeId = employeeId;
|
||||
state.is16To30FieldAgent = is16To30FieldAgent;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -77,6 +77,7 @@ const ListItem: React.FC<IListItem> = (props) => {
|
||||
collectionTag,
|
||||
paymentStatus,
|
||||
dpdBucket,
|
||||
dpdCycle,
|
||||
pinRank,
|
||||
isSynced,
|
||||
isNewlyAdded,
|
||||
@@ -191,6 +192,7 @@ const ListItem: React.FC<IListItem> = (props) => {
|
||||
!isTeamLead &&
|
||||
!nearbyCaseView;
|
||||
|
||||
const is16to30FieldAgent = useAppSelector((state) => state.user?.is16To30FieldAgent);
|
||||
const distanceMapOfNearbyCases =
|
||||
useAppSelector((state) => state.nearbyCasesSlice.caseReferenceIdToDistanceMap) || {};
|
||||
const selectedTab = useAppSelector((state) => state?.nearbyCasesSlice?.sortTabSelected);
|
||||
@@ -291,10 +293,17 @@ const ListItem: React.FC<IListItem> = (props) => {
|
||||
</Text>
|
||||
)}
|
||||
<View>
|
||||
<Text small style={[styles.caseStatusText, styles.borderTop]} bold>
|
||||
Total due {formatAmount(totalOverdueAmount, false)}
|
||||
{' '}DPD bucket {dpdBucket}
|
||||
</Text>
|
||||
{is16to30FieldAgent ? (
|
||||
<Text small style={[styles.caseStatusText, styles.borderTop]} bold>
|
||||
Total due {formatAmount(totalOverdueAmount, false)}
|
||||
{' '}DPD Cycle {dpdCycle}
|
||||
</Text>
|
||||
) : (
|
||||
<Text small style={[styles.caseStatusText, styles.borderTop]} bold>
|
||||
Total due {formatAmount(totalOverdueAmount, false)}
|
||||
{' '}DPD bucket {dpdBucket}
|
||||
</Text>
|
||||
)}
|
||||
{caseInteractionStatus ? (
|
||||
<Text small style={styles.caseStatusText} bold>
|
||||
{caseInteractionStatus}
|
||||
|
||||
@@ -11,6 +11,7 @@ import { addClickstreamEvent } from '../../services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES } from '../../common/Constants';
|
||||
import { ToastMessages } from '../allCases/constants';
|
||||
import { toTileCase } from '../../components/utlis/commonFunctions';
|
||||
import { useAppSelector } from '@hooks';
|
||||
|
||||
interface ICollectionCaseData {
|
||||
caseData: CaseDetail;
|
||||
@@ -22,12 +23,13 @@ const CollectionCaseData: React.FC<ICollectionCaseData> = ({ caseData }) => {
|
||||
currentDpd,
|
||||
loanAccountNumber,
|
||||
dpdBucket,
|
||||
dpdCycle,
|
||||
pos,
|
||||
collectionTag,
|
||||
employmentDetail,
|
||||
unpaidDays
|
||||
} = caseData;
|
||||
|
||||
const is16to30FieldAgent = useAppSelector((state) => state.user.is16To30FieldAgent );
|
||||
return (
|
||||
<View>
|
||||
{fatherName && (
|
||||
@@ -67,9 +69,15 @@ const CollectionCaseData: React.FC<ICollectionCaseData> = ({ caseData }) => {
|
||||
GenericStyles.flexWrap,
|
||||
]}
|
||||
>
|
||||
<Text style={[styles.greyText]} small>
|
||||
DPD bucket {dpdBucket}
|
||||
</Text>
|
||||
{is16to30FieldAgent ? (
|
||||
<Text style={[styles.greyText]} small>
|
||||
DPD Cycle {dpdCycle}
|
||||
</Text>
|
||||
) : (
|
||||
<Text style={[styles.greyText]} small>
|
||||
DPD bucket {dpdBucket}
|
||||
</Text>
|
||||
)}
|
||||
<View style={styles.lineStyle} />
|
||||
<Text style={[styles.greyText]} small>
|
||||
POS {formatAmount(pos)}
|
||||
|
||||
@@ -284,6 +284,7 @@ export interface CaseDetail {
|
||||
customerName: string;
|
||||
pos: number;
|
||||
dpdBucket: string;
|
||||
dpdCycle: string;
|
||||
addresses?: Address[];
|
||||
currentAllocationReferenceId: string;
|
||||
customerReferenceId: string;
|
||||
|
||||
Reference in New Issue
Block a user