diff --git a/src/data/RealTemplateData.json b/src/data/RealTemplateData.json index f1005b93..26d253e2 100644 --- a/src/data/RealTemplateData.json +++ b/src/data/RealTemplateData.json @@ -20,7 +20,7 @@ "nextJourney": null }, "false":{ - "status": "OPEN", + "status": "VERIFICATION_FAILED", "nextJourney": "PERMANENT_ADDRESS_VERIFICATION_TASK" } } @@ -154,7 +154,7 @@ "false": "w3" } }, - "isLeaf": false + "isLeaf": false }, "w2": { "sections": [ @@ -251,7 +251,7 @@ "section": "s12" }, "actions": { - "true": "w7", + "true": "w7", "false": "w8" } }, @@ -271,7 +271,7 @@ }, "actions": { "true": "w1", - "false": "w8" + "false": "w8" } }, "isLeaf": false @@ -797,7 +797,7 @@ "text": "Government Job", "associateQuestions": [], "metadata": {} - }, + }, "o40": { "text": "Private Sector", "associateQuestions": [], @@ -971,4 +971,4 @@ ] } } -} \ No newline at end of file +} diff --git a/src/reducer/allCasesSlice.ts b/src/reducer/allCasesSlice.ts index 91abd7a9..99141866 100644 --- a/src/reducer/allCasesSlice.ts +++ b/src/reducer/allCasesSlice.ts @@ -5,6 +5,7 @@ import { ICaseItem, IFilter, } from '../screens/allCases/interface'; import {CONDITIONAL_OPERATORS, FILTER_TYPES, SELECTION_TYPES} from "../common/Constants"; +import {CaseDetail} from "../screens/caseDetails/interface"; export type ICasesMap = {[key: string]: ICaseItem}; @@ -22,7 +23,7 @@ interface IAllCasesSlice { filterList: ICaseItem[]; newlyPinnedCases: number; completedCases: number; - caseDetails: any; + caseDetails: Record; filters: Record; searchQuery: string; selectedFilters: Record diff --git a/src/screens/caseDetails/CaseDetails.tsx b/src/screens/caseDetails/CaseDetails.tsx index a23d62de..04ee3c33 100644 --- a/src/screens/caseDetails/CaseDetails.tsx +++ b/src/screens/caseDetails/CaseDetails.tsx @@ -6,7 +6,6 @@ import { StyleSheet, View, } from 'react-native'; -import Text from '../../../RN-UI-LIB/src/components/Text'; import {GenericStyles} from '../../../RN-UI-LIB/src/styles'; import {useAppSelector} from '../../hooks'; import CaseDetailsHeader from './CaseDetailsHeader'; diff --git a/src/screens/caseDetails/interface.ts b/src/screens/caseDetails/interface.ts index 4cd3d4a9..0bf6f603 100644 --- a/src/screens/caseDetails/interface.ts +++ b/src/screens/caseDetails/interface.ts @@ -1,3 +1,5 @@ +import {TaskTitle} from "../allCases/interface"; + export enum LoanType { PERSONAL_LOAN = "PERSONAL_LOAN", HOUSE_LOAN = "HOUSE_LOAN" @@ -18,6 +20,12 @@ export enum LoanTypeUIMapping { HOUSE_LOAN = 'House loan' } +export enum CONTEXT_TASK_STATUSES { + VERIFICATION_FAILED = 'VERIFICATION_FAILED', + VERIFICATION_SUCCESS = 'VERIFICATION_SUCCESS', + OPEN = 'OPEN', +} + export interface LoanDetails { loanAccountNumber: string; disbursalDate: string; @@ -64,7 +72,7 @@ export interface Metadata { export interface Task { taskId: number; - taskType: string; + taskType: TaskTitle; metadata: Metadata; } @@ -99,7 +107,7 @@ export interface COMMUNICATIONADDRESSVERIFICATIONTASK { } export interface TaskContext { - COMMUNICATION_ADDRESS_VERIFICATION_TASK: COMMUNICATIONADDRESSVERIFICATIONTASK[]; + [id: string] :any } export interface Context { @@ -118,4 +126,7 @@ export interface CaseDetail { customerInfo: CustomerInfo; tasks: Task[]; context: Context; -} \ No newline at end of file + isSynced: boolean; + currentTask: string; +} + diff --git a/src/screens/caseDetails/journeyStepper/StepperHeader.tsx b/src/screens/caseDetails/journeyStepper/StepperHeader.tsx index 3ce2fb3d..c642d0ab 100644 --- a/src/screens/caseDetails/journeyStepper/StepperHeader.tsx +++ b/src/screens/caseDetails/journeyStepper/StepperHeader.tsx @@ -7,6 +7,7 @@ import TickIcon from '../../../assets/icons/TickIcon'; import {COLORS} from '../../../../RN-UI-LIB/src/styles/colors'; import UnsyncedIcon from '../../../assets/icons/UnsyncedIcon'; import Tag from '../../../../RN-UI-LIB/src/components/Tag'; +import {CONTEXT_TASK_STATUSES} from "../interface"; export const enum STEPPER_STATE { DEFAULT = 'DEFAULT', @@ -19,7 +20,7 @@ interface IStepperHeader { stepNumber: number; header: string; currentState: STEPPER_STATE; - verdict: any; + verdict: CONTEXT_TASK_STATUSES; } const StepperHeader: React.FC = props => { @@ -54,19 +55,19 @@ const StepperHeader: React.FC = props => { ); - case STEPPER_STATE.UNSYNCED: - return ( - - - - - - - {header} - - - - ); + // case STEPPER_STATE.UNSYNCED: + // return ( + // + // + // + // + // + // + // {header} + // + // + // + // ); case STEPPER_STATE.SYNCED: return ( @@ -81,7 +82,7 @@ const StepperHeader: React.FC = props => { {verdict && ( - + )} diff --git a/src/screens/caseDetails/journeyStepper/TaskContent.tsx b/src/screens/caseDetails/journeyStepper/TaskContent.tsx index 1a568394..549a9dc7 100644 --- a/src/screens/caseDetails/journeyStepper/TaskContent.tsx +++ b/src/screens/caseDetails/journeyStepper/TaskContent.tsx @@ -4,13 +4,20 @@ import {GenericStyles} from '../../../../RN-UI-LIB/src/styles'; import Button from '../../../../RN-UI-LIB/src/components/Button'; import React from 'react'; import MapPinIcon from '../../../../RN-UI-LIB/src/Icons/MapPinIcon'; +import {TaskTitle} from "../../allCases/interface"; +import {navigateToScreen} from "../../../components/utlis/navigationUtlis"; +const templateData = require('../../../data/RealTemplateData.json'); const TaskContent = ({ address, geolocationUrl, + taskType, + caseId }: { address?: any; - geolocationUrl: string | null; + geolocationUrl: string | undefined; + taskType: TaskTitle; + caseId: string; }) => { const openGeolocation = () => { geolocationUrl && Linking.openURL(geolocationUrl); @@ -32,7 +39,12 @@ const TaskContent = ({ leftIcon={} /> )} -