-
- {{ renderHeader() }}
-
-
-
- {{ renderText() }}
-
+
+
+
+
+
+
+
+
+ {{ renderHeader() }}
+
+
+
+ {{ renderText() }}
+
+
-
-
-
-
+
+
+
+
diff --git a/resources/js/Shared/Components/FavoriteButton.vue b/resources/js/Shared/Components/FavoriteButton.vue
index 83185344..27288ba7 100644
--- a/resources/js/Shared/Components/FavoriteButton.vue
+++ b/resources/js/Shared/Components/FavoriteButton.vue
@@ -49,7 +49,7 @@ const toggleFavorite = async () => {
toast.success(__('City added to favorites.'))
}
} catch (error) {
- toast.error('There was an error!')
+ toast.error(__('There was an error'))
}
}
diff --git a/resources/js/Shared/Components/Opinion.vue b/resources/js/Shared/Components/Opinion.vue
new file mode 100644
index 00000000..f65ba8d0
--- /dev/null
+++ b/resources/js/Shared/Components/Opinion.vue
@@ -0,0 +1,157 @@
+
+
+
+
+
+ {{ opinion.user.name }}
+
+
+
+
+ {{ new Date(opinion.updated_at).toLocaleString("pl-PL", dateOptions) }}
+
+
+
+ {{ opinion.content }}
+
+
+
+
+
+
+
+
diff --git a/resources/js/Shared/Components/ProviderIcons.vue b/resources/js/Shared/Components/ProviderIcons.vue
index 4c3b6135..eef49127 100644
--- a/resources/js/Shared/Components/ProviderIcons.vue
+++ b/resources/js/Shared/Components/ProviderIcons.vue
@@ -13,10 +13,10 @@ function getProviderColor(providerName) {
-
-
+
+
diff --git a/routes/web.php b/routes/web.php
index 1de774b1..99da75d2 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -29,6 +29,8 @@
Route::get("/favorite-cities", [FavoritesController::class, "index"]);
Route::post("/opinions", [CityOpinionController::class, "store"]);
+ Route::patch("/opinions/{cityOpinion}", [CityOpinionController::class, "update"]);
+ Route::delete("/opinions/{cityOpinion}", [CityOpinionController::class, "destroy"]);
Route::middleware(["role:admin"])->group(function (): void {
Route::get("/admin/importers", [ImportInfoController::class, "index"]);