diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php new file mode 100644 index 00000000..7bd130ac --- /dev/null +++ b/app/Http/Controllers/NotificationController.php @@ -0,0 +1,10 @@ +increments('id'); + $table->string('detail'); + $table->unsignedInteger('user_id'); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id')->on('users') + ->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('notifications'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index ebc04e05..e0ba98e9 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -28,6 +28,7 @@ class DatabaseSeeder extends Seeder $this->call(SettingActiveBankSeeder::class); $this->call(SettingTaxRateSeeder::class); $this->call(SettingBillingChargeSeeder::class); + $this->call(NotificationSeeder::class); DB::statement('SET FOREIGN_KEY_CHECKS=1;'); } } diff --git a/database/seeds/NotificationSeeder.php b/database/seeds/NotificationSeeder.php new file mode 100644 index 00000000..5e567bf6 --- /dev/null +++ b/database/seeds/NotificationSeeder.php @@ -0,0 +1,33 @@ +first(); + $admin = User::where("email", "admin@example.com")->first(); + + DB::table('notifications')->insert([ + 'detail' => 'This is an user seeder notification', + 'user_id' => $user->id, + 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), + 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'), + ]); + + DB::table('notifications')->insert([ + 'detail' => 'This is an admin seeder notification', + 'user_id' => $admin->id, + 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), + 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'), + ]); + } +} diff --git a/resources/assets/js/pages/home.vue b/resources/assets/js/pages/home.vue index c159acdf..99e8f9fe 100644 --- a/resources/assets/js/pages/home.vue +++ b/resources/assets/js/pages/home.vue @@ -141,19 +141,19 @@ - +
- + - + - + - @@ -178,25 +178,21 @@ Customer Marking : {{ bookingConfirmTable.marking }} + + Payment for (Order No.) : + {{ bookingConfirmTable.payment_order }} + Payment Method : {{ bookingConfirmTable.payment_method }} - CNY/RMB : - {{ bookingConfirmTable.amount }} + Remarks : + {{ bookingConfirmTable.remark }} - + Service Charge : - RMB {{ bookingConfirmTable.service_charge }} - - - RATE : - {{ bookingConfirmTable.rate }} - - - China Beneficiary Acc : - {{ bookingForm.account_name }} + + CNY/RMB : @@ -235,11 +231,40 @@ - Bank in Amount : + Bank In Amount : RM {{ bookingConfirmTable.bankin_amount }} + + China Beneficiary Acc : + + + + +
+ {{index+1}}) {{ item.account_name }} {{ item.account_num }} +
+
+ + + + + + Bank In Amount : + RM {{ bookingConfirmTable.bankin_amount }} + + + + + + + + CIEF WORLDWIDE SDN. BHD.(1134596-M) +
+ MBB 568603010762 + + @@ -343,13 +368,12 @@ export default { amount: '', rate: '' }, - bookingForm: { - // amount: '', + bookingForm: [{ account_name: '', bank_name: '', bank_branch: '', account_num: '' - }, + }], rules: { amount: [{ required: true, @@ -459,8 +483,6 @@ export default { }) }) }, - - makePagination(data){ let pagination ={ current_page: data.current_page, @@ -511,12 +533,11 @@ export default { this.loading = false console.log(response) this.bookingConfirmTable = response.data; - this.bookingConfirmTable.payment_for = 'Full Payment';//For future purpose? - this.bookingConfirmTable.remark = '';//For future purpose? + this.bookingConfirmTable.payment_for = 'Full Payment';//For future purpose + this.bookingConfirmTable.remark = '';//For future purpose + this.bookingConfirmTable.payment_order = '';//For future purpose this.dialogFormVisible = false this.dialogFormVisible1 = true - console.log(this.bookingConfirmTable); - console.log(this.bookingForm); }) .catch((error) => { this.$message({ @@ -550,8 +571,6 @@ export default { amount: this.booking.amount, term: this.term } - - console.log(newBooking) axios.post('api/booking', newBooking) .then((response) => { this.loading = false @@ -560,7 +579,6 @@ export default { name: 'booking.user.upload', params: {id: response.data.id } }) - // pass variable to another router }) .catch((error) => { diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4bb9b48a..ac9fa334 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -462,6 +462,7 @@ class ComposerStaticInit0eb1f3eb0d8144627e65b3e93f0783e4 'App\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/app/Http/Middleware/VerifyCsrfToken.php', 'App\\Invoice' => __DIR__ . '/../..' . '/app/Invoice.php', 'App\\Marking' => __DIR__ . '/../..' . '/app/Marking.php', + 'App\\Notification' => __DIR__ . '/../..' . '/app/Notification.php', 'App\\Notifications\\ResetPassword' => __DIR__ . '/../..' . '/app/Notifications/ResetPassword.php', 'App\\OAuthProvider' => __DIR__ . '/../..' . '/app/OAuthProvider.php', 'App\\Permission' => __DIR__ . '/../..' . '/app/Permission.php', @@ -2852,6 +2853,7 @@ class ComposerStaticInit0eb1f3eb0d8144627e65b3e93f0783e4 'Namshi\\JOSE\\Signer\\SecLib\\RSA' => __DIR__ . '/..' . '/namshi/jose/src/Namshi/JOSE/Signer/SecLib/RSA.php', 'Namshi\\JOSE\\Signer\\SignerInterface' => __DIR__ . '/..' . '/namshi/jose/src/Namshi/JOSE/Signer/SignerInterface.php', 'Namshi\\JOSE\\SimpleJWS' => __DIR__ . '/..' . '/namshi/jose/src/Namshi/JOSE/SimpleJWS.php', + 'NotificationSeeder' => __DIR__ . '/../..' . '/database/seeds/NotificationSeeder.php', 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' => __DIR__ . '/..' . '/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php', 'NunoMaduro\\Collision\\Adapters\\Laravel\\ExceptionHandler' => __DIR__ . '/..' . '/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php', 'NunoMaduro\\Collision\\Adapters\\Laravel\\Inspector' => __DIR__ . '/..' . '/nunomaduro/collision/src/Adapters/Laravel/Inspector.php',