@djb25/digit-ui-module-ekyc 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3513 -3789
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/src/Module.js +49 -22
- package/src/components/ConnectionDetailsView.js +183 -60
- package/src/components/DesktopInbox.js +47 -165
- package/src/components/EKYCCard.js +35 -23
- package/src/components/Filter.js +48 -53
- package/src/components/SearchConsumer.js +104 -94
- package/src/components/SearchFormFieldsComponent.js +55 -0
- package/src/components/StatusCards.js +100 -118
- package/src/config/config.js +69 -0
- package/src/hook/useInboxTableConfig.js +134 -0
- package/src/pages/citizen/index.js +90 -0
- package/src/pages/employee/AadhaarVerification.js +473 -609
- package/src/pages/employee/AddressDetails.js +508 -732
- package/src/pages/employee/ConsumerDetails.js +512 -0
- package/src/pages/employee/Create.js +24 -22
- package/src/pages/employee/Dashboard.js +43 -0
- package/src/pages/employee/EKYCForm.js +117 -0
- package/src/pages/employee/Inbox.js +248 -140
- package/src/pages/employee/Mapping.js +645 -0
- package/src/pages/employee/MeterDetails.js +496 -0
- package/src/pages/employee/PropertyInfo.js +471 -560
- package/src/pages/employee/Review.js +268 -484
- package/src/pages/employee/Update.js +9 -0
- package/src/pages/employee/index.js +60 -82
|
@@ -3,31 +3,43 @@ import React from "react";
|
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
|
|
5
5
|
const EKYCCard = () => {
|
|
6
|
-
|
|
6
|
+
const { t } = useTranslation();
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
const propsForModuleCard = {
|
|
9
|
+
Icon: <PersonIcon />,
|
|
10
|
+
moduleName: t("ACTION_TEST_EKYC"),
|
|
11
|
+
kpis: [
|
|
12
|
+
{
|
|
13
|
+
count: "-",
|
|
14
|
+
label: t("TOTAL_EKYC"),
|
|
15
|
+
link: `/digit-ui/employee/ekyc/dashboard`,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
links: [
|
|
19
|
+
{
|
|
20
|
+
label: t("EKYC_DASHBOARD"),
|
|
21
|
+
link: `/digit-ui/employee/ekyc/dashboard`,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: t("EKYC_INBOX"),
|
|
25
|
+
link: `/digit-ui/employee/ekyc/inbox`,
|
|
26
|
+
},
|
|
27
|
+
// {
|
|
28
|
+
// label: t("EKYC_CREATE_KYC"),
|
|
29
|
+
// link: `/digit-ui/employee/ekyc/create-kyc`
|
|
30
|
+
// },
|
|
31
|
+
// {
|
|
32
|
+
// label: t("EKYC_UPDATE_KYC"),
|
|
33
|
+
// link: `/digit-ui/employee/ekyc/update-kyc`
|
|
34
|
+
// },
|
|
35
|
+
{
|
|
36
|
+
label: t("EKYC_MAPPING"),
|
|
37
|
+
link: `/digit-ui/employee/ekyc/mapping`,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
return <EmployeeModuleCard {...propsForModuleCard} />;
|
|
31
43
|
};
|
|
32
44
|
|
|
33
45
|
export default EKYCCard;
|
package/src/components/Filter.js
CHANGED
|
@@ -1,60 +1,55 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import { Dropdown, FilterForm, FilterFormField } from "@djb25/digit-ui-react-components";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
|
|
5
5
|
const Filter = ({ searchParams, onFilterChange, defaultSearchParams, statusMap, moduleCode, ...props }) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
selected={_searchParams?.status || { label: t("EKYC_STATUS_ALL"), value: "" }}
|
|
54
|
-
/>
|
|
55
|
-
</FilterFormField>
|
|
56
|
-
</FilterForm>
|
|
57
|
-
);
|
|
6
|
+
const { t } = useTranslation();
|
|
7
|
+
|
|
8
|
+
const [_searchParams, setSearchParams] = useState(() => ({ ...searchParams }));
|
|
9
|
+
|
|
10
|
+
const applyLocalFilters = () => {
|
|
11
|
+
onFilterChange(_searchParams);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const clearAll = () => {
|
|
15
|
+
setSearchParams({ ...defaultSearchParams });
|
|
16
|
+
onFilterChange({ ...defaultSearchParams });
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const onStatusChange = (value) => {
|
|
20
|
+
const newParams = { ..._searchParams, status: value };
|
|
21
|
+
setSearchParams(newParams);
|
|
22
|
+
onFilterChange(newParams);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<FilterForm
|
|
27
|
+
onSubmit={applyLocalFilters}
|
|
28
|
+
handleSubmit={(fn) => (e) => {
|
|
29
|
+
e && e.preventDefault();
|
|
30
|
+
fn();
|
|
31
|
+
}}
|
|
32
|
+
onResetFilterForm={clearAll}
|
|
33
|
+
id="ekyc-filter-form"
|
|
34
|
+
onMobileExclusiveFilterPopupFormClose={props.onClose}
|
|
35
|
+
>
|
|
36
|
+
<FilterFormField>
|
|
37
|
+
<div className="filter-label" style={{ fontWeight: "normal" }}>
|
|
38
|
+
{t("EKYC_STATUS")}:
|
|
39
|
+
</div>
|
|
40
|
+
<Dropdown
|
|
41
|
+
option={[
|
|
42
|
+
{ label: t("EKYC_STATUS_ALL"), value: "" },
|
|
43
|
+
{ label: t("EKYC_STATUS_ACTIVE"), value: "ACTIVE" },
|
|
44
|
+
{ label: t("EKYC_STATUS_PENDING"), value: "PENDING START" },
|
|
45
|
+
]}
|
|
46
|
+
optionKey="label"
|
|
47
|
+
select={onStatusChange}
|
|
48
|
+
selected={_searchParams?.status || { label: t("EKYC_STATUS_ALL"), value: "" }}
|
|
49
|
+
/>
|
|
50
|
+
</FilterFormField>
|
|
51
|
+
</FilterForm>
|
|
52
|
+
);
|
|
58
53
|
};
|
|
59
54
|
|
|
60
55
|
export default Filter;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React, { useState
|
|
2
|
-
import { TextInput, Card,
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { TextInput, Card, HomeIcon } from "@djb25/digit-ui-react-components";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
-
import StatusCards from "./StatusCards";
|
|
5
4
|
|
|
6
5
|
const SearchConsumer = ({ onSearch, searchParams, FilterComponent, children, ...props }) => {
|
|
7
6
|
const { t } = useTranslation();
|
|
@@ -23,110 +22,121 @@ const SearchConsumer = ({ onSearch, searchParams, FilterComponent, children, ...
|
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
return (
|
|
26
|
-
<div className="
|
|
27
|
-
<div className="
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
className="sidebar-title-card"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div>
|
|
40
|
-
{FilterComponent && (
|
|
41
|
-
<FilterComponent
|
|
42
|
-
defaultSearchParams={props.defaultSearchParams}
|
|
43
|
-
onFilterChange={props.onSearch}
|
|
44
|
-
searchParams={searchParams}
|
|
45
|
-
type="desktop"
|
|
46
|
-
moduleCode="EKYC"
|
|
47
|
-
/>
|
|
48
|
-
)}
|
|
25
|
+
<div className="ekyc-employee-container">
|
|
26
|
+
<div className="search-consumer-wrapper">
|
|
27
|
+
<div className="header-wrapper">
|
|
28
|
+
{/* Sidebar Title Card — flush top, full width */}
|
|
29
|
+
<Card className="sidebar-title-card">
|
|
30
|
+
<div className="icon-container">
|
|
31
|
+
<HomeIcon />
|
|
32
|
+
</div>
|
|
33
|
+
<div className="title-text">
|
|
34
|
+
{t("EKYC_SEARCH_CONSUMER_HEADER")}
|
|
35
|
+
</div>
|
|
36
|
+
</Card>
|
|
49
37
|
</div>
|
|
50
|
-
</div>
|
|
51
38
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<div className="filter-label" style={{ fontWeight: "600", marginBottom: "8px", fontSize: "14px", color: "#505A5F" }}>
|
|
66
|
-
{t("EKYC_K_NUMBER")}
|
|
67
|
-
</div>
|
|
68
|
-
<div style={{ position: "relative" }}>
|
|
69
|
-
<TextInput
|
|
70
|
-
value={_searchParams?.kNumber}
|
|
71
|
-
onChange={(e) => onChange("kNumber", e.target.value)}
|
|
72
|
-
placeholder={t("EKYC_K_NUMBER_PLACEHOLDER")}
|
|
73
|
-
style={{ borderRadius: "8px", paddingLeft: "12px", height: "44px" }}
|
|
74
|
-
/>
|
|
39
|
+
{/* Main Content */}
|
|
40
|
+
<div className="main-content-wrapper">
|
|
41
|
+
{/* Top Row: Search Card + Stats Cards */}
|
|
42
|
+
<div className="search-stats-row">
|
|
43
|
+
{/* Identity Lookup Card */}
|
|
44
|
+
<div className="identity-lookup-card">
|
|
45
|
+
{/* Card Title */}
|
|
46
|
+
<div className="lookup-card-title">
|
|
47
|
+
<div className="lookup-icon-bg">
|
|
48
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#3A7BD5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
49
|
+
<circle cx="11" cy="11" r="8" />
|
|
50
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
51
|
+
</svg>
|
|
75
52
|
</div>
|
|
53
|
+
<span className="lookup-title-text">
|
|
54
|
+
{t("EKYC_IDENTITY_LOOKUP") || "Identity Lookup"}
|
|
55
|
+
</span>
|
|
76
56
|
</div>
|
|
77
57
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
58
|
+
{/* Inputs Row */}
|
|
59
|
+
<form onSubmit={onSubmit}>
|
|
60
|
+
<div className="inputs-row">
|
|
61
|
+
<div className="input-group">
|
|
62
|
+
<label>
|
|
63
|
+
{t("EKYC_K_NUMBER") || "K Number"}
|
|
64
|
+
<span className="info-badge">i</span>
|
|
65
|
+
</label>
|
|
66
|
+
<TextInput
|
|
67
|
+
value={_searchParams?.kNumber}
|
|
68
|
+
onChange={(e) => onChange("kNumber", e.target.value)}
|
|
69
|
+
placeholder={t("EKYC_K_NUMBER_PLACEHOLDER") || "e.g. 8234910234"}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div className="input-group">
|
|
74
|
+
<label>
|
|
75
|
+
{t("EKYC_K_NAME") || "K Name"}
|
|
76
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#3A7BD5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
77
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
|
|
78
|
+
<circle cx="12" cy="7" r="4" />
|
|
79
|
+
</svg>
|
|
80
|
+
</label>
|
|
81
|
+
<TextInput
|
|
82
|
+
value={_searchParams?.kName}
|
|
83
|
+
onChange={(e) => onChange("kName", e.target.value)}
|
|
84
|
+
placeholder={t("EKYC_K_NAME_PLACEHOLDER") || "Consumer name search"}
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
81
87
|
</div>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
{/* Actions Row */}
|
|
90
|
+
<div className="actions-row">
|
|
91
|
+
<button type="button" onClick={onClear} className="clear-btn">
|
|
92
|
+
{t("ES_COMMON_CLEAR") || "Clear"}
|
|
93
|
+
</button>
|
|
94
|
+
<button type="submit" className="search-btn">
|
|
95
|
+
{t("ES_COMMON_SEARCH") || "Execute Search"}
|
|
96
|
+
</button>
|
|
89
97
|
</div>
|
|
90
|
-
</
|
|
98
|
+
</form>
|
|
91
99
|
</div>
|
|
92
|
-
<div style={{ display: "flex", justifyContent: "flex-end", marginTop: "20px" }}>
|
|
93
|
-
<div style={{ display: "flex", gap: "12px", alignItems: "center" }}>
|
|
94
|
-
<button
|
|
95
|
-
type="button"
|
|
96
|
-
onClick={onClear}
|
|
97
|
-
style={{
|
|
98
|
-
background: "none",
|
|
99
|
-
border: "none",
|
|
100
|
-
color: "#0076f3ff",
|
|
101
|
-
fontWeight: "600",
|
|
102
|
-
cursor: "pointer",
|
|
103
|
-
fontSize: "14px",
|
|
104
|
-
padding: "10px",
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
{t("ES_COMMON_CLEAR")}
|
|
108
|
-
</button>
|
|
109
100
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
101
|
+
{/* Right Stats Column */}
|
|
102
|
+
<div className="stats-column">
|
|
103
|
+
{/* Today's Audits Card */}
|
|
104
|
+
<div className="audits-card">
|
|
105
|
+
<div className="audits-label">{t("EKYC_TODAYS_AUDITS") || "Today's Audits"}</div>
|
|
106
|
+
<div className="audits-count">{props.countData?.todaysAudits || 24}</div>
|
|
107
|
+
<div className="audits-change">
|
|
108
|
+
<span>↗</span>
|
|
109
|
+
{props.countData?.auditChange || "12% increase from yesterday"}
|
|
110
|
+
</div>
|
|
111
|
+
<div className="audits-watermark">M</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
{/* Queue Status Card */}
|
|
115
|
+
<div className="queue-card">
|
|
116
|
+
<div className="queue-label">{t("EKYC_QUEUE_STATUS") || "Queue Status"}</div>
|
|
117
|
+
<div className="queue-content">
|
|
118
|
+
<div className="queue-status-text">
|
|
119
|
+
{props.countData?.pendingCount || 3} Pending
|
|
120
|
+
</div>
|
|
121
|
+
<div className="avatar-group">
|
|
122
|
+
{[0, 1].map((i) => (
|
|
123
|
+
<div key={i} className="avatar-item">
|
|
124
|
+
{String.fromCharCode(65 + i)}
|
|
125
|
+
</div>
|
|
126
|
+
))}
|
|
127
|
+
<div className="avatar-more">+1</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
122
130
|
</div>
|
|
123
131
|
</div>
|
|
124
|
-
</
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{/* Children (ConnectionDetailsView or placeholder) */}
|
|
135
|
+
{children}
|
|
136
|
+
</div>
|
|
127
137
|
</div>
|
|
128
138
|
</div>
|
|
129
139
|
);
|
|
130
140
|
};
|
|
131
141
|
|
|
132
|
-
export default SearchConsumer;
|
|
142
|
+
export default SearchConsumer;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Controller } from "react-hook-form";
|
|
3
|
+
import { CardLabelError, TextInput, Tooltip, Label } from "@djb25/digit-ui-react-components";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
|
|
6
|
+
const SearchFormFieldsComponents = ({ searchFormState, controlSearchForm }) => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
const { errors } = searchFormState;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<React.Fragment>
|
|
12
|
+
{/* K NUMBER */}
|
|
13
|
+
<span className="mobile-input">
|
|
14
|
+
<Label className="flex-roww flex-gap-2">
|
|
15
|
+
{t("EKYC_K_NUMBER") || "K Number"}
|
|
16
|
+
<Tooltip message={t("EKYC_K_NUMBER_MESSAGE")} />
|
|
17
|
+
</Label>
|
|
18
|
+
|
|
19
|
+
<Controller
|
|
20
|
+
name="kNumber"
|
|
21
|
+
control={controlSearchForm}
|
|
22
|
+
defaultValue=""
|
|
23
|
+
rules={{
|
|
24
|
+
pattern: {
|
|
25
|
+
value: /^[a-zA-Z0-9-_/]*$/,
|
|
26
|
+
message: t("ERR_INVALID_APPLICATION_NO"),
|
|
27
|
+
},
|
|
28
|
+
}}
|
|
29
|
+
render={({ onChange, value }) => <TextInput value={value || ""} onChange={(e) => onChange(e.target.value)} />}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
{errors?.kNumber && <CardLabelError>{errors.kNumber.message}</CardLabelError>}
|
|
33
|
+
</span>
|
|
34
|
+
|
|
35
|
+
{/* K NAME */}
|
|
36
|
+
{/* <span className="mobile-input">
|
|
37
|
+
<Label className="flex-roww flex-gap-2">
|
|
38
|
+
{t("EKYC_K_NAME") || "K Name"}
|
|
39
|
+
<Tooltip message={t("EKYC_K_NAME_MESSAGE")} />
|
|
40
|
+
</Label>
|
|
41
|
+
|
|
42
|
+
<Controller
|
|
43
|
+
name="kName"
|
|
44
|
+
control={controlSearchForm}
|
|
45
|
+
defaultValue=""
|
|
46
|
+
render={({ onChange, value }) => <TextInput value={value || ""} onChange={(e) => onChange(e.target.value)} />}
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
{errors?.kName && <CardLabelError>{errors.kName.message}</CardLabelError>}
|
|
50
|
+
</span> */}
|
|
51
|
+
</React.Fragment>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default SearchFormFieldsComponents;
|