diff --git a/apps/amakrushi/lang/en.json b/apps/amakrushi/lang/en.json
index 175fb12a..82c57b62 100644
--- a/apps/amakrushi/lang/en.json
+++ b/apps/amakrushi/lang/en.json
@@ -35,6 +35,14 @@
"label.speak": "Speak",
"label.tap_to_speak": "Tap to speak",
"label.manual": "User Manual - For VAWs",
+ "lable.disclaimer": "Disclaimer",
+ "label.grievance_disclaimer": "If a grievance is pending, please Contact the officer for verification",
+ "label.eleg_disclaimer": "If not eligible, please apply for a grievance via KALIA Portal",
+ "label.disbursal_disclaimer": "If the payment status is failed, please link your bank account with Aadhar.",
+ "label.kalia_status": "KALIA Status",
+ "label.plant_protection":"Plant Protection",
+ "label.weather_advisory":"Weather Advisory",
+ "table.personalDetails": "Personal Details",
"table.header_date": "Date",
"table.header_temp_max": "Temp Max",
"table.header_temp_min": "Temp Min",
diff --git a/apps/amakrushi/lang/or.json b/apps/amakrushi/lang/or.json
index df60c2de..963e6acd 100644
--- a/apps/amakrushi/lang/or.json
+++ b/apps/amakrushi/lang/or.json
@@ -35,6 +35,13 @@
"label.speak":"କଥା ହୁଅନ୍ତୁ",
"label.tap_to_speak": "କହିବାକୁ ଟ୍ୟାପ୍ କରନ୍ତୁ",
"label.manual":"ବ୍ୟବହାରକାରୀ ମାନୁଆଲ - VAWs ପାଇଁ",
+ "lable.disclaimer": "ଧ୍ୟାନ ଦିଅନ୍ତୁ",
+ "label.grievance_disclaimer": "ଯଦି କୌଣସି ଅଭିଯୋଗ ବିଚାରାଧୀନ ଅଛି, ଦୟାକରି ଯାଞ୍ଚ ପାଇଁ ଅଧିକାରୀଙ୍କ ସହିତ ଯୋଗାଯୋଗ କରନ୍ତୁ |",
+ "label.eleg_disclaimer": "ଯଦି ଯୋଗ୍ୟ ନୁହେଁ, ଦୟାକରି କାଳିଆ ପୋର୍ଟାଲ ମାଧ୍ୟମରେ ଅଭିଯୋଗ ପାଇଁ ଆବେଦନ କରନ୍ତୁ |",
+ "label.disbursal_disclaimer": "ଯଦି ଦେୟ ସ୍ଥିତି ବିଫଳ ହୁଏ, ଦୟାକରି ଆପଣଙ୍କର ବ୍ୟାଙ୍କ ଆକାଉଣ୍ଟକୁ ଆଧାର ସହିତ ଲିଙ୍କ୍ କରନ୍ତୁ |",
+ "label.kalia_status": "କାଳିଆ ସ୍ଥିତି",
+ "label.plant_protection":"ଉଦ୍ଭିଦ ସୁରକ୍ଷା",
+ "label.weather_advisory":"ପାଣିପାଗ ପରାମର୍ଶଦାତା",
"table.header_date": "ତାରିଖ",
"table.header_temp_max":"ସର୍ବାଧିକ ତାପମାତ୍ରା",
"table.header_temp_min": "ସାର୍ବନିମ୍ନ ତାପମାତ୍ରା ",
diff --git a/apps/amakrushi/src/assets/images/kalia_status.png b/apps/amakrushi/src/assets/images/kalia_status.png
new file mode 100644
index 00000000..e13b42d1
Binary files /dev/null and b/apps/amakrushi/src/assets/images/kalia_status.png differ
diff --git a/apps/amakrushi/src/assets/images/plant_protection.png b/apps/amakrushi/src/assets/images/plant_protection.png
new file mode 100644
index 00000000..f7c9660a
Binary files /dev/null and b/apps/amakrushi/src/assets/images/plant_protection.png differ
diff --git a/apps/amakrushi/src/assets/images/weather_advisory.png b/apps/amakrushi/src/assets/images/weather_advisory.png
new file mode 100644
index 00000000..01f19807
Binary files /dev/null and b/apps/amakrushi/src/assets/images/weather_advisory.png differ
diff --git a/apps/amakrushi/src/components/HomePage/index.module.css b/apps/amakrushi/src/components/HomePage/index.module.css
index 7d1aff47..0f4d08e6 100644
--- a/apps/amakrushi/src/components/HomePage/index.module.css
+++ b/apps/amakrushi/src/components/HomePage/index.module.css
@@ -4,6 +4,14 @@
color: var(--secondarygreen);
}
+.kaliaImg{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+}
+
.disconnected {
padding-top: 0.5vh;
display: flex;
@@ -19,20 +27,58 @@
width: 57%;
margin: auto;
position: relative;
- top: 10%;
+ top: 3%;
text-align: center;
font-family: 'Mulish-Bold';
font-size: 3.5vh;
font-weight: 700;
}
+.imgButtons{
+ position: relative;
+ top: 7%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.imgBtn {
+ background-color: white;
+ box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
+ padding: 10px;
+ border-radius: 12px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ cursor: pointer;
+ width: 110px;
+ height: 110px;
+}
+
+.imgBtn:active{
+ transform: scale(0.9);
+}
+
+.imgBtn img{
+ min-width: 80% !important;
+}
+
+.imgBtn p{
+ color: var(--font);
+ font-family: 'Mulish-bold';
+ text-align: center;
+ line-height: 1;
+ margin-bottom: 5px;
+}
+
.voiceRecorder {
position: relative;
margin: auto;
- top: 25%;
+ top: 11%;
text-align: center;
- height: 18vh;
- width: 18vh;
+ height: 15vh;
+ width: 15vh;
}
.exampleMessages {
@@ -116,7 +162,7 @@
position: absolute;
left: 50%;
right: 50%;
- bottom: 1vh;
+ bottom: 0;
transform: translateX(-50%);
color: var(--font);
width: 70%;
diff --git a/apps/amakrushi/src/components/HomePage/index.tsx b/apps/amakrushi/src/components/HomePage/index.tsx
index bce50701..3fd7f772 100644
--- a/apps/amakrushi/src/components/HomePage/index.tsx
+++ b/apps/amakrushi/src/components/HomePage/index.tsx
@@ -28,6 +28,9 @@ import RenderVoiceRecorder from '../recorder/RenderVoiceRecorder';
import { useFlags } from 'flagsmith/react';
import DownTimePage from '../down-time-page';
import { recordUserLocation } from '../../utils/location';
+import kaliaStatusImg from '../../assets/images/kalia_status.png';
+import plantProtectionImg from '../../assets/images/plant_protection.png';
+import weatherAdvisoryImg from '../../assets/images/weather_advisory.png';
const HomePage: NextPage = () => {
const context = useContext(AppContext);
@@ -65,7 +68,7 @@ const HomePage: NextPage = () => {
};
useEffect(() => {
- if (inputMsg.length > 0 && !(localStorage.getItem('locale') === 'en')) {
+ if (inputMsg.length > 0 && !(localStorage.getItem('locale') === 'en') && !context?.kaliaClicked) {
if (suggestionClicked) {
setSuggestionClicked(false);
return;
@@ -200,7 +203,6 @@ const HomePage: NextPage = () => {
}
recordUserLocation();
-
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
@@ -214,7 +216,9 @@ const HomePage: NextPage = () => {
console.log('clearing mssgs');
context?.setMessages([]);
router.push('/chat');
- context?.sendMessage(msg);
+ if (context?.kaliaClicked) {
+ context?.sendMessage("Aadhar number - " + msg, null, true, null, true);
+ } else context?.sendMessage(msg);
} else {
toast.error(t('error.disconnected'));
return;
@@ -225,8 +229,12 @@ const HomePage: NextPage = () => {
const handleInputChange = (e: any) => {
const inputValue = e.target.value;
- setInputMsg(inputValue);
- // Store the cursor position
+ if (context?.kaliaClicked) {
+ if (!/^[0-9]*$/.test(inputValue) || inputValue.length > 12) {
+ toast.error('Please enter valid aadhaar number');
+ // setInputMsg(inputValue.slice(0, 12));
+ } else setInputMsg(inputValue);
+ } else setInputMsg(inputValue);
const cursorPosition = e.target.selectionStart;
setCursorPosition(cursorPosition);
// setShowExampleMessages(inputValue.length === 0);
@@ -351,11 +359,60 @@ const HomePage: NextPage = () => {
return (
<>
-
{t('label.ask_me')}
-
-
-
-
+
+
: <>
{t('label.ask_me')}
+
+
+
{ context?.setKaliaClicked((props: boolean) => !props); }}>
+
{t('label.kalia_status')}
+
+
+
{
+ toast('Coming Soon!')
+ }}>
+
{t('label.plant_protection')}
+
+
+
+
{
+ sendMessage('weather advisory');
+ }}>
+
{t('label.weather_advisory')}
+
+
+
+
+
+
>}
+
+ {/*
{
style={{ marginRight: '2px' }}
/>
{choice.text}
- {/*
);
})}
-
-
-
>
);
diff --git a/apps/amakrushi/src/components/NavBar/index.module.css b/apps/amakrushi/src/components/NavBar/index.module.css
index 7bfe48cc..329d55ad 100644
--- a/apps/amakrushi/src/components/NavBar/index.module.css
+++ b/apps/amakrushi/src/components/NavBar/index.module.css
@@ -2,9 +2,9 @@
display: flex;
justify-content: space-between;
align-items: center;
- padding: 10px;
+ padding: 5px;
background-color: var(--bg-color);
- height: 100px;
+ height: 85px;
border-bottom: 1px solid #dbdbdb;
}
diff --git a/apps/amakrushi/src/components/NavBar/index.tsx b/apps/amakrushi/src/components/NavBar/index.tsx
index 6dcd5526..b331f110 100644
--- a/apps/amakrushi/src/components/NavBar/index.tsx
+++ b/apps/amakrushi/src/components/NavBar/index.tsx
@@ -125,7 +125,7 @@ function NavBar() {
{/* */}
{/*
*/}
- {router.pathname !== '/chat' && router.pathname !== '/' ? (
+ {router.pathname !== '/chat' && router.pathname !== '/' || (router.pathname === '/' && context?.kaliaClicked) ? (
{
+ if(context?.kaliaClicked) context?.setKaliaClicked(false);
router.push('/');
}}
/>
diff --git a/apps/amakrushi/src/components/chat-message-item/index.module.css b/apps/amakrushi/src/components/chat-message-item/index.module.css
index 0057724b..12cacbd7 100644
--- a/apps/amakrushi/src/components/chat-message-item/index.module.css
+++ b/apps/amakrushi/src/components/chat-message-item/index.module.css
@@ -141,6 +141,18 @@
}
+.tableContainerKalia {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ max-width: 90vw;
+ background: #FFF;
+ padding: 0.5rem;
+ border-radius: 0.5rem;
+ box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
+
+}
+
.tableHeader {
display: flex;
flex-direction: column;
@@ -151,10 +163,20 @@
font-weight: bold;
}
+.tableHeaderKalia {
+ display: flex;
+ flex-direction: column;
+ margin: 0.5rem;
+ gap: 0.5rem;
+ white-space: nowrap;
+ color: var(--secondarygreen);
+ font-weight: bold;
+}
+
.tableData {
display: flex;
flex-direction: row;
- overflow-x: scroll;
+ overflow-x: auto;
}
/* .tableData::-webkit-scrollbar {
@@ -186,6 +208,33 @@
gap: 0.5rem;
}
+.tableDataColKalia {
+ display: flex;
+ flex-direction: row;
+ padding: 0rem 1rem;
+ /* margin: 0.5rem 0rem; */
+ width: 100%;
+ gap: 0.5rem;
+ border: 1px solid black;
+ font-size: 13px;
+ font-weight: 500;
+}
+
.tableDataCol:nth-child(odd) {
background: #F2F2F2;
+}
+
+.tableDataColKalia:nth-child(odd) {
+ background: #F2F2F2;
+}
+
+.kaliaCell {
+ width: 50%;
+}
+
+.divider {
+ width: 100%;
+ background: rgba(0, 0, 0, 0.1);
+ height: 2px;
+ margin: 1rem 0rem 1rem 0rem;
}
\ No newline at end of file
diff --git a/apps/amakrushi/src/components/chat-message-item/index.tsx b/apps/amakrushi/src/components/chat-message-item/index.tsx
index 8c8900d0..7e79c5bf 100644
--- a/apps/amakrushi/src/components/chat-message-item/index.tsx
+++ b/apps/amakrushi/src/components/chat-message-item/index.tsx
@@ -137,7 +137,7 @@ const ChatMessageItem: FC = ({ message, onSend }) => {
message?.content?.data?.optionClicked || false
);
const getLists = useCallback(
- ({ choices, isWeather = false }: { choices: any, isWeather: Boolean }) => {
+ ({ choices, isWeather = false }: { choices: any; isWeather: Boolean }) => {
return (
{choices?.map((choice: any, index: string) => (
@@ -157,7 +157,12 @@ const ChatMessageItem: FC = ({ message, onSend }) => {
onClick={(e: any): void => {
e.preventDefault();
if (optionDisabled) {
- toast.error(`${isWeather ? t('message.wait_before_choosing') : t('message.cannot_answer_again')}`);
+ toast.error(
+ `${isWeather
+ ? t('message.wait_before_choosing')
+ : t('message.cannot_answer_again')
+ }`
+ );
} else {
if (context?.messages?.[0]?.exampleOptions) {
console.log('clearing chat');
@@ -165,18 +170,23 @@ const ChatMessageItem: FC = ({ message, onSend }) => {
}
if (isWeather)
context?.sendMessage(choice?.text, false, true, choice);
- else
- context?.sendMessage(choice);
+ else context?.sendMessage(choice);
setOptionDisabled(true);
if (isWeather)
- setTimeout(() => document.getElementsByClassName('PullToRefresh')?.[0]?.scrollTo({
- top: 999999,
- left: 0,
- behavior: "smooth",
- }), 500)
+ setTimeout(
+ () =>
+ document
+ .getElementsByClassName('PullToRefresh')?.[0]
+ ?.scrollTo({
+ top: 999999,
+ left: 0,
+ behavior: 'smooth',
+ }),
+ 500
+ );
setTimeout(() => {
setOptionDisabled(false);
- }, 4000)
+ }, 4000);
}
}}>
= ({ message, onSend }) => {
- ))
- }
-
+ ))}
+
);
},
[context, t]
@@ -314,34 +323,50 @@ const ChatMessageItem: FC = ({ message, onSend }) => {
const FormattedText = ({ content }: FormattedTextProps) => {
let words = content.split(' ');
- if (words?.[words?.length - 1] == '' || words?.[words?.length - 1] == " ") {
+ if (words?.[words?.length - 1] == '' || words?.[words?.length - 1] == ' ') {
words = words.slice(0, words?.length - 1);
}
- if (words?.[0] == ":") {
- words = words.slice(1)
+ if (words?.[0] == ':') {
+ words = words.slice(1);
}
if (words?.[0]?.includes('null')) {
- words[0] = words[0].replace('null', localStorage.getItem('locale') == 'en' ? "I'm here to help with any agriculture-related questions you might have. Feel free to ask!" : "ଆପଣଙ୍କ ପାଖରେ ଥିବା କୃଷି ସମ୍ବନ୍ଧୀୟ ପ୍ରଶ୍ନଗୁଡ଼ିକରେ ସାହାଯ୍ୟ କରିବାକୁ ମୁଁ ଏଠାରେ ଅଛି | ପଚାରିବାକୁ ମୁକ୍ତ ହୁଅନ୍ତୁ!");
+ words[0] = words[0].replace(
+ 'null',
+ localStorage.getItem('locale') == 'en'
+ ? "I'm here to help with any agriculture-related questions you might have. Feel free to ask!"
+ : 'ଆପଣଙ୍କ ପାଖରେ ଥିବା କୃଷି ସମ୍ବନ୍ଧୀୟ ପ୍ରଶ୍ନଗୁଡ଼ିକରେ ସାହାଯ୍ୟ କରିବାକୁ ମୁଁ ଏଠାରେ ଅଛି | ପଚାରିବାକୁ ମୁକ୍ତ ହୁଅନ୍ତୁ!'
+ );
}
if (words?.[1]?.includes('null')) {
- words[1] = words[1].replace('null', localStorage.getItem('locale') == 'en' ? "I'm here to help with any agriculture-related questions you might have. Feel free to ask!" : "ଆପଣଙ୍କ ପାଖରେ ଥିବା କୃଷି ସମ୍ବନ୍ଧୀୟ ପ୍ରଶ୍ନଗୁଡ଼ିକରେ ସାହାଯ୍ୟ କରିବାକୁ ମୁଁ ଏଠାରେ ଅଛି | ପଚାରିବାକୁ ମୁକ୍ତ ହୁଅନ୍ତୁ!");
+ words[1] = words[1].replace(
+ 'null',
+ localStorage.getItem('locale') == 'en'
+ ? "I'm here to help with any agriculture-related questions you might have. Feel free to ask!"
+ : 'ଆପଣଙ୍କ ପାଖରେ ଥିବା କୃଷି ସମ୍ବନ୍ଧୀୟ ପ୍ରଶ୍ନଗୁଡ଼ିକରେ ସାହାଯ୍ୟ କରିବାକୁ ମୁଁ ଏଠାରେ ଅଛି | ପଚାରିବାକୁ ମୁକ୍ତ ହୁଅନ୍ତୁ!'
+ );
}
- if (words?.[words?.length - 2]?.includes('Thank') && words?.[words?.length - 1]?.includes('you')) {
- words[words.length - 2] = words[words.length - 2].replace('Thank', '\nThank')
+ if (
+ words?.[words?.length - 2]?.includes('Thank') &&
+ words?.[words?.length - 1]?.includes('you')
+ ) {
+ words[words.length - 2] = words[words.length - 2].replace(
+ 'Thank',
+ '\nThank'
+ );
}
return (
{words.map((word) => {
- return word + ' '
+ return word + ' ';
})}
);
- }
+ };
switch (type) {
case 'loader':
@@ -617,14 +642,18 @@ const ChatMessageItem: FC = ({ message, onSend }) => {
case 'video': {
const url = content?.data?.payload?.media?.url || content?.data?.videoUrl;
- const videoId = url.split("=")[1];
+ const videoId = url.split('=')[1];
return (
<>
-
+ frameBorder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
+ allowFullScreen>
= ({ message, onSend }) => {
{getLists({
choices:
content?.data?.payload?.buttonChoices ?? content?.data?.choices,
- isWeather: true
+ isWeather: true,
})}
>
);
}
+ case 'kaliaTable': {
+ const personalDetails = JSON.parse(content?.text)?.['Personal Details'];
+ const entries = Object.entries(personalDetails);
+ const chunkedEntries = [];
+ for (let i = 0; i < entries.length; i += 4) {
+ chunkedEntries.push(entries.slice(i, i + 4));
+ }
+ return (
+
+
+
+
+
+
+ {t('table.personalDetails')}
+
+ {/*
{t('table.header_temp_max')}
+
{t('table.header_temp_min')}
+
{t('table.header_temp')}
+
{t('table.header_humidity')}
+
{t('table.header_precip')}
+
{t('table.header_precip_prob')}
+
{t('table.header_windspeed')}
+
{t('table.header_cloudcover')}
+
{t('table.header_conditions')}
*/}
+
+
+ {chunkedEntries.map((chunk, rowIndex) => (
+
+ {chunk.map(([field, value]: [any, any], colIndex) => (
+
+ ))}
+
+ ))}
+
+
+
+ {/* {`\n` +
+ JSON.parse(content?.text)?.generalAdvice +
+ `\n\n` +
+ JSON.parse(content?.text)?.buttonDescription} */}
+ {getLists({
+ choices: JSON.parse(content?.text)?.buttons,
+ isWeather: true,
+ })}
+
+
+
+ );
+ }
case 'table': {
return (
= ({ message, onSend }) => {
}}>
{`\n` +
JSON.parse(content?.text)?.generalAdvice +
- `\n\n` + JSON.parse(content?.text)?.buttonDescription}
+ `\n\n` +
+ JSON.parse(content?.text)?.buttonDescription}
{getLists({
choices: JSON.parse(content?.text)?.buttons,
- isWeather: true
+ isWeather: true,
})}
);
}
+ case 'singleTable': {
+ const dataKeys = JSON.parse(content?.text);
+ const entries = Object.keys(dataKeys);
+ const innerData = dataKeys?.[entries?.[0]]?.Object?.keys(dataKeys?.[entries?.[0]])?.[0];
+ console.log({ dataKeys, entries })
+ return (
+
+
+
+
+
+
+
+
+
{dataKeys[entries?.[0]]}
+
+
+
+
+ {/* Disclaimer Text */}
+
+ {dataKeys?.['Disclaimer'] && {t('lable.disclaimer')}: {dataKeys?.['Eligibility Status'] ? t('label.eleg_disclaimer') : t('label.grievance_disclaimer')}
}
+
+ {/* {`\n` +
+ JSON.parse(content?.text)?.generalAdvice +
+ `\n\n` +
+ JSON.parse(content?.text)?.buttonDescription} */}
+ {getLists({
+ choices: JSON.parse(content?.text)?.buttons,
+ isWeather: true,
+ })}
+
+
+
+ );
+ }
+
+ case 'disbursalHistory': {
+ const disclaimer = JSON.parse(content?.text)?.['Disclaimer'] || '';
+ const data = JSON.parse(content?.text)?.['Payment Account Details']
+ return (
+
+
+
+
+
+
+ Name of
Bank
+
+
IFSC Code
+
Payment
processed Date
+
Saving Bank
Account No
+
Payment Status
+
UTR No
+
+
+ {data?.map(
+ (el: any, idx: any) => (
+
+
+ {el['Name of Bank']}
+
+
{el['IFSC Code']}
+
{el['Payment processed Date']}
+
{el['Saving Bank Account No.']}
+
{el['Payment Status']}
+
{el['UTR No.']}
+
+ )
+ )}
+
+
+
+ {disclaimer && {t('lable.disclaimer')}: {t('label.disbursal_disclaimer')}
}
+
+
+ );
+ }
default:
return (
{
toast.success(`${t('message.recorder_wait')}`);
// const audioElement = new Audio();
-
+
// const blobUrl = URL.createObjectURL(blob);
// audioElement.src = blobUrl;
// console.log(audioElement)
@@ -184,45 +184,37 @@ const RenderVoiceRecorder = ({ setInputMsg, tapToSpeak }) => {
{mediaRecorder && mediaRecorder.state === 'recording' ? (
- {
- stopRecording();
- }}
- style={{ cursor: 'pointer' }}
- layout="responsive"
- />
-
- ) : (
-
- {apiCallStatus === 'processing' ? (
+
- ) : apiCallStatus === 'error' ? (
- {
- setUserClickedError(true);
- startRecording();
+ stopRecording();
}}
style={{ cursor: 'pointer' }}
layout="responsive"
/>
- ) : (
- <>
+
+
+ ) : (
+
+ {apiCallStatus === 'processing' ? (
+
+
+
+ ) : apiCallStatus === 'error' ? (
+
{
setUserClickedError(true);
startRecording();
@@ -230,6 +222,24 @@ const RenderVoiceRecorder = ({ setInputMsg, tapToSpeak }) => {
style={{ cursor: 'pointer' }}
layout="responsive"
/>
+
+ ) : (
+ <>
+
+ {
+ setUserClickedError(true);
+ startRecording();
+ }}
+ style={{ cursor: 'pointer' }}
+ height={'10px !important'}
+ width={'10px !important'}
+ layout="responsive"
+ />
+
{tapToSpeak ? (
{t('label.tap_to_speak')}
diff --git a/apps/amakrushi/src/components/recorder/styles.module.css b/apps/amakrushi/src/components/recorder/styles.module.css
index c55c8061..bc9e2b80 100644
--- a/apps/amakrushi/src/components/recorder/styles.module.css
+++ b/apps/amakrushi/src/components/recorder/styles.module.css
@@ -9,4 +9,12 @@
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
+}
+
+.imgContainer {
+ position: relative;
+ overflow: hidden;
+ margin: auto;
+ width: 6rem;
+ height: 6rem;
}
\ No newline at end of file
diff --git a/apps/amakrushi/src/context/ContextProvider.tsx b/apps/amakrushi/src/context/ContextProvider.tsx
index bd451993..3e3a6cd7 100644
--- a/apps/amakrushi/src/context/ContextProvider.tsx
+++ b/apps/amakrushi/src/context/ContextProvider.tsx
@@ -67,6 +67,7 @@ const ContextProvider: FC<{
const [startTime, setStartTime] = useState(Date.now());
const [endTime, setEndTime] = useState(Date.now());
const [lastMsgId, setLastMsgId] = useState('');
+ const [kaliaClicked, setKaliaClicked] = useState(false);
const downloadChat = useMemo(() => {
return (e: string) => {
@@ -375,7 +376,7 @@ const ContextProvider: FC<{
//@ts-ignore
const sendMessage = useCallback(
- (text: string, media: any, isVisibile = true, selectedButton: any): void => {
+ (text: string, media: any, isVisibile = true, selectedButton: any, kaliaSchemeClicked = false): void => {
if (!sessionStorage.getItem('conversationId')) {
const cId = uuidv4();
console.log('convId', cId);
@@ -415,7 +416,8 @@ const ContextProvider: FC<{
asrId: sessionStorage.getItem('asrId'),
userId: localStorage.getItem('userID'),
conversationId: sessionStorage.getItem('conversationId'),
- selectedButton: selectedButton || null
+ selectedButton: selectedButton || null,
+ kaliaSchemeClicked: kaliaSchemeClicked
}
});
setStartTime(Date.now());
@@ -641,6 +643,8 @@ const ContextProvider: FC<{
downloadChat,
audioPlaying,
setAudioPlaying,
+ kaliaClicked,
+ setKaliaClicked
}),
[
locale,
@@ -667,6 +671,8 @@ const ContextProvider: FC<{
downloadChat,
audioPlaying,
setAudioPlaying,
+ kaliaClicked,
+ setKaliaClicked
]
);
diff --git a/apps/amakrushi/src/utils/getMsgType.ts b/apps/amakrushi/src/utils/getMsgType.ts
index d93c8639..695ef9ef 100644
--- a/apps/amakrushi/src/utils/getMsgType.ts
+++ b/apps/amakrushi/src/utils/getMsgType.ts
@@ -1,6 +1,10 @@
export const getMsgType = (msg: any): string => {
if (isJsonString(msg?.text)) {
if (Array.isArray(JSON.parse(msg?.text)?.weatherData)) return 'table';
+ if (JSON.parse(msg?.text)?.['Online Grievance Application Status']) return 'singleTable'
+ if (JSON.parse(msg?.text)?.['Eligibility Status']) return 'singleTable'
+ if (JSON.parse(msg?.text)?.['Personal Details']) return 'kaliaTable';
+ if (JSON.parse(msg?.text)?.['Payment Account Details']) return 'disbursalHistory';
}
if (msg?.payload?.buttonChoices?.length || msg?.choices?.length) return 'options';
if (msg?.imageUrl) return 'image';