Changeset 2651414
- Timestamp:
- 12/31/2021 03:39:45 PM (4 years ago)
- Location:
- wp-hr-manager/trunk
- Files:
-
- 4 edited
-
includes/class-install.php (modified) (4 diffs)
-
modules/hrm/views/leave/leave-entitlements.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
-
wp-hr-manager.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-hr-manager/trunk/includes/class-install.php
r2631006 r2651414 438 438 `data` longtext, 439 439 `date` datetime NOT NULL, 440 `additional` varchar(50 ) COLLATE utf8mb4_unicode_520_ci NOT NULL,440 `additional` varchar(500) COLLATE utf8mb4_unicode_520_ci NOT NULL, 441 441 PRIMARY KEY (`id`), 442 442 KEY `user_id` (`user_id`), … … 593 593 `type` text, 594 594 `performance_date` datetime DEFAULT NULL, 595 `additional` varchar(50 ) COLLATE utf8mb4_unicode_520_ci NOT NULL,595 `additional` varchar(500) COLLATE utf8mb4_unicode_520_ci NOT NULL, 596 596 PRIMARY KEY (`id`), 597 597 KEY `employee_id` (`employee_id`) … … 720 720 721 721 if (!check_table_column_exists($wpdb->prefix . 'wphr_hr_employee_history', 'additional')) { 722 $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wphr_hr_employee_history` ADD additional varchar(50 ) COLLATE utf8mb4_unicode_520_ci NOT NULL");722 $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wphr_hr_employee_history` ADD additional varchar(500) COLLATE utf8mb4_unicode_520_ci NOT NULL"); 723 723 } 724 724 … … 727 727 } 728 728 if (!check_table_column_exists($wpdb->prefix . 'wphr_hr_employee_performance', 'additional')) { 729 $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wphr_hr_employee_performance` ADD additional varchar(50 ) COLLATE utf8mb4_unicode_520_ci NOT NULL");729 $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wphr_hr_employee_performance` ADD additional varchar(500) COLLATE utf8mb4_unicode_520_ci NOT NULL"); 730 730 } 731 731 -
wp-hr-manager/trunk/modules/hrm/views/leave/leave-entitlements.php
r2631006 r2651414 1 1 <?php 2 $cur_year = date( 'Y');3 $active_tab = isset( $_GET['tab']) ? sanitize_text_field($_GET['tab']) : '';2 $cur_year = date('Y'); 3 $active_tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : ''; 4 4 ?> 5 5 <div class="wrap wphr-hr-employees" id="wp-wphr"> 6 6 7 7 <h2> 8 <?php _e( 'Leave Entitlements', 'wphr' );?>9 <?php if ( 'assignment' == $active_tab): ?>10 <a href="<?php echo admin_url( 'admin.php?page=wphr-leave-assign' ); ?>" id="wphr-new-leave-request" class="add-new-h2"><?php _e( 'Back to Entitlement list', 'wphr' );?></a>8 <?php _e('Leave Entitlements', 'wphr');?> 9 <?php if ('assignment' == $active_tab): ?> 10 <a href="<?php echo admin_url('admin.php?page=wphr-leave-assign'); ?>" id="wphr-new-leave-request" class="add-new-h2"><?php _e('Back to Entitlement list', 'wphr');?></a> 11 11 <?php else: ?> 12 12 <!-- Mostrar Boton--> 13 <!-- <a href="<?php echo add_query_arg( array( 'tab' => 'assignment' ), admin_url( 'admin.php?page=wphr-leave-assign' ) ); ?>" id="wphr-new-leave-request" class="add-new-h2"><?php _e( ' ', 'wphr' ); ?></a> -->14 <?php endif ?>13 <a href="<?php echo add_query_arg(array('tab' => 'assignment'), admin_url('admin.php?page=wphr-leave-assign')); ?>" id="wphr-new-leave-request" class="add-new-h2"><?php _e('Add New ', 'wphr');?></a> 14 <?php endif?> 15 15 </h2> 16 16 17 <?php if ( 'assignment' == $active_tab ) { ?> 17 <?php if ('assignment' == $active_tab) { 18 ?> 18 19 19 20 <p class="description"> 20 <?php _e( 'Assign a leave policy to employees.', 'wphr' );?>21 <?php _e('Assign a leave policy to employees.', 'wphr');?> 21 22 </p> 22 23 23 24 <?php 24 $errors = array(25 'invalid-policy' => __( 'Error: Please select a leave policy.', 'wphr'),26 'invalid-period' => __( 'Error: Please select a valid period.', 'wphr'),27 'invalid-employee' => __( 'Error: Please select an employee.', 'wphr' ) 28 );25 $errors = array( 26 'invalid-policy' => __('Error: Please select a leave policy.', 'wphr'), 27 'invalid-period' => __('Error: Please select a valid period.', 'wphr'), 28 'invalid-employee' => __('Error: Please select an employee.', 'wphr'), 29 ); 29 30 30 if ( isset( $_GET['affected' ] )) {31 wphr_html_show_notice( sprintf( __( '%d Employee(s) has been entitled to this leave policy.', 'wphr' ), $_GET['affected'] ));32 }31 if (isset($_GET['affected'])) { 32 wphr_html_show_notice(sprintf(__('%d Employee(s) has been entitled to this leave policy.', 'wphr'), $_GET['affected'])); 33 } 33 34 34 if ( isset( $_GET['error'] ) && array_key_exists( sanitize_text_field( $_GET['error'] ), $errors )) {35 wphr_html_show_notice( $errors[ $_GET['error'] ], 'error');36 }37 ?>35 if (isset($_GET['error']) && array_key_exists(sanitize_text_field($_GET['error']), $errors)) { 36 wphr_html_show_notice($errors[$_GET['error']], 'error'); 37 } 38 ?> 38 39 39 40 <form action="" method="post"> … … 41 42 <ul class="wphr-list separated"> 42 43 <?php 43 wphr_html_form_input(array(44 'label' => __( 'Assignment', 'wphr'),45 'name'=> 'assignment_to',46 'type'=> 'checkbox',47 'help' => __( 'Assign to multiple employees', 'wphr'),48 'tag'=> 'li',49 ));44 wphr_html_form_input(array( 45 'label' => __('Assignment', 'wphr'), 46 'name' => 'assignment_to', 47 'type' => 'checkbox', 48 'help' => __('Assign to multiple employees', 'wphr'), 49 'tag' => 'li', 50 )); 50 51 51 wphr_html_form_input(array(52 'label' => __( 'Leave Policy', 'wphr'),53 'name'=> 'leave_policy',54 'type'=> 'select',55 'class'=> 'leave-policy-select',56 'tag'=> 'li',57 'required' => true,58 'options' => array( 0 => __( '- Select -', 'wphr' ) ) + wphr_hr_leave_get_policies_dropdown_raw() 59 ));52 wphr_html_form_input(array( 53 'label' => __('Leave Policy', 'wphr'), 54 'name' => 'leave_policy', 55 'type' => 'select', 56 'class' => 'leave-policy-select', 57 'tag' => 'li', 58 'required' => true, 59 'options' => array(0 => __('- Select -', 'wphr')) + wphr_hr_leave_get_policies_dropdown_raw(), 60 )); 60 61 61 wphr_html_form_input(array(62 'label' => __( 'Leave Period', 'wphr'),63 'name'=> 'leave_period',64 'type'=> 'select',65 'tag'=> 'li',66 'required' => true,67 'class'=> 'leave-period-select',68 'options'=> wphr_hr_leave_period(),69 ));62 wphr_html_form_input(array( 63 'label' => __('Leave Period', 'wphr'), 64 'name' => 'leave_period', 65 'type' => 'select', 66 'tag' => 'li', 67 'required' => true, 68 'class' => 'leave-period-select', 69 'options' => wphr_hr_leave_period(), 70 )); 70 71 71 wphr_html_form_input(array(72 'label' => __( 'Employee', 'wphr'),73 'name'=> 'single_employee',74 'type'=> 'select',75 'class'=> 'wphr-select2 show-if-single',76 'tag'=> 'li',77 'required' => true,78 'options' => wphr_hr_get_employees_dropdown_raw() 79 ));72 wphr_html_form_input(array( 73 'label' => __('Employee', 'wphr'), 74 'name' => 'single_employee', 75 'type' => 'select', 76 'class' => 'wphr-select2 show-if-single', 77 'tag' => 'li', 78 'required' => true, 79 'options' => wphr_hr_get_employees_dropdown_raw(), 80 )); 80 81 81 wphr_html_form_input(array(82 'label' => __( 'Location', 'wphr'),83 'name'=> 'location',84 'type'=> 'select',85 'class'=> 'wphr-select2 show-if-multiple',86 'tag'=> 'li',87 'options' => wphr_company_get_location_dropdown_raw( __( 'All Locations', 'wphr' ) ) 88 ));82 wphr_html_form_input(array( 83 'label' => __('Location', 'wphr'), 84 'name' => 'location', 85 'type' => 'select', 86 'class' => 'wphr-select2 show-if-multiple', 87 'tag' => 'li', 88 'options' => wphr_company_get_location_dropdown_raw(__('All Locations', 'wphr')), 89 )); 89 90 90 wphr_html_form_input(array(91 'label' => __( 'Department', 'wphr'),92 'name'=> 'department',93 'type'=> 'select',94 'class'=> 'wphr-select2 show-if-multiple',95 'tag'=> 'li',96 'options' => wphr_hr_get_departments_dropdown_raw( __( 'All Departments', 'wphr' ) ) 97 ));91 wphr_html_form_input(array( 92 'label' => __('Department', 'wphr'), 93 'name' => 'department', 94 'type' => 'select', 95 'class' => 'wphr-select2 show-if-multiple', 96 'tag' => 'li', 97 'options' => wphr_hr_get_departments_dropdown_raw(__('All Departments', 'wphr')), 98 )); 98 99 99 wphr_html_form_input(array(100 'label' => __( 'Comment', 'wphr'),101 'name'=> 'comment',102 'type'=> 'textarea',103 'tag'=> 'li',104 'placeholder' => __( 'Optional Comment', 'wphr'),105 ));100 wphr_html_form_input(array( 101 'label' => __('Comment', 'wphr'), 102 'name' => 'comment', 103 'type' => 'textarea', 104 'tag' => 'li', 105 'placeholder' => __('Optional Comment', 'wphr'), 106 )); 106 107 107 ?>108 ?> 108 109 </ul> 109 110 110 111 <input type="hidden" name="wphr-action" value="hr-leave-assign-policy"> 111 112 112 <?php wp_nonce_field( 'wphr-hr-leave-assign' );?>113 <?php submit_button( __( 'Assign Policies', 'wphr' ), 'primary' );?>113 <?php wp_nonce_field('wphr-hr-leave-assign');?> 114 <?php submit_button(__('Assign Policies', 'wphr'), 'primary');?> 114 115 </form> 115 116 … … 130 131 </script> 131 132 132 <?php } else { ?> 133 <?php } else { 134 ?> 133 135 134 136 <div id="wphr-entitlement-table-wrap"> … … 140 142 <input type="hidden" name="tab" value="entitlements"> 141 143 <?php 142 $entitlement = new \WPHR\HR_MANAGER\HRM\Entitlement_List_Table();143 $entitlement->prepare_items();144 $entitlement->views();144 $entitlement = new \WPHR\HR_MANAGER\HRM\Entitlement_List_Table(); 145 $entitlement->prepare_items(); 146 $entitlement->views(); 145 147 146 $entitlement->display();147 ?>148 $entitlement->display(); 149 ?> 148 150 </form> 149 151 150 152 </div><!-- .list-table-inner --> 151 153 </div><!-- .list-table-wrap --> 152 <?php } ?>154 <?php }?> 153 155 </div> -
wp-hr-manager/trunk/readme.txt
r2631006 r2651414 6 6 Requires at least: 5.0 7 7 Tested up to: 5.8.2 8 Stable tag: 3.0. 08 Stable tag: 3.0.1 9 9 License: GPLv2 10 10 Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GLKGN964GRZJW … … 191 191 192 192 == Changelog == 193 = v3.0.1 -> 31 December 2021 194 * Fixed Leave Entitlement Add issue 195 *Fixed WP-HR-Field issue 196 193 197 = v3.0.0 -> 16 November 2021 194 198 * Fixed Employee Shift Issue … … 380 384 381 385 == Upgrade Notice == 386 = v3.0.1 -> 31 December 2021 387 * Fixed Leave Entitlement Add issue 388 *Fixed WP-HR-Field issue 389 382 390 = v3.0.0 -> 16 November 2021 383 391 * Fixed Employee Shift Issue -
wp-hr-manager/trunk/wp-hr-manager.php
r2631006 r2651414 7 7 * Author: Black and White Digital Ltd 8 8 * Author URI: http://www.wphrmanager.com 9 * Version: 3.0. 09 * Version: 3.0.1 10 10 * Requires at least: 5 11 11 * License: GPLv2
Note: See TracChangeset
for help on using the changeset viewer.