web changes

This commit is contained in:
mohanmd 2026-06-23 17:56:11 +05:30
parent 8fb9b9dc26
commit ac4cc64cb6
7 changed files with 95 additions and 41 deletions

View File

@ -480,6 +480,8 @@ public function createPassword(Request $request)
'emirates_id_employer' => $pending['emirates_id_employer'] ?? null, 'emirates_id_employer' => $pending['emirates_id_employer'] ?? null,
'emirates_id_issue_place' => $pending['emirates_id_issue_place'] ?? null, 'emirates_id_issue_place' => $pending['emirates_id_issue_place'] ?? null,
'emirates_id_occupation' => $pending['emirates_id_occupation'] ?? null, 'emirates_id_occupation' => $pending['emirates_id_occupation'] ?? null,
'emirates_id_card_number' => $pending['emirates_id_card_number'] ?? null,
'emirates_id_gender' => $pending['emirates_id_gender'] ?? null,
'nationality' => $pending['emirates_id_nationality'] ?? null, 'nationality' => $pending['emirates_id_nationality'] ?? null,
'address' => $pending['address'] ?? null, 'address' => $pending['address'] ?? null,
]); ]);
@ -510,6 +512,8 @@ public function createPassword(Request $request)
'emirates_id_employer' => $pending['emirates_id_employer'] ?? null, 'emirates_id_employer' => $pending['emirates_id_employer'] ?? null,
'emirates_id_issue_place' => $pending['emirates_id_issue_place'] ?? null, 'emirates_id_issue_place' => $pending['emirates_id_issue_place'] ?? null,
'emirates_id_occupation' => $pending['emirates_id_occupation'] ?? null, 'emirates_id_occupation' => $pending['emirates_id_occupation'] ?? null,
'emirates_id_card_number' => $pending['emirates_id_card_number'] ?? null,
'emirates_id_gender' => $pending['emirates_id_gender'] ?? null,
'nationality' => $pending['emirates_id_nationality'] ?? null, 'nationality' => $pending['emirates_id_nationality'] ?? null,
]); ]);

View File

@ -51,6 +51,8 @@ private function buildProfileData($user, $profile)
'employer' => $profile->emirates_id_employer ?? 'Msj International Technical Services L.L.C UAE', 'employer' => $profile->emirates_id_employer ?? 'Msj International Technical Services L.L.C UAE',
'issue_place' => $profile->emirates_id_issue_place ?? 'Dubai', 'issue_place' => $profile->emirates_id_issue_place ?? 'Dubai',
'occupation' => $profile->emirates_id_occupation ?? 'Electrician', 'occupation' => $profile->emirates_id_occupation ?? 'Electrician',
'card_number' => $profile->emirates_id_card_number ?? '151023946',
'gender' => $profile->emirates_id_gender ?? 'M',
], ],
'fcm_token' => $user->fcm_token ?? 'fcm_token_example', 'fcm_token' => $user->fcm_token ?? 'fcm_token_example',
'address' => $profile->address ?? 'Villa 45, Street 12', 'address' => $profile->address ?? 'Villa 45, Street 12',
@ -83,6 +85,8 @@ public function index(Request $request)
'emirates_id_employer' => 'Msj International Technical Services L.L.C UAE', 'emirates_id_employer' => 'Msj International Technical Services L.L.C UAE',
'emirates_id_issue_place' => 'Dubai', 'emirates_id_issue_place' => 'Dubai',
'emirates_id_occupation' => 'Electrician', 'emirates_id_occupation' => 'Electrician',
'emirates_id_card_number' => '151023946',
'emirates_id_gender' => 'M',
'address' => 'Villa 45, Street 12', 'address' => 'Villa 45, Street 12',
]); ]);
} }
@ -115,6 +119,8 @@ public function edit(Request $request)
'emirates_id_employer' => 'Msj International Technical Services L.L.C UAE', 'emirates_id_employer' => 'Msj International Technical Services L.L.C UAE',
'emirates_id_issue_place' => 'Dubai', 'emirates_id_issue_place' => 'Dubai',
'emirates_id_occupation' => 'Electrician', 'emirates_id_occupation' => 'Electrician',
'emirates_id_card_number' => '151023946',
'emirates_id_gender' => 'M',
'address' => 'Villa 45, Street 12', 'address' => 'Villa 45, Street 12',
]); ]);
} }

View File

