Compare commits

..

244 Commits

Author SHA1 Message Date
Dillon 25cc1ffc42 Debug Pipeline Failed 2023-05-08 16:00:35 +08:00
Dillon 358dcfa81a Debug Pipeline Failed 2023-05-08 15:51:00 +08:00
Dillon 0570fef268 Debug Pipeline Failed 2023-05-08 15:43:17 +08:00
Dillon 1d3042728c Debug Pipeline Failed 2023-05-08 15:38:26 +08:00
Dillon bdc71c3ab6 Debug Pipeline Failed 2023-05-08 14:58:33 +08:00
Dillon 902c72b225 Debug Pipeline Failed 2023-05-08 14:32:19 +08:00
Dillon fafa3be998 Debug Pipeline Failed 2023-05-08 14:24:16 +08:00
Dillon 96ff2f5e15 Debug Pipeline Failed 2023-05-08 14:03:03 +08:00
Dillon bb1daa48a4 Debug Pipeline Failed 2023-05-08 13:46:32 +08:00
Dillon 758624b29c Debug Pipeline Failed 2023-05-08 13:36:45 +08:00
Dillon ffb5edc6e9 Debug Pipeline Failed 2023-05-08 13:24:50 +08:00
Dillon 6902dc36c0 Debug Pipeline Failed 2023-05-08 13:14:02 +08:00
Dillon c853b6dfea Debug Pipeline Failed 2023-05-08 13:05:27 +08:00
Dillon df1cb83aa2 Debug Pipeline Failed 2023-05-08 12:24:17 +08:00
Dillon d09a8a8b8d Debug Pipeline Failed 2023-05-08 12:20:10 +08:00
Dillon 8347b2c1db Debug Pipeline Failed 2023-05-08 10:08:51 +08:00
Dillon 37570193e7 Debug Pipeline Failed 2023-05-08 10:00:24 +08:00
Dillon c0fdb44996 Debug Pipeline Failed 2023-05-08 09:49:57 +08:00
Dillon a7429554f6 Debug Pipeline Failed 2023-05-08 09:26:45 +08:00
Dillon dcfb73c952 Laravel Vapor Initial Commit 2023-05-08 09:17:06 +08:00
Dillon 41db8f57f5 Merge branch 'dillon/crisp-help-menu-2' into development 2023-05-04 15:42:53 +08:00
Dillon 18579d5c1d Implement help menu on new order profile version 2 component 2023-05-04 15:42:16 +08:00
Dillon 1060401128 Merge branch 'dillon/crisp-help-menu' into dillon/crisp-help-menu-2 2023-05-04 15:39:54 +08:00
Dillon 3497de9727 Merge branch 'dillon/crisp-help-menu' into development 2023-05-04 15:23:54 +08:00
Dillon 5b00b7b45f Help Menu prototype v0.1 2023-05-04 15:19:04 +08:00
edmondlang 965dfb3098 Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Billplzs/ControllersLogic/CallbackBillplzLogic.php
#	app/Classes/ValueObjects/Constants/TransactionType.php
#	routes/web.php
2023-04-28 18:26:33 +08:00
edmondlang d6fad96d4d add robot.txt 2023-04-28 00:17:00 +08:00
edmondlang 351447b1fc Merge branch 'list-order-v2' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-25 23:40:47 +08:00
edmondlang 3378d37ffb Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-19 12:53:50 +08:00
edmondlang fff3d948d0 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Orders/ControllersLogic/CreateOrderLogic.php
2023-04-18 23:44:36 +08:00
Dillon c181882145 Merge branch 'dillon/improvement-1' into development 2023-04-15 21:57:58 +08:00
edmondlang 2a333f7d19 Merge branch 'order-v2' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-13 16:09:37 +08:00
edmondlang 8f8622aa10 Merge branch 'order-v2' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-13 16:05:38 +08:00
edmondlang f88936c873 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-13 16:01:45 +08:00
Dillon 20f3004e22 Merge branch 'dillon/accounting-bank-mapping' into development 2023-04-06 22:59:39 +08:00
edmondlang fd4bbe5d4f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-06 19:25:35 +08:00
edmondlang a630b49867 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-06 14:25:33 +08:00
edmondlang 75ce5bd752 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-06 00:08:24 +08:00
edmondlang abb7bc2e4c Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-04-05 23:50:22 +08:00
edmondlang 857003b25b update code conflict 2023-04-02 11:45:58 +08:00
edmondlang 551119e313 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/ValueObjects/Constants/TransactionType.php
#	routes/web.php
2023-04-02 11:41:55 +08:00
edmondlang b567f50711 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-31 00:42:03 +08:00
edmondlang 395b15af90 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	routes/api.php
2023-03-31 00:32:46 +08:00
edmondlang 833ffdab8d Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-30 15:18:00 +08:00
edmondlang 2f6a30a512 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-30 14:38:15 +08:00
edmondlang 4c433f74f1 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-30 12:53:00 +08:00
Dillon 852da05e24 Merge branch 'dillon/debug-and-fixes-2' into development 2023-03-30 06:00:12 +08:00
Dillon 1658b65484 A quick fix 2023-03-28 23:42:59 +08:00
Dillon 8e9ff0cad5 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-28 23:36:35 +08:00
edmondlang acee1a7884 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-28 16:17:14 +08:00
edmondlang 0079d745ba Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-26 22:48:42 +08:00
Dillon 0bd3464184 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-25 14:20:49 +08:00
Dillon 7ec1bc65a5 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-25 02:18:03 +08:00
Dillon c401d1e0d5 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-24 15:15:32 +08:00
Dillon a2983ec9f1 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-24 15:15:15 +08:00
Martin Maina Kiragu 2421640c0a Merge branch 'feature/dashboard_optimization' into 'development'
Feature/dashboard optimization

See merge request CIEFWorldwideSdnBhd/shipping-portal!156
2023-03-24 03:48:40 +00:00
Martin Kiragu 7dae2228f6 fix ide-autospace formatting 2023-03-24 06:34:04 +03:00
Martin Kiragu 75039466ab fix ide-autospace formatting 2023-03-24 06:28:53 +03:00
Martin Kiragu f3df5fbe9f fix ide-autospace formatting 2023-03-24 06:13:35 +03:00
Martin Kiragu 362e47aaa0 fix ide-autospace formatting 2023-03-24 06:04:28 +03:00
Martin Kiragu ba26cda598 switched the Modal resources to Transformers for /document/lists endpoint 2023-03-24 05:51:32 +03:00
Dillon 8995a567d5 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-24 03:16:47 +08:00
Dillon 5eeec7806b Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-23 04:31:47 +08:00
Dillon fd46a4fb7f Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-23 04:18:38 +08:00
Dillon 1100267316 Merge branch 'dillon/crm-create-task-3-26' into development 2023-03-22 22:23:43 +08:00
edmondlang e133f1fab8 Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-21 17:38:35 +08:00
edmondlang 5d5892ce07 Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	routes/transaction.php
2023-03-21 14:13:20 +08:00
edmondlang b26700ea6f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-20 18:08:50 +08:00
Dillon 589c2e01d9 Merge branch 'dillon/debug-and-fixes-1' into development 2023-03-19 22:32:53 +08:00
Dillon 9cf6058a65 Merge branch 'dillon/debug-and-fixes-1' into development 2023-03-19 17:34:52 +08:00
Dillon ff4d81966c Merge branch 'dillon/debug-and-fixes-1' into development 2023-03-19 16:39:40 +08:00
Martin Kiragu a4891aa0de added a debugber optional paramenter for addational resource on ListDocument resource 2023-03-19 06:31:44 +03:00
Martin Kiragu 05ba0ba6fd update fix conflicts 2023-03-19 04:41:40 +03:00
Martin Kiragu 9217970237 update helpers 2023-03-19 04:38:24 +03:00
Dillon 828f424cfd Merge branch 'dillon/crm-invoice-update-23' into development 2023-03-19 04:50:46 +08:00
Dillon 057ca8480b Merge branch 'dillon/crm-invoice-update-23' into development 2023-03-19 04:30:36 +08:00
edmondlang d07901f31b Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Billplzs/ControllersLogic/CallbackBillplzLogic.php
#	routes/web.php
2023-03-18 23:36:37 +08:00
Dillon c22638b29e Merge branch 'dillon/debug-and-fixes-1' into development 2023-03-17 17:36:56 +08:00
Martin Kiragu c292bfd1e0 extract repeated queries on MonthlyReport Controller and Add a global Library helper.php file 2023-03-13 09:21:51 +03:00
edmondlang 85942eff1d Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-12 23:27:57 +08:00
edmondlang d69896f807 Merge branch 'multi-payment-final' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-12 23:13:58 +08:00
Dillon 2c5c97488f Merge branch 'dillon/crm-tasks-department' into development 2023-03-12 17:38:48 +08:00
Dillon 99e38b96ce Merge branch 'dillon/crm-create-task-2' into development 2023-03-11 16:34:04 +08:00
Dillon 81a00a8195 Merge branch 'dillon/crm-create-task-2' into development 2023-03-10 21:14:00 +08:00
Dillon dbab7a9f8c Merge branch 'dillon/crm-feed-improvement-1' into development 2023-03-10 17:59:34 +08:00
Dillon 046676d174 Merge branch 'dillon/crm-create-task-2' into development 2023-03-10 02:52:53 +08:00
edmondlang 2b4f1ad570 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-08 14:34:36 +08:00
Dillon bcb78f2392 undo debug logs 2023-03-06 16:00:58 +08:00
Dillon 345a62fec6 debug 2023-03-06 15:54:57 +08:00
Dillon 6257b11a6e Merge branch 'dillon/crm-create-invoice' into development 2023-03-06 15:13:17 +08:00
Dillon 4b124ca96d Merge branch 'dillon/crm-create-invoice' into development 2023-03-05 20:30:04 +08:00
Martin Kiragu 4b25764fb3 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-03 06:29:16 +03:00
Martin Kiragu 422a0af465 move all UI related tests to codeception tets 2023-03-03 06:28:45 +03:00
edmondlang c73d65343b Merge branch 'update-create-dilivery-address' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-02 23:38:33 +08:00
edmondlang 9e5784b6ec update force create order delivery address 2023-03-02 23:38:12 +08:00
edmondlang 9a863e2143 Merge branch 'update-create-dilivery-address' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-02 23:18:12 +08:00
edmondlang 8024865d5d create order with force enter billing address 2023-03-02 23:17:42 +08:00
Martin Kiragu 66abe81e73 Merge remote-tracking branch 'origin/development' into development 2023-03-02 12:24:07 +03:00
Martin Kiragu ca178e1b31 add HasFactory facade to Users model 2023-03-02 12:23:49 +03:00
edmondlang e52a27aedb Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-02 17:06:55 +08:00
Martin Kiragu 6c2c28fb31 rerun UI build on the test job 2023-03-02 11:58:09 +03:00
Martin Kiragu 049da351ef Merge remote-tracking branch 'origin/development' into development 2023-03-02 11:28:03 +03:00
Martin Kiragu 0ce8709f70 reduplicate mysql service for unit test job 2023-03-02 11:27:25 +03:00
edmondlang 1e5609bb1b Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-02 16:26:11 +08:00
edmondlang 8e7970a925 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-03-02 16:16:23 +08:00
Martin Kiragu 06b2c5166d remove dependencies test and add reruns 2023-03-02 11:01:10 +03:00
Martin Kiragu 6ba3b873a2 add building assets and dependencies test 2023-03-02 10:47:45 +03:00
Martin Kiragu 623fb1609b switch dependencies with an installation rerun 2023-03-02 10:29:40 +03:00
Martin Kiragu 24be20a60d switch dependencies with an installation rerun 2023-03-02 10:17:30 +03:00
Martin Kiragu 3535201481 remove test dependency injection 2023-03-02 10:04:09 +03:00
Martin Kiragu cdefd48d26 remove pdo echo 2023-03-02 09:50:44 +03:00
Martin Kiragu 45fbcf1447 pdo addition 2023-03-02 09:42:49 +03:00
Martin Kiragu 53805f3608 add database test 2023-03-02 09:20:02 +03:00
Martin Kiragu 99e90ad357 update remove pdo and mysql extension 2023-03-02 09:03:28 +03:00
Martin Kiragu 5edb9b5cfe add node and gulp builds 2023-03-02 08:58:23 +03:00
Martin Kiragu 86a5a3b2d9 add migration and seeder 2023-03-02 08:37:38 +03:00
Martin Kiragu a6590e3b81 test set up on the set up job 2023-03-02 08:31:14 +03:00
Martin Kiragu b1bb2b9f33 add .env.example to the env file 2023-03-02 08:25:04 +03:00
Dillon 9318e7471f Merge branch 'dillon/crm-create-task' into development 2023-03-01 12:36:15 +08:00
Martin Maina Kiragu e19ba1c9f3 Merge branch 'feature/TDD' into 'development'
Feature/tdd

See merge request CIEFWorldwideSdnBhd/shipping-portal!140
2023-03-01 03:54:54 +00:00
edmondlang 8cffae079b test approve invoice 2023-02-28 14:46:04 +08:00
edmondlang 594b25b71b temporary disable all other cron on development server 2023-02-28 14:29:04 +08:00
edmondlang d142a86683 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-28 14:23:11 +08:00
edmondlang 935f3e9bf5 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-27 15:59:49 +08:00
edmondlang dedd6464f4 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-24 18:08:22 +08:00
edmondlang 38aba65178 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-23 14:53:41 +08:00
Dillon 091119c244 Merge branch 'dillon/crm-integration' into development 2023-02-22 18:09:51 +08:00
Dillon 4d095b5459 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-22 17:10:08 +08:00
Dillon 1c50181132 Merge branch 'dillon/crm-integration' into development 2023-02-22 10:37:19 +08:00
edmondlang 9e26c470f5 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-21 23:54:08 +08:00
edmondlang 4c0bf164a0 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-21 23:43:18 +08:00
edmondlang 8ab7f72e90 reverse invoice search function 2023-02-21 23:42:00 +08:00
edmondlang 5772e30575 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-21 23:41:19 +08:00
edmondlang 4b2daa62d7 test auto generate invoice function 2023-02-21 17:32:20 +08:00
edmondlang 2bd8700a61 Merge branch 'auto-generate-invoice' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-21 16:50:42 +08:00
edmondlang ad7e77c169 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-21 15:01:09 +08:00
edmondlang e95c41bd3e Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-20 19:51:11 +08:00
edmondlang 903269e714 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-20 18:22:48 +08:00
edmondlang 4120a50559 commented on the web routes and api routes to test on the crm 2023-02-18 23:09:24 +08:00
Dillon 88b31f2d3f Merge branch 'dillon/crm-integration' into development 2023-02-18 21:08:08 +08:00
Dillon a2f9bf83ce Merge branch 'dillon/crm-integration' into development 2023-02-18 20:29:57 +08:00
Dillon dd2ac4c966 Merge branch 'dillon/crm-integration' into development 2023-02-18 20:09:08 +08:00
Dillon c88f6890d6 Merge branch 'dillon/crm-integration' into development 2023-02-17 09:24:38 +08:00
edmondlang bf4b3fa97f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-16 23:13:22 +08:00
edmondlang 6bcea5a8f1 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-16 16:53:12 +08:00
Martin Maina Kiragu 2704ec1665 Merge branch 'feature/pipeline' into 'development'
Update .gitlab-ci.yml file

