Skip to content

Commit

Permalink
Merge with dev-hiresuit branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinjohn22 committed Dec 31, 2024
2 parents 5eb6a23 + ff1df83 commit 2b0645f
Show file tree
Hide file tree
Showing 26 changed files with 543 additions and 406 deletions.
6 changes: 3 additions & 3 deletions admin/class-awsm-job-openings-overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public static function get_jobs( $args ) {

$values = array();
//$join = "LEFT JOIN {$wpdb->posts} AS applications ON {$wpdb->posts}.ID = applications.post_parent AND applications.post_type = 'awsm_job_application'";
$join = "LEFT JOIN {$wpdb->posts} AS applications ON {$wpdb->posts}.ID = applications.post_parent AND applications.post_type = 'awsm_job_application' AND applications.post_status != 'trash'";
$where = 'WHERE 1=1';
$join = "LEFT JOIN {$wpdb->posts} AS applications ON {$wpdb->posts}.ID = applications.post_parent AND applications.post_type = 'awsm_job_application' AND applications.post_status != 'trash'";
$where = 'WHERE 1=1';
if ( isset( $parsed_args['tax_query'] ) && is_array( $parsed_args['tax_query'] ) ) {
$in = array();
$term_ids = array();
Expand Down Expand Up @@ -300,5 +300,5 @@ public static function get_applications_analytics_data( $date_query = array(), $
}
return $analytics_data;
}

}
8 changes: 4 additions & 4 deletions admin/templates/meta/applicant-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@
);
?>
</div>
<?php endif; ?>
<div class="awsm-application-action awsm-dropdown">
<div class="awsm-application-action awsm-dropdown">
<a class="awsm-application-action-btn awsm-dropdown-toggle" href="#">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.40008 1.60001C6.40008 2.48367 7.11642 3.20002 8.00009 3.20002C8.88375 3.20002 9.6001 2.48367 9.6001 1.60001C9.6001 0.716349 8.88375 -3.13126e-08 8.00009 -6.99387e-08C7.11642 -1.08565e-07 6.40008 0.716349 6.40008 1.60001Z" fill="#161616"/>
<path d="M6.40008 7.99997C6.40008 8.88364 7.11642 9.59999 8.00009 9.59999C8.88375 9.59999 9.6001 8.88364 9.6001 7.99997C9.6001 7.11631 8.88375 6.39996 8.00009 6.39996C7.11642 6.39996 6.40008 7.11631 6.40008 7.99997Z" fill="#161616"/>
<path d="M6.40008 14.4C6.40008 15.2837 7.11642 16 8.00009 16C8.88375 16 9.6001 15.2837 9.6001 14.4C9.6001 13.5163 8.88375 12.8 8.00009 12.8C7.11642 12.8 6.40008 13.5163 6.40008 14.4Z" fill="#161616"/>
</svg>
</a>
<?php do_action( 'after_awsm_job_applicant_mb_details_list', $post->ID ); ?>
</div><!-- .awsm-application-action -->
</div>
<?php endif; ?>
<?php do_action( 'after_awsm_job_applicant_mb_details_list', $post->ID ); ?>
</div><!-- .awsm-application-head-actions -->
</div><!-- .awsm-application-head -->
<div class="application-main-cnt">
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/meta/get-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<li><?php esc_html_e( 'Shortlist, Reject and Select Applicants', 'wp-job-openings' ); ?></li>
<li><?php esc_html_e( 'Rate and Filter Applications', 'wp-job-openings' ); ?></li>
<li><?php esc_html_e( 'Custom Email Notifications &amp; Templates', 'wp-job-openings' ); ?></li>
<li><?php esc_html_e( 'Notes, Activity Log and more!', 'wp-job-openings' ); ?></li>
<li><?php esc_html_e( 'Remarks, Activity Log and more!', 'wp-job-openings' ); ?></li>
</ul>
<div class="awsm-job-get-pro-now-btn-wrapper">
<a href="<?php echo esc_url( 'https://awsm.in/get/wpjo-pro/' ); ?>" class="button button-large"><?php esc_html_e( 'View Pricing', 'wp-job-openings' ); ?></a>
Expand Down
52 changes: 31 additions & 21 deletions admin/templates/meta/resume-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,40 @@
<?php
$awsm_attachment_id = get_post_meta( $post->ID, 'awsm_attachment_id', true );
$attachment_url = wp_get_attachment_url( intval( $awsm_attachment_id ) );
if ( $attachment_url ) :
$file_extension = strtolower( pathinfo( $attachment_url, PATHINFO_EXTENSION ) );
if ( $attachment_url ) :
$file_extension = strtolower( pathinfo( $attachment_url, PATHINFO_EXTENSION ) );

