aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/captcha/application-receipt.ts5
-rw-r--r--src/scripts/functionality/application-receipt.ts23
-rw-r--r--src/scripts/functionality/grn-search.ts31
-rw-r--r--src/scripts/functionality/view-khatian/index.ts4
4 files changed, 36 insertions, 27 deletions
diff --git a/src/scripts/captcha/application-receipt.ts b/src/scripts/captcha/application-receipt.ts
new file mode 100644
index 0000000..5ff1a57
--- /dev/null
+++ b/src/scripts/captcha/application-receipt.ts
@@ -0,0 +1,5 @@
+document.addEventListener("DOMContentLoaded", () => {
+ $("#werter > div > form > div:nth-child(4)").hide();
+ (window as any).validateForm = () => true;
+ const captchaElement = $("#werter > div > div:nth-child(4)");
+});
diff --git a/src/scripts/functionality/application-receipt.ts b/src/scripts/functionality/application-receipt.ts
deleted file mode 100644
index a86405f..0000000
--- a/src/scripts/functionality/application-receipt.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-$("#form_reprint_request")
- .removeAttr("id")
- .removeAttr("name")
- .removeAttr("onsubmit")
- .removeAttr("target")
- .removeAttr("autocomplete")
- .removeAttr("rel");
-
-const captchaElement = $("#werter > div > div:nth-child(4)");
-
-if (captchaElement.length > 0) {
- const captchaValueElement = $("#captchaText");
- const captchaFieldElement = $("[name=txtDrawText]");
-
- const captcha = () => {
- captchaFieldElement.val("FFFFFF");
- captchaValueElement.val("FFFFFF");
- captchaElement.hide();
- };
-
- captcha();
- setInterval(captcha, 1000);
-}
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);
+});
diff --git a/src/scripts/functionality/view-khatian/index.ts b/src/scripts/functionality/view-khatian/index.ts
index 312c7c1..c54ef5a 100644
--- a/src/scripts/functionality/view-khatian/index.ts
+++ b/src/scripts/functionality/view-khatian/index.ts
@@ -2,11 +2,7 @@ import { generateWebPage } from "@/shared/generate-web-page";
import { interceptPost } from "@/shared/intercept-jquery-ajax";
import getDownloadInformationPDFPageContent from "@/scripts/functionality/view-khatian/download-information-pdf-page-content.html";
-declare function load(): void;
-
const sanghaFacilitationCentreBannerUrl = "$l{ /assets/sangha-facilitation-centre-banner.jpg }l$";
-// document.currentScript.getAttribute("data-banner-image-url");
-//("/assets/sangha-facilitation-centre-banner.jpg");
document.addEventListener("DOMContentLoaded", () => {
const submitButtonElement = $("#khbutton");