@@ -44,7 +44,9 @@ const FormFieldNameAndBirthday = ({ control, dob = false }) => (
First Name
-
+
@@ -68,7 +70,9 @@ const FormFieldNameAndBirthday = ({ control, dob = false }) => (
Last Name
-
+
diff --git a/components/org/quotient/quotient-success.jsx b/components/org/quotient/quotient-success.jsx
index 3b74d9e..26cce91 100644
--- a/components/org/quotient/quotient-success.jsx
+++ b/components/org/quotient/quotient-success.jsx
@@ -46,7 +46,7 @@ const QuotientSuccess = ({ title, proofTemplateId, showQrcode = true }) => {
{textFields.benefits}
- Download the Quotient Mobile App by clicking
+ Download the Quotient Mobile App by clicking
this link
diff --git a/pages/org/quotient/loan.jsx b/pages/org/quotient/loan.jsx
index 5ff1b0a..c855951 100644
--- a/pages/org/quotient/loan.jsx
+++ b/pages/org/quotient/loan.jsx
@@ -45,6 +45,33 @@ const DEFAULT_FORM_VALUES = {
* @returns React.FC Form Field
*/
const QuotientApplyLoanForm = () => {
+ const [applicant, setApplicant] = useState({
+ firstName: {
+ text: '',
+ isVerified: false
+ },
+ lastName: {
+ text: '',
+ isVerified: false
+ },
+ streetAddress: {
+ text: '',
+ isVerified: false
+ },
+ city: {
+ text: '',
+ isVerified: false
+ },
+ zipCode: {
+ text: '',
+ isVerified: false
+ },
+ state: {
+ text: '',
+ isVerified: false
+ },
+ });
+
const [isSuccess, setIsSuccess] = useState(false);
const verified = qrCodeStore((state) => state.verified);
const retrievedData = qrCodeStore((state) => state.retrievedData);
@@ -78,6 +105,33 @@ const QuotientApplyLoanForm = () => {
const credential = retrievedData.credentials.find((obj) => Object.prototype.hasOwnProperty.call(obj.credentialSubject, 'address'));
if (credential) {
const username = credential.credentialSubject.name.split(' ');
+ setApplicant({
+ firstName: {
+ text: username[0],
+ isVerified: true
+ },
+ lastName: {
+ text: username[1],
+ isVerified: true
+ },
+ streetAddress: {
+ text: credential.credentialSubject.address,
+ isVerified: true
+ },
+ city: {
+ text: credential.credentialSubject.city,
+ isVerified: true
+ },
+ zipCode: {
+ text: credential.credentialSubject.zip,
+ isVerified: true
+ },
+ state: {
+ text: credential.credentialSubject.state,
+ isVerified: true
+ },
+ });
+
form.setValue('firstName', username[0]);
form.setValue('lastName', username[1]);
form.setValue('streetAddress', credential.credentialSubject.address);
@@ -108,9 +162,9 @@ const QuotientApplyLoanForm = () => {
-
+
-
+
diff --git a/scripts/download-ecosystem.mjs b/scripts/download-ecosystem.mjs
index 805429a..3aea060 100644
--- a/scripts/download-ecosystem.mjs
+++ b/scripts/download-ecosystem.mjs
@@ -8,29 +8,30 @@ const axiosHeaders = {
},
};
-const templatesToDownload = [{
- templateId: process.env.NEXT_PUBLIC_BANK_IDENDITY_TEMPLATE_ID,
- name: 'BANK_IDENDITY_TEMPLATE_ID'
-},
+const templatesToDownload = [
+ {
+ templateId: process.env.NEXT_PUBLIC_BANK_IDENDITY_TEMPLATE_ID,
+ name: 'BANK_IDENDITY_TEMPLATE_ID'
+ },
{
templateId: process.env.NEXT_PUBLIC_FORSUR_PROOF_TEMPLATE_ID,
name: 'FORSUR_PROOF_TEMPLATE_ID'
},
-{
- templateId: process.env.NEXT_PUBLIC_FORSUR_VERIFICATION_PROOF_TEMPLATE_ID,
- name: 'FORSUR_VERIFICATION_PROOF_TEMPLATE_ID'
- },
-{
- templateId: process.env.NEXT_PUBLIC_QUOTIENT_LOAN_PROOF_TEMPLATE_ID,
- name: 'QUOTIENT_LOAN_PROOF_TEMPLATE_ID'
+ {
+ templateId: process.env.NEXT_PUBLIC_FORSUR_VERIFICATION_PROOF_TEMPLATE_ID,
+ name: 'FORSUR_VERIFICATION_PROOF_TEMPLATE_ID'
},
-{
- templateId: process.env.NEXT_PUBLIC_URBANSCAPE_BANKBIO_TEMPLATE_ID,
- name: 'URBANSCAPE_BANKBIO_TEMPLATE_ID'
+ {
+ templateId: process.env.NEXT_PUBLIC_QUOTIENT_LOAN_PROOF_TEMPLATE_ID,
+ name: 'QUOTIENT_LOAN_PROOF_TEMPLATE_ID'
},
-{
- templateId: process.env.NEXT_PUBLIC_URBANSCAPE_CREDITSCORE_TEMPLATE_ID,
- name: 'URBANSCAPE_CREDITSCORE_TEMPLATE_ID'
+ {
+ templateId: process.env.NEXT_PUBLIC_URBANSCAPE_BANKBIO_TEMPLATE_ID,
+ name: 'URBANSCAPE_BANKBIO_TEMPLATE_ID'
+ },
+ {
+ templateId: process.env.NEXT_PUBLIC_URBANSCAPE_CREDITSCORE_TEMPLATE_ID,
+ name: 'URBANSCAPE_CREDITSCORE_TEMPLATE_ID'
},
];
@@ -38,7 +39,7 @@ export async function downloadEcosystems() {
console.log('--- Downloading ecosystems from Certs ---');
const ecosystemsUrl = `${process.env.DOCK_API_URL}/trust-registries/`;
- const ecosystemsResponse = await axios.get(ecosystemsUrl, axiosHeaders);
+ const ecosystemsResponse = await axios.get(ecosystemsUrl, axiosHeaders);
ecosystemsResponse.data.map(async (ecosystem) => {
try {
From ff1cc290d8d7e6febd3d46c1d8e574f0d5fd424a Mon Sep 17 00:00:00 2001
From: Mike Parkhill
Date: Fri, 17 May 2024 15:40:04 -0400
Subject: [PATCH 24/28] fix undefined applicant error
---
pages/org/quotient/index.jsx | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/pages/org/quotient/index.jsx b/pages/org/quotient/index.jsx
index e8b03b6..0d723de 100644
--- a/pages/org/quotient/index.jsx
+++ b/pages/org/quotient/index.jsx
@@ -30,6 +30,33 @@ import { getRandomNumber } from 'utils';
* @returns React.FC page
*/
const QuotientBankForm = () => {
+ const [applicant, setApplicant] = useState({
+ firstName: {
+ text: '',
+ isVerified: false
+ },
+ lastName: {
+ text: '',
+ isVerified: false
+ },
+ streetAddress: {
+ text: '',
+ isVerified: false
+ },
+ city: {
+ text: '',
+ isVerified: false
+ },
+ zipCode: {
+ text: '',
+ isVerified: false
+ },
+ state: {
+ text: '',
+ isVerified: false
+ },
+ });
+
const [isLoading, setIsLoading] = useState(false);
const [isSuccess, setIsSuccess] = useState(false);
const [isCaptureCompleted, setIsCaptureCompleted] = useState(false);
@@ -157,9 +184,9 @@ const QuotientBankForm = () => {