diff --git a/Aberwyn/Aberwyn.csproj b/Aberwyn/Aberwyn.csproj
index 96925a8..ba378a5 100644
--- a/Aberwyn/Aberwyn.csproj
+++ b/Aberwyn/Aberwyn.csproj
@@ -9,13 +9,6 @@
Linux
-
-
-
-
-
-
-
diff --git a/Aberwyn/Controllers/MovieController.cs b/Aberwyn/Controllers/MovieController.cs
new file mode 100644
index 0000000..a41400a
--- /dev/null
+++ b/Aberwyn/Controllers/MovieController.cs
@@ -0,0 +1,13 @@
+using Microsoft.AspNetCore.Mvc;
+
+namespace Aberwyn.Controllers
+{
+ public class MovieController : Controller
+ {
+ [HttpGet("/movie/search")]
+ public IActionResult Search()
+ {
+ return View();
+ }
+ }
+}
diff --git a/Aberwyn/Models/MediaModels.cs b/Aberwyn/Models/MediaModels.cs
new file mode 100644
index 0000000..909fb51
--- /dev/null
+++ b/Aberwyn/Models/MediaModels.cs
@@ -0,0 +1,33 @@
+namespace Aberwyn.Models
+{
+ public class StreamingService
+ {
+ public int Id { get; set; }
+ public string Name { get; set; } // T.ex. "Netflix", "Plex"
+ }
+
+ public class MediaItem
+ {
+ public int Id { get; set; }
+ public string TmdbId { get; set; } // TMDb ID
+ public string Title { get; set; }
+ public string Overview { get; set; }
+ public string PosterPath { get; set; }
+ public string MediaType { get; set; } // "movie" eller "tv"
+ public double Rating { get; set; }
+ public DateTime? ReleaseDate { get; set; }
+
+ public List MediaItemStreamingServices { get; set; } = new();
+ }
+
+ public class MediaItemStreamingService
+ {
+ public int MediaItemId { get; set; }
+ public MediaItem MediaItem { get; set; }
+
+ public int StreamingServiceId { get; set; }
+ public StreamingService StreamingService { get; set; }
+ }
+
+
+}
diff --git a/Aberwyn/Views/Movie/Search.cshtml b/Aberwyn/Views/Movie/Search.cshtml
new file mode 100644
index 0000000..b74f97e
--- /dev/null
+++ b/Aberwyn/Views/Movie/Search.cshtml
@@ -0,0 +1,43 @@
+@{
+ ViewData["Title"] = "Filmsök";
+}
+
+
+@section Scripts {
+
+}
diff --git a/Aberwyn/wwwroot/js/budget.js b/Aberwyn/wwwroot/js/budget.js
index 7e2d706..9a7a060 100644
--- a/Aberwyn/wwwroot/js/budget.js
+++ b/Aberwyn/wwwroot/js/budget.js
@@ -557,14 +557,13 @@ app.controller('BudgetController', function ($scope, $http) {
};
$scope.createNewCategory = function () {
const defaultName = "Ny kategori";
- const newOrder = $scope.budget.categories.length; // sist i listan
+ const newOrder = $scope.budget.categories.length;
const newCategory = {
name: defaultName,
color: "#666666",
- year: $scope.selectedYear,
- month: $scope.selectedMonth,
- order: newOrder
+ order: newOrder,
+ budgetPeriodId: $scope.budget.id // <- 💡 den viktiga raden
};
$http.post("/api/budget/category", newCategory)
@@ -589,6 +588,8 @@ app.controller('BudgetController', function ($scope, $http) {
$scope.showToast("Fel vid skapande av kategori", true);
});
};
+
+
$scope.addItem = function (category) {
if (!category.newItemName || !category.newItemAmount) return;