Tp 19218 profile section (#98)

This commit is contained in:
Aman Chaturvedi
2023-02-24 11:56:48 +05:30
committed by GitHub Enterprise
parent c134619661
commit 645b69685d
14 changed files with 397 additions and 347 deletions

View File

@@ -16,6 +16,7 @@ import { setLoanIdToValue } from './src/reducer/paymentSlice';
import { setDeviceId } from './src/reducer/userSlice';
import AddressGeolocation from './src/screens/addressGeolocation';
import AllCasesMain from './src/screens/allCases';
import CompletedCase from './src/screens/allCases/CompletedCase';
import CaseDetails from './src/screens/caseDetails/CaseDetails';
import CollectionCaseDetails from './src/screens/caseDetails/CollectionCaseDetail';
import interactionsHandler from './src/screens/caseDetails/interactionsHandler';
@@ -163,6 +164,16 @@ const ProtectedRouter = () => {
}}
listeners={getScreenFocusListenerObj}
/>
<Stack.Screen
name="CompletedCases"
component={CompletedCase}
options={{
header: () => null,
animation: 'slide_from_right',
animationDuration: ANIMATION_DURATION
}}
listeners={getScreenFocusListenerObj}
/>
</>
) : (
<>

View File

@@ -16,8 +16,7 @@ import { navigateToScreen } from '../components/utlis/navigationUtlis';
import { AxiosResponse } from 'axios';
import { AppDispatch } from '../store/store';
import { setGlobalUserData } from '../constants/Global';
import { resetCasesData, setCasesListData } from '../reducer/allCasesSlice';
import { getAllCaseDetails } from './dataActions';
import { resetCasesData } from '../reducer/allCasesSlice';
export interface GenerateOTPPayload {
phoneNumber: string;

View File

@@ -2,164 +2,158 @@ import React from 'react';
import Svg, {Path} from 'react-native-svg';
const EmptyPageCheckIcon = () => (
<Svg width={161} height={116} viewBox="0 0 161 116" fill="none">
<Svg width={209} height={144} viewBox="0 0 209 144" fill="none">
<Path
d="M113.614 15.803H41.8793C41.3405 15.803 40.9037 16.2398 40.9037 16.7786V113.905C40.9037 114.444 41.3405 114.881 41.8793 114.881H113.614C114.153 114.881 114.589 114.444 114.589 113.905V16.7786C114.589 16.2398 114.153 15.803 113.614 15.803Z"
fill="#F7F7F7"
d="M147.513 11.875H54.375C53.6754 11.875 53.1083 12.4421 53.1083 13.1417V141.845C53.1083 142.544 53.6754 143.111 54.375 143.111H147.513C148.213 143.111 148.78 142.544 148.78 141.845V13.1417C148.78 12.4421 148.213 11.875 147.513 11.875Z"
fill="#0085FF"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M110.955 20.5932V107.262C110.955 107.657 110.609 107.976 110.182 107.976H46.1508C45.7234 107.976 45.3775 107.657 45.3775 107.262V20.5932C45.3775 20.1984 45.7234 19.8787 46.1508 19.8787H110.182C110.609 19.8787 110.955 20.1984 110.955 20.5932Z"
d="M141.824 17.1289V133.11L57.0524 135.11C55.54 135.148 54.2945 134.021 54.2945 132.623V130.445H53.1083V107.628C56.4932 77.1084 56.955 27.7878 57.0143 18.8489C57.0185 18.0694 57.7048 17.4339 58.5479 17.4339L141.824 17.1289Z"
fill="#12183E"
/>
<Path
d="M144.061 18.0918V130.62C144.061 131.133 143.612 131.548 143.057 131.548H59.9208C59.3658 131.548 58.9167 131.133 58.9167 130.62V18.0918C58.9167 17.5792 59.3658 17.1641 59.9208 17.1641H143.057C143.612 17.1641 144.061 17.5792 144.061 18.0918Z"
fill="#F6F5F5"
stroke="#12183E"
strokeWidth={0.162534}
strokeWidth={0.254186}
strokeLinejoin="round"
/>
<Path
d="M103.662 104.838C86.4572 106.388 66.5014 106.952 45.3775 107.099V63.4383L49.678 20.1431L105.839 19.8821H105.845C106.269 19.8821 106.615 20.2018 106.615 20.5967C106.651 54.8047 107.806 95.7278 103.662 104.838Z"
d="M134.592 127.472C112.254 129.484 86.3435 130.217 58.9167 130.408V73.7202L64.5004 17.5069L137.418 17.168H137.426C137.977 17.168 138.426 17.5831 138.426 18.0958C138.473 62.5106 139.973 115.644 134.592 127.472Z"
fill="#E1E1E1"
/>
<Path
d="M105.065 102.061C76.9032 106.231 57.923 106.515 42.5352 105.51C42.1045 105.48 41.7815 105.131 41.8207 104.733C43.7653 84.9959 44.5647 52.8075 45.3609 20.58C45.3707 20.1917 45.7133 19.8818 46.1342 19.8818L79.8952 19.9503L110.188 19.8752C110.612 19.8752 110.958 20.1885 110.964 20.5833C111.415 54.439 111.594 87.5605 105.065 102.057V102.061Z"
d="M136.414 123.868C99.849 129.282 75.2056 129.65 55.2266 128.346C54.6674 128.307 54.248 127.854 54.2988 127.337C56.8237 101.711 57.8616 59.9186 58.8953 18.0752C58.908 17.5711 59.3529 17.1686 59.8994 17.1686L103.734 17.2576L143.065 17.1602C143.616 17.1602 144.065 17.5669 144.073 18.0795C144.658 62.0368 144.891 105.041 136.414 123.863V123.868Z"
fill="white"
stroke="#12183E"
strokeWidth={0.162534}
strokeWidth={0.254186}
strokeLinejoin="round"
/>
<Path
d="M59.264 36.4216H52.2391C51.7381 36.4216 51.332 36.8277 51.332 37.3287V43.6913C51.332 44.1923 51.7381 44.5984 52.2391 44.5984H59.264C59.765 44.5984 60.1711 44.1923 60.1711 43.6913V37.3287C60.1711 36.8277 59.765 36.4216 59.264 36.4216Z"
d="M133.381 31.1094H85.6829C85.1448 31.1094 84.7086 31.5456 84.7086 32.0838V32.9565C84.7086 33.4946 85.1448 33.9308 85.6829 33.9308H133.381C133.919 33.9308 134.355 33.4946 134.355 32.9565V32.0838C134.355 31.5456 133.919 31.1094 133.381 31.1094Z"
fill="#E1E1E1"
/>
<Path
d="M106.259 36.875H85.6787C85.1429 36.875 84.7086 37.3093 84.7086 37.8451V38.7094C84.7086 39.2452 85.1429 39.6795 85.6787 39.6795H106.259C106.795 39.6795 107.229 39.2452 107.229 38.7094V37.8451C107.229 37.3093 106.795 36.875 106.259 36.875Z"
fill="#E1E1E1"
/>
<Path
d="M78.4763 29.9062H69.3553C68.7048 29.9062 68.1776 30.4335 68.1776 31.084V39.345C68.1776 39.9955 68.7048 40.5228 69.3553 40.5228H78.4763C79.1268 40.5228 79.6541 39.9955 79.6541 39.345V31.084C79.6541 30.4335 79.1268 29.9062 78.4763 29.9062Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M55.3358 42.2519L53.4531 40.9076C53.2834 40.7869 53.2541 40.5618 53.3846 40.4051L53.5804 40.1702C53.7109 40.0136 53.9523 39.9842 54.122 40.1049L55.4761 41.074L57.5839 38.8292C57.7242 38.6791 57.9689 38.6628 58.1288 38.7933L58.3703 38.9858C58.5301 39.1163 58.5497 39.3414 58.4094 39.4915L55.8644 42.1997C55.7306 42.3433 55.4989 42.3629 55.3358 42.2487V42.2519Z"
fill="#E1E1E1"
d="M73.376 37.4723L70.9316 35.7269C70.7113 35.5702 70.6732 35.2778 70.8426 35.0745L71.0968 34.7695C71.2663 34.5661 71.5797 34.528 71.8 34.6847L73.5582 35.943L76.2949 33.0283C76.4771 32.8334 76.7948 32.8122 77.0024 32.9817L77.3159 33.2316C77.5235 33.4011 77.5489 33.6934 77.3667 33.8883L74.0623 37.4045C73.8886 37.5909 73.5878 37.6164 73.376 37.4681V37.4723Z"
fill="#0085FF"
/>
<Path
d="M59.264 50.2234H52.2391C51.7381 50.2234 51.332 50.6295 51.332 51.1305V57.4931C51.332 57.9941 51.7381 58.4002 52.2391 58.4002H59.264C59.765 58.4002 60.1711 57.9941 60.1711 57.4931V51.1305C60.1711 50.6295 59.765 50.2234 59.264 50.2234Z"
d="M78.4765 47.8203H69.3554C68.705 47.8203 68.1777 48.3476 68.1777 48.998V57.2591C68.1777 57.9095 68.705 58.4368 69.3554 58.4368H78.4765C79.1269 58.4368 79.6542 57.9095 79.6542 57.2591V48.998C79.6542 48.3476 79.1269 47.8203 78.4765 47.8203Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M55.3358 56.051L53.4531 54.7067C53.2834 54.586 53.2541 54.3608 53.3846 54.2042L53.5804 53.9693C53.7109 53.8127 53.9523 53.7833 54.122 53.904L55.4761 54.8731L57.5839 52.6282C57.7242 52.4781 57.9689 52.4618 58.1288 52.5923L58.3703 52.7849C58.5301 52.9154 58.5497 53.1405 58.4094 53.2906L55.8644 55.9988C55.7306 56.1424 55.4989 56.1619 55.3358 56.0477V56.051Z"
fill="#E1E1E1"
d="M73.3761 55.3903L70.9317 53.6449C70.7114 53.4881 70.6733 53.1958 70.8427 52.9925L71.0969 52.6874C71.2664 52.4841 71.5799 52.446 71.8002 52.6027L73.5583 53.8609L76.295 50.9463C76.4772 50.7514 76.7949 50.7302 77.0025 50.8997L77.316 51.1496C77.5236 51.3191 77.549 51.6114 77.3668 51.8063L74.0624 55.3225C73.8887 55.5089 73.5879 55.5343 73.3761 55.3861V55.3903Z"
fill="#0085FF"
/>
<Path
d="M55.3358 69.5422L53.4531 68.1979C53.2834 68.0772 53.2541 67.852 53.3846 67.6954L53.5804 67.4605C53.7109 67.3039 53.9523 67.2745 54.122 67.3952L55.4761 68.3643L57.5839 66.1194C57.7242 65.9694 57.9689 65.953 58.1288 66.0836L58.3703 66.2761C58.5301 66.4066 58.5497 66.6317 58.4094 66.7818L55.8644 69.49C55.7306 69.6336 55.4989 69.6531 55.3358 69.5389V69.5422Z"
fill="#E1E1E1"
/>
<Path
d="M55.3358 83.6833L53.4531 82.339C53.2834 82.2183 53.2541 81.9931 53.3846 81.8365L53.5804 81.6016C53.7109 81.445 53.9523 81.4156 54.122 81.5363L55.4761 82.5054L57.5839 80.2606C57.7242 80.1105 57.9689 80.0942 58.1288 80.2247L58.3703 80.4172C58.5301 80.5477 58.5497 80.7728 58.4094 80.9229L55.8644 83.6311C55.7306 83.7747 55.4989 83.7943 55.3358 83.6801V83.6833Z"
fill="#E1E1E1"
/>
<Path
d="M59.264 64.0225H52.2391C51.7381 64.0225 51.332 64.4286 51.332 64.9295V71.2922C51.332 71.7931 51.7381 72.1992 52.2391 72.1992H59.264C59.765 72.1992 60.1711 71.7931 60.1711 71.2922V64.9295C60.1711 64.4286 59.765 64.0225 59.264 64.0225Z"
d="M78.4765 65.7422H69.3554C68.705 65.7422 68.1777 66.2695 68.1777 66.9199V75.181C68.1777 75.8314 68.705 76.3587 69.3554 76.3587H78.4765C79.1269 76.3587 79.6542 75.8314 79.6542 75.181V66.9199C79.6542 66.2695 79.1269 65.7422 78.4765 65.7422Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M59.264 77.8242H52.2391C51.7381 77.8242 51.332 78.2303 51.332 78.7313V85.0939C51.332 85.5949 51.7381 86.001 52.2391 86.001H59.264C59.765 86.001 60.1711 85.5949 60.1711 85.0939V78.7313C60.1711 78.2303 59.765 77.8242 59.264 77.8242Z"
d="M73.3761 73.3083L70.9317 71.5628C70.7114 71.4061 70.6733 71.1138 70.8427 70.9104L71.0969 70.6054C71.2664 70.4021 71.5799 70.3639 71.8002 70.5207L73.5583 71.7789L76.295 68.8642C76.4772 68.6694 76.7949 68.6482 77.0025 68.8176L77.316 69.0676C77.5236 69.237 77.549 69.5294 77.3668 69.7242L74.0624 73.2405C73.8887 73.4269 73.5879 73.4523 73.3761 73.304V73.3083Z"
fill="#0085FF"
/>
<Path
d="M78.4765 83.6602H69.3554C68.705 83.6602 68.1777 84.1874 68.1777 84.8379V93.0989C68.1777 93.7494 68.705 94.2767 69.3554 94.2767H78.4765C79.1269 94.2767 79.6542 93.7494 79.6542 93.0989V84.8379C79.6542 84.1874 79.1269 83.6602 78.4765 83.6602Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M101.551 37.009H64.8142C64.3998 37.009 64.0638 37.345 64.0638 37.7595V38.4316C64.0638 38.8461 64.3998 39.1821 64.8142 39.1821H101.551C101.966 39.1821 102.302 38.8461 102.302 38.4316V37.7595C102.302 37.345 101.966 37.009 101.551 37.009Z"
fill="#E1E1E1"
/>
<Path
d="M80.6621 41.4497H64.811C64.3983 41.4497 64.0638 41.7842 64.0638 42.1969V42.8625C64.0638 43.2752 64.3983 43.6097 64.811 43.6097H80.6621C81.0747 43.6097 81.4093 43.2752 81.4093 42.8625V42.1969C81.4093 41.7842 81.0747 41.4497 80.6621 41.4497Z"
fill="#E1E1E1"
/>
<Path
d="M101.551 51.4277H64.8142C64.3998 51.4277 64.0638 51.7637 64.0638 52.1782V52.8504C64.0638 53.2648 64.3998 53.6008 64.8142 53.6008H101.551C101.966 53.6008 102.302 53.2648 102.302 52.8504V52.1782C102.302 51.7637 101.966 51.4277 101.551 51.4277Z"
fill="#E1E1E1"
/>
<Path
d="M80.6621 55.8684H64.811C64.3983 55.8684 64.0638 56.2029 64.0638 56.6156V57.2812C64.0638 57.6939 64.3983 58.0284 64.811 58.0284H80.6621C81.0747 58.0284 81.4093 57.6939 81.4093 57.2812V56.6156C81.4093 56.2029 81.0747 55.8684 80.6621 55.8684Z"
fill="#E1E1E1"
/>
<Path
d="M101.551 64.7598H64.8142C64.3998 64.7598 64.0638 65.0958 64.0638 65.5102V66.1824C64.0638 66.5969 64.3998 66.9328 64.8142 66.9328H101.551C101.966 66.9328 102.302 66.5969 102.302 66.1824V65.5102C102.302 65.0958 101.966 64.7598 101.551 64.7598Z"
fill="#E1E1E1"
/>
<Path
d="M80.6621 69.2007H64.811C64.3983 69.2007 64.0638 69.5352 64.0638 69.9479V70.6135C64.0638 71.0262 64.3983 71.3607 64.811 71.3607H80.6621C81.0747 71.3607 81.4093 71.0262 81.4093 70.6135V69.9479C81.4093 69.5352 81.0747 69.2007 80.6621 69.2007Z"
fill="#E1E1E1"
/>
<Path
d="M101.551 79.0105H64.8142C64.3998 79.0105 64.0638 79.3465 64.0638 79.761V80.4331C64.0638 80.8476 64.3998 81.1836 64.8142 81.1836H101.551C101.966 81.1836 102.302 80.8476 102.302 80.4331V79.761C102.302 79.3465 101.966 79.0105 101.551 79.0105Z"
fill="#E1E1E1"
/>
<Path
d="M80.6621 83.4512H64.811C64.3983 83.4512 64.0638 83.7857 64.0638 84.1984V84.864C64.0638 85.2767 64.3983 85.6112 64.811 85.6112H80.6621C81.0747 85.6112 81.4093 85.2767 81.4093 84.864V84.1984C81.4093 83.7857 81.0747 83.4512 80.6621 83.4512Z"
fill="#E1E1E1"
/>
<Path
d="M0.000183105 114.868H160.266"
d="M78.4765 101.578H69.3554C68.705 101.578 68.1777 102.105 68.1777 102.756V111.017C68.1777 111.667 68.705 112.195 69.3554 112.195H78.4765C79.1269 112.195 79.6542 111.667 79.6542 111.017V102.756C79.6542 102.105 79.1269 101.578 78.4765 101.578Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M54.1607 19.898C54.1607 19.898 52.8425 21.6469 53.0089 23.9766C53.0481 24.5379 53.5179 24.9751 54.0791 24.9718L100.432 24.8119C101.208 23.8885 100.901 21.846 100.689 19.8948H54.1607V19.898Z"
d="M133.381 48.5859H85.6829C85.1448 48.5859 84.7086 49.0222 84.7086 49.5603V50.433C84.7086 50.9712 85.1448 51.4074 85.6829 51.4074H133.381C133.919 51.4074 134.355 50.9712 134.355 50.433V49.5603C134.355 49.0222 133.919 48.5859 133.381 48.5859Z"
fill="#E1E1E1"
/>
<Path
d="M106.259 54.3516H85.6787C85.1429 54.3516 84.7086 54.7859 84.7086 55.3217V56.1859C84.7086 56.7217 85.1429 57.1561 85.6787 57.1561H106.259C106.795 57.1561 107.229 56.7217 107.229 56.1859V55.3217C107.229 54.7859 106.795 54.3516 106.259 54.3516Z"
fill="#E1E1E1"
/>
<Path
d="M133.381 67.3047H85.6829C85.1448 67.3047 84.7086 67.7409 84.7086 68.2791V69.1518C84.7086 69.6899 85.1448 70.1262 85.6829 70.1262H133.381C133.919 70.1262 134.355 69.6899 134.355 69.1518V68.2791C134.355 67.7409 133.919 67.3047 133.381 67.3047Z"
fill="#E1E1E1"
/>
<Path
d="M106.259 73.0703H85.6787C85.1429 73.0703 84.7086 73.5047 84.7086 74.0405V74.9047C84.7086 75.4405 85.1429 75.8748 85.6787 75.8748H106.259C106.795 75.8748 107.229 75.4405 107.229 74.9047V74.0405C107.229 73.5047 106.795 73.0703 106.259 73.0703Z"
fill="#E1E1E1"
/>
<Path
d="M133.381 84.6172H85.6829C85.1448 84.6172 84.7086 85.0534 84.7086 85.5916V86.4643C84.7086 87.0024 85.1448 87.4387 85.6829 87.4387H133.381C133.919 87.4387 134.355 87.0024 134.355 86.4643V85.5916C134.355 85.0534 133.919 84.6172 133.381 84.6172Z"
fill="#E1E1E1"
/>
<Path
d="M106.259 90.3828H85.6787C85.1429 90.3828 84.7086 90.8172 84.7086 91.353V92.2172C84.7086 92.753 85.1429 93.1873 85.6787 93.1873H106.259C106.795 93.1873 107.229 92.753 107.229 92.2172V91.353C107.229 90.8172 106.795 90.3828 106.259 90.3828Z"
fill="#E1E1E1"
/>
<Path
d="M133.381 104.418H85.6829C85.1448 104.418 84.7086 104.854 84.7086 105.392V106.265C84.7086 106.803 85.1448 107.239 85.6829 107.239H133.381C133.919 107.239 134.355 106.803 134.355 106.265V105.392C134.355 104.854 133.919 104.418 133.381 104.418Z"
fill="#E1E1E1"
/>
<Path
d="M106.259 110.184H85.6787C85.1429 110.184 84.7086 110.618 84.7086 111.154V112.018C84.7086 112.554 85.1429 112.988 85.6787 112.988H106.259C106.795 112.988 107.229 112.554 107.229 112.018V111.154C107.229 110.618 106.795 110.184 106.259 110.184Z"
fill="#E1E1E1"
/>
<Path
d="M0.000183105 143.094H208.086"
stroke="#12183E"
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M70.3208 17.1917C70.3208 17.1917 68.6093 19.4625 68.8253 22.4873C68.8762 23.216 69.4862 23.7836 70.2149 23.7794L130.398 23.5718C131.406 22.3729 131.008 19.7209 130.732 17.1875H70.3208V17.1917Z"
fill="#12183E"
/>
<Path
d="M79.0469 13.5975C79.0469 14.3153 78.4661 14.8993 77.745 14.8993C77.0239 14.8993 76.4431 14.3186 76.4431 13.5975C76.4431 13.5224 76.4496 13.4474 76.4627 13.3723C76.5671 13.9857 77.1022 14.4491 77.745 14.4491C78.3878 14.4491 78.9196 13.9857 79.0273 13.3723C79.0404 13.4441 79.0469 13.5191 79.0469 13.5975Z"
d="M102.633 9.01106C102.633 9.94308 101.878 10.7014 100.942 10.7014C100.006 10.7014 99.2518 9.94732 99.2518 9.01106C99.2518 8.91363 99.2603 8.81619 99.2772 8.71875C99.4128 9.5152 100.108 10.1168 100.942 10.1168C101.777 10.1168 102.467 9.5152 102.607 8.71875C102.624 8.81195 102.633 8.90939 102.633 9.01106Z"
fill="#12183E"
/>
<Path
d="M96.5036 16.7789H87.1C87.1 11.6138 82.9137 7.42749 77.7486 7.42749C72.5835 7.42749 68.3972 11.6138 68.3972 16.7789H58.9935C56.5823 16.7789 54.6278 18.7334 54.6278 21.1446V22.6032C54.6278 22.8903 54.8595 23.122 55.1466 23.122H100.357C100.644 23.122 100.876 22.8903 100.876 22.6032V21.1446C100.876 18.7334 98.9214 16.7789 96.5102 16.7789H96.5036ZM76.4663 13.3725C76.5707 12.7623 77.1058 12.2957 77.7486 12.2957C78.3914 12.2957 78.9232 12.759 79.0309 13.3725C79.044 13.4442 79.0505 13.5193 79.0505 13.5976C79.0505 14.3154 78.4697 14.8995 77.7486 14.8995C77.0275 14.8995 76.4467 14.3187 76.4467 13.5976C76.4467 13.5226 76.4532 13.4475 76.4663 13.3725Z"
d="M125.298 13.1416H113.088C113.088 6.43535 107.653 1 100.946 1C94.2402 1 88.8048 6.43535 88.8048 13.1416H76.5954C73.4647 13.1416 70.9271 15.6793 70.9271 18.81V20.7037C70.9271 21.0765 71.2278 21.3773 71.6007 21.3773H130.301C130.674 21.3773 130.974 21.0765 130.974 20.7037V18.81C130.974 15.6793 128.437 13.1416 125.306 13.1416H125.298ZM99.2816 8.7188C99.4171 7.92658 100.112 7.32077 100.946 7.32077C101.781 7.32077 102.472 7.92234 102.611 8.7188C102.628 8.812 102.637 8.90944 102.637 9.01111C102.637 9.94313 101.883 10.7015 100.946 10.7015C100.01 10.7015 99.2561 9.94736 99.2561 9.01111C99.2561 8.91367 99.2646 8.81623 99.2816 8.7188Z"
fill="white"
/>
<Path
d="M100.869 21.8296V22.6029C100.869 22.89 100.637 23.1217 100.35 23.1217H55.1427C54.8556 23.1217 54.6239 22.89 54.6239 22.6029V21.8296H100.872H100.869Z"
d="M130.965 19.6992V20.7033C130.965 21.0761 130.665 21.3768 130.292 21.3768H71.596C71.2231 21.3768 70.9224 21.0761 70.9224 20.7033V19.6992H130.97H130.965Z"
fill="#BCBCBC"
/>
<Path
d="M96.5036 16.7789H87.1C87.1 11.6138 82.9137 7.42749 77.7486 7.42749C72.5835 7.42749 68.3972 11.6138 68.3972 16.7789H58.9935C56.5823 16.7789 54.6278 18.7334 54.6278 21.1446V22.6032C54.6278 22.8903 54.8595 23.122 55.1466 23.122H100.357C100.644 23.122 100.876 22.8903 100.876 22.6032V21.1446C100.876 18.7334 98.9214 16.7789 96.5102 16.7789H96.5036ZM76.4663 13.3725C76.5707 12.7623 77.1058 12.2957 77.7486 12.2957C78.3914 12.2957 78.9232 12.759 79.0309 13.3725C79.044 13.4442 79.0505 13.5193 79.0505 13.5976C79.0505 14.3154 78.4697 14.8995 77.7486 14.8995C77.0275 14.8995 76.4467 14.3187 76.4467 13.5976C76.4467 13.5226 76.4532 13.4475 76.4663 13.3725V13.3725Z"
d="M125.298 13.1416H113.088C113.088 6.43535 107.653 1 100.946 1C94.2402 1 88.8048 6.43535 88.8048 13.1416H76.5954C73.4647 13.1416 70.9271 15.6793 70.9271 18.81V20.7037C70.9271 21.0765 71.2278 21.3773 71.6007 21.3773H130.301C130.674 21.3773 130.974 21.0765 130.974 20.7037V18.81C130.974 15.6793 128.437 13.1416 125.306 13.1416H125.298ZM99.2816 8.7188C99.4171 7.92658 100.112 7.32077 100.946 7.32077C101.781 7.32077 102.472 7.92234 102.611 8.7188C102.628 8.812 102.637 8.90944 102.637 9.01111C102.637 9.94313 101.883 10.7015 100.946 10.7015C100.01 10.7015 99.2561 9.94736 99.2561 9.01111C99.2561 8.91367 99.2646 8.81623 99.2816 8.7188V8.7188Z"
stroke="#12183E"
strokeWidth={0.157117}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M120.07 77.3704C110.12 72.1066 97.786 75.9029 92.5222 85.8534C87.2585 95.804 91.0547 108.138 101.005 113.401C110.956 118.665 123.289 114.869 128.553 104.918C133.817 94.9678 130.021 82.6341 120.07 77.3704Z"
fill="#12183E"
/>
<Path
d="M118.006 77.3704C108.056 72.1066 95.722 75.9029 90.4583 85.8534C85.1945 95.804 88.9908 108.138 98.9413 113.401C108.892 118.665 121.226 114.869 126.489 104.918C131.753 94.9678 127.957 82.6341 118.006 77.3704Z"
fill="white"
d="M155.223 44.9219H184.158"
stroke="#12183E"
strokeWidth={0.327158}
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M119.223 89.5557L104.79 103.989L97.5737 96.7722"
stroke="#0085FF"
strokeWidth={2.61727}
strokeLinecap="round"
d="M28.6681 67.3086H44.8937"
stroke="#12183E"
strokeWidth={0.245714}
strokeLinejoin="round"
/>
<Path
d="M19 5L20.0704 4.41457C21.0603 3.87312 21.8731 3.0603 22.4146 2.07035L23 1L23.5854 2.07035C24.1269 3.0603 24.9397 3.87312 25.9296 4.41457L27 5L25.9296 5.58543C24.9397 6.12688 24.1269 6.9397 23.5854 7.92965L23 9L22.4146 7.92965C21.8731 6.9397 21.0603 6.12688 20.0704 5.58543L19 5Z"
fill="white"
stroke="#001B4B"
strokeWidth={0.101818}
strokeMiterlimit={10}
/>
<Path
d="M33 17.5L35.2745 16.256C37.3781 15.1054 39.1054 13.3781 40.256 11.2745L41.5 9L42.744 11.2745C43.8946 13.3781 45.6219 15.1054 47.7255 16.256L50 17.5L47.7255 18.744C45.6219 19.8946 43.8946 21.6219 42.744 23.7255L41.5 26L40.256 23.7255C39.1054 21.6219 37.3781 19.8946 35.2745 18.744L33 17.5Z"
fill="white"
stroke="#001B4B"
strokeWidth={0.198333}
strokeMiterlimit={10}
/>
</Svg>
);
export default EmptyPageCheckIcon;

View File

@@ -1,111 +1,108 @@
import * as React from "react";
import Svg, { Path, Rect } from "react-native-svg";
const NoCasesFoundIcon = () => (
<Svg
width={148}
height={90}
viewBox="0 0 148 90"
fill="none"
>
<Path
opacity={0.8}
d="M49.6623 88.5846H22.4604C24.599 79.7041 31.2663 72.2151 40.3441 68.0095C45.9661 73.1373 49.5221 80.4513 49.6623 88.5846Z"
fill="#1C1C1C"
stroke="#1C1C1C"
/>
<Path
d="M46.8873 89.2776H1C1 76.6017 11.2677 66.334 23.9436 66.334C29.8553 66.334 35.2381 68.5618 39.3016 72.2332C43.9625 76.4274 46.8873 82.5134 46.8873 89.2776Z"
fill="#E8E8E8"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M115.576 89.2776H69.6888C69.6888 76.6017 79.9565 66.334 92.6325 66.334C98.5442 66.334 103.927 68.5618 107.99 72.2332C112.651 76.4274 115.576 82.5134 115.576 89.2776Z"
fill="#E8E8E8"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M92.6325 61.1256C99.293 61.1256 104.692 55.7262 104.692 49.0657C104.692 42.4053 99.293 37.0059 92.6325 37.0059C85.972 37.0059 80.5726 42.4053 80.5726 49.0657C80.5726 55.7262 85.972 61.1256 92.6325 61.1256Z"
fill="#E8E8E8"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M23.9437 61.1256C30.6041 61.1256 36.0035 55.7262 36.0035 49.0657C36.0035 42.4053 30.6041 37.0059 23.9437 37.0059C17.2832 37.0059 11.8838 42.4053 11.8838 49.0657C11.8838 55.7262 17.2832 61.1256 23.9437 61.1256Z"
fill="#E8E8E8"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M57.8378 55.7361C65.7078 55.7361 72.0877 49.3562 72.0877 41.4862C72.0877 33.6162 65.7078 27.2363 57.8378 27.2363C49.9678 27.2363 43.588 33.6162 43.588 41.4862C43.588 49.3562 49.9678 55.7361 57.8378 55.7361Z"
fill="white"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M30.7278 89.2854C30.7278 74.3076 42.8674 62.168 57.8452 62.168C72.823 62.168 84.9626 74.3076 84.9626 89.2854H30.7278Z"
fill="white"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M109.53 37.5806L107.089 42.1953L117.064 47.4727L119.506 42.858L109.53 37.5806Z"
fill="#E8E8E8"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M116.63 46.4531L114.527 45.3407L116.316 41.9593L118.419 43.0717L116.63 46.4531Z"
fill="#1C1C1C"
stroke="#1C1C1C"
/>
<Path
d="M105.709 39.3115L105.709 39.3114C111.574 28.2242 107.343 14.4833 96.2615 8.61787L96.2615 8.61784C85.1741 2.75244 71.4332 6.98922 65.5679 18.0708L65.5679 18.0708C59.7025 29.1581 63.9335 42.899 75.0208 48.7644L75.0209 48.7645C86.1081 54.6241 99.8434 50.3931 105.709 39.3115ZM61.5944 15.9674C68.6204 2.68567 85.083 -2.38154 98.3649 4.64443C111.647 11.6703 116.714 28.133 109.688 41.4149C102.662 54.6966 86.1992 59.7638 72.9174 52.7378C59.6357 45.7119 54.5685 29.2492 61.5944 15.9674Z"
fill="#1C1C1C"
stroke="#1C1C1C"
strokeWidth={0.5}
/>
<Path
d="M106.949 38.4627C101.148 49.4223 87.5644 53.6068 76.5992 47.8116C65.6339 42.0108 61.4495 28.4211 67.2503 17.4559C73.0511 6.49632 86.6408 2.30621 97.606 8.10703C108.566 13.9078 112.75 27.4975 106.949 38.4627Z"
fill="white"
fillOpacity={0.5}
/>
<Path
d="M99.9432 3.69298C86.5394 -3.39753 69.9254 1.7162 62.8349 15.12C55.7444 28.5238 60.8581 45.1378 74.2619 52.2283C87.6657 59.3188 104.28 54.2051 111.37 40.8013C118.461 27.3975 113.347 10.7835 99.9432 3.69298ZM106.949 38.4641C101.148 49.4237 87.5644 53.6081 76.5991 47.813C65.6339 42.0121 61.4494 28.4225 67.2503 17.4572C73.0511 6.49765 86.6408 2.30754 97.606 8.10836C108.566 13.9092 112.75 27.4988 106.949 38.4641Z"
fill="#F7F7F7"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Rect
x={113.75}
y={50.4805}
width={13.1529}
height={31.276}
rx={6.57644}
transform="rotate(-61.6342 113.75 50.4805)"
fill="#0085FF"
stroke="#1C1C1C"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
</Svg>
<Svg
width={172}
height={114}
viewBox="0 0 172 114"
fill="none">
<Path
d="M56.0647 113.532H1C1 98.3212 13.3212 86 28.5324 86C35.6264 86 42.0857 88.6733 46.9619 93.0791C52.555 98.1121 56.0647 105.415 56.0647 113.532Z"
fill="#F7F7F7"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M138.491 113.532H83.4266C83.4266 98.3212 95.7479 86 110.959 86C118.053 86 124.512 88.6733 129.389 93.0791C134.982 98.1121 138.491 105.415 138.491 113.532Z"
fill="#F7F7F7"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M110.959 79.7484C118.952 79.7484 125.431 73.2691 125.431 65.2765C125.431 57.284 118.952 50.8047 110.959 50.8047C102.966 50.8047 96.4872 57.284 96.4872 65.2765C96.4872 73.2691 102.966 79.7484 110.959 79.7484Z"
fill="#F7F7F7"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M28.5324 79.7484C36.525 79.7484 43.0042 73.2691 43.0042 65.2765C43.0042 57.284 36.525 50.8047 28.5324 50.8047C20.5398 50.8047 14.0605 57.284 14.0605 65.2765C14.0605 73.2691 20.5398 79.7484 28.5324 79.7484Z"
fill="#F7F7F7"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
opacity={0.8}
d="M64 113.301H30C32.4429 101.995 40.8543 92.4932 52.3218 87.3008C59.4973 93.6987 64 102.982 64 113.301Z"
fill="#3591FE"
/>
<Path
d="M69.2053 73.2817C78.6493 73.2817 86.3052 65.6259 86.3052 56.1819C86.3052 46.7379 78.6493 39.082 69.2053 39.082C59.7613 39.082 52.1055 46.7379 52.1055 56.1819C52.1055 65.6259 59.7613 73.2817 69.2053 73.2817Z"
fill="#CCE4FF"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M36.6733 113.541C36.6733 95.5675 51.2409 81 69.2142 81C87.1876 81 101.755 95.5675 101.755 113.541H36.6733Z"
fill="#CCE4FF"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M125.636 45.4974L122.707 51.0352L134.677 57.368L137.607 51.8303L125.636 45.4974Z"
fill="#E8E8E8"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Path
d="M133.529 49.9402L130.821 55.0586L134.406 56.9547L137.113 51.8363L133.529 49.9402Z"
fill="#E8E8E8"
/>
<Path
d="M121.006 47.5488L121.006 47.5488C128.032 34.2685 122.964 17.8096 109.69 10.7841L109.69 10.784C96.41 3.75848 79.9512 8.83328 72.9257 22.1067L72.9256 22.1068C65.9001 35.3871 70.968 51.846 84.2484 58.8715L84.2485 58.8716C97.5287 65.8903 113.981 60.8224 121.006 47.5488ZM68.0692 19.5359C76.5132 3.57344 96.2986 -2.51652 112.261 5.92756C128.224 14.3716 134.314 34.157 125.87 50.1196C117.426 66.0821 97.6401 72.1721 81.6775 63.728C65.715 55.284 59.6251 35.4985 68.0692 19.5359Z"
fill="#545454"
stroke="#12183E"
strokeWidth={0.5}
/>
<Path
d="M122.539 46.5561C115.578 59.7076 99.2772 64.7289 86.119 57.7747C72.9607 50.8138 67.9393 34.5061 74.9003 21.3479C81.8613 8.19636 98.1689 3.16824 111.327 10.1292C124.479 17.0902 129.5 33.3978 122.539 46.5561Z"
fill="white"
fillOpacity={0.5}
/>
<Path
d="M114.132 4.83158C98.0472 -3.67703 78.1104 2.45944 69.6018 18.544C61.0932 34.6286 67.2297 54.5654 83.3143 63.074C99.3989 71.5826 119.336 65.4461 127.844 49.3615C136.353 33.277 130.216 13.3402 114.132 4.83158ZM122.539 46.5569C115.578 59.7084 99.2772 64.7298 86.1189 57.7755C72.9607 50.8146 67.9393 34.507 74.9003 21.3487C81.8613 8.19717 98.1689 3.16905 111.327 10.13C124.479 17.091 129.5 33.3986 122.539 46.5569Z"
fill="#F7F7F7"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<Rect
x={130.7}
y={60.9766}
width={15.7835}
height={37.5312}
rx={7}
transform="rotate(-61.6342 130.7 60.9766)"
fill="#025ECB"
stroke="#12183E"
strokeWidth={0.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
</Svg>
);
export default NoCasesFoundIcon;

View File

@@ -461,12 +461,27 @@ const allCasesSlice = createSlice({
toggleNewlyAddedCase: (state, action) => {
state.caseDetails[action.payload].isNewlyAdded = false;
},
resetCasesData: (state) => {
state = {
...initialState,
isOnboarded: state.isOnboarded
}
}
resetCasesData: state => {
state.casesList = [];
state.pinnedList = [];
state.casesListMap = {};
state.intermediateTodoList = [];
state.intermediateTodoListMap = {};
state.selectedTodoListCount = 0;
state.selectedTodoListMap = {};
state.initialPinnedRankCount = 0;
state.pinnedRankCount = 0;
state.loading = false;
state.filterList = [];
state.newlyPinnedCases = 0;
state.completedCases = 0;
state.caseDetails = {};
state.filters = {};
state.searchQuery = '';
state.selectedFilters = {};
state.filterCount = 0;
state.isOnboarded = state.isOnboarded;
},
},
});

View File

@@ -38,7 +38,12 @@ const loginSlice = createSlice({
state.isLoading = action.payload;
},
resetLoginForm: state => {
state = { ...initialState };
state.phoneNumber = '';
state.otpToken = '';
state.OTPError = '';
state.verifyOTPSuccess = '';
state.verifyOTPError = '';
state.isLoading = false;
},
},
});

