diff options
| author | Geo Xalkis <gx23100@gmail.com> | 2023-07-31 01:53:36 +0300 |
|---|---|---|
| committer | Geo Xalkis <gx23100@gmail.com> | 2023-07-31 01:53:36 +0300 |
| commit | d5746829da07894db10b01f12219cee78f8af882 (patch) | |
| tree | efc9c7c563f845f7770fe07a70d55c3564cfbf89 | |
| parent | c6b6f89e7cda2621fd3d0dfa0768d010fc41d437 (diff) | |
| download | gyraf1gov-master.tar.gz gyraf1gov-master.tar.bz2 gyraf1gov-master.zip | |
| -rw-r--r-- | public/app/config/setup_application.php | 18 | ||||
| -rw-r--r-- | public/app/views/js/pdf-designer/application.php | 14 | ||||
| -rw-r--r-- | public/app/views/js/pdf-designer/penalty.php | 17 | ||||
| -rw-r--r-- | public/app/views/templates/admin_petitions.php | 2 | ||||
| -rw-r--r-- | public/app/views/templates/create_pdf.php | 3 |
5 files changed, 39 insertions, 15 deletions
diff --git a/public/app/config/setup_application.php b/public/app/config/setup_application.php index a8a911b..3d13931 100644 --- a/public/app/config/setup_application.php +++ b/public/app/config/setup_application.php @@ -182,19 +182,25 @@ define('GENDERED_POSITIONS', [ // gender-ed positions 'Διευθυντής', 'Υποδιευθυντής', 'Μόνιμος Καθηγητής', - 'Αναπληρωτής Καθηγητής' + 'Αναπληρωτής Καθηγητής ΕΣΠΑ', + 'Αναπληρωτής Καθηγητής ΠΔΕ', + 'Κρατικός Αναπληρωτής Καθηγητής', ], 'she' => [ 'Διευθύντρια', 'Υποδιευθύντρια', 'Μόνιμη Καθηγήτρια', - 'Αναπληρώτρια Καθηγήτρια' + 'Αναπληρώτρια Καθηγήτρια ΕΣΠΑ' + 'Αναπληρώτρια Καθηγήτρια ΠΔΕ' + 'Κρατική Αναπληρώτρια Καθηγήτρια' ], 'ze' => [ 'Διευθυντ@', 'Υποδιευθυντ@', 'Μόνιμ@ Καθηγητ@', - 'Αναπληρωτ@ Καθηγητ@' + 'Αναπληρωτ@ Καθηγητ@ ΕΣΠΑ', + 'Αναπληρωτ@ Καθηγητ@ ΠΔΕ', + 'Κρατικ@ Αναπληρωτ@ Καθηγητ@' ] ]); @@ -260,7 +266,7 @@ define('REGISTRATION_FORM', [ ], [ 'name' => 'belonging_school', - 'label' => 'Σχολείο τοποθέτησης', + 'label' => 'Σχολείο οργανικής', 'attributes' => ['required', 'auto'] ], // [ // working school = (obviously) is the current school @@ -468,7 +474,7 @@ define('APPLICATION_FORM', [ ], [ 'name' => 'belonging_school', - 'label' => 'Σχολείο τοποθέτησης', + 'label' => 'Σχολείο οργανικής', 'attributes' => ['required', 'auto'] ], [ @@ -603,7 +609,7 @@ define('PENALTY_FORM', [ 'options' => [ 'προφορική παρατήρηση', 'επίπληξη', - 'προφορική παρατήρηση με ωριαία απομάκρυνση' + 'προφορική παρατήρηση με ωριαία απομάκρυνση', 'αποβολή από τα μαθήματα μίας ημέρας', 'αποβολή από τα μαθήματα δύο ημερών' ], 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 |
