From 3b9c3dec10c5ee5ecb9f5db6e39ac1148ca9c95f Mon Sep 17 00:00:00 2001 From: mahdahar <89adham@gmail.com> Date: Tue, 16 Dec 2025 16:44:25 +0700 Subject: [PATCH] add print dialog, add preview button, add print dropdown button --- app/Views/v2/admin/dialog_print.php | 23 ++++++++++++ app/Views/v2/admin/index.php | 58 ++++++++++++++++++++++++++--- 2 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 app/Views/v2/admin/dialog_print.php diff --git a/app/Views/v2/admin/dialog_print.php b/app/Views/v2/admin/dialog_print.php new file mode 100644 index 0000000..b9ee1b9 --- /dev/null +++ b/app/Views/v2/admin/dialog_print.php @@ -0,0 +1,23 @@ + + + diff --git a/app/Views/v2/admin/index.php b/app/Views/v2/admin/index.php index 6ad5c70..6ae723c 100644 --- a/app/Views/v2/admin/index.php +++ b/app/Views/v2/admin/index.php @@ -59,10 +59,10 @@
-
- - -
+
@@ -79,8 +79,9 @@ Reff Doctor Tests - Result To - Validation + ResTo + Val + Result Status @@ -113,6 +114,24 @@ + + + + @@ -127,6 +146,7 @@ include('v2/admin/dialog_sample'); ?> include('v2/admin/dialog_val'); ?> include('v2/admin/dialog_unval'); ?> + include('v2/admin/dialog_print'); ?> endSection(); ?> @@ -371,6 +391,32 @@ this.isDialogUnvalOpen = false; }, + /* + print dialog + */ + isDialogPrintOpen : false, + printAccessnumber : null, + printType : null, + openPrintDialog (accessnumber, type) { + this.printAccessnumber = accessnumber; + this.printType = type; + this.isDialogPrintOpen = true; + }, + closePrintDialog () { + this.isDialogPrintOpen = false; + }, + getPrintUrl() { + // Base URL from existing modal_request.php reference + let base = 'http://glenlis/spooler_db/main_dev.php'; + let url = `${base}?acc=${this.printAccessnumber}`; + + // Append params based on type + if (this.printType === 'ind') url += '&lang=ID'; + if (this.printType === 'eng') url += '&lang=EN'; + if (this.printType === 'pdf') url += '&output=pdf'; + + return url; + }, })); });