changes
This commit is contained in:
parent
2c8fb9e757
commit
3b5a0d48ac
@ -175,6 +175,9 @@ public function setupProfile(Request $request)
|
|||||||
'name' => 'required|string|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'nationality' => 'required|string|max:100',
|
'nationality' => 'required|string|max:100',
|
||||||
'language' => 'nullable|string',
|
'language' => 'nullable|string',
|
||||||
|
'gender' => 'nullable|string|in:male,female,other',
|
||||||
|
'live_in_out' => 'nullable|string|in:live_in,live_out',
|
||||||
|
'preferred_location' => 'nullable|string|max:255',
|
||||||
'skills' => 'nullable|array',
|
'skills' => 'nullable|array',
|
||||||
'skills.*' => 'integer|exists:skills,id',
|
'skills.*' => 'integer|exists:skills,id',
|
||||||
]);
|
]);
|
||||||
@ -231,9 +234,12 @@ public function setupProfile(Request $request)
|
|||||||
'language' => $request->language ?? 'HI', // Default to Hindi if not selected
|
'language' => $request->language ?? 'HI', // Default to Hindi if not selected
|
||||||
'password' => Hash::make(Str::random(16)), // No password at this stage
|
'password' => Hash::make(Str::random(16)), // No password at this stage
|
||||||
'nationality' => $request->nationality,
|
'nationality' => $request->nationality,
|
||||||
|
'gender' => $request->gender,
|
||||||
|
'live_in_out' => $request->live_in_out,
|
||||||
|
'preferred_location' => $request->preferred_location,
|
||||||
'age' => 25, // Default — updated later in full profile
|
'age' => 25, // Default — updated later in full profile
|
||||||
'salary' => 1500, // Default AED — updated later
|
'salary' => 1500, // Default AED — updated later
|
||||||
'availability'=> 'Immediate',
|
'availability' => 'Immediate',
|
||||||
'experience' => 'Not Specified',
|
'experience' => 'Not Specified',
|
||||||
'religion' => 'Not Specified',
|
'religion' => 'Not Specified',
|
||||||
'bio' => 'New worker on Migrant platform.',
|
'bio' => 'New worker on Migrant platform.',
|
||||||
@ -295,7 +301,9 @@ public function register(Request $request)
|
|||||||
'in_country' => 'nullable',
|
'in_country' => 'nullable',
|
||||||
'visa_status' => 'nullable|string|max:100',
|
'visa_status' => 'nullable|string|max:100',
|
||||||
'preferred_job_type' => 'nullable|string|max:100',
|
'preferred_job_type' => 'nullable|string|max:100',
|
||||||
'live_in_out' => 'nullable|string|max:100',
|
'gender' => 'nullable|string|in:male,female,other',
|
||||||
|
'live_in_out' => 'nullable|string|in:live_in,live_out',
|
||||||
|
'preferred_location' => 'nullable|string|max:255',
|
||||||
'country' => 'nullable|string|max:100',
|
'country' => 'nullable|string|max:100',
|
||||||
'city' => 'nullable|string|max:100',
|
'city' => 'nullable|string|max:100',
|
||||||
'area' => 'nullable|string|max:100',
|
'area' => 'nullable|string|max:100',
|
||||||
@ -362,9 +370,12 @@ public function register(Request $request)
|
|||||||
'language' => $request->language ?? 'HI',
|
'language' => $request->language ?? 'HI',
|
||||||
'password' => Hash::make($request->password),
|
'password' => Hash::make($request->password),
|
||||||
'nationality' => $request->nationality ?? 'Not Specified',
|
'nationality' => $request->nationality ?? 'Not Specified',
|
||||||
|
'gender' => $request->gender,
|
||||||
|
'live_in_out' => $request->live_in_out,
|
||||||
|
'preferred_location' => $request->preferred_location,
|
||||||
'age' => $request->age ?? 25,
|
'age' => $request->age ?? 25,
|
||||||
'salary' => $request->salary,
|
'salary' => $request->salary,
|
||||||
'availability'=> 'Immediate',
|
'availability' => 'Immediate',
|
||||||
'experience' => $request->experience ?? 'Not Specified',
|
'experience' => $request->experience ?? 'Not Specified',
|
||||||
'religion' => 'Not Specified',
|
'religion' => 'Not Specified',
|
||||||
'bio' => 'Hardworking and reliable General Helper available for immediate hire.',
|
'bio' => 'Hardworking and reliable General Helper available for immediate hire.',
|
||||||
@ -375,7 +386,6 @@ public function register(Request $request)
|
|||||||
'in_country' => $inCountry,
|
'in_country' => $inCountry,
|
||||||
'visa_status' => $inCountry ? $request->visa_status : null,
|
'visa_status' => $inCountry ? $request->visa_status : null,
|
||||||
'preferred_job_type' => $request->preferred_job_type,
|
'preferred_job_type' => $request->preferred_job_type,
|
||||||
'live_in_out' => $request->live_in_out,
|
|
||||||
'country' => $request->country,
|
'country' => $request->country,
|
||||||
'city' => $request->city,
|
'city' => $request->city,
|
||||||
'area' => $request->area,
|
'area' => $request->area,
|
||||||
|
|||||||
@ -64,7 +64,9 @@ public function updateProfile(Request $request)
|
|||||||
'in_country' => 'nullable',
|
'in_country' => 'nullable',
|
||||||
'visa_status' => 'nullable|string|max:100',
|
'visa_status' => 'nullable|string|max:100',
|
||||||
'preferred_job_type' => 'nullable|string|max:100',
|
'preferred_job_type' => 'nullable|string|max:100',
|
||||||
'live_in_out' => 'nullable|string|max:100',
|
'gender' => 'nullable|string|in:male,female,other',
|
||||||
|
'live_in_out' => 'nullable|string|in:live_in,live_out',
|
||||||
|
'preferred_location' => 'nullable|string|max:255',
|
||||||
'country' => 'nullable|string|max:100',
|
'country' => 'nullable|string|max:100',
|
||||||
'city' => 'nullable|string|max:100',
|
'city' => 'nullable|string|max:100',
|
||||||
'area' => 'nullable|string|max:100',
|
'area' => 'nullable|string|max:100',
|
||||||
@ -94,7 +96,9 @@ public function updateProfile(Request $request)
|
|||||||
'category_id',
|
'category_id',
|
||||||
'visa_status',
|
'visa_status',
|
||||||
'preferred_job_type',
|
'preferred_job_type',
|
||||||
|
'gender',
|
||||||
'live_in_out',
|
'live_in_out',
|
||||||
|
'preferred_location',
|
||||||
'country',
|
'country',
|
||||||
'city',
|
'city',
|
||||||
'area'
|
'area'
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class Worker extends Model
|
|||||||
'country',
|
'country',
|
||||||
'city',
|
'city',
|
||||||
'area',
|
'area',
|
||||||
|
'preferred_location',
|
||||||
'live_in_out',
|
'live_in_out',
|
||||||
'age',
|
'age',
|
||||||
'gender',
|
'gender',
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?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('workers', function (Blueprint $table) {
|
||||||
|
if (!Schema::hasColumn('workers', 'preferred_location')) {
|
||||||
|
$table->string('preferred_location')->nullable()->after('area');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('workers', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('preferred_location');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -421,14 +421,16 @@ public function test_register_with_new_api_fields()
|
|||||||
'salary' => 2200.50,
|
'salary' => 2200.50,
|
||||||
'password' => 'secret123',
|
'password' => 'secret123',
|
||||||
'passport_file' => $fakePassport,
|
'passport_file' => $fakePassport,
|
||||||
'language' => 'HI, SW',
|
'language' => 'HI',
|
||||||
'nationality' => 'Kenya',
|
'nationality' => 'Kenya',
|
||||||
'age' => 30,
|
'age' => 30,
|
||||||
'experience' => '5 Years',
|
'experience' => '5 Years',
|
||||||
'in_country' => 'true',
|
'in_country' => 'true',
|
||||||
'visa_status' => 'Tourist Visa',
|
'visa_status' => 'Tourist Visa',
|
||||||
'preferred_job_type' => 'full-time',
|
'preferred_job_type' => 'full-time',
|
||||||
'live_in_out' => 'Live-out (External housing)',
|
'gender' => 'male',
|
||||||
|
'live_in_out' => 'live_out',
|
||||||
|
'preferred_location' => 'Dubai Marina',
|
||||||
'country' => 'UAE',
|
'country' => 'UAE',
|
||||||
'city' => 'Dubai',
|
'city' => 'Dubai',
|
||||||
'area' => 'Marina',
|
'area' => 'Marina',
|
||||||
@ -442,7 +444,9 @@ public function test_register_with_new_api_fields()
|
|||||||
'in_country' => true,
|
'in_country' => true,
|
||||||
'visa_status' => 'Tourist Visa',
|
'visa_status' => 'Tourist Visa',
|
||||||
'preferred_job_type' => 'full-time',
|
'preferred_job_type' => 'full-time',
|
||||||
'live_in_out' => 'Live-out (External housing)',
|
'gender' => 'male',
|
||||||
|
'live_in_out' => 'live_out',
|
||||||
|
'preferred_location' => 'Dubai Marina',
|
||||||
'country' => 'UAE',
|
'country' => 'UAE',
|
||||||
'city' => 'Dubai',
|
'city' => 'Dubai',
|
||||||
'area' => 'Marina',
|
'area' => 'Marina',
|
||||||
@ -479,7 +483,9 @@ public function test_update_profile_with_new_api_fields()
|
|||||||
'in_country' => false,
|
'in_country' => false,
|
||||||
'visa_status' => null,
|
'visa_status' => null,
|
||||||
'preferred_job_type' => 'part-time',
|
'preferred_job_type' => 'part-time',
|
||||||
'live_in_out' => 'Live-in (Stay with family)',
|
'gender' => 'female',
|
||||||
|
'live_in_out' => 'live_in',
|
||||||
|
'preferred_location' => 'Abu Dhabi',
|
||||||
'country' => 'UAE',
|
'country' => 'UAE',
|
||||||
'city' => 'Abu Dhabi',
|
'city' => 'Abu Dhabi',
|
||||||
'area' => 'Khalifa City',
|
'area' => 'Khalifa City',
|
||||||
@ -492,7 +498,9 @@ public function test_update_profile_with_new_api_fields()
|
|||||||
'in_country' => false,
|
'in_country' => false,
|
||||||
'visa_status' => null,
|
'visa_status' => null,
|
||||||
'preferred_job_type' => 'part-time',
|
'preferred_job_type' => 'part-time',
|
||||||
'live_in_out' => 'Live-in (Stay with family)',
|
'gender' => 'female',
|
||||||
|
'live_in_out' => 'live_in',
|
||||||
|
'preferred_location' => 'Abu Dhabi',
|
||||||
'country' => 'UAE',
|
'country' => 'UAE',
|
||||||
'city' => 'Abu Dhabi',
|
'city' => 'Abu Dhabi',
|
||||||
'area' => 'Khalifa City',
|
'area' => 'Khalifa City',
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default defineConfig({
|
|||||||
port: 5173,
|
port: 5173,
|
||||||
cors: true,
|
cors: true,
|
||||||
hmr: {
|
hmr: {
|
||||||
host: '192.168.0.194',
|
host: '192.168.29.131',
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
ignored: ['**/storage/framework/views/**'],
|
ignored: ['**/storage/framework/views/**'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user