// Supported office formats
$supported_office_formats = array(
'doc', 'docx', // Word documents
'ppt', 'pptx', // PowerPoint presentations
'xls', 'xlsx' // Excel spreadsheets
);
// Supported office formats
$supported_office_formats = array(
'doc',
'docx', // Word documents
'ppt',
'pptx', // PowerPoint presentations
'xls',
'xlsx', // Excel spreadsheets
);

// Formats supported by Google Docs Viewer
$google_docs_formats = array(
'csv', // CSV files
'odt', 'ods', 'odp' // OpenDocument formats
);
// Formats supported by Google Docs Viewer
$google_docs_formats = array(
'csv', // CSV files
'odt',
'ods',
'odp', // OpenDocument formats
);

// Supported image formats
$supported_image_formats = array(
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp' // Common image formats
);
// Supported image formats
$supported_image_formats = array(
'jpg',
'jpeg',
'png',
'gif',
'bmp',
'webp', // Common image formats
);

?>
?>
<div class="awsm-document-preview">
<?php if ( $file_extension === 'pdf' ) : ?>
<?php if ( $file_extension === 'pdf' ) : ?>
<iframe
src="<?php echo esc_url( $attachment_url ); ?>"
style="width: 100%; height: 400px; border: none;"
Expand Down Expand Up @@ -69,8 +79,8 @@
<div class="awsm-resume-none">
<h2><strong><?php esc_html_e( 'No resume to preview. File not found!', 'wp-job-openings' ); ?></strong></h2>
</div>
<?php
<?php
endif;
?>
?>

</div>
67 changes: 40 additions & 27 deletions admin/templates/overview/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$new_applications = intval( $overview_data['new_applications'] );
$total_applications = intval( $overview_data['total_applications'] );
$total_active_applications = intval( $overview_data['active_applications'] );
$applications_count = intval( $overview_data['unread_applications'] );
$applications_count = intval( $overview_data['unread_applications'] );
// Enable meta-box support.
do_action( 'add_meta_boxes_' . AWSM_Job_Openings_Overview::$screen_id, null );

