diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-13 11:35:08 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-13 11:35:08 +0530 |
| commit | 600c337b1cdc884aebf59083eb57b178b43441ce (patch) | |
| tree | d1f3cb7eb1020bcdcd66d9dbf0279f79d5856332 /src/scripts/functionality/view-khatian/index.ts | |
| parent | 98e7019c61ea0ffe344ef7ce809d38d62254a9fc (diff) | |
| download | banglar-bhumi-utils-600c337b1cdc884aebf59083eb57b178b43441ce.tar.gz banglar-bhumi-utils-600c337b1cdc884aebf59083eb57b178b43441ce.zip | |
docs: added some documentation comments to all functions
Diffstat (limited to 'src/scripts/functionality/view-khatian/index.ts')
| -rw-r--r-- | src/scripts/functionality/view-khatian/index.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/scripts/functionality/view-khatian/index.ts b/src/scripts/functionality/view-khatian/index.ts index 93d03cf..34e6765 100644 --- a/src/scripts/functionality/view-khatian/index.ts +++ b/src/scripts/functionality/view-khatian/index.ts @@ -14,6 +14,12 @@ const styles = Array.from(submitButtonElementComputedStyles) "" ); +/** + * Reads the currently selected text from a `<select>` element. + * + * @param selector - CSS selector for the select element. + * @returns The text of the selected option. + */ const getValueOfSelectElement = (selector: string) => { const element = document.querySelector<HTMLSelectElement>(selector)!; return element.options[element.selectedIndex].text; @@ -21,6 +27,10 @@ const getValueOfSelectElement = (selector: string) => { let isPlotInformation: boolean | null = null; +/** + * Opens a new window with a printable PDF view of the current khatian + * or plot details, including district/block/mouza info. + */ const downloadInformationPDF = () => { generateWebPage( getDownloadInformationPDFPageContent({ @@ -36,6 +46,13 @@ const downloadInformationPDF = () => { ); }; +/** + * Intercepts the success callback of a jQuery AJAX call. When a valid + * details table is returned, it inserts a "Download PDF" button; + * otherwise it removes an existing button. + * + * @param args - The `arguments` object from the intercepted `$.post` call. + */ const showDownloadButton = (args: any) => { if (isPlotInformation !== null) { const callback = args[2]; |
