summaryrefslogtreecommitdiff
path: root/public/app/views
diff options
context:
space:
mode:
authorGeo Xalkis <gx23100@gmail.com>2023-07-31 01:53:36 +0300
committerGeo Xalkis <gx23100@gmail.com>2023-07-31 01:53:36 +0300
commitd5746829da07894db10b01f12219cee78f8af882 (patch)
treeefc9c7c563f845f7770fe07a70d55c3564cfbf89 /public/app/views
parentc6b6f89e7cda2621fd3d0dfa0768d010fc41d437 (diff)
downloadgyraf1gov-master.tar.gz
gyraf1gov-master.tar.bz2
gyraf1gov-master.zip
added protoocol on petition copiesHEADmasterdevelop
Diffstat (limited to 'public/app/views')
-rw-r--r--public/app/views/js/pdf-designer/application.php14
-rw-r--r--public/app/views/js/pdf-designer/penalty.php17
-rw-r--r--public/app/views/templates/admin_petitions.php2
-rw-r--r--public/app/views/templates/create_pdf.php3
4 files changed, 27 insertions, 9 deletions
diff --git a/public/app/views/js/pdf-designer/application.php b/public/app/views/js/pdf-designer/application.php
index 8017fa9..53f5193 100644
--- a/public/app/views/js/pdf-designer/application.php
+++ b/public/app/views/js/pdf-designer/application.php
@@ -1,10 +1,16 @@
<?php
/** application PDF designer
* -----------------------------------------------------------------------------
+ *
+ * main function: designer
+ * @param data (json) : fields'values of petition
+ * @param defines (json) : data properties of authoriry
+ * @param protocol (string) : protocol numeber (if exists; else empty string)
+ *
*/
?>
<script>
-function designer(data, defines) {
+function designer(data, defines, protocol = '') {
// handle date
const d = new Date( data.date );
const options = {
@@ -71,6 +77,9 @@ function designer(data, defines) {
'\n\nΣχολείο Οργανικής: ',{
style: 'bigger', text: data.belonging_school
},
+ '\n\nΘέση Υπηρέτησης: ',{
+ style: 'bigger', text: '1ο ΓΥΜΝΑΣΙΟ ΡΑΦΗΝΑΣ'
+ },
// '\n\nΣχολείο Υπηρέτησης:\n\t',{
// style: 'bigger', text: data.constants.organization
// },
@@ -113,7 +122,8 @@ function designer(data, defines) {
],
footer: {
text: [
- 'Αριθμός πρωτοκόλου: A124-2501-4568-7 / 2023-12-15',
+ 'Αριθμός πρωτοκόλου: ',
+ ((protocol == '') ? '—' : protocol),
'\ndocument signature: ' + defines.ticket
],
diff --git a/public/app/views/js/pdf-designer/penalty.php b/public/app/views/js/pdf-designer/penalty.php
index f2f3029..bdd5dc2 100644
--- a/public/app/views/js/pdf-designer/penalty.php
+++ b/public/app/views/js/pdf-designer/penalty.php
@@ -1,10 +1,16 @@
<?php
/** penalty PDF designer
* -----------------------------------------------------------------------------
+ *
+ * main function: designer
+ * @param data (json) : fields'values of petition
+ * @param defines (json) : data properties of authoriry
+ * @param protocol (string) : protocol numeber (if exists; else empty string)
+ *
*/
?>
<script>
-function designer(data, defines) {
+function designer(data, defines, protocol = '') {
// handle date
const d = new Date( data.date );
const options = {
@@ -22,7 +28,7 @@ function designer(data, defines) {
// get labels from id-specified objects
- let petition = 'Αίτηση';
+ let petition = 'Καταγραφή Ενέργειας Υποστήριξης Εύρυθμης Λειτουργείας';
return {
info: {
@@ -35,8 +41,8 @@ function designer(data, defines) {
{
text: [
'Καταγραφή Ενέργειας Υποστήριξης Εύρυθμης Λειτουργείας\n',
- 'ΠΡΑΚΤΙΚΟ ',
- 'αριθμός πρακτικού',
+ 'ΠΡΑΚΤΙΚΟ',
+ ((protocol == '') ? '' : (' ' + protocol)),
'\n\n'
],
style: 'header'
@@ -153,7 +159,8 @@ function designer(data, defines) {
],
footer: {
text: [
- 'Αριθμός πρωτοκόλου: A124-2501-4568-7 / 2023-12-15',
+ 'Αριθμός πρωτοκόλου: ',
+ ((protocol == '') ? '—' : protocol),
'\ndocument signature: ' + defines.ticket
],
diff --git a/public/app/views/templates/admin_petitions.php b/public/app/views/templates/admin_petitions.php
index 52f2a89..c4374bb 100644
--- a/public/app/views/templates/admin_petitions.php
+++ b/public/app/views/templates/admin_petitions.php
@@ -88,7 +88,7 @@
<div class="modal-body">
<div class="row form-group">
- <label class="control-label col-sm-12" for="protocol">Αριθμός Πρψτοκόλλου</label>
+ <label class="control-label col-sm-12" for="protocol">Αριθμός Πρωτοκόλλου</label>
<div class="col-sm-12">
<input class="form-control form-control-sm" type="text" name="protocol" value="" required="">
</div>
diff --git a/public/app/views/templates/create_pdf.php b/public/app/views/templates/create_pdf.php
index 2549cda..52be9ab 100644
--- a/public/app/views/templates/create_pdf.php
+++ b/public/app/views/templates/create_pdf.php
@@ -50,6 +50,7 @@
</body>
<script>
var data = <?=json_encode($petition, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE)?>;
+console.log(data);
pdfMake.fonts = {
FiraSans: {
@@ -64,7 +65,7 @@ pdfMake.fonts = {
}
pdfMake.createPdf(
- designer( data.form_structure, data.form_structure.ref )
+ designer( data.form_structure, data.form_structure.ref, data.protocol )
).download('<?=$petition['signature']?>.pdf');
</script>
</html> \ No newline at end of file