From caa9c3f705730886cab911cb241703a10494581c Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:28:24 +0530 Subject: Added plot map details on top of pdf page. --- src/scripts/functionality/sheet-map/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/scripts/functionality/sheet-map/index.ts') diff --git a/src/scripts/functionality/sheet-map/index.ts b/src/scripts/functionality/sheet-map/index.ts index c3ad13f..71228fe 100644 --- a/src/scripts/functionality/sheet-map/index.ts +++ b/src/scripts/functionality/sheet-map/index.ts @@ -44,8 +44,18 @@ const setPlotInformation = (plotPolygon: PlotPolygon | null | undefined = null) }; const downloadPDF = (labelPoints: boolean = true) => { + const _getMapDetail = (i: number) => { + const detail = document.querySelector(`#headerTable > tbody > tr > td:nth-child(${i})`)! + .innerHTML + .split("[")[1] + .trim(); + return detail.substr(0, detail.length - 1); + }; generateWebPage( getDownloadMapPDFPageContent({ + district: _getMapDetail(1), + block: _getMapDetail(2), + mouza: _getMapDetail(3), mapContent: plotPolygonPathElements + (labelPoints ? plotNumberLabelTextElements : "") }), "map" -- cgit v1.2.3