Expand Down Expand Up @@ -80,7 +80,7 @@
<li>
<img src="<?php echo esc_url( AWSM_JOBS_PLUGIN_URL . '/assets/img/icon-3.svg' ); ?>" align="Icon">
<?php esc_html_e( 'Total Applications', 'wp-job-openings' ); ?>
<span><?php echo esc_html( $total_active_applications ); ?></span>
<span><?php echo esc_html( $total_active_applications ); ?></span>
</li>
<?php endif; ?>
</ul>
Expand All @@ -95,31 +95,40 @@
<h2><?php esc_html_e( 'Application by Status', 'wp-job-openings' ); ?></h2>
</div><!-- .awsm-jobs-overview-col-head -->
<div class="awsm-jobs-overview-col-content">
<?php
if ( ! class_exists( 'AWSM_Job_Openings_Pro_Pack' ) ) {
// Translators: %1$s is the opening <a> tag for the PRO Plan link, %2$s is the closing </a> tag.
$pro_link = sprintf( esc_html__( 'This feature requires %1$sPRO Plan%2$s to work', 'wp-job-openings' ), '<a href="https://awsm.in/get/wpjo-pro/">', '</a>' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<div class="awsm-jobs-overview-widget-wrapper"><div class="awsm-jobs-pro-feature"><img src="%2$s"><p>%1$s</p></div></div>', $pro_link, esc_url( 'https://i.ibb.co/vXyz24d/Screenshot-2024-03-05-at-12-41-12-PM.png' ) );
} else {
// Ensure the AWSM_Job_Openings_Pro_Overview class is initialized
$overview_instance = AWSM_Job_Openings_Pro_Overview::init();
<?php
if ( ! class_exists( 'AWSM_Job_Openings_Pro_Pack' ) ) {
// Translators: %1$s is the opening <a> tag for the PRO Plan link, %2$s is the closing </a> tag.
$pro_link = sprintf( esc_html__( 'This feature requires %1$sPRO Plan%2$s to work', 'wp-job-openings' ), '<a href="https://awsm.in/get/wpjo-pro/">', '</a>' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<div class="awsm-jobs-overview-widget-wrapper"><div class="awsm-jobs-pro-feature"><img src="%2$s"><p>%1$s</p></div></div>', $pro_link, esc_url( 'https://i.ibb.co/vXyz24d/Screenshot-2024-03-05-at-12-41-12-PM.png' ) );
} else {
// Ensure the AWSM_Job_Openings_Pro_Overview class is initialized
$overview_instance = AWSM_Job_Openings_Pro_Overview::init();

// Set the unique ID for which you want the template path
$unique_id = 'awsm-jobs-overview-applications-by-status';
// Set the unique ID for which you want the template path
$unique_id = 'awsm-jobs-overview-applications-by-status';

// Get the template path
$template_path = $overview_instance->pro_widget_template_path( '', $unique_id );
// Create a template args array to pass variables to the template
$template_args = array(
'widget_id' => $unique_id, // Pass the unique_id as widget_id
);

// Include the template file if it exists
if ( file_exists( $template_path ) ) {
include $template_path;
} else {
echo '<p>' . esc_html__( 'Template not found.', 'wp-job-openings' ) . '</p>';
// Get the template path
$template_path = $overview_instance->pro_widget_template_path( '', $unique_id );

// Include the template file if it exists
if ( file_exists( $template_path ) ) {

foreach ( $template_args as $key => $value ) {
${$key} = $value;
}
include $template_path;
} else {
echo '<p>' . esc_html__( 'Template not found.', 'wp-job-openings' ) . '</p>';
}
?>
</div><!-- .awsm-jobs-overview-col-content -->
}
?>
</div><!-- .awsm-jobs-overview-col-content -->
</div><!-- .awsm-jobs-overview-chart -->
</div><!-- .awsm-jobs-overview-col -->
<div class="awsm-jobs-overview-col" id="awsm-jobs-overview-applications-analytics">
Expand Down Expand Up @@ -251,9 +260,11 @@
</div><!-- .awsm-jobs-overview-col-head -->

<?php
if ( ! empty( $jobs ) ) : ?>
if ( ! empty( $jobs ) ) :
?>
<div class="awsm-jobs-overview-col-content">
<?php foreach ( $jobs as $job ) :
<?php
foreach ( $jobs as $job ) :
$jobmeta = get_post_meta( $job->ID );
$expiry_date = isset( $jobmeta['awsm_job_expiry'][0] ) ? $jobmeta['awsm_job_expiry'][0] : null;

Expand All @@ -263,7 +274,7 @@
$published_date = get_the_date( 'F j, Y', $job->ID );
?>
<a href="<?php echo esc_url( get_edit_post_link( $job->ID ) ); ?>" class="awsm-jobs-overview-list-item">
<span class="count"><?php echo esc_html( $job->applications_count ); ?></span>
<span class="count"><?php echo esc_html( $job->applications_count ); ?></span>
<p>
<strong>
<?php
Expand All @@ -282,9 +293,11 @@
</a>
<?php
endif;
endforeach; ?>
endforeach;
?>
</div>
<?php else :
<?php
else :
?>
<div class="awsm-jobs-overview-empty-wrapper">
<p><img src="<?php echo esc_url( AWSM_JOBS_PLUGIN_URL . '/assets/img/icon-1.svg' ); ?>" align="Icon">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="awsm-jobs-overview-col-content">
<div class="<?php echo esc_attr( "awsm-jobs-overview-widget-wrapper awsm-jobs-overview-{$widget_id}-widget-wrapper" ); ?>">
<?php


$analytics_data = AWSM_Job_Openings_Overview::get_applications_analytics_data();

Expand Down
3 changes: 2 additions & 1 deletion assets/css/admin-global.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/admin.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.min.css.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/css/admin/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,10 @@ textarea.awsm-form-control {
cursor: progress; /* Show progress cursor */
pointer-events: none; /* Disable button interaction */
}
.awsm-application-actions .awsm-applicant-details-list li{
padding: 0;
border: none !important;
}
@media (min-width:701px) {
.awsm-job-setup {
position: absolute;
Expand Down
3 changes: 2 additions & 1 deletion assets/css/general.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion assets/js/admin-overview.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2b0645f

Please sign in to comment.