@ -29,6 +29,8 @@ class EmployerProfile extends Model
'emirates_id_employer', 'emirates_id_employer',
'emirates_id_issue_place', 'emirates_id_issue_place',
'emirates_id_occupation', 'emirates_id_occupation',
'emirates_id_card_number',
'emirates_id_gender',
'address', 'address',
'property_type', 'property_type',
'profile_photo_url', 'profile_photo_url',

View File

@ -43,6 +43,8 @@ class Sponsor extends Authenticatable
'emirates_id_employer', 'emirates_id_employer',
'emirates_id_issue_place', 'emirates_id_issue_place',
'emirates_id_occupation', 'emirates_id_occupation',
'emirates_id_card_number',
'emirates_id_gender',
]; ];
protected $hidden = [ protected $hidden = [

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('employer_profiles', function (Blueprint $table) {
$table->string('emirates_id_card_number')->nullable();
$table->string('emirates_id_gender')->nullable();
});
Schema::table('sponsors', function (Blueprint $table) {
$table->string('emirates_id_card_number')->nullable();
$table->string('emirates_id_gender')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('employer_profiles', function (Blueprint $table) {
$table->dropColumn(['emirates_id_card_number', 'emirates_id_gender']);
});
Schema::table('sponsors', function (Blueprint $table) {
$table->dropColumn(['emirates_id_card_number', 'emirates_id_gender']);
});
}
};

View File

@ -286,9 +286,8 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
<TableHead onClick={() => handleSort('name')} className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14 pl-8 cursor-pointer select-none"> <TableHead onClick={() => handleSort('name')} className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14 pl-8 cursor-pointer select-none">
Employer {sortField === 'name' && (sortOrder === 'desc' ? '↓' : '↑')} Employer {sortField === 'name' && (sortOrder === 'desc' ? '↓' : '↑')}
</TableHead> </TableHead>
<TableHead className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14">Company Name</TableHead>
<TableHead className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14">Subscription Plan</TableHead> <TableHead className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14">Subscription Plan</TableHead>
<TableHead className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14">Verification Status</TableHead> <TableHead className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14">Country</TableHead>
<TableHead onClick={() => handleSort('status')} className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14 cursor-pointer select-none"> <TableHead onClick={() => handleSort('status')} className="font-bold text-slate-500 text-[10px] uppercase tracking-widest h-14 cursor-pointer select-none">
Status {sortField === 'status' && (sortOrder === 'desc' ? '↓' : '↑')} Status {sortField === 'status' && (sortOrder === 'desc' ? '↓' : '↑')}
</TableHead> </TableHead>
@ -310,11 +309,6 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
</div> </div>
</div> </div>
</TableCell> </TableCell>
<TableCell>
<div className="text-xs font-bold text-slate-700">
{emp.employer_profile?.company_name || 'N/A'}
</div>
</TableCell>
<TableCell> <TableCell>
<span className={`px-2 py-0.5 rounded-lg text-[10px] font-black uppercase tracking-tight ${ <span className={`px-2 py-0.5 rounded-lg text-[10px] font-black uppercase tracking-tight ${
emp.subscription_status === 'active' ? 'bg-blue-50 text-blue-600 border border-blue-100' : 'bg-slate-100 text-slate-500' emp.subscription_status === 'active' ? 'bg-blue-50 text-blue-600 border border-blue-100' : 'bg-slate-100 text-slate-500'
@ -323,10 +317,8 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
</span> </span>
</TableCell> </TableCell>
<TableCell> <TableCell>
<span className={`text-xs font-bold uppercase ${ <span className="text-xs font-bold text-slate-700">
emp.employer_profile?.verification_status === 'approved' ? 'text-emerald-600' : 'text-amber-500' {emp.employer_profile?.country || 'United Arab Emirates'}
}`}>
{emp.employer_profile?.verification_status || 'pending'}
</span> </span>
</TableCell> </TableCell>
<TableCell> <TableCell>
@ -410,7 +402,7 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
)) ))
) : ( ) : (
<TableRow> <TableRow>
<TableCell colSpan={6} className="py-12 text-center text-slate-400 font-semibold text-sm"> <TableCell colSpan={5} className="py-12 text-center text-slate-400 font-semibold text-sm">
No employers found. No employers found.
</TableCell> </TableCell>
</TableRow> </TableRow>
@ -478,10 +470,6 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
Employer Profile Employer Profile
</h3> </h3>
<div className="grid grid-cols-2 gap-4 text-xs"> <div className="grid grid-cols-2 gap-4 text-xs">
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Company / Household</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.company_name || 'N/A'}</span>
</div>
<div> <div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Email Address</span> <span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Email Address</span>
<span className="font-bold text-slate-800">{selectedEmployer?.email || 'N/A'}</span> <span className="font-bold text-slate-800">{selectedEmployer?.email || 'N/A'}</span>
@ -535,28 +523,52 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
<div className="bg-white p-5 border border-slate-200 rounded-2xl shadow-xs space-y-4"> <div className="bg-white p-5 border border-slate-200 rounded-2xl shadow-xs space-y-4">
<h3 className="text-xs font-black text-slate-700 uppercase tracking-widest border-b border-slate-100 pb-2 flex items-center gap-2"> <h3 className="text-xs font-black text-slate-700 uppercase tracking-widest border-b border-slate-100 pb-2 flex items-center gap-2">
<ShieldCheck className="w-4 h-4 text-[#0F6E56]" /> <ShieldCheck className="w-4 h-4 text-[#0F6E56]" />
Emirates ID & Document Extracted Details Emirates ID Details
</h3> </h3>
<div className="grid grid-cols-2 gap-4 text-xs"> <div className="grid grid-cols-2 gap-4 text-xs">
<div> <div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Emirates ID Number</span> <span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">ID Number</span>
<span className="font-mono font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_number || 'Not Extracted / Pending'}</span> <span className="font-mono font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_number || 'N/A'}</span>
</div> </div>
<div> <div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Emirates ID Expiry</span> <span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Card Number</span>
<span className="font-bold text-slate-800">{formatDate(selectedEmployer?.employer_profile?.emirates_id_expiry)}</span> <span className="font-mono font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_card_number || 'N/A'}</span>
</div> </div>
<div> <div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Verification Status</span> <span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Full Name</span>
<span className={`font-bold uppercase ${ <span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_name || 'N/A'}</span>
selectedEmployer?.employer_profile?.verification_status === 'approved' ? 'text-emerald-600' : 'text-amber-500'
}`}>
{selectedEmployer?.employer_profile?.verification_status || 'Pending'}
</span>
</div> </div>
<div> <div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Trade License Expiry</span> <span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Date of Birth</span>
<span className="font-bold text-slate-800">{formatDate(selectedEmployer?.sponsor?.license_expiry)}</span> <span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_dob || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Nationality</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.nationality || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Gender</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_gender || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Issue Date</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_issue_date || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Expiry Date</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_expiry || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Occupation</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_occupation || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Employer</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_employer || 'N/A'}</span>
</div>
<div>
<span className="text-[10px] font-black text-slate-400 uppercase tracking-wider block mb-0.5">Issuing Place</span>
<span className="font-bold text-slate-800">{selectedEmployer?.employer_profile?.emirates_id_issue_place || 'N/A'}</span>
</div> </div>
</div> </div>
</div> </div>
@ -590,15 +602,7 @@ export default function EmployersIndex({ employers: initialEmployers, sponsors,
required required
/> />
</div> </div>
<div className="space-y-1">
<label className="text-[10px] font-black text-slate-400 uppercase tracking-widest">Company Name</label>
<input
type="text"
className="w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm font-semibold focus:ring-4 focus:ring-teal-500/10 outline-none"
value={editForm.company_name}
onChange={e => setEditForm({ ...editForm, company_name: e.target.value })}
/>
</div>
<div className="grid grid-cols-2 gap-4"> <div className="grid grid-cols-2 gap-4">
<div className="space-y-1"> <div className="space-y-1">
<label className="text-[10px] font-black text-slate-400 uppercase tracking-widest">Email Address</label> <label className="text-[10px] font-black text-slate-400 uppercase tracking-widest">Email Address</label>

View File

@ -250,9 +250,7 @@ export default function WorkerManagement({ workers }) {
className="w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-100 rounded-xl text-sm focus:bg-white focus:ring-4 focus:ring-[#0F6E56]/10 outline-none transition-all font-medium" className="w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-100 rounded-xl text-sm focus:bg-white focus:ring-4 focus:ring-[#0F6E56]/10 outline-none transition-all font-medium"
/> />
</div> </div>
<button className="p-2.5 bg-white border border-slate-200 rounded-xl text-slate-400 hover:bg-slate-50 transition-colors">
<Filter className="w-4 h-4" />
</button>
</div> </div>
<div className="flex items-center gap-2 w-full md:w-auto"> <div className="flex items-center gap-2 w-full md:w-auto">