See merge request CIEFWorldwideSdnBhd/shipping-portal!144
2023-02-13 07:28:57 +00:00
Martin Maina Kiragu 0c636d2156 remove spaces on Export warehouse service 2023-02-13 05:17:03 +00:00
Martin Kiragu 1270ba3f43 delete the code ide-helper file 2023-02-13 08:08:06 +03:00
Martin Kiragu f2c32c5024 fix more spaces 2023-02-13 08:07:11 +03:00
Martin Kiragu ccb3bde260 clean up spaces on my branch 2023-02-13 08:01:23 +03:00
Martin Kiragu a7eb14c2b7 Merge branch 'feature/TDD' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into feature/TDD 2023-02-13 07:37:01 +03:00
Martin Kiragu abac96b1e5 revert all models changes 2023-02-13 07:36:40 +03:00
Martin Maina Kiragu ecb48c8897 Merge branch 'master' into 'feature/TDD'
# Conflicts:
#   config/app.php
2023-02-13 04:24:32 +00:00
Martin Maina Kiragu 2686229a0f Merge branch 'master' into 'feature/pipeline'
# Conflicts:
#   config/app.php
2023-02-13 04:12:19 +00:00
Martin Kiragu 558fa7ae52 remove migration and seeder 2023-02-13 06:49:08 +03:00
Martin Kiragu 88e2136c07 add cp .env 2023-02-13 06:47:58 +03:00
Martin Kiragu 70cdcded9b generate key, run migration and database seeder 2023-02-13 06:40:02 +03:00
Martin Kiragu 4022b640f9 test by rerunning the install 2023-02-13 06:31:05 +03:00
Martin Kiragu 0d780074b8 vender test to php 2023-02-13 06:23:53 +03:00
Martin Kiragu 078f675a7f add codeception and change vender test to php 2023-02-13 06:20:42 +03:00
Martin Kiragu 2b48a86f98 comment the Meneses\LaravelMpdf\LaravelMpdfServiceProvider 2023-02-13 06:11:41 +03:00
Martin Maina Kiragu 19f3aa18fc Update .gitlab-ci.yml file
add libzip
2023-02-13 03:07:34 +00:00
Martin Maina Kiragu 2b4c932fc8 Update .gitlab-ci.yml file
add libzip
2023-02-13 03:05:29 +00:00
Martin Maina Kiragu 89f0ca651a Update .gitlab-ci.yml file
add libzip
2023-02-13 03:01:07 +00:00
Martin Maina Kiragu c9fc5938c6 Update .gitlab-ci.yml file
add libzip
2023-02-13 02:55:41 +00:00
Martin Maina Kiragu 2ad8235c1b Update .gitlab-ci.yml file
add libzip
2023-02-13 02:53:22 +00:00
Martin Maina Kiragu dbf8301cb9 Update .gitlab-ci.yml file
add libzip
2023-02-13 02:49:27 +00:00
Martin Maina Kiragu 7d582c6bca Update .gitlab-ci.yml file
add libzip
2023-02-13 02:48:30 +00:00
Martin Maina Kiragu 3c4b6afcb2 Update .gitlab-ci.yml file
add zip
2023-02-13 02:46:21 +00:00
Martin Maina Kiragu e4bc56d188 Update .gitlab-ci.yml file 2023-02-13 02:44:10 +00:00
Martin Maina Kiragu 9a448d5a3d Update .gitlab-ci.yml file 2023-02-13 02:41:24 +00:00
Martin Maina Kiragu 5c1074b244 Update .gitlab-ci.yml file 2023-02-13 02:38:49 +00:00
Martin Maina Kiragu 49fcdfd89e Update .gitlab-ci.yml file 2023-02-13 02:36:51 +00:00
Martin Maina Kiragu c900759234 Update .gitlab-ci.yml file 2023-02-13 02:30:15 +00:00
Martin Maina Kiragu cd3b47ab1a Update .gitlab-ci.yml file 2023-02-13 02:26:31 +00:00
Martin Maina Kiragu c5f95cdf61 Update .gitlab-ci.yml file 2023-02-13 02:22:31 +00:00
Martin Maina Kiragu cc428a92b8 Update .gitlab-ci.yml file 2023-02-13 02:08:09 +00:00
Martin Maina Kiragu 97bac45612 Update .gitlab-ci.yml file 2023-02-13 02:03:30 +00:00
Martin Maina Kiragu 8048396a88 Update .gitlab-ci.yml file 2023-02-13 01:59:14 +00:00
Martin Maina Kiragu 400ec31235 Update .gitlab-ci.yml file 2023-02-13 01:54:53 +00:00
Martin Maina Kiragu 4d9346c62c Update .gitlab-ci.yml file 2023-02-13 01:49:47 +00:00
Martin Maina Kiragu 94fd2069e8 Update .gitlab-ci.yml file 2023-02-13 01:43:41 +00:00
Martin Maina Kiragu 1f401eb347 Update .gitlab-ci.yml file 2023-02-13 01:39:09 +00:00
Martin Maina Kiragu 80e282bda0 Update .gitlab-ci.yml file 2023-02-13 01:35:00 +00:00
Martin Maina Kiragu 65cd6aae3c Update .gitlab-ci.yml file 2023-02-13 01:33:05 +00:00
Martin Maina Kiragu eba2a30024 Update .gitlab-ci.yml file 2023-02-13 01:28:16 +00:00
Martin Maina Kiragu c103deb2a7 Update .gitlab-ci.yml file 2023-02-13 01:25:16 +00:00
Martin Maina Kiragu dcef782587 Update .gitlab-ci.yml file
--update to php 7.4
2023-02-13 01:22:54 +00:00
Martin Maina Kiragu 10e7da4673 Update .gitlab-ci.yml file 2023-02-13 01:15:20 +00:00
Martin Kiragu faff35f241 update the pipeline with master branch code 2023-02-13 04:07:33 +03:00
Martin Maina Kiragu e2c1562f19 Update .gitlab-ci.yml file 2023-02-13 00:57:12 +00:00
Martin Maina Kiragu df35ceb798 Update .gitlab-ci.yml file 2023-02-13 00:51:03 +00:00
Martin Maina Kiragu cdb81a0bf4 Update .gitlab-ci.yml file 2023-02-13 00:48:41 +00:00
Martin Maina Kiragu f1b1955190 Update .gitlab-ci.yml file 2023-02-13 00:42:05 +00:00
Martin Maina Kiragu 860632b7a3 Update .gitlab-ci.yml file 2023-02-13 00:39:49 +00:00
Martin Maina Kiragu bde7a61fb4 Update .gitlab-ci.yml file 2023-02-13 00:35:42 +00:00
edmondlang b6600c5168 Merge branch 'update-laravelmpdf' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-10 20:56:42 +08:00
edmondlang 25f38ef7fe Merge branches 'development' and 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-07 23:40:38 +08:00
edmondlang ddeb44b920 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-07 23:32:35 +08:00
Martin Maina Kiragu 02be710203 Update .gitlab-ci.yml file try php 7.3 2023-02-06 16:14:50 +00:00
Martin Maina Kiragu 2ffbfc9f1c Update .gitlab-ci.yml file 2023-02-06 16:12:41 +00:00
Martin Maina Kiragu 7b34f8116c Update .gitlab-ci.yml file 2023-02-06 16:09:41 +00:00
Martin Maina Kiragu 8a9b6df255 Update .gitlab-ci.yml file 2023-02-06 16:04:42 +00:00
Martin Kiragu c881dd44d6 updated action file 2023-02-06 18:38:12 +03:00
Martin Kiragu 1cfaeaf8bb add triggers 2023-02-06 18:28:46 +03:00
Martin Kiragu 914f29184d simple pipeline configuration 2023-02-06 18:23:51 +03:00
edmondlang f510d57463 Merge branch 'change-company-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-06 23:08:03 +08:00
edmondlang 7833c17938 Merge branch 'change-company-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-06 23:02:43 +08:00
edmondlang 97fdffe6eb Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-06 22:46:53 +08:00
edmondlang b1f2900f1c Merge branch 'change-company-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-06 22:25:33 +08:00
edmondlang ddf015dc71 Revert "work on combine invoices"
This reverts commit 2a9d4fd212.
2023-02-06 22:24:48 +08:00
Sheikh Ahmer 2a9d4fd212 work on combine invoices 2023-02-04 16:36:09 +05:00
Martin Kiragu 2cacc23a38 login acceptance test 2023-02-04 10:04:34 +03:00
Martin Kiragu a7fd5a038e Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into feature/TDD 2023-02-04 07:53:45 +03:00
edmondlang 626b31084f Merge branch 'wip-invoice-tab' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-02-03 16:11:48 +08:00
Martin Kiragu 4f3c25d5bd Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into feature/TDD 2023-01-29 10:51:30 +03:00
Martin Kiragu 8da942e41e updated list of all user, passwords and emails unit tests 2023-01-28 12:56:41 +03:00
edmondlang b599c8a151 Merge branch 'multi-invoice-combined-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-20 17:15:25 +08:00
Martin Kiragu d41f796825 fix access_token issue 2023-01-20 10:39:39 +03:00
Martin Kiragu dd612e2660 fix issues 2023-01-19 12:12:54 +03:00
Martin Kiragu c503b5e677 acceptance test set up and demo 2023-01-19 12:03:09 +03:00
Martin Kiragu 0b433cfa18 ed debug 2023-01-19 09:39:16 +03:00
Martin Kiragu 75aba8c4ac remove password related tests on auth test class 2023-01-19 09:39:16 +03:00
Martin Kiragu 81c65874a3 added the Auth tdd and a modal property autogenerator helpers 2023-01-19 09:39:15 +03:00
Martin Kiragu 79d29d9c7b Authentication TDD 2023-01-19 09:39:15 +03:00
Martin Kiragu 1e558b93af set up testig env codeception laravela and phpunit 2023-01-19 09:39:15 +03:00
edmondlang 6d3d52639e Merge branch 'multi-invoice-combined-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-19 00:33:37 +08:00
edmondlang a1d460aa6c Merge branch 'multi-invoice-combined-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-19 00:20:38 +08:00
edmondlang 5a0bc7aaea Merge branch 'multi-invoice-combined-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	resources/views/pages/pdfs/shipping_invoices_combined.blade.php
2023-01-18 23:59:58 +08:00
Martin Kiragu c7962b4231 ed debug 2023-01-18 18:34:18 +03:00
Martin Kiragu d14bb39ae8 remove password related tests on auth test class 2023-01-18 09:11:30 +03:00
Martin Kiragu 5cc2f51c02 added the Auth tdd and a modal property autogenerator helpers 2023-01-18 08:17:05 +03:00
Martin Kiragu a185f73e8a Authentication TDD 2023-01-16 14:40:57 +03:00
edmondlang f9a9598210 Merge branch 'dillon/search-marking-by-email' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-15 14:20:38 +08:00
edmondlang 9976ccec41 Merge branch 'ChangeCompanie' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-11 22:39:58 +08:00
edmondlang 8bfb2d749a Merge branch 'dillon/multiple-invoices-combined' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-11 18:25:28 +08:00
Martin Kiragu 7bf9a570a1 set up testig env codeception laravela and phpunit 2023-01-11 12:44:32 +03:00
edmondlang b38df170e8 Merge branch 'multiple-payment-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-09 22:58:10 +08:00
Dillon bf38ace70c Multiple invoices into one 2023-01-07 11:51:27 +08:00
edmondlang 66c008f97e Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2023-01-03 13:49:15 +08:00
edmondlang 0298eb946f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into activity-route-log-dev 2023-01-02 17:41:29 +08:00
edmondlang 70fb35e37c api and web route logs 2023-01-02 17:41:00 +08:00
edmondlang 1a30877ca9 activity route log dev 2022-12-31 11:53:41 +08:00
WAKOYA_KUMSA\waqo1 569a22c0db route activity log 2022-12-28 13:15:15 +03:00
132 changed files with 4007 additions and 402 deletions
+4 -2
View File
@@ -10,9 +10,9 @@ LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_DATABASE=shpping_portal
DB_USERNAME=root
DB_PASSWORD=
DB_PASSWORD=root
BROADCAST_DRIVER=log
CACHE_DRIVER=file
@@ -56,6 +56,8 @@ MIX_EXCHANGE_URL="${EXCHANGE_URL}"
YD_API_CODE=''
JWT_SECRET=Btj63iMEleEaww6Bb2IBECkxWn7YHPhhPFluAkg9DfcQik0qDRy6QW75ABGmPT2h
PERFEXCRM_BASE_URL=""
PERFEXCRM_API_KEY=""
PERFEXCRM_IS_ENABLED="false"
+59
View File
@@ -0,0 +1,59 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:rIar2fvNeRzQdvKOgLUg03detGDMx6ym2SYFRjawrAc=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=shpping_portal
DB_USERNAME=root
DB_PASSWORD=P@ssw0rd
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
UNITY_APP_URL="https://unity.izyim.com"
EXCHANGE_URL=https://dev.exchange.cief-malaysia.com/
MIX_EXCHANGE_URL="${EXCHANGE_URL}"
YD_API_CODE=''
JWT_SECRET=Btj63iMEleEaww6Bb2IBECkxWn7YHPhhPFluAkg9DfcQik0qDRy6QW75ABGmPT2h
+5
View File
@@ -2,6 +2,8 @@
/public/hot
/public/storage
/storage/*.key
/tests/_output
/tests/_support
/vendor
**/.idea/
.env
@@ -25,3 +27,6 @@ package-lock.json
public/*
/public/*
storage/framework/laravel-excel/*
.vapor/
.env.production
.env.staging
+48
View File
@@ -0,0 +1,48 @@
image: php:7.4
stages:
- deploy
#jobs
#deploy
deploy:
stage: deploy
before_script:
- apt-get update -yqq
- apt-get install -yqq
- apt-get install -y libonig-dev
- apt-get install -y libxml2-dev
- apt-get install -y libzip-dev
- apt-get install -y libgd-dev
- apt-get install -y libgd-dev
# Install PDO MySQL extension
- docker-php-ext-install pdo_mysql
# Install php dependencies
- docker-php-ext-install mbstring xml zip gd
# Install composer package manager
- curl --location --output /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
- chmod +x /usr/local/bin/composer
# Install node js
- apt-get update && apt-get install -y nodejs npm
# Install docker
- apt-get update
- apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release software-properties-common
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt-get update
- apt-get install -y docker-ce docker-ce-cli containerd.io
- service docker start
# Install gulp Js
- npm install -g gulp-cli
script:
- composer install
- vendor/bin/vapor deploy production --message="$CI_COMMIT_MESSAGE"
only:
- test
+20 -43
View File
@@ -1,62 +1,39 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400"></a></p>
## Shipping portal documentation
<p align="center">
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
simple documentation on how to install, run, test, commit and deploy application
## About Laravel
## creating and running unit tests
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
Required Tools
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
- Chromium Driver / selenium
- add running and setting selenium on all OS if possible
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Required Packages :
## Learning Laravel
- laravel/legacy-factories
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
- codeception/codeception
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
Or Simply Run
## Laravel Sponsors
``Composer install``
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
To create a unit test
### Premium Partners
``php artisan make test: Test Example --unit``
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[OP.GG](https://op.gg)**
Running the tests :
## Contributing
Running a single Test
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
`` php artisan test --filter Example``
## Code of Conduct
Running Unit tests -
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
`` php artisan test ``
## Security Vulnerabilities
Running Codeception tests -
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
``vendor/bin/codecept run``
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
@@ -15,7 +15,7 @@ class DoesNotHaveTransactionType implements Filter
public static function apply(Builder $builder, $value)
{
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
$query->where('type', $value)->whereIn('status', [0,1,2,3,5]);
$query->where('type', $value)->whereIn('status', [0,1,2,3]);
})->whereHas('containers', function ($query){
return $query->whereDate('loading_date', '>=', Carbon::parse('20-09-2022'));
});
@@ -4,9 +4,8 @@ namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class BillNo implements Filter
class IdNext implements Filter
{
/**
* @param Builder $builder
* @param $value
@@ -14,7 +13,6 @@ class BillNo implements Filter
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('bill_no', $value);
return $builder->where('id', '>', $value);
}
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class NextMainQuestion implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('next_main_question', $value);
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OwnerType implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('owner_type', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('question_id', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionNumber implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('question_number', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionnaireSetId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('questionnaire_set_id', $value);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class UserId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('user_id', $value);
}
}
+3 -1
View File
@@ -11,14 +11,16 @@ use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMInvoice;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMInvoiceObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePaymentPerfexCRMObject;
use App\Classes\ValueObjects\Constants\PerfexCRMInvoiceStatus;
use App\Models\PackingList;
use App\Models\Transaction;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use Carbon\Carbon;
use App\Classes\General\Helper;
class UpdatePerfexCRMInvoice implements ShouldQueue
@@ -68,19 +68,19 @@ class CreateBillingAddressLogic extends AbstractControllerLogic
{
$companyModule = $this->fetchesCompanyModule->execute(['id' => $request->input('company_module_id')]);
$address = $this->fetchesAddress->execute(['id' => $request->input('billing_address_id')]);
$billingAddressInputed = $this->fetchesAddress->execute(['id' => $request->input('billing_address_id')]);
if ($address->type !== AddressType::BILLING || $address->id !== $companyModule->addresses->where('type', AddressType::BILLING)->first()->id) {
if ($billingAddressInputed->type !== AddressType::BILLING || $billingAddressInputed->id !== $companyModule->addresses->where('type', AddressType::BILLING)->first()->id) {
// delete all current billing address
Address::where('owner_type', CompanyModule::class)->where('owner_id', $request->input('company_module_id'))->where('type', AddressType::BILLING)->delete();
// create addrress
$billingAddress = new AddressObject($address->street_one, $address->street_two, $address->country_id, $address->state_id, $address->district_id, $address->postcode, AddressType::BILLING, ApprovalStatus::APPROVED, $address->reference);
// create new billing addrress
$billingAddress = new AddressObject($billingAddressInputed->street_one, $billingAddressInputed->street_two, $billingAddressInputed->country_id, $billingAddressInputed->state_id, $billingAddressInputed->district_id, $billingAddressInputed->postcode, AddressType::BILLING, ApprovalStatus::APPROVED, $billingAddressInputed->reference);
$this->canCreateAddress->passes($billingAddress);
$this->createsAddress->execute($companyModule, $billingAddress);
}
return $this->resourceResponse(new AddressResource($address));
return $this->resourceResponse(new AddressResource($billingAddressInputed));
}
}
@@ -131,10 +131,10 @@ class CallbackBillplzLogic
if(($invoice->amount - $totalPaidAmount) < 0.01) {
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
if(app()->environment('production')){
$this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
@@ -4,7 +4,6 @@ namespace App\Classes\Modules\Billplzs\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\App;
class CreatesBillplzBill
{
@@ -26,7 +25,7 @@ class CreatesBillplzBill
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
'collection_id' => config('billplz.collection_id'),
'name' => $name,
'email' => App::environment('production') ? $email : 'development@cief-malaysia.com',
'email' => $email,
'description' => $description,
'amount' => $this->finalizeAmount($amount),
'redirect_url' => route('online_payment.redirect'),
@@ -7,9 +7,13 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Documents\Services\ListsDocuments;
use App\Classes\Modules\Documents\Standards\Rules\CanListDocuments;
use App\Http\Resources\DocumentResource;
use App\Models\Document;
use App\Transformers\DocumentTransformer;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use League\Fractal;
class ListDocumentLogic extends AbstractControllerLogic
{
@@ -58,6 +62,11 @@ class ListDocumentLogic extends AbstractControllerLogic
return $this->collectionResponse(DocumentResource::collection($query));
/* return fractal()
->collection($query, new DocumentTransformer)
->respond(200, [], JSON_PRETTY_PRINT);*/
}
}
@@ -0,0 +1,50 @@
<?php
namespace App\Classes\Modules\Documents\Processors;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\Document;
use Illuminate\Http\Request;
use App\Models\QAUserAnswerSelected;
class UploadDocumentForHelpMenuProcessor
{
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFiles;
/**
* UploadDocumentForHelpMenuProcessor constructor.
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFiles
*/
public function __construct(CreatesDocument $createsDocument, CreatesFiles $createsFiles)
{
$this->createsDocument = $createsDocument;
$this->createsFiles = $createsFiles;
}
/**
* @param Request $request
* @param QAUserAnswerSelected qaUserAnswerSelected
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Request $request, QAUserAnswerSelected $qaUserAnswerSelected) {
$object = new DocumentObject("HELP_MENU", $request->input('files'),
'123456', ApprovalStatus::PENDING_VERIFICATION, 'help_menu'); //cief todo: 123456 cannot be hardcoded
/** @var Document $document */
$document = $this->createsDocument->execute($qaUserAnswerSelected, $object);
$result = $this->createsFiles->execute($document, $object);
return $result;
}
}
@@ -5,7 +5,6 @@ namespace App\Classes\Modules\Exports\Services;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Models\Order;
use App\Models\State;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
@@ -32,10 +31,8 @@ class ExportsWarehousePackingList implements FromQuery, WithHeadings, WithHeadin
*/
public function query()
{
$johor_state_id = State::where('name', 'johor')->first()->id;
return Order::whereHas('addresses', function($address) use ($johor_state_id){
$address->where('status', ApprovalStatus::APPROVED)->where('state_id', $johor_state_id);
return Order::whereHas('addresses', function($address) {
$address->where('status', ApprovalStatus::APPROVED);
})->whereHas('packingLists', function($packingLists) {
$packingLists->where('type', PackingListType::SHIPPING_PACKING_LIST)->whereDoesntHave('transports');
});
@@ -0,0 +1,62 @@
<?php
namespace App\Classes\Modules\HelpMenu\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\HelpMenu\Standards\Rules\CanFetchHelpMenuQuestionList;
use App\Classes\Modules\HelpMenu\Processors\FetchFirstHelpMenuQuestionProcessor;
use App\Http\Resources\HelpMenuQuestionResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class FetchHelpMenuQuestionLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Retrieved Help Menu First Question',
'message' => 'You have successfully retrieved a Help Menu First Question'
];
}
/** @var CanFetchHelpMenuQuestionList */
private $canFetchHelpMenuQuestionList;
/** @var FetchFirstHelpMenuQuestionProcessor */
private $fetchFirstHelpMenuQuestionProcessor;
/**
* FetchHelpMenuQuestionLogic constructor.
* @param CanFetchHelpMenuQuestionList $canFetchHelpMenuQuestionList
* @param FetchFirstHelpMenuQuestionProcessor $fetchFirstHelpMenuQuestionProcessor
*/
public function __construct(CanFetchHelpMenuQuestionList $canFetchHelpMenuQuestionList, FetchFirstHelpMenuQuestionProcessor $fetchFirstHelpMenuQuestionProcessor)
{
$this->canFetchHelpMenuQuestionList = $canFetchHelpMenuQuestionList;
$this->fetchFirstHelpMenuQuestionProcessor = $fetchFirstHelpMenuQuestionProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$this->canFetchHelpMenuQuestionList->passes();
$userId = Auth::user()->id;
$query = $this->fetchFirstHelpMenuQuestionProcessor->execute($request);
return $this->resourceResponse(new HelpMenuQuestionResource($query, $userId));
}
}
@@ -0,0 +1,124 @@
<?php
namespace App\Classes\Modules\HelpMenu\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMSupportTicket;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMCustomer;
use App\Classes\Modules\HelpMenu\Standards\Rules\CanFetchHelpMenuQuestionList;
use App\Classes\Modules\HelpMenu\Processors\SaveHelpMenuAnswerProcessor;
use App\Classes\Modules\HelpMenu\Processors\DeleteHelpMenuAnswerProcessor;
use App\Classes\Modules\HelpMenu\Processors\FetchNextHelpMenuQuestionProcessor;
use App\Classes\Modules\HelpMenu\Processors\FetchFirstHelpMenuQuestionProcessor;
use App\Http\Resources\HelpMenuQuestionResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Auth;
use App\Classes\ValueObjects\Constants\QAType;
class UpdateHelpMenuNextQuestionLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Retrieved Help Menu Next Question',
'message' => 'You have successfully retrieved a Help Menu Next Question'
];
}
/** @var CanFetchHelpMenuQuestionList */
private $canFetchHelpMenuQuestionList;
/** @var SaveHelpMenuAnswerProcessor */
private $saveHelpMenuAnswerProcessor;
/** @var DeleteHelpMenuAnswerProcessor */
private $deleteHelpMenuAnswerProcessor;
/** @var FetchNextHelpMenuQuestionProcessor */
private $fetchNextHelpMenuQuestionProcessor;
/** @var FetchFirstHelpMenuQuestionProcessor */
private $fetchFirstHelpMenuQuestionProcessor;
/** @var CreatesPerfexCRMSupportTicket */
private $createsPerfexCRMSupportTicket;
/** @var FetchesPerfexCRMCustomer */
private $fetchesPerfexCRMCustomer;
/**
* UpdateHelpMenuNextQuestionLogic constructor.
* @param CanFetchHelpMenuQuestionList $canFetchHelpMenuQuestionList
* @param SaveHelpMenuAnswerProcessor $saveHelpMenuAnswerProcessor
* @param FetchNextHelpMenuQuestionProcessor $fetchNextHelpMenuQuestionProcessor
* @param FetchFirstHelpMenuQuestionProcessor $fetchFirstHelpMenuQuestionProcessor
* @param DeleteHelpMenuAnswerProcessor $deleteHelpMenuAnswerProcessor
*/
public function __construct(CanFetchHelpMenuQuestionList $canFetchHelpMenuQuestionList, SaveHelpMenuAnswerProcessor $saveHelpMenuAnswerProcessor, FetchNextHelpMenuQuestionProcessor $fetchNextHelpMenuQuestionProcessor, FetchFirstHelpMenuQuestionProcessor $fetchFirstHelpMenuQuestionProcessor, CreatesPerfexCRMSupportTicket $createsPerfexCRMSupportTicket, FetchesPerfexCRMCustomer $fetchesPerfexCRMCustomer, DeleteHelpMenuAnswerProcessor $deleteHelpMenuAnswerProcessor)
{
$this->canFetchHelpMenuQuestionList = $canFetchHelpMenuQuestionList;
$this->saveHelpMenuAnswerProcessor = $saveHelpMenuAnswerProcessor;
$this->fetchNextHelpMenuQuestionProcessor = $fetchNextHelpMenuQuestionProcessor;
$this->fetchFirstHelpMenuQuestionProcessor = $fetchFirstHelpMenuQuestionProcessor;
$this->createsPerfexCRMSupportTicket = $createsPerfexCRMSupportTicket;
$this->fetchesPerfexCRMCustomer = $fetchesPerfexCRMCustomer;
$this->deleteHelpMenuAnswerProcessor = $deleteHelpMenuAnswerProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$questionId = 0;
$userId = Auth::user()->id;
$currentQuestion = $request->question;
$questionId = $currentQuestion['id'];
$questionType = $currentQuestion['question_type'];
$this->canFetchHelpMenuQuestionList->passes();
//Delete answer
$this->deleteHelpMenuAnswerProcessor->execute($userId, $questionId, $request);
//Save answer given by user
if (!$request->has('isPrevious')) {
$this->saveHelpMenuAnswerProcessor->execute($userId, $questionId, $request);
}
//Create ticket at crm
if (!$request->has('isPrevious')) {
if($questionType == QAType::TICKET_CRM){
$email = Auth::user()->email;
$customer = $this->fetchesPerfexCRMCustomer->execute($email);
$subject = "test subject 3";
$department = 1;
$contactid = 0;
$userid = 0;
if($customer){
$contactid = $customer->id;
$userid = $customer->userid;
}
$this->createsPerfexCRMSupportTicket->execute($subject, $department, $contactid, $userid);
}
}
//Get returned question (previous or next)
$returnQuestion = $this->fetchNextHelpMenuQuestionProcessor->execute($request);
//When a questionnaire ended, return back the first question
if(is_null($returnQuestion)){
$returnQuestion = $this->fetchFirstHelpMenuQuestionProcessor->execute($request);
}
return $this->resourceResponse(new HelpMenuQuestionResource($returnQuestion, $userId));
}
}
@@ -0,0 +1,51 @@
<?php
namespace App\Classes\Modules\HelpMenu\Processors;
use App\Models\QAUserAnswerSelected;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuUserAnswerSelected;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuUserAnswerSelectedList;
class DeleteHelpMenuAnswerProcessor
{
/** @var FetchesHelpMenuUserAnswerSelected */
private $fetchesHelpMenuUserAnswerSelected;
/** @var FetchesHelpMenuUserAnswerSelectedList */
private $fetchesHelpMenuUserAnswerSelectedList;
/**
* DeleteHelpMenuAnswerProcessor constructor.
* @param FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected
* @param FetchesHelpMenuUserAnswerSelectedList $fetchesHelpMenuUserAnswerSelectedList
*/
public function __construct(FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected, FetchesHelpMenuUserAnswerSelectedList $fetchesHelpMenuUserAnswerSelectedList)
{
$this->fetchesHelpMenuUserAnswerSelected = $fetchesHelpMenuUserAnswerSelected;
$this->fetchesHelpMenuUserAnswerSelectedList = $fetchesHelpMenuUserAnswerSelectedList;
}
public function execute($userId, $questionId, $request){
if ($request->has('isPrevious')) {
//Get current and previous question's answer
try{
$selectedAnswer = $this->fetchesHelpMenuUserAnswerSelectedList->execute(['user_id' => $userId, 'question_id' => $questionId, 'order_by' => (object)['column' => 'id','DESC' => true]])[0];
} catch (\Exception $exception){
$selectedAnswer = null;
}
if($selectedAnswer)
{
$this->fetchesHelpMenuUserAnswerSelected->execute(['id' => $selectedAnswer['id']])->delete();
}
}
else{
//Delete all answer's belongs to the user
$currentQuestion = $request->question;
$isStart = $currentQuestion['is_start'];
if($isStart){
QAUserAnswerSelected::where('user_id', $userId)->delete();
}
}
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Classes\Modules\HelpMenu\Processors;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuQuestion;
use ErrorException;
use Illuminate\Http\Request;
class FetchFirstHelpMenuQuestionProcessor
{
/** @var FetchesHelpMenuQuestion */
private $fetchesHelpMenuQuestion;
/**
* FetchFirstHelpMenuQuestionProcessor constructor.
* @param FetchesHelpMenuQuestion $fetchesHelpMenuQuestion
*/
public function __construct(FetchesHelpMenuQuestion $fetchesHelpMenuQuestion)
{
$this->fetchesHelpMenuQuestion = $fetchesHelpMenuQuestion;
}
public function execute(Request $request){
try {
$query = $this->fetchesHelpMenuQuestion->execute(['questionnaire_set_id' => 1]);
return $query;
} catch (\Exception $exception){
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
}
}
@@ -0,0 +1,93 @@
<?php
namespace App\Classes\Modules\HelpMenu\Processors;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuQuestion;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuUserAnswerSelected;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuUserAnswerSelectedList;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Classes\ValueObjects\Constants\QAType;
class FetchNextHelpMenuQuestionProcessor
{
/** @var FetchesHelpMenuQuestion */
private $fetchesHelpMenuQuestion;
/** @var FetchesHelpMenuUserAnswerSelected */
private $fetchesHelpMenuUserAnswerSelected;
/** @var FetchesHelpMenuUserAnswerSelectedList */
private $fetchesHelpMenuUserAnswerSelectedList;
/**
* FetchNextHelpMenuQuestionProcessor constructor.
* @param FetchesHelpMenuQuestion $fetchesHelpMenuQuestion
* @param FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected
* @param FetchesHelpMenuUserAnswerSelectedList $fetchesHelpMenuUserAnswerSelectedList
*/
public function __construct(FetchesHelpMenuQuestion $fetchesHelpMenuQuestion, FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected, FetchesHelpMenuUserAnswerSelectedList $fetchesHelpMenuUserAnswerSelectedList)
{
$this->fetchesHelpMenuQuestion = $fetchesHelpMenuQuestion;
$this->fetchesHelpMenuUserAnswerSelected = $fetchesHelpMenuUserAnswerSelected;
$this->fetchesHelpMenuUserAnswerSelectedList = $fetchesHelpMenuUserAnswerSelectedList;
}
public function execute(Request $request){
$isEnd = 0;
$questionId = 0;
$nextQuestionNumber = 0;
$nextNestedQuestion = 0;
$nextMainQuestion= 0;
$currentQuestion = $request->question;
$questionType = QAType::DEFAULT;
$returnQuestion = null;
if ($currentQuestion && array_key_exists('id', $currentQuestion)) {
$questionId = $currentQuestion['id'];
$isEnd = $currentQuestion['is_end'];
$questionType = $currentQuestion['question_type'];
$nextNestedQuestion = $currentQuestion['next_nested_question'];
$nextMainQuestion = $currentQuestion['next_main_question'];
}
if ($request->has('answerObj')) {
$nextQuestionNumber = $request->answerObj['next_question_number'];
}
if ($request->has('isPrevious')) {
$userId = Auth::user()->id;
$previousAnswer = $this->fetchesHelpMenuUserAnswerSelectedList->execute(['user_id' => $userId, 'order_by' => (object)['column' => 'id','DESC' => true]])[0];
//Get previous question
$previousQuestion = $this->fetchesHelpMenuQuestion->execute(['questionnaire_set_id' => 1, 'id' => $previousAnswer['question_id']]);
$returnQuestion = $previousQuestion;
}
else{
//Get next question
$nextQuestion = null;
$question_number = 0;
if($nextQuestionNumber != 0){
$question_number = $nextQuestionNumber;
}
else if($nextNestedQuestion != 0){
$question_number = $nextNestedQuestion;
}
else {
$question_number = $nextMainQuestion;
}
if($isEnd){
$returnQuestion = null;
}
else if($question_number != 0){
$nextQuestion = $this->fetchesHelpMenuQuestion->execute(['questionnaire_set_id' => 1, 'question_number' => $question_number]);
$returnQuestion = $nextQuestion;
}
else if (array_key_exists('id', $request->input('question'))) {
$nextQuestion = $this->fetchesHelpMenuQuestion->execute(['questionnaire_set_id' => 1, 'id_next' => $questionId, 'next_main_question' => null]);
$returnQuestion = $nextQuestion;
}
}
return $returnQuestion;
}
}
@@ -0,0 +1,63 @@
<?php
namespace App\Classes\Modules\HelpMenu\Processors;
use App\Models\QAUserAnswerSelected;
use App\Classes\Modules\HelpMenu\Services\FetchesHelpMenuUserAnswerSelected;
use App\Classes\Modules\Documents\Processors\UploadDocumentForHelpMenuProcessor;
class SaveHelpMenuAnswerProcessor
{
/** @var FetchesHelpMenuUserAnswerSelected */
private $fetchesHelpMenuUserAnswerSelected;
/** @var UploadDocumentForHelpMenuProcessor */
private $uploadDocumentForHelpMenuProcessor;
/**
* SaveHelpMenuAnswerProcessor constructor.
* @param FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected
* @param UploadDocumentForHelpMenuProcessor $uploadDocumentForHelpMenuProcessor
*/
public function __construct(FetchesHelpMenuUserAnswerSelected $fetchesHelpMenuUserAnswerSelected, UploadDocumentForHelpMenuProcessor $uploadDocumentForHelpMenuProcessor)
{
$this->fetchesHelpMenuUserAnswerSelected = $fetchesHelpMenuUserAnswerSelected;
$this->uploadDocumentForHelpMenuProcessor = $uploadDocumentForHelpMenuProcessor;
}
public function execute($userId, $questionId, $request){
$filesUpload = $request->input('files');
$answer = null;
try{
// $answer = $this->fetchesHelpMenuUserAnswerSelected->execute(['user_id' => $userId, 'question_id' => $questionId, 'order_by' => ['column' => 'id','DESC' => 1]]);
$answer = $this->fetchesHelpMenuUserAnswerSelected->execute(['user_id' => $userId, 'question_id' => $questionId]);
} catch (\Exception $exception){
$answer = null;
}
if(is_null($answer))
{
$answer = new QAUserAnswerSelected;
}
$answer->user_id = $userId;
$answer->question_id = $questionId;
if ($request->has('answerObj')) {
$answer->answer_option_id = intval($request->answerObj['id']);
}
$answer->free_text_answer = $request->answer;
$answer->save();
if($filesUpload){
$result = $this->uploadDocumentForHelpMenuProcessor->execute($request, $answer);
$newData = array_map(function ($item) {
return [
'document_id' => $item->document_id,
'file_id' => $item->id,
];
}, $result);
$answer->free_text_answer = json_encode($newData);
$answer->save();
}
}
}
@@ -1,23 +1,23 @@
<?php
namespace App\Classes\Modules\Transactions\Services;
namespace App\Classes\Modules\HelpMenu\Services;
use App\Classes\General\Eloquent\AbstractFetchRecord;
use Illuminate\Database\Eloquent\Builder;
use App\Models\Group;
use App\Models\QAQuestions;
class FetchesGroup extends AbstractFetchRecord
class FetchesHelpMenuQuestion extends AbstractFetchRecord
{
/** @var Transaction */
/** @var QAQuestions */
private $repository;
/**
* FetchesTransaction constructor.
* @param Transaction $repository
* FetchesHelpMenuQuestion constructor.
* @param QAQuestions $repository
*/
public function __construct(Group $repository)
public function __construct(QAQuestions $repository)
{
$this->repository = $repository;
}
@@ -30,4 +30,4 @@ class FetchesGroup extends AbstractFetchRecord
{
return $this->repository->newQuery();
}
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Classes\Modules\HelpMenu\Services;
use App\Classes\General\Eloquent\AbstractFetchRecord;
use Illuminate\Database\Eloquent\Builder;
use App\Models\QAUserAnswerSelected;
class FetchesHelpMenuUserAnswerSelected extends AbstractFetchRecord
{
/** @var QAUserAnswerSelected */
private $repository;
/**
* FetchesHelpMenuUserAnswerSelected constructor.
* @param QAUserAnswerSelected $repository
*/
public function __construct(QAUserAnswerSelected $repository)
{
$this->repository = $repository;
}
/**
* @return Builder
*/
public function getRepository(): Builder
{
return $this->repository->newQuery();
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Classes\Modules\HelpMenu\Services;
use App\Classes\General\Eloquent\AbstractListRecord;
use Illuminate\Database\Eloquent\Builder;
use App\Models\QAUserAnswerSelected;
class FetchesHelpMenuUserAnswerSelectedList extends AbstractListRecord
{
/** @var QAUserAnswerSelected */
private $repository;
/**
* FetchesHelpMenuUserAnswerSelectedList constructor.
* @param QAUserAnswerSelected $repository
*/
public function __construct(QAUserAnswerSelected $repository)
{
$this->repository = $repository;
}
/**
* @return Builder
*/
public function getRepository(): Builder
{
return $this->repository->newQuery();
}
}
@@ -0,0 +1,37 @@
<?php
namespace App\Classes\Modules\HelpMenu\Standards\Rules;
use App\Classes\General\Abstracts\AbstractRule;
class CanFetchHelpMenuQuestionList extends AbstractRule
{
/**
* @return bool
*/
protected function authorized(): bool
{
// TODO Set Authorization rules
return true;
}
/**
* @param $object
* @return bool
*/
protected function validators($object): bool
{
return true;
}
/**
* @param $object
* @return bool
*/
protected function criteria($object): bool
{
return true;
}
}
@@ -4,14 +4,20 @@ namespace App\Classes\Modules\Orders\ControllersLogic;
use App\Classes\Exceptions\RequestValidationException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
use App\Classes\Modules\Addresses\Services\CreatesAddress;
use App\Classes\Modules\Addresses\Services\FetchesAddress;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\PerfexCRM\Processors\NewLeadTaskToPerfexCRMProcessor;
use App\Classes\Modules\Orders\Processors\CreateOrderProcessor;
use App\Classes\Modules\Orders\Services\GeneratesOrderNumber;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use App\Http\Resources\OrderResource;
use App\Classes\Modules\Addresses\Standards\Rules\CanCreateAddress;
use App\Models\Address;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
@@ -41,6 +47,12 @@ class CreateOrderLogic extends AbstractControllerLogic
/** @var GeneratesOrderNumber */
private $generatesOrderNumber;
/** @var CreatesAddress */
private $createsAddress;
/** @var CanCreateAddress */
private $canCreateAddress;
/** @var NewLeadTaskToPerfexCRMProcessor */
private $newLeadTaskToPerfexCRMProcessor;
/**
@@ -51,14 +63,18 @@ class CreateOrderLogic extends AbstractControllerLogic
* @param FetchesCompanyModule $fetchesCompanyModule
* @param GeneratesOrderNumber $generatesOrderNumber
* @param NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor
* @param CreatesAddress $createsAddress
* @param CanCreateAddress $canCreateAddress
*/
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor)
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber, CreatesAddress $createsAddress, CanCreateAddress $canCreateAddress, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesAddress = $fetchesAddress;
$this->createOrderProcessor = $createOrderProcessor;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->generatesOrderNumber = $generatesOrderNumber;
$this->createsAddress = $createsAddress;
$this->canCreateAddress = $canCreateAddress;
$this->newLeadTaskToPerfexCRMProcessor = $newLeadTaskToPerfexCRMProcessor;
}
@@ -0,0 +1,43 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class CreatesPerfexCRMSupportTicket
{
/**
* @param string $subject
* @param string $department
* @param int $contactid
* @param int $userid
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $subject, string $department, int $contactid, int $userid) {
try{
$data = [
'subject' => $subject,
'department' => $department,
'contactid' => $contactid,
'userid' => $userid,
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/tickets',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,104 @@
<?php
namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\Notifications\InvoiceIssuedEmail;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\Modules\Transactions\ControllersLogic\Document;
class CreateCombinedInvoicesLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Shipping Invoice Status',
'message' => 'You have successfully updated multiple shipping invoices status'
];
}
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var UpdatesTransactionStatus */
private $updatesTransactionStatus;
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFiles;
/**
* ApprovePaymentVerificationLogic constructor.
* @param FetchesPackingList $fetchesPackingList
* @param UpdatesTransactionStatus $updatesTransactionStatus
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFiles
* @param CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor
*/
public function __construct(FetchesPackingList $fetchesPackingList, UpdatesTransactionStatus $updatesTransactionStatus, CreatesDocument $createsDocument, CreatesFiles $createsFiles)
{
$this->fetchesPackingList = $fetchesPackingList;
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->createsDocument = $createsDocument;
$this->createsFiles = $createsFiles;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function logic(Request $request) : JsonResponse
{
$items = $request->input('ids');
$invoice_transactions=array();
foreach($items as $item){
$packing_list = $this->fetchesPackingList->execute(['id' => $item['id']]);
$invoice_transaction = $packing_list->transactions()->where('transactions.type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::PENDING_SUBMISSION])->first();
array_push($invoice_transactions, $invoice_transaction);
// $this->updatesTransactionStatus->execute($invoice_transaction, ApprovalStatus::APPROVED);
}
$transaction_invoice_pdf = LaravelMpdf::loadView('pages.pdfs.shipping_invoices_combined', ['invoice_transactions' => $invoice_transactions]);
$document_object = new DocumentObject(
DocumentType::SHIPPING_INVOICE,
[chunk_split('data:application/pdf;base64,'.base64_encode($transaction_invoice_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'shipping_invoice'
);
/** @var Document $document */
$document = $this->createsDocument->execute($invoice_transaction, $document_object);
$this->createsFiles->execute($document, $document_object);
$user = $packing_list->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new InvoiceIssuedEmail($user, $packing_list));
}
return $this->response([]);
}
}
@@ -5,8 +5,9 @@ namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Transactions\Services\FetchesGroup;
use App\Classes\Modules\Transactions\Services\DeletesTransaction;
use App\Classes\Modules\Transactions\Services\DeletesGroup;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Http\Resources\GroupResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -23,11 +24,14 @@ class DeleteGroupLogic extends AbstractControllerLogic
];
}
/** @var UpdatesTransactionStatus */
private $updatesTransactionStatus;
/** @var FetchesGroup */
private $fetchesGroup;
/** @var DeletesGroup */
private $deletesGroup;
/** @var DeletesTransaction */
private $deletesTransaction;
/**
* DeleteGroupLogic constructor.
@@ -35,10 +39,11 @@ class DeleteGroupLogic extends AbstractControllerLogic
* @param FetchesGroup $fetchesGroup
* @param DeletesTransaction $deletesTransaction
*/
public function __construct(FetchesGroup $fetchesGroup, DeletesGroup $deletesGroup)
public function __construct(updatesTransactionStatus $updatesTransactionStatus, FetchesGroup $fetchesGroup, DeletesTransaction $deletesTransaction)
{
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->fetchesGroup = $fetchesGroup;
$this->deletesGroup = $deletesGroup;
$this->deletesTransaction = $deletesTransaction;
}
/**
@@ -50,9 +55,19 @@ class DeleteGroupLogic extends AbstractControllerLogic
{
$group = $this->fetchesGroup->execute(['id' => $request->route('id')]);
$this->deletesGroup->execute($group);
$items = $group->transactions()->get();
return $this->response([]);
foreach($items as $item) {
$bill = $item;
$payment = $bill->owner;
$group->transactions()->detach($bill->id);
$this->updatesTransactionStatus->execute($payment, ApprovalStatus::APPROVED);
$this->deletesTransaction->execute($bill);
}
$group->delete();
return $this->resourceResponse(new GroupResource($group));
}
}
@@ -1,19 +0,0 @@
<?php
namespace App\Classes\Modules\Transactions\Services;
use App\Classes\General\Eloquent\AbstractDeleteRecord;
use App\Models\Group;
class DeletesGroup extends AbstractDeleteRecord
{
/**
* @param Group $model
* @return mixed
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Group $model) {
return $this->handler($model);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\ValueObjects\Constants;
final class QAType {
public const DEFAULT = 0;
public const MULTIPLE_CHOICES = 1;
public const FREE_TEXT = 2;
public const DOCUMENT_UPLOAD = 3;
public const ANSWER = 4;
public const TICKET_CRM = 5;
}
@@ -0,0 +1,11 @@
<?php
namespace App\Classes\ValueObjects\Constants;
final class RouteType {
public const WEB = 1;
public const API = 2;
}
@@ -77,6 +77,7 @@ class FixBillplzFailedCallbackPayment extends Command
{
ini_set('memory_limit', '-1');
$this->info(Carbon::now() . ' : Fix failled callback from billplz cron started.');
$this->outputArray = [];
$start = new Carbon();
@@ -84,11 +85,6 @@ class FixBillplzFailedCallbackPayment extends Command
$transactions = Transaction::where('type', TransactionType::PAYMENT)->where('payment_method', PaymentMethodType::PAYMENT_GATEWAY)->whereNotIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
$totalTransactions = count($transactions);
if ($totalTransactions) {
$this->info(Carbon::now() . ' : Fix failled callback from billplz cron started.');
}
$counter = 1;
$totalAmount = 0;
foreach ($transactions as $transaction){
@@ -184,9 +180,6 @@ class FixBillplzFailedCallbackPayment extends Command
$end = new Carbon();
$elapsedTime = $start->diff($end)->format('%H:%I:%S');
if ($totalTransactions) {
$this->info(Carbon::now() . ' : Done Billplz Failled Callback. ElapsedTime: ' . $elapsedTime . '. Total: ' . $totalAmount);
}
$this->info(Carbon::now() . ' : Done Billplz Failled Callback. ElapsedTime: ' . $elapsedTime . '. Total: ' . $totalAmount);
}
}
+18 -13
View File
@@ -28,30 +28,35 @@ class Kernel extends ConsoleKernel
protected function schedule(Schedule $schedule)
{
$schedule->command('command:curlVTCommand')
->cron('0 8 * * *')
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/curlvt.log');
// $schedule->command('command:curlVTCommand')
// ->cron('0 8 * * *')
// ->withoutOverlapping()
// ->appendOutputTo (storage_path().'/logs/curlvt.log');
$schedule->command('command:curlYdOrderListCommand')
->cron('30 9-18/3 * * *')
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/curlyd.log');
// $schedule->command('command:curlYdOrderListCommand')
// ->cron('30 9-18/3 * * *')
// ->withoutOverlapping()
// ->appendOutputTo (storage_path().'/logs/curlyd.log');
$schedule->command('command:curlYdOrderListCommand')
->cron('0 9 * * *')
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/departure_email.log');
// $schedule->command('command:curlYdOrderListCommand')
// ->cron('0 9 * * *')
// ->withoutOverlapping()
// ->appendOutputTo (storage_path().'/logs/departure_email.log');
$schedule->command('invoice:generate')
->hourly()
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/auto_generate_invoice.log');
$schedule->command('approve:invoice')
->hourly()
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/approve_invoice.log');
$schedule->command('billplz-failed-callback:fix')
->dailyAt('00:00')
->withoutOverlapping()
->appendOutputTo (storage_path().'/logs/fix_failed_callback_from_billplz.log');
->appendOutputTo (storage_path().'/logs/dix_failed_callback_from_billplz.log');
}
/**
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers\HelpMenu;
use App\Classes\Modules\HelpMenu\ControllersLogic\FetchHelpMenuQuestionLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FetchHelpMenuQuestionController
{
/**
* @param Request $request
* @param FetchHelpMenuQuestionLogic $logic
* @return JsonResponse
*/
public function fetch(Request $request, FetchHelpMenuQuestionLogic $logic): JsonResponse {
return $logic->execute($request);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers\HelpMenu;
use App\Classes\Modules\HelpMenu\ControllersLogic\UpdateHelpMenuNextQuestionLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class UpdateHelpMenuNextQuestionController
{
/**
* @param Request $request
* @param FetchQAQuestionListLogic $logic
* @return JsonResponse
*/
public function fetch(Request $request, UpdateHelpMenuNextQuestionLogic $logic): JsonResponse {
return $logic->execute($request);
}
}
@@ -19,7 +19,39 @@ use Illuminate\Http\Request;
class MonthlyReportController
{
public function salesReport(Request $request): JsonResponse {
/**
* Get Containers
* @param $from
* @param $to
* @return mixed
*/
private function getContainersByLoadingDate($from, $to)
{
return Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
}
private function getPackages($from, $to)
{
$containers = $this->getContainersByLoadingDate($from, $to);
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
return $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
}
public function salesReport(Request $request): JsonResponse
{
$from = $request->route('from') ? Carbon::parse($request->route('from')) : Carbon::now()->startOfMonth();
$to = $request->route('to') ? Carbon::parse($request->route('to')) : Carbon::now()->endOfMonth();
@@ -39,16 +71,18 @@ class MonthlyReportController
return $container->orders;
})->unique();
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packages = $this->getPackages($from, $to);
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
/* $packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});*/
$totalCbm = $packages->sum(function($package){
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
@@ -89,19 +123,18 @@ class MonthlyReportController
$model = (int) $request->route('model');
$value = (float) $request->route('value');
$packages = $this->getPackages($from, $to);
$containers = Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
/* $packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});*/
$totalCbm = $packages->sum(function($package){
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
@@ -142,18 +175,20 @@ class MonthlyReportController
$from = $request->route('from') ? Carbon::parse($request->route('from')) : Carbon::parse('01-01-2018');
$to = $request->route('to') ? Carbon::parse($request->route('to')) : Carbon::now();
$containers = Container::whereBetween('loading_date', [$from, $to])->orderBy('loading_date')->get();
/* $containers = $this->getContainersByLoadingDate($from, $to);
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packingLists = $containers->flatMap(function ($container) {
return $container->packingLists;
});
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});
$packages = $packingLists->map(function ($packingList) {
$replica = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) ? $packingList : $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
return $replica ? $replica : $packingList;
})->flatMap(function ($packingList) {
return $packingList->packages;
});*/
$packages = $this->getPackages($from, $to);
$packages = $packages->filter(function($package) use ($id) {
return $package->companyModule->id === $id;
@@ -210,17 +245,19 @@ class MonthlyReportController
$minCbm = $request->input('cbm');
$minOrders = $request->input('minOrders');
$activeCompanies = CompanyModule::where('type', \App\Classes\ValueObjects\Constants\BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($inactive_start, $inactive_end) {
return $query->where('packing_lists.type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
return $query->where('drop_date', '>=', \Carbon\Carbon::parse($inactive_start))->where('drop_date', '<=', \Carbon\Carbon::parse($inactive_end)->addDay());
});
})->pluck('id');
/* $activeCompanies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function ($query) use ($inactive_start, $inactive_end) {
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
return $query->where('drop_date', '>=', Carbon::parse($inactive_start))->where('drop_date', '<=', Carbon::parse($inactive_end)->addDay());
});
})->pluck('id');
$companies = CompanyModule::where('type', \App\Classes\ValueObjects\Constants\BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($active_start, $active_end) {
return $query->where('packing_lists.type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
return $query->whereDate('drop_date', '>=', \Carbon\Carbon::parse($active_start))->whereDate('drop_date', '<=', \Carbon\Carbon::parse($active_end)->addDay());
});
})->whereNotIn('id', $activeCompanies)->get();
$companies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function ($query) use ($active_start, $active_end) {
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
return $query->whereDate('drop_date', '>=', Carbon::parse($active_start))->whereDate('drop_date', '<=', Carbon::parse($active_end)->addDay());
});
})->whereNotIn('id', $activeCompanies)->get();*/
$companies = getActiveCompanies($inactive_start, $inactive_end, $active_start, $active_end);
$customerActivityData = [];
$counter = 1;
@@ -240,7 +277,7 @@ class MonthlyReportController
if ($minOrders != 'null' && $packingList->count() < $minOrders) { continue; }
array_push($customerActivityData, array(
'key' => $counter,
'key' => $counter,
'marking' => $marking,
'packingListCount'=> $packingList->count(),
'totalCbm'=> $totalCbm,
@@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers\Transactions;
use App\Classes\Modules\Transactions\ControllersLogic\CreateCombinedInvoicesLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class CreateCombinedInvoicesController
{
public function combine(Request $request, CreateCombinedInvoicesLogic $logic): JsonResponse {
return $logic->execute($request);
}
}
+2
View File
@@ -38,11 +38,13 @@ class Kernel extends HttpKernel
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
// \App\Http\Middleware\WebRouteLogs::class,
],
'api' => [
'throttle:300,1',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
// \App\Http\Middleware\ApiRouteLogs::class,
],
'apipub' => [
+64
View File
@@ -0,0 +1,64 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Models\RouteLog;
use App\Classes\ValueObjects\Constants\RouteType;
use Illuminate\Support\Facades\Auth;
class ApiRouteLogs
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
$ip_address = getenv('REMOTE_ADDR') == '::1' ? '127.0.0.1' : getenv('REMOTE_ADDR');
$url = urldecode($request->fullUrl());
$request_method = $request->method();
$platform = $request->header('sec-ch-ua-platform');
$browser = Str::after($request->header('sec-ch-ua'), 'Not?A_Brand";v="8", "Chromium";v="108", "');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$ip_address"));
$longitude = $geo["geoplugin_longitude"];
$latitude = $geo["geoplugin_latitude"];
$last_page = url()->previous();
$countryName = $geo["geoplugin_countryName"];
$user_id = Auth::user() ? Auth::user()->id : 0;
// if ($user_id != 0) {
// // $ip_address
// $webRouteLogWithSameIp = RouteLog::where('ip_address', $ip_address)->where('user_id', 0)->get();
// dd($webRouteLogWithSameIp);
// foreach($webRouteLogWithSameIp as $result){
// $result
// }
// }
$route_log = [
'user_id' => $user_id,
// 'ip_address' => $request->ip(),
'ip_address' => $ip_address,
'url' => $url,
'request_method' => $request_method,
'browser' => $browser,
'platform' => $platform,
'longitude' => $longitude,
'latitude' => $latitude,
'last_page' => $last_page,
'countryname' => $countryName,
'route_type' => RouteType::API,
];
RouteLog::create($route_log);
return $next($request);
}
}
+55
View File
@@ -0,0 +1,55 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Models\RouteLog;
use App\Classes\ValueObjects\Constants\RouteType;
use Illuminate\Support\Facades\Auth;
class WebRouteLogs
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
$ip_address = getenv('REMOTE_ADDR') == '::1' ? '127.0.0.1' : getenv('REMOTE_ADDR');
$url = $request->fullUrl();
$request_method = $request->method();
$platform = $request->header('sec-ch-ua-platform');
$browser = Str::after($request->header('sec-ch-ua'), 'Not?A_Brand";v="8", "Chromium";v="108", "');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$ip_address"));
$longitude = $geo["geoplugin_longitude"];
$latitude = $geo["geoplugin_latitude"];
$last_page = url()->previous();
$countryName = $geo["geoplugin_countryName"];
$route_log = [
'user_id' => Auth::user() ? Auth::user()->id : 0,
// 'ip_address' => $request->ip(),
'ip_address' => $ip_address,
'url' => $url,
'request_method' => $request_method,
'browser' => $browser,
'platform' => $platform,
'longitude' => $longitude,
'latitude' => $latitude,
'last_page' => $last_page,
'countryname' => $countryName,
'route_type' => RouteType::WEB,
];
// dd($route_log);
RouteLog::create($route_log);
return $next($request);
}
}
+12
View File
@@ -28,4 +28,16 @@ class DocumentResource extends JsonResource
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A')
];
}
/**
* include only when should include file, to be loaded if needed in the UI
* @param bool $includeFile
* @return bool
*/
private function shouldIncludeFiles(bool $includeFile): bool
{
return $includeFile;
}
}
@@ -0,0 +1,26 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class HelpMenuAnswerOptionsResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'display_text' => $this->display_text,
'value' => $this->value,
'order' => $this->order,
'question_number' => $this->question_number,
'next_question_number' => $this->next_question_number,
];
}
}
@@ -0,0 +1,53 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
use App\Models\QAQuestions;
use App\Models\QAAnswerOptions;
use App\Models\QAUserAnswerSelected;
class HelpMenuQuestionResource extends JsonResource
{
/** @var integer */
private $userId;
/** @var QAQuestions*/
private $question;
public function __construct($question, $userId) {
$this->question = $question;
$this->userId = $userId;
}
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
if($this->question){
$q = (object)$this->question;
return [
'id' => $q->id,
'question_number' => $q->question_number,
'question_text' => $q->question_text,
'question_type' => $q->question_type,
'question_answers' => HelpMenuAnswerOptionsResource::collection(QAAnswerOptions::where('question_number', $q->question_number)->get()),
'questionnaire_set_id' => $q->questionnaire_set_id,
'next_nested_question' => $q->next_nested_question,
'next_main_question' => $q->next_main_question,
'is_start' => $q->is_start,
'is_end' => $q->is_end,
'end_text' => $q->end_text,
'order' => $q->order,
'answer' => QAUserAnswerSelected::where('question_id', $q->id)->where('user_id', $this->userId)->first(),
'questionnaire_answers' => $q->is_end ? HelpMenuQuestionnaireAnswersResource::collection(QAUserAnswerSelected::where('user_id', $this->userId)->get()) : null,
];
}
else{
return [];
}
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
use App\Models\QAQuestions;
class HelpMenuQuestionnaireAnswersResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
$question = QAQuestions::where('id', $this->question_id)->first();
return [
'question_text' => $question ? $question->question_text : null,
'free_text_answer' => $this->free_text_answer
];
}
}
+1 -2
View File
@@ -5,7 +5,6 @@ namespace App\Http\Resources;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\TransportType;
use Carbon\Carbon;
use Illuminate\Http\Resources\Json\JsonResource;
@@ -48,7 +47,7 @@ class OrderResource extends JsonResource
];
}),
'invoices' => $this->whenLoaded('packingLists', function() {
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->where('transactions.type', TransactionType::SHIPPING_INVOICE)->get());
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->get());
}),
'remarks' => RemarkResource::collection($this->remarks),
'created_at' => $this->created_at->format('d-m-Y')
+49
View File
@@ -0,0 +1,49 @@
<?php
//global helpers functions here
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Models\Company;
use App\Models\CompanyModule;
use Carbon\Carbon;
/**
* Get Active companies
* TODO add extract BusinessType::IMPORTER to a $businessType parameter
* @param $inactive_start
* @param $inactive_end
* @param $active_start
* @param $active_end
* @return mixed
*/
if (!function_exists('getActiveCompanies')) {
function getActiveCompanies($inactive_start, $inactive_end, $active_start, $active_end)
{
$activeCompanies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function ($query) use ($inactive_start, $inactive_end) {
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
return $query->where('drop_date', '>=', Carbon::parse($inactive_start))->where('drop_date', '<=', Carbon::parse($inactive_end)->addDay());
});
})->pluck('id');
return CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function ($query) use ($active_start, $active_end) {
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
return $query->whereDate('drop_date', '>=', Carbon::parse($active_start))->whereDate('drop_date', '<=', Carbon::parse($active_end)->addDay());
});
})->whereNotIn('id', $activeCompanies)->get();
}
}
/**
*
* Get Packing List
* TODO change all packing related query to this
* @param Company $company
* @return mixed
*/
if (!function_exists('getPackingList')) {
function getPackingList(Company $company)
{
return $company->orderPackingLists()->where('packing_lists.type', PackingListType::SHIPPING_PACKING_LIST)->get();
}
}
+52 -4
View File
@@ -5,24 +5,72 @@ namespace App\Models;
use App\Classes\General\Interfaces\Documentable;
use App\Classes\General\Interfaces\Contactable;
use App\Classes\ValueObjects\Constants\BusinessType;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
use Staudenmeir\EloquentHasManyDeep\HasManyDeep;
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
/**
* Class Company
* @package App\Models
*
* @property \App\Models\Country country_id
* @property \App\Models\State state_id
* @property \App\Models\District district_id
* @package App\Models
* @property Country country_id
* @property State state_id
* @property District district_id
* @property string postcode
* @property string street_one
* @property string street_two
* @property integer billing_type
* @property int $id
* @property string $name
* @property string $reference
* @property string|null $debtor
* @property int $type
* @property int $status
* @property Carbon|null $deleted_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Collection|Address[] $addresses
* @property-read int|null $addresses_count
* @property-read Collection|BankAccount[] $banks
* @property-read int|null $banks_count
* @property-read Model|Eloquent $causer
* @property-read Collection|CompanyModule[] $companyModules
* @property-read int|null $company_modules_count
* @property-read Collection|Contact[] $contacts
* @property-read int|null $contacts_count
* @property-read Collection|Document[] $documents
* @property-read int|null $documents_count
* @property-read Collection|User[] $employees
* @property-read int|null $employees_count
* @property-read Model|Eloquent $subject
* @property-read Model|Eloquent $target
* @method static Builder|Company newModelQuery()
* @method static Builder|Company newQuery()
* @method static \Illuminate\Database\Query\Builder|Company onlyTrashed()
* @method static Builder|Company query()
* @method static Builder|Company whereCreatedAt($value)
* @method static Builder|Company whereDebtor($value)
* @method static Builder|Company whereDeletedAt($value)
* @method static Builder|Company whereId($value)
* @method static Builder|Company whereName($value)
* @method static Builder|Company whereReference($value)
* @method static Builder|Company whereStatus($value)
* @method static Builder|Company whereType($value)
* @method static Builder|Company whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|Company withTrashed()
* @method static \Illuminate\Database\Query\Builder|Company withoutTrashed()
* @mixin Eloquent
*/
class Company extends AbstractModel implements Documentable, Contactable
{
+34 -1
View File
@@ -2,13 +2,18 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
/**
* Class Contact
* @package App\Models
*
* @package App\Models
* @property int owner_id
* @property string owner_type
* @property string reference
@@ -16,6 +21,34 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
* @property string email
* @property string wechat_id
* @property int default
* @property int $id
* @property Carbon|null $deleted_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Model|\Eloquent $causer
* @property-read Model|\Eloquent $owner
* @property-read Model|\Eloquent $subject
* @property-read Model|\Eloquent $target
* @method static Builder|Contact newModelQuery()
* @method static Builder|Contact newQuery()
* @method static \Illuminate\Database\Query\Builder|Contact onlyTrashed()
* @method static Builder|Contact query()
* @method static Builder|Contact whereCreatedAt($value)
* @method static Builder|Contact whereDefault($value)
* @method static Builder|Contact whereDeletedAt($value)
* @method static Builder|Contact whereEmail($value)
* @method static Builder|Contact whereId($value)
* @method static Builder|Contact whereOwnerId($value)
* @method static Builder|Contact whereOwnerType($value)
* @method static Builder|Contact wherePhone($value)
* @method static Builder|Contact whereReference($value)
* @method static Builder|Contact whereUpdatedAt($value)
* @method static Builder|Contact whereWechatId($value)
* @method static \Illuminate\Database\Query\Builder|Contact withTrashed()
* @method static \Illuminate\Database\Query\Builder|Contact withoutTrashed()
* @mixin \Eloquent
*/
class Contact extends AbstractModel
{
+39 -2
View File
@@ -3,17 +3,21 @@
namespace App\Models;
use Carbon\Traits\Timestamp;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\hasMany;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
/**
* Class Document
* @package App\Models
* @version August 4, 2020, 4:36 am
*
* @property int owner_id
* @property int owner_type
* @property int document_type
@@ -23,6 +27,39 @@ use Illuminate\Database\Eloquent\Relations\hasMany;
* @property timestamp issued_date
* @property timestamp expired_date
* @property timestamp approved_date
* @property int $id
* @property string|null $approval_date
* @property Carbon|null $deleted_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Model|\Eloquent $causer
* @property-read Collection|File[] $files
* @property-read int|null $files_count
* @property-read Model|\Eloquent $owner
* @property-read Model|\Eloquent $subject
* @property-read Model|\Eloquent $target
* @method static Builder|Document newModelQuery()
* @method static Builder|Document newQuery()
* @method static \Illuminate\Database\Query\Builder|Document onlyTrashed()
* @method static Builder|Document query()
* @method static Builder|Document whereApprovalDate($value)
* @method static Builder|Document whereApprover($value)
* @method static Builder|Document whereCreatedAt($value)
* @method static Builder|Document whereDeletedAt($value)
* @method static Builder|Document whereDocumentType($value)
* @method static Builder|Document whereExpiredDate($value)
* @method static Builder|Document whereId($value)
* @method static Builder|Document whereIssuedDate($value)
* @method static Builder|Document whereOwnerId($value)
* @method static Builder|Document whereOwnerType($value)
* @method static Builder|Document whereReference($value)
* @method static Builder|Document whereStatus($value)
* @method static Builder|Document whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|Document withTrashed()
* @method static \Illuminate\Database\Query\Builder|Document withoutTrashed()
* @mixin \Eloquent
*/
class Document extends AbstractModel
{
@@ -43,7 +80,7 @@ class Document extends AbstractModel
/**
* @return hasMany
*/
public function files(): hasMany
public function files(): hasMany
{
return $this->hasMany(File::class, 'document_id');
}
+30 -2
View File
@@ -2,17 +2,45 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
/**
* Class File
*
* @package App\Models
* @version August 4, 2020, 4:36 am
*
* @property \App\Models\Document document_id
* @property Document document_id
* @property text file
* @property int file_type_id
* @property int $id
* @property string $file_type
* @property Carbon|null $deleted_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Model|\Eloquent $causer
* @property-read Model|\Eloquent $subject
* @property-read Model|\Eloquent $target
* @method static Builder|File newModelQuery()
* @method static Builder|File newQuery()
* @method static \Illuminate\Database\Query\Builder|File onlyTrashed()
* @method static Builder|File query()
* @method static Builder|File whereCreatedAt($value)
* @method static Builder|File whereDeletedAt($value)
* @method static Builder|File whereDocumentId($value)
* @method static Builder|File whereFile($value)
* @method static Builder|File whereFileType($value)
* @method static Builder|File whereId($value)
* @method static Builder|File whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|File withTrashed()
* @method static \Illuminate\Database\Query\Builder|File withoutTrashed()
* @mixin \Eloquent
*/
class File extends AbstractModel
{
+3
View File
@@ -19,6 +19,9 @@ use Illuminate\Database\Eloquent\Relations\MorphMany;
use Staudenmeir\EloquentHasManyDeep\HasManyDeep;
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
/**
* @method static whereBetween(string $string, array $array)
*/
class Order extends AbstractModel implements Addressable, Packable, Remarkable, Notifiable
{
use SoftDeletes;
+9
View File
@@ -0,0 +1,9 @@
<?php
namespace App\Models;
class QAAnswerOptions extends AbstractModel
{
protected $table = 'qa_answer_options';
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasMany;
class QAQuestionnaireSet extends AbstractModel
{
protected $table = 'qa_questionnaire_sets';
}
+9
View File
@@ -0,0 +1,9 @@
<?php
namespace App\Models;
class QAQuestions extends AbstractModel
{
protected $table = 'qa_questions';
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use App\Classes\General\Interfaces\Documentable;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphMany;
/**
* Class Contact
* @package App\Models
*/
class QAUserAnswerSelected extends AbstractModel implements Documentable
{
protected $table = 'qa_user_answer_selected';
/**
* @return MorphMany
*/
public function documents(): morphMany
{
return $this->morphMany(Document::class, 'owner');
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class RouteLog extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'ip_address',
'url',
'request_method',
'browser',
'platform',
'longitude',
'latitude',
'last_page',
'countryname',
'route_type'
];
}
+67 -1
View File
@@ -2,10 +2,19 @@
namespace App\Models;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Notifications\DatabaseNotificationCollection;
use Illuminate\Support\Carbon;
use Spatie\Activitylog\Models\Activity;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -19,13 +28,70 @@ use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
/**
* App\Models\User
*
* @property int $id
* @property string $name
* @property string $email
* @property string $password
* @property int $type
* @property int $status
* @property string|null $remember_token
* @property string|null $active_at
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property-read Collection|Activity[] $activities
* @property-read int|null $activities_count
* @property-read Model|\Eloquent $causer
* @property-read Collection|CompanyModule[] $companyModule
* @property-read int|null $company_module_count
* @property-read Collection|Contact[] $contacts
* @property-read int|null $contacts_count
* @property-read Collection|UserEmailVerification[] $emailVerification
* @property-read int|null $email_verification_count
* @property-read DatabaseNotificationCollection|DatabaseNotification[] $notifications
* @property-read int|null $notifications_count
* @property-read Collection|PasswordReset[] $passwordReset
* @property-read int|null $password_reset_count
* @property-read Collection|Permission[] $permissions
* @property-read int|null $permissions_count
* @property-read Collection|Remark[] $remarks
* @property-read int|null $remarks_count
* @property-read Collection|Role[] $roles
* @property-read int|null $roles_count
* @property-read Model|\Eloquent $subject
* @property-read Model|\Eloquent $target
* @method static UserFactory factory(...$parameters)
* @method static Builder|User newModelQuery()
* @method static Builder|User newQuery()
* @method static \Illuminate\Database\Query\Builder|User onlyTrashed()
* @method static Builder|User permission($permissions)
* @method static Builder|User query()
* @method static Builder|User role($roles, $guard = null)
* @method static Builder|User whereActiveAt($value)
* @method static Builder|User whereCreatedAt($value)
* @method static Builder|User whereDeletedAt($value)
* @method static Builder|User whereEmail($value)
* @method static Builder|User whereId($value)
* @method static Builder|User whereName($value)
* @method static Builder|User wherePassword($value)
* @method static Builder|User whereRememberToken($value)
* @method static Builder|User whereStatus($value)
* @method static Builder|User whereType($value)
* @method static Builder|User whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|User withTrashed()
* @method static \Illuminate\Database\Query\Builder|User withoutTrashed()
* @mixin \Eloquent
*/
class User extends AbstractModel implements
JWTSubject,
AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
{
use HasRoles, Notifiable, Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail, SoftDeletes;
use HasRoles, Notifiable, Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail, SoftDeletes, HasFactory;
protected $dates = ['deleted_at'];
+63
View File
@@ -0,0 +1,63 @@
<?php
namespace App\Transformers;
use App\Models\Company;
use Illuminate\Support\Facades\Crypt;
use League\Fractal\Resource\Item;
use League\Fractal\TransformerAbstract;
class CompanyTransformer extends TransformerAbstract
{
/**
* List of all default includes
*/
protected array $defaultIncludes = [
'contact',
];
/**
* List of all possible includes
* @var array|string[]
*/
protected array $availableIncludes = [
'segments',
'employee',
'company_module',
'last_order',
'order_count',
'identification',
];
public function transform(Company $company): array
{
return [
'id' => $company->id,
'hash_id' => Crypt::encryptString($company->id),
'name' => $company->name,
'debtor' => $company->debtor,
'reference' => $company->reference,
'type' => $company->type,
'business_type' => (int)$company->business_type,
'status' => $company->status,
'created_at' => $company->created_at->format('d-m-Y')
];
}
/**
* Include Contact
*
* @return Item
*/
public function includeContact(Company $company): Item
{
$contact = $company->contacts();
return $this->item($contact->first(), new ContactTransformer());
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Transformers;
use App\Models\Contact;
use League\Fractal\TransformerAbstract;
class ContactTransformer extends TransformerAbstract
{
/**
* Additional includes to the ContactResource
*/
protected array $defaultIncludes = [
];
/**
* Transform contact
* @param Contact $contact
* @return array
*/
public function transform(Contact $contact): array
{
return [
'id' => $contact->id,
'reference' => $contact->reference,
'phone' => $contact->phone,
'email' => $contact->email,
'wechat_id' => $contact->wechat_id,
];
}
}
+52
View File
@@ -0,0 +1,52 @@
<?php
namespace App\Transformers;
use App\Models\Document;
use Carbon\Carbon;
use League\Fractal\Resource\Collection;
use League\Fractal\Resource\Item;
use League\Fractal\TransformerAbstract;
class DocumentTransformer extends TransformerAbstract
{
/**
* Default Includes for Document Module
* @var array
*/
protected array $defaultIncludes = [
'files'
];
/**
* Available includes
* @var array
*/
protected array $availableIncludes = [
'owner'
];
public function transform(Document $document): array
{
return [
'id' => $document->id,
'reference' => $document->reference,
'status' => $document->status,
'document_type' => $document->document_type,
'created_at' => Carbon::parse($document->created_at)->format('d-m-Y h:i:s A')
];
}
public function includeFiles(Document $document): Collection
{
$files = $document->files;
return $this->collection($files, new FileTransformer());
}
public function includeOwner(Document $document): Item
{
$owner = $document->owner;
return $this->item($owner, new CompanyTransformer());
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Transformers;
use App\Models\File;
use League\Fractal\TransformerAbstract;
class FileTransformer extends TransformerAbstract
{
/**
* AA Array of possible includes for file model
* @var array
*/
protected array $availableIncludes = [
];
/**
* Transform File
* @param File $file
* @return array
*/
public function transform(File $file): array
{
return [
'id' => $file->id,
'file' => $file->file,
'type' => (int)$file->file_type,
];
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Transformers;
use App\Models\User;
use League\Fractal\TransformerAbstract;
class UserTransformer extends TransformerAbstract
{
/**
* List of default User modal includes
* @var array
*/
protected array $defaultIncludes = [
];
/**
* User Modal Available includes
* @var array
*/
protected array $availableIncludes = [
];
public function transform(User $user): array
{
return [
'id' => $user->id,
'name' => $user->name,
'email' => $user->email,
'type' => $user->type,
'status' => $user->status
];
}
}
+12
View File
@@ -0,0 +1,12 @@
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
params:
- .env.testing
+21 -3
View File
@@ -2,29 +2,44 @@
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3",
"ext-fileinfo": "^7.3",
"ext-json": "*",
"barryvdh/laravel-dompdf": "^0.9.0",
"carlos-meneses/laravel-mpdf": "^2.1",
"carlos-meneses/laravel-mpdf": "*",
"doctrine/dbal": "^3.1",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"intervention/image": "^2.5",
"laravel/framework": "^8.40",
"laravel/legacy-factories": "^1.3",
"laravel/tinker": "^2.5",
"laravel/vapor-cli": "^1.55",
"laravel/vapor-core": "^2.30",
"league/fractal": "^0.20.1",
"maatwebsite/excel": "^3.1",
"rinvex/countries": "^6.1",
"spatie/laravel-activitylog": "^3.14",
"spatie/laravel-fractal": "^5.8",
"spatie/laravel-permission": "^4.2",
"staudenmeir/eloquent-has-many-deep": "^1.7",
"tymon/jwt-auth": "^1.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.12",
"codeception/codeception": "^4.2",
"codeception/module-asserts": "^2.0",
"codeception/module-laravel": "^2.3",
"codeception/module-phpbrowser": "^2.0",
"codeception/module-rest": "^2.0",
"codeception/module-webdriver": "^2.0",
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
@@ -42,7 +57,10 @@
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"files": [
"app/Library/helper.php"
]
},
"scripts": {
"post-autoload-dump": [
-14
View File
@@ -25,23 +25,9 @@ class UserFactory extends Factory
return [
'name' => $this->faker->name(),
'email' => $this->faker->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
public function unverified()
{
return $this->state(function (array $attributes) {
return [
'email_verified_at' => null,
];
});
}
}
@@ -0,0 +1,42 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRouteLogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('route_logs', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->unsigned();
$table->string('ip_address');
$table->string('url', 255);
$table->string('request_method');
$table->string('browser')->nullable();
$table->string('platform')->nullable();
$table->string('longitude')->nullable();
$table->string('latitude')->nullable();
$table->string('last_page')->nullable();
$table->string('countryname')->nullable();
$table->integer('route_type');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('route_logs');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateQAQuestionnaireSetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('qa_questionnaire_sets', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->unsignedSmallInteger('order')->default(0);
$table->unsignedBigInteger('next_set')->nullable();
$table->unsignedSmallInteger('version')->default(1);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('qa_questionnaire_sets');
}
}
@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateQAQuestionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('qa_questions', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('question_number');
$table->text('question_text');
$table->unsignedBigInteger('questionnaire_set_id');
$table->unsignedBigInteger('next_nested_question')->nullable();
$table->unsignedBigInteger('next_main_question')->nullable();
$table->unsignedBigInteger('question_type');
$table->tinyInteger('is_start');
$table->tinyInteger('is_end');
$table->string('end_text')->nullable();
$table->unsignedInteger('order')->default(0);
$table->timestamps();
$table->softDeletes();
$table->foreign('questionnaire_set_id')->references('id')->on('qa_questionnaire_sets');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('qa_questions');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateQAAnswerOptionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('qa_answer_options', function (Blueprint $table) {
$table->id();
$table->text('display_text');
$table->string('value');
$table->unsignedSmallInteger('order')->default(0);
$table->unsignedBigInteger('question_number');
$table->unsignedBigInteger('next_question_number')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('qa_answer_options');
}
}
@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateQAUserAnswerSelectedTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('qa_user_answer_selected', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('question_id');
$table->unsignedBigInteger('answer_option_id')->default(0);
$table->string('free_text_answer')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('question_id')->references('id')->on('qa_questions');
// $table->foreign('answer_option_id')->references('id')->on('qa_answer_options');
$table->foreign('user_id')->references('id')->on('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('qa_answer_option_selections');
}
}
+3
View File
@@ -21,5 +21,8 @@ class DatabaseSeeder extends Seeder
$this->call(SegmentConstantsTableSeeder::class);
$this->call(DummyDataSeeder::class);
// $this->call(QAQuestionSeeder::class);
// $this->call(QAAnswerOptionsSeeder::class);
}
}
+155
View File
@@ -0,0 +1,155 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\QAAnswerOptions;
class QAAnswerOptionsSeeder extends Seeder
{
public function run()
{
// Option 1 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Billing";
$answerOption->value = "Billing";
$answerOption->question_number = 10;
$answerOption->next_question_number = 100;
$answerOption->save();
// Option 2 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Shipping";
$answerOption->value = "Shipping";
$answerOption->question_number = 10;
$answerOption->next_question_number = 100;
$answerOption->save();
// Option 3 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Returns";
$answerOption->value = "Returns";
$answerOption->question_number = 10;
$answerOption->next_question_number = 100;
$answerOption->save();
// Option 4 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Product Information";
$answerOption->value = "Product Information";
$answerOption->question_number = 10;
$answerOption->next_question_number = 100;
$answerOption->save();
// Option 5 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Technical Support";
$answerOption->value = "Technical Support";
$answerOption->question_number = 10;
$answerOption->next_question_number = 100;
$answerOption->save();
// Option 6 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Shipping Fee Calculation";
$answerOption->value = "Shipping Fee Calculation";
$answerOption->question_number = 10;
$answerOption->next_question_number = 600;
$answerOption->save();
// Option 7 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Error-in Measurements";
$answerOption->value = "Error-in Measurements";
$answerOption->question_number = 10;
$answerOption->next_question_number = 700;
$answerOption->save();
// Option 8 for Question 10
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Contact Us";
$answerOption->value = "Contact Us";
$answerOption->question_number = 10;
$answerOption->next_question_number = 800;
$answerOption->save();
// Option 1 for Question 20
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 1 for Question 20";
$answerOption->value = "Option 1 for Question 20";
$answerOption->question_number = 20;
$answerOption->save();
// Option 2 for Question 20
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 2 for Question 20";
$answerOption->value = "Option 2 for Question 20";
$answerOption->question_number = 20;
$answerOption->save();
// Option 1 for Question 100
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 1 for Question 100";
$answerOption->value = "Option 1 for Question 100";
$answerOption->question_number = 100;
$answerOption->save();
// Option 2 for Question 100
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 2 for Question 100";
$answerOption->value = "Option 2 for Question 100";
$answerOption->question_number = 100;
$answerOption->save();
// Option 1 for Question 30
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 1 for Question 30";
$answerOption->value = "Option 1 for Question 30";
$answerOption->question_number = 30;
$answerOption->save();
// Option 2 for Question 30
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 2 for Question 30";
$answerOption->value = "Option 2 for Question 30";
$answerOption->question_number = 30;
$answerOption->save();
// Option 3 for Question 30
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 3 for Question 30";
$answerOption->value = "Option 3 for Question 30";
$answerOption->question_number = 30;
$answerOption->save();
// Option 1 for Question 300
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 1 for Question 300";
$answerOption->value = "Option 1 for Question 300";
$answerOption->question_number = 300;
$answerOption->save();
// Option 2 for Question 300
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 2 for Question 300";
$answerOption->value = "Option 2 for Question 300";
$answerOption->question_number = 300;
$answerOption->save();
// Option 3 for Question 300
$answerOption = new QAAnswerOptions;
$answerOption->display_text = "Option 3 for Question 300";
$answerOption->value = "Option 3 for Question 300";
$answerOption->question_number = 300;
$answerOption->save();
// Option 1 for Question 600
$answerOption = new QAAnswerOptions;
$answerOption->display_text = '<h1>Et harum accusamus eum quis dolorum? </h1><p>Lorem ipsum dolor sit amet. Est corporis voluptas et repudiandae libero <em>Aut quis</em>! Est aperiam voluptatum eum quidem rerumnam deserunt sit internos possimus non dolore voluptate. Vel explicabo aliquam <strong>Sit sunt ut maxime voluptatibus non vero libero ad ratione dolore</strong>. </p><h2>Ea incidunt dolor in obcaecati harum ut dignissimos facilis! </h2><p>Et adipisci illo et laborum internos <strong>Nam aperiam est ipsa nisi non quia architecto ut itaque autem</strong>. Eos maiores sunt <em>Et voluptas aut expedita quidem aut odio repellendus eum neque voluptate</em> et iusto nisi vel consequatur quos. Sit doloribus omnis in minima illoQui soluta est omnis quasi vel officia reiciendis qui aliquid quis! Sed odit esse aut sint laborumEa internos et magni amet sed dolores omnis hic totam temporibus ut quia numquam. </p><ul><li>Est soluta praesentium ut vero obcaecati! </li><li>Sit nobis facere in porro rerum et quidem deserunt qui inventore odit. </li></ul><h3>Et laborum quaerat vel animi ipsum. </h3><p>Aut quos libero <a href="https://www.loremipzum.com" target="_blank">Et explicabo qui enim libero id rerum ipsa</a>. Est quod tempora est soluta enimaut quasi aut eligendi fugit et fugit Quis. </p>
';
$answerOption->value = "Answer";
$answerOption->question_number = 600;
$answerOption->save();
}
}
+187
View File
@@ -0,0 +1,187 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\QAQuestionnaireSet;
use App\Models\QAQuestions;
use App\Classes\ValueObjects\Constants\QAType;
class QAQuestionSeeder extends Seeder
{
public function run()
{
$questionnaireSets = [
[
'name' => 'Set 1',
'description' => 'This is set 1 questions',
],
];
foreach ($questionnaireSets as $set) {
$questionnaireSet = QAQuestionnaireSet::create([
'name' => $set['name'],
'description' => $set['description'],
]);
$questions = [];
switch ($set['name']) {
case 'Set 1':
$questions = [
[
'question_number' => 10,
'question_text' => 'Please select one',
'question_type' => QAType::MULTIPLE_CHOICES,
'is_start' => true,
'is_end' => false,
],
[
'question_number' => 20,
'question_text' => 'Question text for question number 20?',
'question_type' => QAType::MULTIPLE_CHOICES,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 30,
'question_text' => 'Question text for question number 30?',
'question_type' => QAType::MULTIPLE_CHOICES,
'next_nested_question' => 300,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 40,
'question_text' => 'What is your name?',
'question_type' => QAType::FREE_TEXT,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 50,
'question_text' => 'The End',
'question_type' => QAType::ANSWER,
'is_start' => false,
'is_end' => true,
],
[
'question_number' => 60,
'question_text' => 'We have received your request and will response as soon as possible.',
'question_type' => QAType::TICKET_CRM,
'is_start' => false,
'is_end' => true,
],
[
'question_number' => 100,
'question_text' => 'Question text for question number 100?',
'question_type' => QAType::MULTIPLE_CHOICES,
'next_nested_question' => 110, //200 //3 digits - first level
'next_main_question' => 20,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 110,
'question_text' => 'Question text for question number 110?',
'question_type' => QAType::FREE_TEXT,
'next_nested_question' => 1000, //1000 //4 digits - second level
'next_main_question' => 20,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 300,
'question_text' => 'Question text for question number 300?',
'question_type' => QAType::MULTIPLE_CHOICES,
'next_main_question' => 40,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 600,
'question_text' => 'Shipping Fee Calculations',
'question_type' => QAType::ANSWER,
'is_start' => false,
'is_end' => true,
],
[
'question_number' => 700,
'question_text' => 'Please enter your measurements',
'question_type' => QAType::FREE_TEXT,
'next_nested_question' => 710,
'next_main_question' => 20,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 710,
'question_text' => 'Please upload the photo proof',
'question_type' => QAType::DOCUMENT_UPLOAD,
'next_main_question' => 60,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 800,
'question_text' => 'What is your name?',
'question_type' => QAType::FREE_TEXT,
'next_nested_question' => 810,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 810,
'question_text' => 'Click Next to speak to our customer service',
'question_type' => QAType::FREE_TEXT,
'is_start' => false,
'is_end' => true,
'end_text' => 'We have received your request and will response as soon as possible.',
],
[
'question_number' => 1000,
'question_text' => 'Question text for question number 1000?',
'question_type' => QAType::FREE_TEXT,
'next_nested_question' => 10000, //10000 - 5 digits - 3rd level
'next_main_question' => 20,
'is_start' => false,
'is_end' => false,
],
[
'question_number' => 10000,
'question_text' => 'Question text for question number 10000?',
'question_type' => QAType::FREE_TEXT,
'next_main_question' => 20,
'is_start' => false,
'is_end' => false,
],
];
break;
}
foreach ($questions as $key => $questionData) {
$question = new QAQuestions;
$question->question_number = $questionData['question_number'];
$question->question_text = $questionData['question_text'];
$question->question_type = $questionData['question_type'];
$question->questionnaire_set_id = $questionnaireSet->id;
if (isset($questionData['next_nested_question'])) {
$question->next_nested_question = $questionData['next_nested_question'];
}
if (isset($questionData['next_main_question'])) {
$question->next_main_question = $questionData['next_main_question'];
}
$question->is_start = $questionData['is_start'];
$question->is_end = $questionData['is_end'];
if (isset($questionData['end_text'])) {
$question->end_text = $questionData['end_text'];
}
$question->order = $key + 1;
$question->save();
}
}
}
}
+40
View File
@@ -0,0 +1,40 @@
version: '3'
services:
web:
build:
context: .
args:
PHP_VERSION: 7.4
ports:
- "9000:9000"
db:
image: mysql:5.7
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: laravel
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
ports:
- "3306:3306"
tests:
build:
context: .
args:
PHP_VERSION: 7.4
command: bash -c "composer install && php artisan migrate --seed && vendor/bin/phpunit"
links:
- db
- redis
acceptance:
image: node:14
working_dir: /app
volumes:
- ./:/app
command: bash -c "npm install && gulp build"
links:
- web
- redis
redis:
image: redis:6.0
ports:
- "6379:6379"
+2 -2
View File
@@ -21,8 +21,8 @@
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<!-- <server name="DB_CONNECTION" value="sqlite"/> -->
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
+3
View File
@@ -0,0 +1,3 @@
FROM laravelphp/vapor:php82
COPY . /var/task
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

@@ -198,6 +198,9 @@
},
methods:{
submitForm(){
if (this.type) {
this.parameters.type = this.type;
}
this.submit(this.data ? (this.route('api.address.update', this.data.id)) : (this.route('api.address.create')), this.data ? 'put' : 'post', 'addressList', true, true);
},
},
@@ -83,11 +83,12 @@
billingAddressFilters: {
per_page: 10,
HasMorphCompanyModule: this.company_module_id,
ownerType: 'App\\Models\\CompanyModule',
type: 1
},
parameters : {
company_module_id: this.company_module_id,
billing_address_id: '',
billing_address_id: null,
},
item:{
id:null
@@ -63,7 +63,7 @@
<div class="row" v-if="selectedInvoice.length">
<div class="col">
<div v-if="section === 'customerPendingPaymentInvoiceComponent'" class="btn btn-success btn-xl pointer m-t-10 w-100 requestModal" data-type="makePayment">Make Payment</div>
<div v-if="['customerPaidInvoiceComponent', 'customerPendingPaymentInvoiceComponent'].includes(section)" class="btn btn-info btn-xl pointer m-t-10 w-100" @click='generateSummaryInvoice'>Generate Summary Invoice</div>
<div v-if="section === 'customerPaidInvoiceComponent'" class="btn btn-info btn-xl pointer m-t-10 w-100" @click='generateSummaryInvoice'>Generate Summary Invoice</div>
</div>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="makePayment">
@@ -84,7 +84,7 @@
<div class="col bg-master-lightest p-1 p-sm-4">
<div class="row tabsContainer tabContent" tab-name="pendingPayment">
<div class="col">
<customer-payment-billing-inner-component :endpoint="route('api.transaction.list')" section="customerPendingPaymentInvoiceComponent" :company_module_id="company_module_id" :options="{'per_page': 10, order_by: {column: 'id', DESC: true}, 'status_in': [2], 'receiver': company_module_id, 'type': 1, 'does_not_have_payment_status_in': [0,1] ,'does_not_have_groups': 1}"></customer-payment-billing-inner-component>
<customer-payment-billing-inner-component :endpoint="route('api.transaction.list')" section="customerPendingPaymentInvoiceComponent" :company_module_id="company_module_id" :options="{'per_page': 10, order_by: {column: 'id', DESC: true}, 'status_in': [2], 'receiver': company_module_id, 'type': 1, 'does_not_have_payment_status_in': [0,1] ,'does_not_have_group_transactions': 1}"></customer-payment-billing-inner-component>
</div>
</div>
<div class="row tabsContainer tabContent hide" tab-name="groupPaymentInProgress">
@@ -1,55 +0,0 @@
<template>
<div class="row">
<div class="col">
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
<div class="row justify-content-center" v-show="!isLoading">
<div class="col">
<div class="row m-b-20">
<div class="col">
<h3 class="all-caps">Are you Sure?</h3>
<div class="fs-11">{{ contentText }}</div>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submit(apiRoute, apiMethod, section, true, true)">{{ buttonText }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import componentHandler from '../../../general/mixins/componentHandler';
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
export default {
props: {
contentText: {
type: String,
required: true
},
modalType: {
type: String,
default: 'confirm'
},
buttonText: {
type: String,
default: 'Confirm'
},
apiRoute: {
type: String,
required: true
},
apiMethod: {
type: String,
required: true
},
},
mixins: [componentHandler, ModalFormHandler]
}
</script>
@@ -0,0 +1,235 @@
<template>
<div class="row">
<div class="col bg-white padding-40 b-rad-lg">
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
<div class="row" v-if="question" v-show="!$store.getters.isLoading(section)">
<div class="col">
<div class="row m-b-5 animate__animated animate__fadeInUpBig animate__fast" v-if="error">
<div class="col">
<small class="bold fs-10 text-danger">{{error}}</small>
</div>
</div>
<div class="row m-b-20">
<div class="col">
<h3>{{question.question_text}}</h3>
</div>
</div>
<div class="row m-b-10" v-if="question.question_type === 4" >
<div class="col" v-for="ans in question.question_answers">
<div v-html="ans.display_text"></div>
</div>
</div>
<div class="row m-b-15" v-else-if="question.question_type === 3">
<div class="col">
<file-input-component :validator="$v.files" v-model="files">
<template slot="label">
<div class="font-heading fs-11 all-caps">Photo or File</div>
</template>
<template slot="tips">
<div class="row" v-show="false">
<div class="col">
<div class="row m-b-20">
<div class="col">
<div class="font-heading fs-11 text-warning m-b-10">{{ documentType === 0 ? 'IC': 'SSM registration'}} number shown in the photo should tally with {{ documentType === 0 ? 'IC': 'SSM registration'}} number provided above.</div>
<div class="font-heading fs-11 muted">Tips on how your photo should look</div>
</div>
</div>
</div>
</div>
</template>
</file-input-component>
</div>
</div>
<div class="row m-b-10" v-show="question.is_end === 0" v-else-if="question.question_type === 1" >
<validation-wrapper-component :validator="$v.answer" class="col">
<div class="col" v-for="ans in question.question_answers">
<div class="col question.answers">
<div class="btn btn-xs btn-block" :answerValue="ans.value" :answerId=ans.id @click="addClass($event, 'question.answers')">{{ ans.display_text }}</div>
</div>
</div>
</validation-wrapper-component>
</div>
<div class="row m-b-10" v-show="question.is_end === 0" v-else>
<div class="col" >
<validation-wrapper-component :validator="$v.answer">
<label>Answer</label>
<input type="text" class="form-control" v-model="answer" @input="formTouched = true">
</validation-wrapper-component>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" @click=" submitForm('previous')">Previous</div>
</div>
<div class="col p-r-5">
<div class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-sm btn-primary btn-block b-rad-none" :disabled="!$v.$dirty || !$v.$valid" @click="formTouched = true; submitForm('next')">{{ data.remarks.length > 0 ? 'Edit' : (question.is_end === 0 ? 'Next' : 'Finish') }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { required } from "vuelidate/lib/validators";
export default {
props: {
data:{
type: Object,
required: true
},
module_type: {
type: String,
required: true
}
},
data(){
return {
section: 'helpMenuForm',
showAnswerInput: false,
showUploadInput: false,
formTouched: false,
question: null,
answer: '',
answerId: 0,
direction: 'next',
documentType: 1,
files: [],
error: null
}
},
validations() {
return {
answer: {
required: this.formTouched && this.showAnswerInput ? required : false,
},
files: {
required: this.formTouched && this.showUploadInput ? required : false,
}
};
},
computed: {
pendingQueue () {
return this.$store.getters.isInCompleteQueue(this.section);
},
parametersExist() {
return Boolean(this.answer);
}
},
watch: {
pendingQueue(inComplete, oldValue){
if(inComplete){
this.fetchCompany();
}
}
},
created(){
this.$store.dispatch('updateListQueue', {'name': this.section});
},
methods: {
fetchCompany(){
this.isLoading = true;
this.submit(route('api.helpmenu.first.question'), 'get', this.section, false, false);
},
successHandler(response){
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
this.question = response.payload.data;
this.reset();
this.removeClass('question.answers');
if(this.question.answer != null && this.direction == "previous"){
this.answer = this.question.answer.free_text_answer;
}
},
errorHandler(error){
this.error = error.message;
},
submitForm(direction) {
this.parameters = {}
this.error = null;
this.direction = direction;
if(this.question.question_type === 3){
this.showAnswerInput = false;
this.showUploadInput = true;
}
else if(this.question.question_type === 1 || (this.question.question_type === 2)){
this.showAnswerInput = true;
this.showUploadInput = false;
}
if(direction === 'next'){
this.parameters.question = this.question;
this.parameters.answer = this.answer;
this.parameters.answerId = this.answerId;
this.parameters.answerObj = this.question.question_answers.find(item => item.id === Number(this.answerId));
this.parameters.files = this.files;
if(this.question.question_type === 4)
{
this.closeModal();
this.reset();
this.fetchCompany();
}
else{
if(this.question.is_end){
if(this.question.question_type === 5){
this.submit(this.route('api.helpmenu.next.question'), 'post', this.section, true, true);
this.closeModal();
this.reset();
}
else{
$crisp.push(["do", "chat:open"]);
const result = [
...this.question.questionnaire_answers.map(item => [item.question_text.replace(/ /g, "_").replace(/\W/g, ''), item.free_text_answer])
];
let payload = [];
payload.push(result);
$crisp.push(["set", "session:data", payload]);
$crisp.push(["do", "message:send", ["text", "Hello there!"]]);
this.closeModal();
this.reset();
this.fetchCompany();
}
}
else{
this.submit(this.route('api.helpmenu.next.question'), 'post', this.section, true, true);
}
}
}
else if(direction === 'previous'){
this.formTouched = false;
this.parameters.question = this.question;
this.parameters.isPrevious = true;
this.submit(this.route('api.helpmenu.next.question'), 'post', this.section, true, true);
}
},
reset() {
this.parameters = null;
this.isLoading = false;
this.answer = '';
this.answerId = 0;
this.files = [];
this.formTouched = false;
this.showAnswerInput = false;
this.showUploadInput = false;
this.error = null;
},
addClass(event, cls) {
const div = event.target;
this.answer = div.getAttribute('answerValue');
this.answerId = div.getAttribute('answerId');
this.removeClass(cls);
div.classList.add('btn-primary');
},
removeClass(cls) {
document.getElementsByClassName(cls).forEach(el => {
const btnPrimaryEl = el.getElementsByClassName('btn-primary')[0];
if (btnPrimaryEl) {
btnPrimaryEl.classList.remove('btn-primary');
}
});
}
},
}
</script>
@@ -36,6 +36,7 @@
</div>
</template>
<script>
import { required } from "vuelidate/lib/validators";
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
export default {
props: {
@@ -58,9 +59,7 @@
},
validations: {
parameters: {
content: {
required: false
}
content: { required: required },
}
},
methods: {
@@ -71,4 +70,4 @@
mixins: [ModalFormHandler]
}
</script>
</script>
@@ -86,7 +86,7 @@
</div>
</div>
</div>
<div class="row justify-content-center" v-if="step === 2">
<div class="row justify-content-center" v-if="step === 2 && !chooseBillingAddress">
<div class="col col-md-10">
<div class="row m-b-20">
<div class="col">
@@ -102,7 +102,7 @@
</div>
<div class="row justify-content-center">
<div class="col col-md-10">
<list-component style="min-height: 50px;" section="addressList" :emptyListSection=false :endpoint="route('api.address.list')" :options="{per_page: 10, HasMorphCompanyModule: company.company_module.id}">
<list-component style="min-height: 50px;" section="addressList" :emptyListSection=false :endpoint="route('api.address.list')" :options="{per_page: 10, HasMorphCompanyModule: company.company_module.id, type:2}">
<template slot="list" slot-scope="{data}">
<select-address-component :data="data" :value="parameters.address_id" v-model="parameters.address_id"></select-address-component>
</template>
@@ -133,7 +133,72 @@
<button type="button" class="btn btn-lg btn-default b-rad-none" @click="step--">back</button>
</div>
<div class="col p-l-5">
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click="createOrder()" v-if="parameters.address_id">Create Order</button>
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click="createOrder()" v-if="parameters.address_id && company.company_module.billingAddress">Create Order</button>
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click=" chooseBillingAddress = !chooseBillingAddress" v-if="parameters.address_id && !company.company_module.billingAddress">Select Billing Address</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row justify-content-center" v-if="step === 2 && chooseBillingAddress">
<div class="col col-md-10">
<div class="row m-b-20">
<div class="col">
<div class="row m-b-20 text-info">
<div class="col text-center">
<h3>Please select the <b>Billing Address</b></h3>
</div>
</div>
<div class="row b-rounded justify-content-center m-b-15" @click="updateBillingAddressFilters">
<div class="col col-md-10 bg-master-lightest margin-auto padding-15">
<div class="row justify-content-center">
<div class="col pointer d-flex justtify-content-center align-items-center">
<i class="fa fs-30 fa-fw" :class="{'fa-square-o': !useDeliveryAddress, 'fa-check-square': useDeliveryAddress, 'text-primary':useDeliveryAddress}" ></i>
<p class="m-b-0">Use Delivery Address</p>
</div>
</div>
</div>
</div>
<div class="row justify-content-center m-b-15" v-if="error">
<div class="col-10">
<small class="text-danger">{{error}}</small>
</div>
</div>
<div class="row justify-content-center">
<div class="col col-md-10">
<list-component :key="currentKey" style="min-height: 50px;" section="addressList" :emptyListSection=false :endpoint="route('api.address.list')" :options="billingAddressFilters">
<template slot="list" slot-scope="{data}">
<select-address-component :data="data" :value="parameters.billing_address_id" v-model="parameters.billing_address_id"></select-address-component>
</template>
</list-component>
<div class="row m-b-10 animate__animated animate__fadeInUpBig animate__delay-1 animate__fast">
<div class="col b-a p-t-15 p-b-15 pointer" :class="{ 'b-primary': !parameters.billing_address_id, 'b-grey': parameters.billing_address_id}" @click="parameters.billing_address_id = null">
<div class="row align-items-center">
<div class="col-auto p-r-0">
<i class="fa fs-20 p-t-5" :class="{'fa-circle-o': parameters.billing_address_id, 'fa-check-circle': !parameters.billing_address_id, 'text-primary': !parameters.billing_address_id}"></i>
</div>
<div class="col-auto semi-bold">New Address</div>
</div>
<div class="row" v-show="!parameters.billing_address_id">
<div class="col">
<address-form-component :type="1" :id="company.company_module.id" section="addressList" @input="parameters.billing_address_id = $event"></address-form-component>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row justify-content-center animate__animated animate__fadeInUpBig animate__delay-1 animate__fast">
<div class="col col-md-8 no-padding">
<div class="row">
<div class="col-auto p-r-5">
<button type="button" class="btn btn-lg btn-default b-rad-none" @click="chooseBillingAddress = !chooseBillingAddress">back</button>
</div>
<div class="col p-l-5">
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click="createOrder()" v-if="parameters.billing_address_id">Create Order</button>
</div>
</div>
</div>
@@ -186,11 +251,20 @@
return {
section: 'createOrderForm',
step: 1,
currentKey: 1,
error: '',
chooseBillingAddress: false,
useDeliveryAddress: false,
billingAddressFilters: {
per_page: 10,
HasMorphCompanyModule: this.company.company_module.id,
type: 1
},
parameters : {
warehouse_id: '',
address_id: '',
company_id: this.company.id,
billing_address_id: '',
}
}
},
@@ -219,6 +293,21 @@
alert(response.message)
this.error = response.message;
this.step--;
},
updateBillingAddressFilters(){
if(this.useDeliveryAddress) {
// if use delivery address
this.billingAddressFilters = {
per_page: 10,
HasMorphCompanyModule: this.company.company_module.id,
type: 1
}
this.parameters.billing_address_id = '';
} else {
this.billingAddressFilters = {per_page: 10, HasMorphCompanyModule: this.company.company_module.id};
}
this.useDeliveryAddress = !this.useDeliveryAddress;
this.currentKey++;
}
}
}
@@ -25,9 +25,13 @@
</div>
<div class="col d-flex">
<div class="btn btn-xs btn-outline-danger b-rad-none pointer requestModal align-items-center d-flex" data-type="changeOrderNo" v-if="$store.getters.isSuperAdmin">Change Order Number</div>
<div class="btn btn-xs btn-outline-danger b-rad-none pointer requestModal align-items-center d-flex m-l-10" data-type="helpMenu" v-if="$store.getters.isSuperAdmin">Help Menu</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="changeOrderNo">
<change-order-number-form-component :section="section" :data="order"></change-order-number-form-component>
</modal-component>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="helpMenu">
<help-menu-form-component module_type="Order" :data="order"></help-menu-form-component>
</modal-component>
</div>
</div>
<div class="row m-b-20">
@@ -500,4 +504,4 @@
}
}
}
</script>
</script>
@@ -25,9 +25,13 @@
</div>
<div class="col d-flex">
<div class="btn btn-xs btn-outline-danger b-rad-none pointer requestModal align-items-center d-flex" data-type="changeOrderNo" v-if="$store.getters.isSuperAdmin">Change Order Number</div>
<div class="btn btn-xs btn-outline-danger b-rad-none pointer requestModal align-items-center d-flex m-l-10" data-type="helpMenu" v-if="$store.getters.isSuperAdmin">Help Menu</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="changeOrderNo">
<change-order-number-form-component :section="section" :data="order"></change-order-number-form-component>
</modal-component>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="helpMenu">
<help-menu-form-component module_type="Order" :data="order"></help-menu-form-component>
</modal-component>
</div>
</div>
<div class="row m-b-20">
@@ -200,4 +204,4 @@
}
}
}
</script>
</script>
@@ -1,36 +0,0 @@
<template>
<div class="row">
<list-component
section="packageListSection"
:endpoint="route('api.packing_list.list')"
:options="{
packing_list_type: 1,
packing_list_status: 2,
per_page: 5,
owner_id: 1,
order_by: { column: 'arrival_date', DESC: true },
with_arrival_date: true,
}"
>
<template slot="list" slot-scope="{ data }">
<parcel-component
v-for="packages in data.packages"
:data="packages"
:key="packages.id"
></parcel-component>
</template>
</list-component>
</div>
</template>
<script>
import componentHandler from "../../../general/mixins/componentHandler";
export default {
data() {
return {
section: "packageListSection",
};
},
methods: {},
mixins: [componentHandler],
};
</script>
@@ -65,23 +65,6 @@
<p class="no-margin fs-10 all-caps">Billing Question</p>
<div>{{ latestComment ? latestComment.content : '' }} </div>
</div>
<div class="col-auto" v-if="invoice_status == 'Suspended Invoice'">
<div class="btn bg-grey no-border muted requestModal" data-type="deleteInvoiceFunction">
<i class="fa fa-trash"></i>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteInvoiceFunction">
<general-confirmation-form-component
contentText="Are you sure you want to delete this Invoice?"
modalType="delete"
buttonText="Delete"
class="text-center"
:apiRoute="route('api.transaction.delete', item.suspended_invoice.id)"
apiMethod="delete"
:section="section"
>
</general-confirmation-form-component>
</modal-component>
</div>
</div>
</div>
</div>
@@ -20,30 +20,14 @@
<p class="no-margin fs-10 all-caps">Payment Date</p>
<div>{{ item.created_at }}</div>
</div>
<div class="col-auto pointer btn btn-success" v-if="item.payment_method == 5 && item.status != 2" @click="retryPayment()">
<div class=" no-border h-100">
<i class="fa fa-repeat fs-20 text-white"></i>
</div>
<div class="col-auto pointer btn btn-success" v-if="item.payment_method == 5 && item.status != 2">
<a :href="route('billplz.bill', item.reference)">
<div class=" no-border h-100">
<i class="fa fa-repeat fs-20 text-white"></i>
</div>
</a>
</div>
<div class="col-auto requestModal" v-if="item.status != 2" data-type="deleteGroupTransaction">
<div class="btn bg-grey no-border">
<i class="fa fa-times"></i>
</div>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteGroupTransaction">
<general-confirmation-form-component
contentText="Are you sure you want to delete this Group Payment?"
modalType="delete"
buttonText="Delete"
class="text-center"
:apiRoute="route('api.transaction.group.delete', item.id)"
apiMethod="delete"
:section="section"
>
</general-confirmation-form-component>
</modal-component>
<!-- payment method 1 -->
<!-- <div class="col-auto pointer btn btn-success requestModal pointer" v-if="item.payment_method == 1 && item.status != 2" data-type="paymentProofModal" @click="selectedID(item.id)">
<div class="col-auto pointer btn btn-success requestModal pointer" v-if="item.payment_method == 1 && item.status != 2" data-type="paymentProofModal" @click="selectedID(item.id)">
<div class="no-border h-100">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="30" height="30" viewBox="0 0 172 172" style=" fill:#000000;"><defs><linearGradient x1="86" y1="70.76994" x2="86" y2="116.46013" gradientUnits="userSpaceOnUse" id="color-1_52139_gr1"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="61.8125" y1="34.48869" x2="61.8125" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-2_52139_gr2"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="130.34375" y1="34.48869" x2="130.34375" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-3_52139_gr3"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="86" y1="32.25" x2="86" y2="148.71013" gradientUnits="userSpaceOnUse" id="color-4_52139_gr4"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M102.45825,99.43213h-5.70825c-1.4835,0 -2.6875,1.16637 -2.6875,2.65256v8.10013c0,1.48081 -1.19862,2.68481 -2.67944,2.68481h-10.76612c-1.48081,0 -2.67944,-1.204 -2.67944,-2.68481v-8.10013c0,-1.48619 -1.204,-2.65256 -2.6875,-2.65256h-5.70825c-1.93769,0 -3.04225,-2.39188 -1.88125,-4.05275l14.577,-20.855c1.8275,-2.61494 5.69481,-2.61763 7.52231,-0.00538l14.577,20.86306c1.16369,1.66088 0.05644,4.05006 -1.87856,4.05006z" fill="url(#color-1_52139_gr1)"></path><path d="M51.0625,67.1875h5.375c0,-8.0625 7.23206,-16.12231 16.125,-16.12231v-5.375c-11.85456,0 -21.5,10.74731 -21.5,21.49731z" fill="url(#color-2_52139_gr2)"></path><path d="M139.75,80.625c0,-10.75 -8.44144,-18.80981 -18.8125,-18.80981v5.375c7.40944,0 13.4375,5.37231 13.4375,13.43481z" fill="url(#color-3_52139_gr3)"></path><path d="M148.09738,92.27263c1.59369,-3.68188 2.40263,-7.59219 2.40263,-11.64494c0,-16.29969 -13.26281,-29.5625 -29.5625,-29.5625c-6.5145,0 -12.68769,2.08819 -17.78588,5.96088c-4.30269,-13.03438 -16.52006,-22.08587 -30.58912,-22.08587c-17.78319,0 -32.25,14.46681 -32.25,32.25c0,4.14681 0.16662,8.05981 1.42437,10.74731h-1.42437c-13.33806,0 -24.1875,10.84944 -24.1875,24.1875c0,11.56431 8.16194,21.24737 19.0275,23.62044c1.02394,6.39894 6.53869,11.31706 13.2225,11.31706h56.4375h16.125h5.375c6.54944,0 12.00238,-4.71388 13.18488,-10.92469c9.2235,-1.20131 16.37762,-9.08913 16.37762,-18.63513c0,-6.09256 -2.924,-11.72019 -7.77762,-15.23006zM126.3125,131.6875h-5.375h-16.125h-56.4375c-3.49912,0 -6.45538,-2.6875 -7.568,-5.375h93.0735c-1.11263,2.6875 -4.06888,5.375 -7.568,5.375zM137.0625,120.9375h-96.75c-10.37106,0 -18.8125,-8.44144 -18.8125,-18.8125c0,-10.37106 8.44144,-18.8125 18.8125,-18.8125h9.51375l-1.68506,-3.78131c-2.23063,-5.01488 -2.45369,-7.48737 -2.45369,-12.341c0,-14.81888 12.05613,-26.875 26.875,-26.875c13.01825,0 24.13106,9.29875 26.42619,22.11275l0.92719,5.17075l3.64962,-3.77325c4.60638,-4.76225 10.77687,-7.38525 17.372,-7.38525c13.33806,0 24.1875,10.84944 24.1875,24.1875c0,3.6765 -0.81431,7.21056 -2.37575,10.41944l-1.763,3.32713l2.37037,1.26044c4.40481,2.34081 7.14338,6.88806 7.14338,11.868c0,7.40944 -6.02806,13.43481 -13.4375,13.43481z" fill="url(#color-4_52139_gr4)"></path></g></g></svg>
</div>
@@ -52,7 +36,7 @@
<div class=" no-border h-100">
<i class="fa fa-repeat fs-20 text-white"></i>
</div>
</div> -->
</div>
<div class="col-auto">
<div class="btn bg-grey no-border" @click="expanded = !expanded">
<i class="fa" :class="{'fa-angle-down': !expanded, 'fa-angle-up': expanded}" ></i>
@@ -99,9 +83,6 @@
},
selectedID(id){
this.selected_id = id;
},
retryPayment(){
window.location.href = route('billplz.bill', this.item.reference);
}
},
computed: {
@@ -1,5 +1,5 @@
<template>
<div class="row" @keyup.enter="submitForm">
<div class="row">
<div class="col">
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
<div class="row" v-show="!$store.getters.isLoading(section)">
@@ -37,7 +37,6 @@
</template>
<script>
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
import { required } from "vuelidate/lib/validators";
export default {
props: {
data:{
@@ -59,7 +58,9 @@
},
validations: {
parameters: {
content:{ required },
content: {
required: false
}
}
},
methods: {
@@ -1,8 +0,0 @@
@extends('layouts.base_portal')
@section('inner_content')
<div class="row" :class="[{'d-flex': !$store.getters.isAdmin}]">
<div class="col">
<packages-section-component></packages-section-component>
</div>
</div>
@endsection
+2 -2
View File
@@ -3,9 +3,9 @@
<div class="container-fluid">
<div class="row no-margin">
<div class="col p-l-0 p-t-20 p-b-20 sm-text-center">
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © {{ date('Y'); }} CIEF IZYIM. All rights reserved.</small>
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © {{ date('Y'); }} CIEF IZYIM. All rights reserved. Powered by Laravel Vapor...</small>
</div>
</div>
</div>
</div>
<!-- END COPYRIGHT -->
<!-- END COPYRIGHT -->
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More