diff --git a/canapGEST/API/app/Helpers/AccessLevelHelper.php b/canapGEST/API/app/Helpers/AccessLevelHelper.php index a8d96cb9d3da3fdaf2382129f978e58c40a249ba..72d30ced68d00831fc3148db2307f75535eb1a99 100644 --- a/canapGEST/API/app/Helpers/AccessLevelHelper.php +++ b/canapGEST/API/app/Helpers/AccessLevelHelper.php @@ -32,15 +32,14 @@ class AccessLevelHelper public static function hasAccessToJob($job, $permissions) { - // Deprecated return in_array($job, $permissions); } public static function isJobValid($job) { - // Deprecated - foreach (self::$default_access_groups as $key => $access) { - if ($access[0] == $job && $job != 'full') { + $default_access_groups = self::getDefaultAccessGroups(); + foreach ($default_access_groups as $access_job => $access) { + if ($access_job == $job) { return true; } } diff --git a/canapGEST/API/app/Http/Controllers/ApplicantsController.php b/canapGEST/API/app/Http/Controllers/ApplicantsController.php index 341c52cba1366bdbdac3d307b9df6e64035896b6..1d2bdaa9fef29d9f93393d0b3e1113d7d2c21472 100644 --- a/canapGEST/API/app/Http/Controllers/ApplicantsController.php +++ b/canapGEST/API/app/Http/Controllers/ApplicantsController.php @@ -6,7 +6,7 @@ use Laravel\Lumen\Routing\Controller; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use App\Helpers\AccessLevelHelper; -use \Illuminate\Support\Facades\Lang; +use Illuminate\Support\Facades\Lang; use Illuminate\Support\Facades\File; class ApplicantsController extends Controller @@ -26,22 +26,33 @@ class ApplicantsController extends Controller public function getAll() { + // Récupère toutes les candidatures autorisée $applicants = []; foreach ($this->user_permissions as $job) { - $job_applicants = DB::table('applicant')->where('applicant_formation', $job)->get(); + $job_applicants = DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('job_short_value', $job) + ->get(); + if (count($job_applicants)) { array_push($applicants, $job_applicants); } } - return $applicants[0]; + return $applicants; } public function getJobApplicants($job) { + // Récupère toutes les candidatures d'un métier if (AccessLevelHelper::isJobValid($job)) { $has_access = AccessLevelHelper::hasAccessToJob($job, $this->user_permissions); if ($has_access) { - return DB::table('applicant')->where('applicant_formation', $job)->get(); + return DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('job_short_value', $job) + ->get(); } else { return abort(403, lang::get('http.unauthorized')); } @@ -52,7 +63,8 @@ class ApplicantsController extends Controller public function getOneById($id) { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); + $applicant_job = $this->getApplicantJob($id); + $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { $data = $this->getOne($id); @@ -62,26 +74,9 @@ class ApplicantsController extends Controller } } - public function updateStatus($id) - { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); - $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); - $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); - if ($has_access && $has_permitted_role) { - $this->validate($this->request, [ - 'status' => 'required' - ], [lang::get('validation.required')]); - - $new_status = $this->request->input('status'); - return DB::table('applicant')->where('applicant_id', $id)->update(['applicant_application_status' => $new_status]); - } else { - return abort(403, lang::get('http.unauthorized')); - } - } - public function delete($id) { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); + $applicant_job = $this->getApplicantJob($id); $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); @@ -94,7 +89,7 @@ class ApplicantsController extends Controller public function export($id) { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); + $applicant_job = $this->getApplicantJob($id); $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { $tmp_file_path = sys_get_temp_dir() . '\\' .$id .'-export.json'; @@ -145,4 +140,12 @@ class ApplicantsController extends Controller "files" => $files ]; } + + private function getApplicantJob ($id) { + return DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('applicant_id', $id) + ->pluck('job_short_value')->first(); + } } diff --git a/canapGEST/API/app/Http/Controllers/AuthController.php b/canapGEST/API/app/Http/Controllers/AuthController.php index 44076db985ad16dca81d80245210c314cb7fd8f9..18cbcc5ae1abae1071ff822d4f62b3d4fcf3a730 100644 --- a/canapGEST/API/app/Http/Controllers/AuthController.php +++ b/canapGEST/API/app/Http/Controllers/AuthController.php @@ -47,8 +47,8 @@ class AuthController extends Controller $this->oClient->SetWantedAttributes(array('uniqueid', 'name', 'firstname', 'unit', 'unitid', 'where', 'group')); $this->oClient->SetWishedAttributes(array('email', 'title')); // $this->oClient->SetApplicationURL('https://canap-gest.epfl.ch:8443'); - $this->oClient->SetApplicationURL('localhost:8000/api/auth/login'); - // $this->oClient->SetApplicationURL('http://canap-gest-dev.local:8080'); + // $this->oClient->SetApplicationURL('localhost:8000/api/auth/login'); + $this->oClient->SetApplicationURL('http://canap-gest-dev.local:8080'); $this->oClient->SetCustomFilter('org=EPFL&group=canap-gest-users-dev'); $this->oClient->Authenticate(); diff --git a/canapGEST/API/app/Http/Controllers/CommentsController.php b/canapGEST/API/app/Http/Controllers/CommentsController.php index 0750f62f0991a088c8dffcbedfe043d5ef27b0d0..8e93099306908ef48d0aeaee4dbfbcc212c1aadf 100644 --- a/canapGEST/API/app/Http/Controllers/CommentsController.php +++ b/canapGEST/API/app/Http/Controllers/CommentsController.php @@ -6,7 +6,7 @@ use Laravel\Lumen\Routing\Controller; use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; use App\Helpers\AccessLevelHelper; -use \Illuminate\Support\Facades\Lang; +use Illuminate\Support\Facades\Lang; class CommentsController extends Controller { @@ -23,7 +23,11 @@ class CommentsController extends Controller public function getApplicantComments($id) { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); + $applicant_job = DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('applicant_id', $id) + ->pluck('job_short_value')->first(); $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { @@ -48,7 +52,12 @@ class CommentsController extends Controller $new_date = date("Y-m-d H:i:s"); $new_applicant_id = $this->request->input('applicant_id'); - $applicant_job = DB::table('applicant')->where('applicant_id', $new_applicant_id)->pluck('applicant_formation')->first(); + $applicant_job = DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('applicant_id', $new_applicant_id) + ->pluck('job_short_value')->first(); + $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { diff --git a/canapGEST/API/app/Http/Controllers/FilesController.php b/canapGEST/API/app/Http/Controllers/FilesController.php index dc21c875ff9aa6427ef63d5b82482e8c660ed860..08e113e773083ec6fe11281735199591bad49fbd 100644 --- a/canapGEST/API/app/Http/Controllers/FilesController.php +++ b/canapGEST/API/app/Http/Controllers/FilesController.php @@ -4,8 +4,10 @@ namespace App\Http\Controllers; use Laravel\Lumen\Routing\Controller; use Illuminate\Http\Request; +use Illuminate\Http\Reponse; use Illuminate\Support\Facades\DB; use App\Helpers\AccessLevelHelper; +use Illuminate\Support\Facades\Lang; class FilesController extends Controller { @@ -20,14 +22,18 @@ class FilesController extends Controller public function getFile($id) { + // Deprecated // Check access to file $applicant_job = DB::table('applicant') ->join('file', 'file.fk_applicant_id', '=', 'applicant.applicant_id') - ->where('file_id', $id)->pluck('applicant_formation')->first(); + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('file_id', $id)->pluck('job_short_value')->first(); $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { $file = DB::table('file')->where('file_id', $id)->first(); + // TODO: Fix this return response()->download($file->file_path); } else { return abort(403, lang::get('http.unauthorized')); diff --git a/canapGEST/API/app/Http/Controllers/MarkersController.php b/canapGEST/API/app/Http/Controllers/MarkersController.php index 86fdb0a821f7058cc47a6b29f4c86262f2b5b998..78b49860a938bd233c660905ea53ab33ebbbc711 100644 --- a/canapGEST/API/app/Http/Controllers/MarkersController.php +++ b/canapGEST/API/app/Http/Controllers/MarkersController.php @@ -6,8 +6,7 @@ use Laravel\Lumen\Routing\Controller; use Illuminate\Support\Facades\DB; use Illuminate\Http\Request; use App\Helpers\AccessLevelHelper; -use \Illuminate\Support\Facades\Lang; - +use Illuminate\Support\Facades\Lang; class MarkersController extends Controller { @@ -22,16 +21,22 @@ class MarkersController extends Controller $this->user_permissions = $this->request->get('user_permissions'); } - public function getApplicantMarkers($id) - { - $applicant_job = DB::table('applicant')->where('applicant_id', $id)->pluck('applicant_formation')->first(); - $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); - if ($has_access) { - return DB::table('marker')->where('fk_applicant_id', $id)->get(); - } else { - return abort(403, lang::get('http.unauthorized')); - } - } + // public function getApplicantMarkers($id) + // { + // // Not usefull anymore + // $applicant_job = DB::table('applicant') + // ->join('position', 'applicant.fk_position', '=', 'position.position_id') + // ->join('job', 'position.fk_job', '=', 'job.job_id') + // ->where('applicant_id', $id) + // ->pluck('job_short_value')->first(); + + // $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); + // if ($has_access) { + // return DB::table('marker')->where('fk_applicant_id', $id)->get(); + // } else { + // return abort(403, lang::get('http.unauthorized')); + // } + // } public function getUserMarkerOnApplicant($id) { @@ -41,20 +46,24 @@ class MarkersController extends Controller public function create() { $this->validate($this->request, [ - 'type' => 'required', + 'value' => 'required', 'applicant_id' => 'required', ], [lang::get('validation.required')]); - $new_type = $this->request->input('type'); + $new_value = $this->request->input('value'); $new_applicant_id = $this->request->input('applicant_id'); - $applicant_job = DB::table('applicant')->where('applicant_id', $new_applicant_id)->pluck('applicant_formation')->first(); + $applicant_job = DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('applicant_id', $new_applicant_id) + ->pluck('job_short_value')->first(); $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); if ($has_access) { $inserted_id = DB::table('marker')->insertGetId([ "marker_owner_sciper" => $this->user_sciper, - "marker_type" => $new_type, + "marker_value" => $new_value, "fk_applicant_id" => $new_applicant_id ]); return ["message" => lang::get('http.success.created.marker'), "id" => $inserted_id]; @@ -66,13 +75,13 @@ class MarkersController extends Controller public function update($id) { $this->validate($this->request, [ - 'type' => 'required' + 'value' => 'required' ], [lang::get('validation.required')]); - $new_type = $this->request->input('type'); + $new_value = $this->request->input('value'); $wanted_marker_exists = DB::table('marker')->where('marker_id', $id)->where('marker_owner_sciper', $this->user_sciper)->exists(); if ($wanted_marker_exists) { - DB::table('marker')->where('marker_id', $id)->update(['marker_type' => $new_type]); + DB::table('marker')->where('marker_id', $id)->update(['marker_value' => $new_value]); return ["message" => lang::get('http.success.updated.marker'), "id" => $id]; } else { return abort(403, lang::get('http.unauthorized')); @@ -89,5 +98,4 @@ class MarkersController extends Controller return abort(403, lang::get('http.unauthorized')); } } - } diff --git a/canapGEST/API/app/Http/Controllers/StatsController.php b/canapGEST/API/app/Http/Controllers/StatsController.php index 7a54f87f2a5eb1b8cd3161e56150ab215e2a4a67..c0ef05e042745001a1de5f15be5229b36bb8d443 100644 --- a/canapGEST/API/app/Http/Controllers/StatsController.php +++ b/canapGEST/API/app/Http/Controllers/StatsController.php @@ -18,6 +18,11 @@ class StatsController extends Controller public function getTotal() { - return DB::table('applicant')->select(DB::raw('applicant_formation as formation, count(*) as total'))->groupBy('formation')->get(); + return DB::table('applicant') + ->select(DB::raw('job_short_value, job_full_value, count(*) as total')) + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->groupBy('job_short_value') + ->get(); } } \ No newline at end of file diff --git a/canapGEST/API/app/Http/Controllers/StatusController.php b/canapGEST/API/app/Http/Controllers/StatusController.php new file mode 100644 index 0000000000000000000000000000000000000000..14aa82c050960459d3fef4e8e19c098fa47dfd7b --- /dev/null +++ b/canapGEST/API/app/Http/Controllers/StatusController.php @@ -0,0 +1,53 @@ +<?php + +namespace App\Http\Controllers; + +use Laravel\Lumen\Routing\Controller; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; +use App\Helpers\AccessLevelHelper; +use Illuminate\Support\Facades\Lang; + +class StatusController extends Controller +{ + public function __construct(Request $request) + { + $this->request = $request; + $this->user_sciper = $this->request->get('user_sciper'); + $this->user_permissions = $this->request->get('user_permissions'); + $this->user_role = $this->request->get('user_role'); + } + + public function getAvailableStatus() + { + return DB::table('status')->select()->get(); + } + + public function updateApplicantStatus ($id) + { + $applicant_job = DB::table('applicant') + ->join('position', 'applicant.fk_position', '=', 'position.position_id') + ->join('job', 'position.fk_job', '=', 'job.job_id') + ->where('applicant_id', $id) + ->pluck('job_short_value')->first(); + + $has_access = AccessLevelHelper::hasAccessToJob($applicant_job, $this->user_permissions); + $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); + if ($has_access && $has_permitted_role) { + $this->validate($this->request, [ + 'status' => 'required' + ], [lang::get('validation.required')]); + + $new_status = $this->request->input('status'); + + // Valide le status + if (count(DB::table('status')->where('status_value', $new_status)->get())) { + return DB::table('applicant')->where('applicant_id', $id)->update(['fk_status' => $new_status]); + } else { + return abort(404, lang::get('http.notfound')); + } + } else { + return abort(403, lang::get('http.unauthorized')); + } + } +} \ No newline at end of file diff --git a/canapGEST/API/app/Http/Controllers/UsersController.php b/canapGEST/API/app/Http/Controllers/UsersController.php index 360858b2e989ca176adecf4431e93d1026e4403f..252a8b4c0c7fdea37be3c196ebea1ce437275d38 100644 --- a/canapGEST/API/app/Http/Controllers/UsersController.php +++ b/canapGEST/API/app/Http/Controllers/UsersController.php @@ -33,6 +33,7 @@ class UsersController extends Controller public function getPermittedJobs() { + // TODO: return full job values too return $this->user_permissions; } diff --git a/canapGEST/API/routes/web.php b/canapGEST/API/routes/web.php index 97810f212f174fa393a92ffe203ef71f2a947c99..80429999d4137d9ef752f078b2e954110ab3932f 100644 --- a/canapGEST/API/routes/web.php +++ b/canapGEST/API/routes/web.php @@ -15,7 +15,6 @@ $router->group(['middleware' => 'jwt.auth'], function () use ($router) { $router->get('api/applicants/job/{job}', 'ApplicantsController@getJobApplicants'); $router->get('api/applicant/{id:[0-9]+}', 'ApplicantsController@getOneById'); $router->get('api/applicant/{id:[0-9]+}/export', 'ApplicantsController@export'); - $router->patch('api/applicant/{id:[0-9]+}', 'ApplicantsController@updateStatus'); $router->delete('api/applicant/{id:[0-9]+}', 'ApplicantsController@delete'); // Comments @@ -25,12 +24,18 @@ $router->group(['middleware' => 'jwt.auth'], function () use ($router) { $router->delete('api/comment/{id:[0-9]+}', 'CommentsController@delete'); // Markers - $router->get('api/applicant/{id:[0-9]+}/markers', 'MarkersController@getApplicantMarkers'); + // $router->get('api/applicant/{id:[0-9]+}/markers', 'MarkersController@getApplicantMarkers'); $router->get('api/applicant/{id:[0-9]+}/usermarkers', 'MarkersController@getUserMarkerOnApplicant'); $router->put('api/marker', 'MarkersController@create'); $router->patch('api/marker/{id:[0-9]+}', 'MarkersController@update'); $router->delete('api/marker/{id:[0-9]+}', 'MarkersController@delete'); + // Status + $router->get('api/status', 'StatusController@getAvailableStatus'); + $router->patch('api/status/applicant/{id:[0-9]+}', 'StatusController@updateApplicantStatus'); + + // TODO: Positions / Jobs + // Files $router->get('api/file/{id:[0-9]+}', 'FilesController@getFile'); diff --git a/canapGEST/DB/tests/table_applicants.sql b/canapGEST/DB/Valeurs de tests/table_applicants.sql similarity index 100% rename from canapGEST/DB/tests/table_applicants.sql rename to canapGEST/DB/Valeurs de tests/table_applicants.sql diff --git a/canapGEST/DB/Valeurs de tests/table_file.sql b/canapGEST/DB/Valeurs de tests/table_file.sql new file mode 100644 index 0000000000000000000000000000000000000000..4c31535167eca11faef58a534df5ea70b74c5d3c --- /dev/null +++ b/canapGEST/DB/Valeurs de tests/table_file.sql @@ -0,0 +1,11 @@ +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (280, 'photo-passeport.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\1\\photo-passeport.pdf', 1); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (289, 'photo-passeport.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\photo-passeport.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (283, 'lettre-motivation.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\1\\lettre-motivation.pdf', 1); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (292, 'lettre-motivation.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\lettre-motivation.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (282, 'curriculum-vitae.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\1\\curriculum-vitae.pdf', 1); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (291, 'curriculum-vitae.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\curriculum-vitae.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (281, 'carte-identite.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\1\\carte-identite.pdf', 1); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (290, 'carte-identite.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\carte-identite.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (295, 'annexe3.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\annexe3.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (294, 'annexe2.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\annexe2.pdf', 2); +INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (293, 'annexe1.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\2\\annexe1.pdf', 2); diff --git a/canapGEST/DB/tests/table_job.sql b/canapGEST/DB/Valeurs de tests/table_job.sql similarity index 100% rename from canapGEST/DB/tests/table_job.sql rename to canapGEST/DB/Valeurs de tests/table_job.sql diff --git a/canapGEST/DB/tests/table_location.sql b/canapGEST/DB/Valeurs de tests/table_location.sql similarity index 100% rename from canapGEST/DB/tests/table_location.sql rename to canapGEST/DB/Valeurs de tests/table_location.sql diff --git a/canapGEST/DB/tests/table_position.sql b/canapGEST/DB/Valeurs de tests/table_position.sql similarity index 100% rename from canapGEST/DB/tests/table_position.sql rename to canapGEST/DB/Valeurs de tests/table_position.sql diff --git a/canapGEST/DB/tests/table_status.sql b/canapGEST/DB/Valeurs de tests/table_status.sql similarity index 100% rename from canapGEST/DB/tests/table_status.sql rename to canapGEST/DB/Valeurs de tests/table_status.sql diff --git a/canapGEST/DB/tests/test3.sql b/canapGEST/DB/Valeurs de tests/test3.sql similarity index 100% rename from canapGEST/DB/tests/test3.sql rename to canapGEST/DB/Valeurs de tests/test3.sql diff --git a/canapGEST/DB/tests/test4.sql b/canapGEST/DB/Valeurs de tests/test4.sql similarity index 100% rename from canapGEST/DB/tests/test4.sql rename to canapGEST/DB/Valeurs de tests/test4.sql diff --git a/canapGEST/DB/tests/test5.sql b/canapGEST/DB/Valeurs de tests/test5.sql similarity index 100% rename from canapGEST/DB/tests/test5.sql rename to canapGEST/DB/Valeurs de tests/test5.sql diff --git a/canapGEST/DB/tests/test6.sql b/canapGEST/DB/Valeurs de tests/test6.sql similarity index 100% rename from canapGEST/DB/tests/test6.sql rename to canapGEST/DB/Valeurs de tests/test6.sql diff --git a/canapGEST/DB/script_canap_prod.sql b/canapGEST/DB/script_canap_prod.sql deleted file mode 100644 index 1373c4371e774b40f421aa8d98d960bac50bdd3b..0000000000000000000000000000000000000000 --- a/canapGEST/DB/script_canap_prod.sql +++ /dev/null @@ -1,221 +0,0 @@ --- MySQL Script generated by MySQL Workbench --- Tue Feb 12 10:17:14 2019 --- Model: New Model Version: 1.0 --- MySQL Workbench Forward Engineering - --- SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; --- SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; --- SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; - --- -- ----------------------------------------------------- --- -- Schema canap_db --- -- ----------------------------------------------------- -DROP SCHEMA IF EXISTS `canap_db` ; - --- -- ----------------------------------------------------- --- -- Schema canap_db --- -- ----------------------------------------------------- -CREATE SCHEMA IF NOT EXISTS `canap_db` DEFAULT CHARACTER SET utf8 ; -USE `canap_db` ; - --- ----------------------------------------------------- --- Table `canap_db`.`responsible` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`responsible` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`responsible` ( - `responsible_id` INT NOT NULL AUTO_INCREMENT, - `responsible_gender` VARCHAR(10) NULL, - `responsible_name` VARCHAR(200) NULL, - `responsible_fsname` VARCHAR(200) NULL, - `responsible_street` VARCHAR(100) NULL, - `responsible_npa` VARCHAR(100) NULL, - `responsible_phone` VARCHAR(20) NULL, - PRIMARY KEY (`responsible_id`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`applicant` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`applicant` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`applicant` ( - `applicant_id` INT NOT NULL AUTO_INCREMENT, - `applicant_guest_sciper` VARCHAR(100) NOT NULL, - `applicant_formation` VARCHAR(100) NOT NULL, - `applicant_it_section` VARCHAR(100) NULL, - `applicant_formation_location` VARCHAR(100) NOT NULL, - `applicant_maturity` TINYINT NOT NULL, - `applicant_gender` VARCHAR(10) NOT NULL, - `applicant_name` VARCHAR(200) NOT NULL, - `applicant_fsname` VARCHAR(200) NOT NULL, - `applicant_address_street` VARCHAR(200) NOT NULL, - `applicant_address_npa` VARCHAR(200) NOT NULL, - `applicant_home_phone` VARCHAR(200) NOT NULL, - `applicant_personal_phone` VARCHAR(200) NOT NULL, - `applicant_mail` VARCHAR(200) NOT NULL, - `applicant_birthdate` VARCHAR(45) NOT NULL, - `applicant_origin` VARCHAR(100) NOT NULL, - `applicant_nationality` VARCHAR(100) NOT NULL, - `applicant_foreign_authorization` VARCHAR(10) NULL, - `applicant_avs` VARCHAR(45) NOT NULL, - `applicant_main_language` VARCHAR(100) NOT NULL, - `applicant_speaks_french` TINYINT NOT NULL, - `applicant_speaks_german` TINYINT NOT NULL, - `applicant_speaks_english` TINYINT NOT NULL, - `applicant_speaks_other` TINYINT NOT NULL, - `applicant_has_majority` TINYINT NOT NULL, - `applicant_scolarity_end` VARCHAR(45) NOT NULL, - `applicant_already_applicant` TINYINT NOT NULL, - `applicant_already_applicant_year` VARCHAR(45) NULL, - `applicant_application_date` DATETIME NOT NULL, - `applicant_application_updated_date` DATETIME NULL, - `applicant_application_status` VARCHAR(45) NOT NULL DEFAULT 'new', - `fk_applicant_main_responsible` INT NULL, - `fk_applicant_sec_responsible` INT NULL, - PRIMARY KEY (`applicant_id`), - INDEX `fk_applicant_responsible_idx` (`fk_applicant_main_responsible` ASC), - INDEX `fk_applicant_responsible1_idx` (`fk_applicant_sec_responsible` ASC), - CONSTRAINT `fk_applicant_responsible` - FOREIGN KEY (`fk_applicant_main_responsible`) - REFERENCES `canap_db`.`responsible` (`responsible_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_applicant_responsible1` - FOREIGN KEY (`fk_applicant_sec_responsible`) - REFERENCES `canap_db`.`responsible` (`responsible_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`scolarity` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`scolarity` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`scolarity` ( - `scolarity_id` INT NOT NULL AUTO_INCREMENT, - `scolarity_school` VARCHAR(200) NULL, - `scolarity_location` VARCHAR(200) NULL, - `scolarity_level` VARCHAR(100) NULL, - `scolarity_years` VARCHAR(100) NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`scolarity_id`), - INDEX `fk_scolarity_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_scolarity_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`professional_activity` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`professional_activity` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`professional_activity` ( - `professional_activity_id` INT NOT NULL AUTO_INCREMENT, - `professional_activity_company` VARCHAR(100) NULL, - `professional_activity_location` VARCHAR(200) NULL, - `professional_activity_activity` VARCHAR(100) NULL, - `professional_activity_years` VARCHAR(50) NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`professional_activity_id`), - INDEX `fk_professional_activity_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_professional_activity_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`training` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`training` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`training` ( - `training_id` INT NOT NULL AUTO_INCREMENT, - `training_job` VARCHAR(100) NULL, - `training_company` VARCHAR(100) NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`training_id`), - INDEX `fk_training_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_training_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`file` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`file` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`file` ( - `file_id` INT NOT NULL AUTO_INCREMENT, - `file_name` VARCHAR(200) NOT NULL, - `file_path` VARCHAR(500) NOT NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`file_id`), - INDEX `fk_file_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_file_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`comment` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`comment` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`comment` ( - `comment_id` INT NOT NULL AUTO_INCREMENT, - `comment_owner_sciper` VARCHAR(45) NOT NULL, - `comment_content` VARCHAR(1000) NOT NULL, - `comment_is_private` TINYINT NOT NULL, - `comment_date` DATETIME NOT NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`comment_id`), - INDEX `fk_comment_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_comment_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `canap_db`.`marker` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `canap_db`.`marker` ; - -CREATE TABLE IF NOT EXISTS `canap_db`.`marker` ( - `marker_id` INT NOT NULL AUTO_INCREMENT, - `marker_owner_sciper` VARCHAR(45) NULL, - `marker_type` VARCHAR(45) NULL, - `fk_applicant_id` INT NOT NULL, - PRIMARY KEY (`marker_id`), - INDEX `fk_marker_applicant1_idx` (`fk_applicant_id` ASC), - CONSTRAINT `fk_marker_applicant1` - FOREIGN KEY (`fk_applicant_id`) - REFERENCES `canap_db`.`applicant` (`applicant_id`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- SET SQL_MODE=@OLD_SQL_MODE; --- SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; --- SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/canapGEST/DB/tests/test.sql b/canapGEST/DB/tests/test.sql deleted file mode 100644 index 7ab980735bcad5db62f6ac42cd334df23ce6a229..0000000000000000000000000000000000000000 --- a/canapGEST/DB/tests/test.sql +++ /dev/null @@ -1,9 +0,0 @@ -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (58, 'G29052', 'gardienAnimaux', '', 'Lausanne', 1, 'Homme', 'Crausaz Test', 'Nicolas Test', 'adsgsfd', 'dfhsdfhsdfh', '012125512545627', '012125512545620', 'n.crausaz99@gmail.com', '02/03/2006', 'sdfhsd', 'fhsdfh', '', 'sdfhs', 'sdfhsdfh', 0, 1, 1, 0, 1, '2015', 0, '', '2019-03-05 14:40:39', '2019-03-07 10:52:15', 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (60, 'G29052', 'logisticien', '', 'Lausanne', 0, 'Homme', 'Crausaz Test', 'Nicolas Test', 'Nicolas', 'Crausaz', '092836508921340', '2034580234085', 'n.crausaz99@gmail.com', '03/08/1999', 'Chavannes', 'Suisse', '', '90235972345239459234', 'Francais', 1, 0, 1, 0, 1, '2015', 1, '2015', '2019-03-06 15:03:37', '2019-03-06 16:31:11', 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (62, 'G29052', 'informaticien', '', 'Lausanne', 1, 'Homme', 'Crausaz Test', 'Nicolas Test', 'adsgsfd', 'dfhsdfhsdfh', '012125512545627', '012125512545620', 'n.crausaz99@gmail.com', '02/03/2006', 'sdfhsd', 'fhsdfh', '', 'sdfhs', 'sdfhsdfh', 0, 1, 1, 0, 1, '2015', 0, '', '2019-03-05 14:40:39', '2019-03-07 10:52:15', 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (67, '262544', 'polyMecanicien', '', 'Lausanne', 1, 'Homme', 'Crausaz', 'Nicolas Benjamin', 'asdghasd', 'hasdha', 'sdgasdgas', 'dgasdgasgd', 'nicolas.crausaz@epfl.ch', '01/03/1988', 'afgjfg', 'dgadsgas', '', 'sdgasdg', 'sdgasdga', 1, 0, 1, 0, 1, '2011', 0, '', '2019-03-13 10:19:04', NULL, 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (71, '262544', 'informaticien', 'entreprise', 'Lausanne', 1, 'Homme', 'Crausaz', 'Nicolas Benjamin', 'asdgasdg', 'asdhgasdg', 'asdgasdg', 'dgasdgasdg', 'nicolas.crausaz@epfl.ch', '06/03/2006', 'asdg', 'asdg', '', 'asdgasd', 'asdg', 0, 1, 0, 0, 1, '2014', 0, '', '2019-03-13 10:27:31', NULL, 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (72, '262544', 'informaticien', 'entreprise', 'Lausanne', 1, 'Homme', 'Crausaz', 'Nicolas Benjamin', 'asdgasdg', 'asdhgasdg', 'asdgasdg', 'dgasdgasdg', 'nicolas.crausaz@epfl.ch', '06/03/2006', 'asdg', 'asdg', '', 'asdgasd', 'asdg', 0, 1, 0, 0, 1, '2014', 0, '', '2019-03-13 10:32:31', NULL, 'new', NULL, NULL); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (63, '262544', 'informaticien', 'developpementApplications', 'Lausanne', 1, 'Homme', 'Crausaz', 'Nicolas Benjamin', 'Village 5', '1134 Vufflens', '654486168165', '846416616615', 'nicolas.crausaz@epfl.ch', '03/08/1999', 'Chavannes', 'Suisse', '', '345981230965601', 'Francais', 1, 0, 1, 0, 0, '2015', 1, '2015', '2019-03-12 14:59:12', NULL, 'new', 22, 23); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (66, '262544', 'logisticien', '', 'Lausanne', 1, 'Homme', 'Crausaz', 'Nicolas Benjamin', 'adfh', 'safdhs', 'dfhsdfh', 'sdfhsd', 'nicolas.crausaz@epfl.ch', '08/03/2002', 'sdfhsdf', 'hsdfh', '', 'asdgasdg', 'sadgasdg', 1, 0, 1, 0, 0, '2015', 0, '', '2019-03-13 10:16:21', NULL, 'new', 28, 29); -INSERT INTO `applicant` (`applicant_id`, `applicant_guest_sciper`, `applicant_formation`, `applicant_it_section`, `applicant_formation_location`, `applicant_maturity`, `applicant_gender`, `applicant_name`, `applicant_fsname`, `applicant_address_street`, `applicant_address_npa`, `applicant_home_phone`, `applicant_personal_phone`, `applicant_mail`, `applicant_birthdate`, `applicant_origin`, `applicant_nationality`, `applicant_foreign_authorization`, `applicant_avs`, `applicant_main_language`, `applicant_speaks_french`, `applicant_speaks_german`, `applicant_speaks_english`, `applicant_speaks_other`, `applicant_has_majority`, `applicant_scolarity_end`, `applicant_already_applicant`, `applicant_already_applicant_year`, `applicant_application_date`, `applicant_application_updated_date`, `applicant_application_status`, `fk_applicant_main_responsible`, `fk_applicant_sec_responsible`) VALUES (73, 'G29052', 'gardienAnimaux', '', 'Lausanne', 1, 'Homme', 'Crausaz Test', 'Nicolas Test', 'Village 8', '1110 Morges', '+71236498798', '+23105723049', 'n.crausaz99@gmail.com', '05/03/2000', 'Lausanne', 'Suisse', '', '278193345682360', 'Francais', 1, 0, 1, 0, 0, '2017', 0, '', '2019-03-21 10:38:19', '2019-03-21 10:40:07', 'new', 31, 32); diff --git a/canapGEST/DB/tests/test2.sql b/canapGEST/DB/tests/test2.sql deleted file mode 100644 index 49bef0c9640d0b06c992b4c42867b4d7718a8806..0000000000000000000000000000000000000000 --- a/canapGEST/DB/tests/test2.sql +++ /dev/null @@ -1,50 +0,0 @@ -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (280, 'photo-passeport.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\58\\photo-passport.pdf', 58); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (281, 'carte-identite.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\58\\carte-identite.pdf', 58); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (282, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\58\\curriculum-vitae.png', 58); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (283, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\58\\lettre-motivation.png', 58); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (289, 'photo-passeport.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\photo-passeport.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (290, 'carte-identite.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\carte-identite.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (291, 'curriculum-vitae.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\curriculum-vitae.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (292, 'lettre-motivation.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\lettre-motivation.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (293, 'annexe1.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\annexe1.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (294, 'annexe2.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\annexe2.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (295, 'annexe3.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\annexe3.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (296, 'annexe4.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\60\\annexe4.pdf', 60); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (297, 'photo-passeport.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\photo-passeport.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (298, 'carte-identite.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\carte-identite.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (299, 'curriculum-vitae.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\curriculum-vitae.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (300, 'lettre-motivation.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\lettre-motivation.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (301, '2. Criteres d evaluation TPI.PDF', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\2. Criteres d evaluation TPI.PDF', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (302, 'annexe1.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\annexe1.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (303, 'certificat-gri.pdf', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\63\\certificat-gri.pdf', 63); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (316, 'photo-passeport.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\photo-passeport.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (317, 'carte-identite.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\carte-identite.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (318, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\curriculum-vitae.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (319, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\lettre-motivation.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (320, 'situation_transitoire.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\situation_transitoire.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (321, 'annexe1.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\66\\annexe1.png', 66); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (322, 'photo-passeport.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\photo-passeport.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (323, 'carte-identite.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\carte-identite.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (324, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\curriculum-vitae.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (325, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\lettre-motivation.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (326, 'situation_actuelle.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\situation_actuelle.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (327, 'annexe1.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\annexe1.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (328, 'certificat-gimch.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\67\\certificat-gimch.png', 67); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (353, 'photo-passeport.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\photo-passeport.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (354, 'carte-identite.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\carte-identite.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (355, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\curriculum-vitae.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (356, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\lettre-motivation.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (357, 'certificat-gri.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\certificat-gri.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (358, 'annexe1.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\71\\annexe1.png', 71); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (359, 'photo-passeport.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\photo-passeport.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (360, 'carte-identite.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\carte-identite.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (361, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\curriculum-vitae.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (362, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\lettre-motivation.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (363, 'certificat-gri.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\certificat-gri.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (364, 'annexe1.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\annexe1.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (365, 'annexe2.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\annexe2.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (366, 'annexe3.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\72\\annexe3.png', 72); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (367, 'photo-passeport.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\73\\photo-passeport.png', 73); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (368, 'carte-identite.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\73\\carte-identite.png', 73); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (369, 'curriculum-vitae.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\73\\curriculum-vitae.png', 73); -INSERT INTO `file` (`file_id`, `file_name`, `file_path`, `fk_applicant_id`) VALUES (370, 'lettre-motivation.png', '\\\\scxdata.epfl.ch\\apprentis$\\candidatures\\nouvelles\\test-Nicolas-Crausaz\\73\\lettre-motivation.png', 73); diff --git a/canapGEST/Documentation/journal_travail.xlsx b/canapGEST/Documentation/journal_travail.xlsx index f89a8c9109bd7ea4403abd264588f1a7e785409f..41454db1a7aa50b4b5fbda0bbb4feb413b443c5d 100644 Binary files a/canapGEST/Documentation/journal_travail.xlsx and b/canapGEST/Documentation/journal_travail.xlsx differ