Пример #1
0
 public function form(RegistrationPeriod $PeriodModel, Country $CountryModel, Specialty $Specialty, Registration $Registration, RegistrationType $type)
 {
     $registration = $Registration->with('degrees', 'contactcountry', 'contactcity', 'contactcity.states', 'birthcountry', 'nationalitycity', 'jobcountry', 'jobcountry.cities')->find(registrar()->id);
     $specialties = $Specialty->pluck('name', 'id')->toArray();
     $registration_types = $type->pluck('title', 'id')->toArray();
     $countries = $CountryModel->all();
     $countries_list = ["" => ""] + $countries->pluck('name', 'id')->toArray();
     $codes_list = ["" => ""] + $countries->pluck('calling_code', 'id')->toArray();
     $stay_types = config('registration.stay_types');
     $social_status = ["" => ""] + config('registration.social_status');
     $social_job_status = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $years_list = ["" => ""] + array_combine(range(date("Y") - 80, date('Y')), range(date("Y") - 80, date('Y')));
     $computer_skills = ["" => "", 'very_low' => 'ضعيف جدا', 'low' => 'ضعيف', 'good' => 'جيد', 'great' => 'جيد جدا', 'excellent' => 'ممتاز'];
     $social_job_types = ["" => "", 'government' => 'عام', 'private' => 'خاص', 'free' => 'حر'];
     $social_jobs = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $references = ["" => "", 'iiswebsite' => 'موقع كلية العلوم الشرعية', 'iisewebsite' => 'موقع مركز التعليم عن بعد', 'iisfriend' => 'صديق يدرس بالكلية', 'iisefriend' => 'صديق يدرس بمركز التعليم عن بعد', 'other' => 'أخرى'];
     return view('registration::registrar.form', compact('registration', 'specialties', 'registration_types', 'period', 'years_list', 'countries', 'stay_types', 'countries_list', 'references', 'computer_skills', 'codes_list', 'social_job_types', 'social_status', 'social_jobs'));
 }
Пример #2
0
 public function apply(RegistrationPeriod $PeriodModel, Country $CountryModel, Specialty $Specialty, RegistrationType $type)
 {
     $period = $PeriodModel->orderBy('id', 'desc')->with('year')->current()->first();
     if (!$period) {
         return redirect()->route('welcome');
     }
     $specialties = $Specialty->lists('name', 'id');
     $registration_types = $type->lists('title', 'id')->toArray();
     $countries = $CountryModel->all();
     $countries_list = ["" => ""] + $countries->lists('name', 'id')->toArray();
     $codes_list = ["" => ""] + $countries->lists('calling_code', 'id')->toArray();
     $stay_types = config('registration.stay_types');
     $social_status = ["" => ""] + config('registration.social_status');
     $social_job_status = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $years_list = ["" => ""] + array_combine(range(date("Y") - 80, date('Y')), range(date("Y") - 80, date('Y')));
     $computer_skills = ["" => "", 'excellent' => 'ممتاز', 'great' => 'جيد جدا', 'very_low' => 'ضعيف جدا', 'low' => 'ضعيف', 'good' => 'جيد'];
     $social_job_types = ["" => "", 'government' => 'عام', 'private' => 'خاص', 'free' => 'حر'];
     $social_jobs = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $references = ["" => "", 'iiswebsite' => 'موقع كلية العلوم الشرعية', 'iisewebsite' => 'موقع مركز التعليم عن بعد', 'iisfriend' => 'صديق يدرس بالكلية', 'iisefriend' => 'صديق يدرس بمركز التعليم عن بعد', 'other' => 'أخرى'];
     $period = $PeriodModel->orderBy('id', 'desc')->with('year')->where(function ($sql) {
         $sql->where('start_at', '<=', date('Y-m-d'))->where('finish_at', '>=', date('Y-m-d'));
     })->first();
     return view('registration::registrar.apply', compact('years_list', 'specialties', 'registration_types', 'period', 'countries', 'stay_types', 'countries_list', 'references', 'computer_skills', 'codes_list', 'social_job_types', 'social_status', 'social_jobs'));
 }
Пример #3
0
 public function edit(Registration $Registration, $id)
 {
     $registration = $Registration->with('degrees', 'contactcountry', 'contactcity', 'step.notes', 'step', 'step.children', 'step.children.notes', 'birthcountry', 'student', 'nationalitycity', 'jobcountry', 'jobcountry.cities')->findOrFail($id);
     if ($registration->step and $registration->step->children) {
         $registration->step->children = $registration->step->children->reject(function ($r) use($registration) {
             return $registration->registration_type_id != 3 && $r->equation_input == 1;
         });
     }
     $specialties = Specialty::pluck('name', 'id')->toArray();
     $histories = RegistrationHistory::with('notes')->where('registration_id', $registration->id)->get();
     $registration_types = RegistrationType::pluck('title', 'id')->toArray();
     $countries = Country::all();
     $countries_list = ["" => ""] + $countries->pluck('name', 'id')->toArray();
     $codes_list = ["" => ""] + $countries->pluck('calling_code', 'id')->toArray();
     $stay_types = ["" => ""] + config('registration.stay_types');
     $social_status = ["" => ""] + config('registration.social_status');
     $social_job_status = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $years_list = ["" => ""] + array_combine(range(date("Y") - 80, date('Y')), range(date("Y") - 80, date('Y')));
     $computer_skills = ["" => "", 'excellent' => 'ممتاز', 'great' => 'جيد جدا', 'very_low' => 'ضعيف جدا', 'low' => 'ضعيف', 'good' => 'جيد'];
     $social_job_types = ["" => "", 'government' => 'عام', 'private' => 'خاص', 'freelance' => 'حر'];
     $social_jobs = [NULL => ""] + config('registration.social_jobs');
     $social_job_ministry = [NULL => ""] + config('registration.social_job_ministry');
     $references = ["" => "", 'iiswebsite' => 'موقع كلية العلوم الشرعية', 'iisewebsite' => 'موقع مركز التعليم عن بعد', 'iisfriend' => 'صديق يدرس بالكلية', 'iisefriend' => 'صديق يدرس بمركز التعليم عن بعد', 'other' => 'أخرى'];
     return view('registration::registrations.edit', compact('registration', 'specialties', 'registration_types', 'period', 'years_list', 'countries', 'stay_types', 'countries_list', 'references', 'computer_skills', 'codes_list', 'social_job_types', 'social_status', 'social_jobs', 'next_steps', 'histories', 'social_job_ministry'));
 }