From 643f3c81a9cd45ccff091b435d29c42137f7ab96 Mon Sep 17 00:00:00 2001 From: Maxi Redigonda Date: Tue, 29 Oct 2019 18:23:20 -0300 Subject: [PATCH] Minor style changes --- client/src/app/admin/panel/staff/add-staff-modal.js | 2 +- server/controllers/staff/add.php | 5 ++--- server/controllers/user/send-recover-password.php | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/client/src/app/admin/panel/staff/add-staff-modal.js b/client/src/app/admin/panel/staff/add-staff-modal.js index 8a20ed00..d9c77a0d 100644 --- a/client/src/app/admin/panel/staff/add-staff-modal.js +++ b/client/src/app/admin/panel/staff/add-staff-modal.js @@ -67,7 +67,7 @@ class AddStaffModal extends React.Component { return SessionStore.getDepartments().map(department => { if(department.private*1){ return {department.name} - }else { + } else { return department.name; } }); diff --git a/server/controllers/staff/add.php b/server/controllers/staff/add.php index 65aa1b2e..ea0a52cb 100755 --- a/server/controllers/staff/add.php +++ b/server/controllers/staff/add.php @@ -44,7 +44,6 @@ class AddStaffController extends Controller { private $level; private $departments; - public function validations() { return [ 'permission' => 'staff_3', @@ -74,7 +73,7 @@ class AddStaffController extends Controller { $this->storeRequestData(); $staff = new Staff(); - $staffRow = Staff::getDataStore($this->email,'email'); + $staffRow = Staff::getDataStore($this->email, 'email'); if($staffRow->isNull()) { $staff->setProperties([ @@ -84,7 +83,6 @@ class AddStaffController extends Controller { 'profilePic' => $this->profilePic, 'level' => $this->level, 'sharedDepartmentList' => $this->getDepartmentList() - ]); $this->addOwner(); @@ -120,6 +118,7 @@ class AddStaffController extends Controller { return $listDepartments; } + public function addOwner() { $departmentIds = json_decode($this->departments); diff --git a/server/controllers/user/send-recover-password.php b/server/controllers/user/send-recover-password.php index 3ba9d2b6..04d227dc 100755 --- a/server/controllers/user/send-recover-password.php +++ b/server/controllers/user/send-recover-password.php @@ -57,9 +57,9 @@ class SendRecoverPasswordController extends Controller { $email = Controller::request('email'); if($this->staff){ - $this->user = Staff::getUser($email,'email'); - }else { - $this->user = User::getUser($email,'email'); + $this->user = Staff::getUser($email, 'email'); + } else { + $this->user = User::getUser($email, 'email'); } if(!$this->user->isNull()) {