From b7f1fb9a6cc001f68142b9faca9cb6d91c3c6d0d Mon Sep 17 00:00:00 2001 From: Aqeeb Imtiaz Harun Date: Mon, 28 May 2018 13:51:03 +0800 Subject: [PATCH 1/6] Added company profile frontend --- public/company-profile.html | 133 ++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 public/company-profile.html diff --git a/public/company-profile.html b/public/company-profile.html new file mode 100644 index 0000000..295a860 --- /dev/null +++ b/public/company-profile.html @@ -0,0 +1,133 @@ + + + AzureUI - Term + + + + + + + + + +
+
+ +
+ +
+

Company Profile

+
+
+ + + +
+
+
+ + +
+
+ +
+ Please upload the registration certificate. + +
+ +
+ +
+ +
+ Company Information +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ Submit +
+
+
+
+
+ + + \ No newline at end of file From cdf6c67db3c6b1c7cfa5cd30a88a4a4566da32f6 Mon Sep 17 00:00:00 2001 From: Aqeeb Imtiaz Harun Date: Mon, 28 May 2018 17:27:11 +0800 Subject: [PATCH 2/6] update company profile frontend --- public/company-profile.html | 53 +++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/public/company-profile.html b/public/company-profile.html index 295a860..5458c4b 100644 --- a/public/company-profile.html +++ b/public/company-profile.html @@ -67,7 +67,7 @@ @@ -122,12 +122,61 @@
+ + + + \ No newline at end of file From d1023faeb44a9f4efa0dc2e29d3d4e3239034f84 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 31 May 2018 09:56:15 +0800 Subject: [PATCH 3/6] fix update profile error fix update profile frontend unauthorize --- app/Company.php | 2 +- app/Http/Controllers/AuthController.php | 3 ++- public/verify-code-number.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Company.php b/app/Company.php index ee6bb6c..237e5cc 100644 --- a/app/Company.php +++ b/app/Company.php @@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Company extends Model { // - protected $fillable = ['company_profile', 'reg_cert', 'company_name', 'registration_no', 'tax_no', 'tel_no', 'fax', 'address', 'city', 'postcode', 'state', 'country', 'contact_person']; + protected $fillable = ['user_id', 'company_profile', 'reg_cert', 'company_name', 'registration_no', 'tax_no', 'tel_no', 'fax', 'address', 'city', 'postcode', 'state', 'country', 'contact_person']; //protected $guarded = []; public function user() diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 17ba3f3..24b22a0 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -149,8 +149,9 @@ class AuthController extends Controller // TODO : create company for user $company = new Company; - $company->user = $user; + $company->user_id = $user->id; $company->save(); + return response()->json(['success'=> true, 'message'=> 'Profile updated.']); } diff --git a/public/verify-code-number.html b/public/verify-code-number.html index 02cc3c1..0cec4a1 100644 --- a/public/verify-code-number.html +++ b/public/verify-code-number.html @@ -78,8 +78,8 @@ token: $('#verify-code').val()}, success: function(data) { if( data.success){ + localStorage.token = data.token; document.location.href="profile-first-setup.html"; - localStorage.token = data.data.token; } else{ console.log('wrong code'); From e6b08a6cbaee5d86350777dd3d182a72dc1b4be5 Mon Sep 17 00:00:00 2001 From: Aqeeb Imtiaz Harun Date: Fri, 1 Jun 2018 09:58:27 +0800 Subject: [PATCH 4/6] added the company profile frontend integration --- public/company-profile.html | 19 +++++++++++++------ public/profile-first-setup.html | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/public/company-profile.html b/public/company-profile.html index 5458c4b..2b7094b 100644 --- a/public/company-profile.html +++ b/public/company-profile.html @@ -134,17 +134,22 @@ + + + + + + diff --git a/public/verify-code-number.html b/public/verify-code-number.html index 0cec4a1..7ce0a9c 100644 --- a/public/verify-code-number.html +++ b/public/verify-code-number.html @@ -4,6 +4,7 @@ AzureUI - Term + @@ -24,6 +25,9 @@
+ + +
@@ -52,6 +56,8 @@ + + + +