aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/functionality/grn-search.ts
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-06-03 13:09:04 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2024-06-03 13:09:04 +0530
commita38b8ca3c6146c2db03167d6ff94e445d756a202 (patch)
tree0d315bd68158336d4241cec75685a8b15b4c00d6 /src/scripts/functionality/grn-search.ts
parent7ea487be4aaf8f3b3047e2a7b3c1da80744f258b (diff)
downloadbanglar-bhumi-utils-a38b8ca3c6146c2db03167d6ff94e445d756a202.tar.gz
banglar-bhumi-utils-a38b8ca3c6146c2db03167d6ff94e445d756a202.zip
Added captha removal and autocomplete to GRN search.
Diffstat (limited to 'src/scripts/functionality/grn-search.ts')
-rw-r--r--src/scripts/functionality/grn-search.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/scripts/functionality/grn-search.ts b/src/scripts/functionality/grn-search.ts
new file mode 100644
index 0000000..02471f5
--- /dev/null
+++ b/src/scripts/functionality/grn-search.ts
@@ -0,0 +1,31 @@
+$("#frmpaymentDetails > div:nth-child(2) > div:nth-child(1) > div:nth-child(4)").hide();
+const captcha = $("#txtDrawText");
+const captchaText = $("#captchaText");
+captcha.val((captchaText.val() as string).replaceAll(" ", ""));
+
+const requestTypeElement = $("#lstRequestType");
+const grnNumberElement = $("#txtGRN_NO");
+const applicationNumberElement = $("#txtAPPLN_NO");
+
+const requestType = localStorage.getItem("requestType");
+const grnNumber = localStorage.getItem("grnNumber");
+const applicationNumber = localStorage.getItem("applicationNumber");
+
+if (requestType) {
+ requestTypeElement.val(requestType);
+}
+
+if (grnNumber) {
+ grnNumberElement.val(grnNumber);
+}
+
+if (applicationNumber) {
+ applicationNumberElement.val(applicationNumber);
+}
+
+$("#btnSubmitGRNNo").click(() => {
+ captcha.val((captchaText.val() as string).replaceAll(" ", ""));
+ localStorage.setItem("requestType", requestTypeElement.val() as string);
+ localStorage.setItem("grnNumber", grnNumberElement.val() as string);
+ localStorage.setItem("applicationNumber", applicationNumberElement.val() as string);
+});