diff --git a/app/Http/Controllers/LoggingController.php b/app/Http/Controllers/LoggingController.php new file mode 100644 index 0000000..f59421a --- /dev/null +++ b/app/Http/Controllers/LoggingController.php @@ -0,0 +1,47 @@ +validated(); + + return Logging::join('users', 'login_activities.user_id', '=', 'users.id') + ->where(function (Builder $query) use ($request) { + $search = '%' . $request->search . '%'; + + $query->where('users.name', 'like', $search) + ->orWhere('users.username', 'like', $search) + ->orWhere('login_activities.ip_address', 'like', $search) + ->orWhere('login_activities.browser', 'like', $search) + ->orWhere('login_activities.platform', 'like', $search) + ->orWhere('login_activities.created_at', 'like', $search); + }) + ->when(!$request->user()->hasRole('superuser'), function (Builder $query) use ($request) { + $query->where('users.id', $request->user()->id); + }) + ->select(['users.*', 'login_activities.*']) + ->orderBy($request->input('order.key') ?: 'login_activities.created_at', $request->input('order.dir') ?: 'desc') + ->paginate($request->per_page ?: 10); + } +} diff --git a/config/app.php b/config/app.php index a93c88c..811b575 100644 --- a/config/app.php +++ b/config/app.php @@ -69,7 +69,7 @@ return [ | */ - 'timezone' => 'Asia/Jakarta', + 'timezone' => 'Europe/Bratislava', /* |-------------------------------------------------------------------------- diff --git a/resources/js/Layouts/GuestLayout.vue b/resources/js/Layouts/GuestLayout.vue index 0c0ced5..2488e6c 100644 --- a/resources/js/Layouts/GuestLayout.vue +++ b/resources/js/Layouts/GuestLayout.vue @@ -279,7 +279,7 @@ onMounted(fetch_menu);
- + All information without guarantee { What is Ikea price comparison?

It is a community project of a group of enthusiasts from Slovakia. - This service provides price comparison of Ikea products in European countries. - Product prices are converted to EUR at the current rate and appear in resulting table. - Information about the prices of Ikea products is obtained online. - You can go to the appropriate product page by clicking on the country name. - Thanks to this service, you can find out in which country a given Ikea product is the cheapest (you can sort - them in the resulting table). +This service provides price comparison of Ikea products in European countries. +

+

+Product prices are converted to appropriate currency (you can change it in settings menu) at the current rate and appear in resulting table. +You can go to the appropriate product page by clicking on the country name. +

+ +

+Thanks to this service, you can find out in which country a given Ikea product is the cheapest (you can sort them in the resulting table).

-
Enjoy :) @@ -63,7 +65,8 @@ const onSubmit = async (data) => {

Message

If you have some comments or ideas for improvement about project, let as know...

-
+ +
diff --git a/resources/js/Pages/IkeaRoot.vue b/resources/js/Pages/IkeaRoot.vue index 23000d1..e3b4bb2 100644 --- a/resources/js/Pages/IkeaRoot.vue +++ b/resources/js/Pages/IkeaRoot.vue @@ -499,7 +499,7 @@ const selectedRowClassNameFunction = (item) => { settingsStore.settings["LAST_REFRESH_TIME"] }}
-
+
diff --git a/vite.config.js b/vite.config.js index 5b30a92..465b260 100644 --- a/vite.config.js +++ b/vite.config.js @@ -19,6 +19,9 @@ export default defineConfig({ build: { assetsInlineLimit: 0 }, + esbuild: { + drop: ['console', 'debugger'], + }, resolve: { dedupe: ["vue"], }