View File

@@ -7,13 +7,25 @@ import { addClickstreamEvent } from '../../services/clickstreamEventService';
import { CLICKSTREAM_EVENT_NAMES } from '../../common/Constants';
import { GenericStyles } from '../../../RN-UI-LIB/src/styles';
import { logout } from '../../action/authActions';
import { goBack } from '../../components/utlis/navigationUtlis';
import { useAppDispatch } from '../../hooks';
import AccountDetails from './AccountDetails';
import { useAppDispatch, useAppSelector } from '../../hooks';
import Layout from '../layout/Layout';
import { RootState } from '../../store/store';
import { ICaseItem } from '../allCases/interface';
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
import ListItem from '../allCases/ListItem';
import Button from '../../../RN-UI-LIB/src/components/Button';
import { navigateToScreen } from '../../components/utlis/navigationUtlis';
import GroupIcon from '../../../RN-UI-LIB/src/Icons/groupIcon';
const Profile: React.FC = () => {
interface IProfile {
completedCases: ICaseItem[];
}
const Profile: React.FC<IProfile> = ({completedCases = []}) => {
const dispatch = useAppDispatch();
const {phoneNumber, name} = useAppSelector(
(state: RootState) => state.user.user!!,
);
useEffect(() => {
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.AV_PROFILE_PAGE_LOADED);
@@ -49,21 +61,54 @@ const Profile: React.FC = () => {
]);
};
const handleViewAllCases = () => {
navigateToScreen('CompletedCases', {completedCases})
}
const numberOfCompletedCases = completedCases?.length || 0;
return (
<Layout>
<View style={GenericStyles.fill}>
<NavigationHeader title={'Profile'} onBack={goBack} />
<View style={GenericStyles.p16}>
<View style={GenericStyles.mb24}>
<AccountDetails />
<NavigationHeader
title={name}
subTitle={phoneNumber}
showAvatarIcon
/>
<View style={[GenericStyles.p16, GenericStyles.mt8]}>
<View
style={[GenericStyles.row, GenericStyles.alignCenter]}>
<View style={[GenericStyles.ml4, GenericStyles.mr8]}>
<GroupIcon />
</View>
<Text>Completed cases ({numberOfCompletedCases})</Text>
</View>
{numberOfCompletedCases
? completedCases
.slice(0, 3)
.map(caseItem => (
<ListItem caseData={caseItem} isCompleted />
))
: null}
{numberOfCompletedCases > 3 ? (
<Button
title="View all completed cases"
variant="primaryText"
style={[
GenericStyles.w100,
GenericStyles.br8,
GenericStyles.mt8,
GenericStyles.mb8,
GenericStyles.whiteBackground,
]}
onPress={handleViewAllCases}
/>
) : null}
</View>
<View style={styles.logoutContainer}>
<TouchableOpacity
onPress={handleLogout}
style={[
GenericStyles.row,
GenericStyles.alignCenter,
styles.logoutContainer,
]}>
style={[GenericStyles.row, GenericStyles.alignCenter]}>
<LogoutIcon />
<Text style={styles.logoutText}>Logout</Text>
</TouchableOpacity>
@@ -77,7 +122,9 @@ export default Profile;
const styles = StyleSheet.create({
logoutContainer: {
marginLeft: 10,
backgroundColor: COLORS.BACKGROUND.PRIMARY,
paddingVertical: 16,
paddingHorizontal: 34
},
logoutText: {
marginLeft: 6,

View File

@@ -95,19 +95,23 @@ const CasesList: React.FC<ICasesList> = ({ casesList = [], isVisitPlan }) => {
})
: filteredList;
const listEmptyComponent =
filterCount > 0 || searchQuery.length > 0 ? (
<NoCasesFound message={EmptyListMessages.NO_CASES_FOUND} subMessage={EmptyListMessages.NO_CASES_FOUND_SUB} />
) : (
<EmptyList
message={
isVisitPlan
? EmptyListMessages.NO_VISIT_PLANS
: EmptyListMessages.NO_PENDING_CASES
}
isVisitPlan={isVisitPlan}
/>
);
const isFilterApplied = filterCount > 0 || searchQuery.length > 0;
const listEmptyComponent = (
<EmptyList
message={
isFilterApplied
? EmptyListMessages.NO_CASES_FOUND
: isVisitPlan
? EmptyListMessages.NO_VISIT_PLANS
: EmptyListMessages.NO_PENDING_CASES
}
isVisitPlan={isVisitPlan}
subMessage={
isFilterApplied ? EmptyListMessages.NO_CASES_FOUND_SUB : ''
}
/>
);
return { filteredCasesList: filteredListAfterQuery, listEmptyComponent };
}, [casesList, caseDetails, filters, selectedFilters, searchQuery]);
@@ -154,7 +158,7 @@ const CasesList: React.FC<ICasesList> = ({ casesList = [], isVisitPlan }) => {
headerLabel={
isVisitPlan
? "Today's visit plan"
: `My Cases (${casesList.length})`
: `My Cases (${filteredCasesList.length})`
}
showFilters={!!casesList.length}
/>

View File

@@ -1,5 +1,4 @@
import {
RefreshControl,
StyleSheet,
View,
VirtualizedList,
@@ -8,45 +7,43 @@ import React from 'react';
import { ICaseItem } from './interface';
import ListItem from './ListItem';
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
import { useAppDispatch, useAppSelector } from '../../hooks';
import { COMPLETED_STATUSES, EmptyListMessages } from './contants';
import { EmptyListMessages } from './contants';
import { GenericStyles } from '../../../RN-UI-LIB/src/styles';
import EmptyList from './EmptyList';
import useRefresh from '../../hooks/useRefresh';
import { getAllCases } from '../../action/dataActions';
import { HEADER_HEIGHT_MIN, HEADER_SCROLL_DISTANCE } from '../../common/Constants';
import NavigationHeader from '../../../RN-UI-LIB/src/components/NavigationHeader';
import { goBack } from '../../components/utlis/navigationUtlis';
const getItem = (item: Array<ICaseItem>, index: number) => item[index];
const CompletedCase = () => {
const { casesList, caseDetails } = useAppSelector(state => state.allCases);
const completed = casesList.filter(caseData => {
const detail = caseDetails[caseData.caseReferenceId];
const { caseStatus } = detail;
return COMPLETED_STATUSES.includes(caseStatus);
});
interface ICompletedCases {
route: {
params: { completedCases: ICaseItem[] },
},
}
const dispatch = useAppDispatch();
const CompletedCase:React.FC<ICompletedCases> = (props) => {
const {
route: {
params: { completedCases },
},
} = props;
const { refreshing, onRefresh } = useRefresh(() => dispatch(getAllCases()));
const handleBack = () => {
goBack();
}
return (
<View style={[GenericStyles.fill, styles.container]}>
<NavigationHeader onBack={handleBack} title={`Completed cases (${completedCases.length})`} />
<VirtualizedList
contentContainerStyle={[
completed.length ? null : GenericStyles.fill,
completedCases.length ? null : GenericStyles.fill,
styles.list
]}
// refreshControl={
// <RefreshControl
// refreshing={refreshing}
// onRefresh={onRefresh}
// />
// }
data={completed}
data={completedCases}
initialNumToRender={4}
renderItem={row => (
<ListItem caseData={row.item} compleatedList />
<ListItem caseData={row.item} isCompleted />
)}
keyExtractor={item => item.caseReferenceId}
getItemCount={item => item.length}
@@ -69,7 +66,6 @@ const styles = StyleSheet.create({
list: {
marginHorizontal: 12,
marginVertical: 10,
paddingTop: HEADER_HEIGHT_MIN - 50
},
seperator: {
backgroundColor: COLORS.BORDER.PRIMARY,

View File

@@ -1,20 +1,21 @@
import { StyleSheet, View } from 'react-native';
import React from 'react';
import EmptyPageWarnIcon from '../../assets/icons/EmptyPageWarnIcon';
import { GenericStyles } from '../../../RN-UI-LIB/src/styles';
import Heading from '../../../RN-UI-LIB/src/components/Heading';
import EmptyPageCheckIcon from '../../assets/icons/EmptyPageCheckIcon';
import EmptyListIcon from '../../../RN-UI-LIB/src/Icons/EmptyListIcon';
import Button from '../../../RN-UI-LIB/src/components/Button';
import { navigateToScreen } from '../../components/utlis/navigationUtlis';
import NoCasesFoundIcon from '../../assets/icons/NoCasesFoundIcon';
import Text from '../../../RN-UI-LIB/src/components/Text';
interface IEmptyList {
message: string;
showWarnSign?: boolean;
subMessage?: string;
isVisitPlan?: boolean;
isFilterApplied?: boolean;
}
const EmptyList: React.FC<IEmptyList> = ({ showWarnSign, message, isVisitPlan }) => {
const EmptyList: React.FC<IEmptyList> = ({ message, isVisitPlan, isFilterApplied, subMessage }) => {
const handleCreateVisitPlan = () => {
navigateToScreen('Cases')
@@ -23,11 +24,31 @@ const EmptyList: React.FC<IEmptyList> = ({ showWarnSign, message, isVisitPlan })
return (
<View style={styles.centerAbsolute}>
<View style={[GenericStyles.w100, styles.centerAbsolute]}>
{isVisitPlan ? <EmptyListIcon /> : showWarnSign ? <EmptyPageWarnIcon /> : <EmptyPageCheckIcon />}
<Heading dark bold type="h3" style={GenericStyles.mt24}>
{message}
</Heading>
{isVisitPlan && <Button title={'Create a visit plan'} style={[GenericStyles.w100, GenericStyles.mt24]} onPress={handleCreateVisitPlan}/>}
{isFilterApplied || !isVisitPlan ? (
<NoCasesFoundIcon />
) : (
<EmptyPageCheckIcon />
)}
<View style={[GenericStyles.mt12, styles.text]}>
<Heading
dark
bold
type="h3"
style={[
GenericStyles.mt16,
GenericStyles.centerAlignedText,
]}>
{message}
</Heading>
{subMessage ? <Text light>{subMessage}</Text> : null}
{isVisitPlan ? (
<Button
title={'Create a visit plan'}
style={[GenericStyles.w100, GenericStyles.mt24]}
onPress={handleCreateVisitPlan}
/>
) : null}
</View>
</View>
</View>
);
@@ -38,7 +59,11 @@ const styles = StyleSheet.create({
height: '100%',
justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 4
paddingHorizontal: 4,
},
text: {
paddingHorizontal: 30,
width: '100%'
},
});

View File

@@ -33,15 +33,15 @@ interface IListItem {
caseData: ICaseItem;
// True if it's from the inside todo screen
isTodoItem?: boolean;
compleatedList?: boolean;
isCompleted?: boolean;
}
const ListItem: React.FC<IListItem> = props => {
const { caseData, compleatedList, isTodoItem } = props;
const { caseData, isCompleted, isTodoItem } = props;
const { caseReferenceId: caseId } = caseData;
const dispatch = useAppDispatch();
if (!compleatedList && caseData.caseStatus === CaseStatuses.CLOSED) {
if (!isCompleted && caseData.caseStatus === CaseStatuses.CLOSED) {
return null;
}
@@ -126,7 +126,7 @@ const ListItem: React.FC<IListItem> = props => {
},
]}>
<CaseItemAvatar caseData={caseData} />
{!isTodoItem ? (
{!isTodoItem && !isCompleted ? (
<TouchableOpacity
onPress={handleAvatarClick}
style={styles.selectBtn}>
@@ -135,11 +135,14 @@ const ListItem: React.FC<IListItem> = props => {
) : null}
<View style={[styles.caseItemInfo]}>
<View style={styles.tag}>
{detail?.caseType === CaseAllocationType.COLLECTION_CASE ? (
{detail?.caseType ===
CaseAllocationType.COLLECTION_CASE ? (
<Tag
variant="violet"
text={
CaseTypeMap[CaseAllocationType.COLLECTION_CASE]
CaseTypeMap[
CaseAllocationType.COLLECTION_CASE
]
}
tagIcon={<CollectionsIcon />}
/>
@@ -148,7 +151,8 @@ const ListItem: React.FC<IListItem> = props => {
variant="teal"
text={
CaseTypeMap[
CaseAllocationType.ADDRESS_VERIFICATION_CASE
CaseAllocationType
.ADDRESS_VERIFICATION_CASE
]
}
tagIcon={<OnboardingIcon />}
@@ -158,26 +162,22 @@ const ListItem: React.FC<IListItem> = props => {
<Heading numberOfLines={1} type={'h5'} bold dark>
{customerName}
</Heading>
{!compleatedList && (
<Text
numberOfLines={2}
dark
bold
ellipsizeMode="tail"
style={styles.address}>
{taskTitle ? (
<Text light>
{/* @ts-ignore */}
<Text>{TaskTitleUIMapping[taskTitle]}</Text>
{displayAddress
? `: ${displayAddress}`
: null}
</Text>
) : isCollection ? (
<Text light>{displayAddress}</Text>
) : null}
</Text>
)}
<Text
numberOfLines={2}
dark
bold
ellipsizeMode="tail"
style={styles.address}>
{taskTitle ? (
<Text light>
{/* @ts-ignore */}
<Text>{TaskTitleUIMapping[taskTitle]}</Text>
{displayAddress ? `: ${displayAddress}` : null}
</Text>
) : isCollection ? (
<Text light>{displayAddress}</Text>
) : null}
</Text>
{detail?.caseType === CaseAllocationType.COLLECTION_CASE ? (
<Text
small
@@ -186,18 +186,13 @@ const ListItem: React.FC<IListItem> = props => {
POS {formatAmount(detail.pos, false)}
{' '}DPD bucket {detail.dpdBucket}
</Text>
) : compleatedList || caseStatus ? (
) : caseStatus ? (
<View style={styles.borderTop}>
{!compleatedList && caseStatus && (
{caseStatus ? (
<Text small style={styles.caseStatusText} bold>
{caseStatus.label}
</Text>
)}
{compleatedList && (
<Text small style={styles.caseStatusText} bold>
{closedCaseStatus.label}
</Text>
)}
): null}
</View>
) : null}
</View>

View File

@@ -1,38 +0,0 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import Heading from '../../../RN-UI-LIB/src/components/Heading';
import Text from '../../../RN-UI-LIB/src/components/Text';
import { GenericStyles } from '../../../RN-UI-LIB/src/styles';
import NoCasesFoundIcon from '../../assets/icons/NoCasesFoundIcon';
interface INoCasesFound {
message: string;
subMessage: string;
}
const NoCasesFound: React.FC<INoCasesFound> = ({ message, subMessage }) => {
return (
<View style={styles.centerAbsolute}>
<View style={styles.centerAbsolute}>
<NoCasesFoundIcon />
<View style={GenericStyles.mt12}>
<Heading dark bold type="h3" style={GenericStyles.mt16}>
{message}
</Heading>
<Text light>{subMessage}</Text>
</View>
</View>
</View>
);
};
const styles = StyleSheet.create({
centerAbsolute: {
height: '100%',
justifyContent: 'center',
alignItems: 'center',
},
});
export default NoCasesFound;

View File

@@ -27,7 +27,7 @@ export const ListHeaderItems = {
export const EmptyListMessages = {
NO_COMPLETED_CASES: 'No case completed yet',
NO_PENDING_CASES: 'All cases completed',
NO_PENDING_CASES: 'Looks like you resolved all your cases for this allocation',
NO_VISIT_PLANS: 'Plan your day by creating a visit plan',
NO_CASES_FOUND: 'No results for the selected filters',
NO_CASES_FOUND_SUB: 'Try removing or adding different filters',

View File

@@ -67,7 +67,7 @@ const AllCasesMain = () => {
},
{
name: 'Profile',
component: Profile,
component: () => <Profile completedCases={completedList}/>,
icon: ProfileIcon,
},
],