Commit ea0117b1 by Wittaya-PIM

Merge branch 'integration' into wittaya

parents 9b7a9912 c9ff32ad
......@@ -8,13 +8,13 @@ use Cake\Http\Client;
class ProfilesController extends AppController
{
public function index($id = 13112){
public function index(){
$this->viewBuilder()->layout('blank');
/*******************************/
$id = $this->Auth->user('id');
$id = $this->Auth->user('id');
$this->loadModel('Users');
$responseUserProfile = $this->Users->get($id, [
......@@ -47,8 +47,8 @@ class ProfilesController extends AppController
'keyField' => 'id',
'valueField' => 'province_name_th'
])
->where(['master_country_id =' => $responseUserPersonal['master_country_id']])
->order(['province_name_th']);
->where(['master_country_id =' => $responseUserPersonal['master_country_id']])
->order(['province_name_th']);
// pr($Province);die;
if(!empty($Province)) $Province = $Province->toArray();
......@@ -56,6 +56,8 @@ class ProfilesController extends AppController
$dateNow = $res->i18nFormat('dd/MM/yyyy');
if ($this->request->is(['patch', 'post', 'put'])) {
// pr($this->request->data());die;
$data = $this->request->data;
// pr($this->request->data);die;
......
......@@ -117,13 +117,12 @@ class UsersController extends AppController {
'keyField' => 'id',
'valueField' => 'province_name_th'
]
);
);
if(!empty($provinces)) $provinces = $provinces->toArray();
$this->set(compact('provinces','countries'));
$this->viewBuilder()->layout('blank');
}
$this->viewBuilder()->layout('blank');
}
#---------------------------------------------------------------------------------------------------
#Signup
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment