NTP-45438 | Reaalocation payload changes (#1395)
This commit is contained in:
@@ -144,10 +144,10 @@ export const getReallocationCaseTypes = (referenceId: string) => (dispatch: Disp
|
||||
axiosInstance
|
||||
.get(url, {
|
||||
params: {
|
||||
allocatingFromAgentReferenceId: referenceId
|
||||
sourceAgentReferenceId: referenceId
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
dispatch(setReallocationCaseTypes(res?.data?.eligibleCaseTypes));
|
||||
dispatch(setReallocationCaseTypes(res?.data?.eligibleReAllocationSubType));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -55,8 +55,13 @@ const Reallocation = () => {
|
||||
|
||||
const handleReallocation = (requestParams: IReallocationFormValues) => {
|
||||
const payload: IReallocationSubmitPayload = {
|
||||
type: 'TELE_RE_ALLOCATION',
|
||||
requestParams
|
||||
reAllocationType: 'TELE_RE_ALLOCATION',
|
||||
reAllocationSubType: requestParams.subReallocationType,
|
||||
reAllocationReason: requestParams.reasonType,
|
||||
reasonDescription: requestParams.reason,
|
||||
sourceAgentReferenceId: requestParams.fromAgentReferenceId,
|
||||
agentCohort: requestParams.toType,
|
||||
destinationAgentReferenceIds: requestParams.toAgentReferenceIds
|
||||
};
|
||||
dispatch(submitReallocation(payload, resetForm));
|
||||
dispatch(getReporteesWithAllocation({ ...defaultPageOptionsAgents, email: '' }));
|
||||
|
||||
@@ -112,8 +112,13 @@ export interface IReallocationFormValues {
|
||||
}
|
||||
|
||||
export interface IReallocationSubmitPayload {
|
||||
type: string;
|
||||
requestParams: IReallocationFormValues;
|
||||
reAllocationType: string;
|
||||
reAllocationSubType: string;
|
||||
reAllocationReason: string;
|
||||
reasonDescription: string;
|
||||
sourceAgentReferenceId: string;
|
||||
agentCohort: string;
|
||||
destinationAgentReferenceIds: string[];
|
||||
}
|
||||
|
||||
export interface IReallocationForm {
|
||||
|
||||
Reference in New Issue
Block a user