Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Employee Dashboard - Include Reference ID #2840

Closed
SA-FL opened this issue Jul 23, 2024 · 3 comments
Closed

Employee Dashboard - Include Reference ID #2840

SA-FL opened this issue Jul 23, 2024 · 3 comments

Comments

@SA-FL
Copy link

SA-FL commented Jul 23, 2024

The default template for the Employee dashboard includes Title, Date, Views, Applications, actions, but it doesn't include the reference number.

With the title likely to have different roles called the same thing, it means you can't differentiate and find the role you may want to review. Having the reference number would help with this as it should be unique. It would also help when re-listing roles.

As an example one of my users has hundreds of roles called "mortgage" broker, so it needs to review each to identify the one to relist, having the reference ID would massively simplify this.

@yscik
Copy link
Contributor

yscik commented Jul 25, 2024

Hey there! Would you like to include the numeric ID of the job, or do you mean a custom reference ID field?

Either way, you can customize the dashboard columns with custom code, using filters or template overrides.

Here is an example to add the ID after the job title with a filter:

add_action( 'job_manager_job_dashboard_column_job_title', function( $job ) {
	echo ' #' . esc_html( $job->ID );
}, 12 );

@yscik yscik closed this as completed Jul 25, 2024
@SA-FL
Copy link
Author

SA-FL commented Jul 25, 2024 via email

@yscik
Copy link
Contributor

yscik commented Jul 25, 2024

If you want it to be its own column, you can add the column via the job_manager_job_dashboard_columns filter.
It would be something like this below.

Note that this is an example you need to adjust to your case.

add_action( 'job_manager_job_dashboard_columns', function( $columns ) {
	$columns[ 'job_reference' ] = 'Reference';
	return $columns;
}, 10 );

add_action( 'job_manager_job_dashboard_column_job_reference', function( $job ) {
	echo ' #' . esc_html( get_post_meta( $job, 'job_reference' ) );
}, 10 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants