diff --git a/frontend/src/admin/daytheme/AdminDaythemeController.js b/frontend/src/admin/daytheme/AdminDaythemeController.js
deleted file mode 100755
index 8f372d1a..00000000
--- a/frontend/src/admin/daytheme/AdminDaythemeController.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var module = angular.module("billett.admin")
-
-module.controller(
- "AdminDaythemeController",
- (
- Page,
- $stateParams,
- $http,
- $scope,
- AdminDaytheme,
- AdminEvent,
- $location,
- ) => {
- Page.setTitle("Temadag")
-
- var loader = Page.setLoading()
- AdminDaytheme.get(
- { id: $stateParams["id"] },
- (ret) => {
- loader()
-
- $scope.daytheme = ret
- },
- () => {
- loader()
- Page.set404()
- },
- )
- },
-)
diff --git a/frontend/src/admin/daytheme/AdminDaythemeEditNewController.js b/frontend/src/admin/daytheme/AdminDaythemeEditNewController.js
deleted file mode 100755
index 9fd649e9..00000000
--- a/frontend/src/admin/daytheme/AdminDaythemeEditNewController.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var module = angular.module("billett.admin")
-
-module.controller(
- "AdminDaythemeEditNewController",
- (
- Page,
- AdminDaytheme,
- $stateParams,
- $rootScope,
- $scope,
- $location,
- $window,
- $timeout,
- ) => {
- var is_new = ($scope.is_new = !("id" in $stateParams))
-
- var loader = Page.setLoading()
-
- if (is_new) {
- Page.setTitle("Ny temadag")
- $scope.eventgroup_id = $stateParams["eventgroup_id"]
- loader()
- } else {
- Page.setTitle("Rediger temadag")
- //loader();
-
- AdminDaytheme.get(
- { id: $stateParams["id"] },
- (ret) => {
- loader()
-
- $scope.daytheme = ret
- },
- () => {
- loader()
- Page.set404()
- },
- )
- }
-
- $scope.storeDaytheme = () => {
- if (!$scope.daytheme.title || !$scope.daytheme.date) return
-
- $scope.daytheme.date = moment($scope.daytheme.date, "YYYY-MM-DD").unix()
-
- if (is_new) {
- $scope.daytheme.eventgroup_id = $scope.eventgroup_id
-
- var eg = new AdminDaytheme($scope.daytheme)
-
- eg.$save(
- (res) => {
- $location.path("/a/eventgroup/" + res.eventgroup_id)
- },
- (err) => {
- alert(err.data)
- },
- )
- } else {
- $scope.daytheme.$update(
- (res) => {
- // go to previous page or redirect to daytheme admin page
- var timer = $timeout(() => {
- $location.path("/a/eventgroup/" + res.eventgroup_id)
- }, 100)
- var ev = $rootScope.$on(
- "$routeChangeStart",
- (event, next, current) => {
- ev()
- $timeout.cancel(timer)
- },
- )
- $window.history.back()
- },
- (err) => {
- alert(err.data)
- },
- )
- }
- }
- },
-)
diff --git a/frontend/src/admin/daytheme/AdminDaythemeService.js b/frontend/src/admin/daytheme/AdminDaythemeService.js
deleted file mode 100755
index 2902b4e9..00000000
--- a/frontend/src/admin/daytheme/AdminDaythemeService.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import { api } from "../../api"
-
-var module = angular.module("billett.admin")
-
-module.factory("AdminDaytheme", ($http, $resource) => {
- var r = $resource(
- api("daytheme/:id"),
- {
- id: "@id",
- admin: 1,
- },
- {
- update: { method: "PUT" },
- },
- )
-
- return r
-})
diff --git a/frontend/src/admin/daytheme/admin-daytheme-create.component.html b/frontend/src/admin/daytheme/admin-daytheme-create.component.html
new file mode 100644
index 00000000..16429c86
--- /dev/null
+++ b/frontend/src/admin/daytheme/admin-daytheme-create.component.html
@@ -0,0 +1,40 @@
+
Ingen arrangementer eksisterer.
-Varighet | -Kategori | -Sted | -Tittel | -Salg | -Tilg. | -Omsatt | -Pub | -Billett- info |
-
---|---|---|---|---|---|---|---|---|
- {{ - events[0].time_start - 21600 | formatdate: "dddd D. MMMM YYYY" - }} - | -||||||||
- {{ event.time_start | formatdate: "HH:mm" }} - - - {{ event.time_end | formatdate: "HH:mm" }} - - | -{{ event.category }} | -{{ event.location }} | -
-
-
- Rediger
- Forhåndsvis
-
-
- {{ event.title }}
- |
- - - {{::event.ticket_count.totals.valid}} - - | -- {{ event.max_sales == 0 ? "" : event.ticket_count.totals.free }} - | -- {{event.max_sales == 0 && event.ticket_count.totals.valid == 0 ? '' - : - (event.ticket_count.totals.sum_price+event.ticket_count.totals.sum_fee|price)}} - | -- - | -- - | -
TODO
diff --git a/frontend/src/admin/daytheme/routes.ts b/frontend/src/admin/daytheme/routes.ts index ac6749f1..1028f450 100755 --- a/frontend/src/admin/daytheme/routes.ts +++ b/frontend/src/admin/daytheme/routes.ts @@ -1,27 +1,11 @@ import { Routes } from "@angular/router" import { requireAdmin } from "../../auth/require-admin" -import { TodoComponent } from "../todo.component" +import { AdminDaythemeCreateComponent } from "./admin-daytheme-create.component" export const routes: Routes = [ { - path: "a/eventgroup/:eventgroup_id/new_daytheme", - // edit.html - // component: AdminDaythemeEditNewComponent, - component: TodoComponent, - canActivate: [requireAdmin], - }, - { - path: "a/daytheme/:id/edit", - // edit.html - // component: AdminDaythemeEditNewComponent, - component: TodoComponent, - canActivate: [requireAdmin], - }, - { - path: "a/daytheme/:id", - // index.html - // component: AdminDaythemeComponent, - component: TodoComponent, + path: "a/eventgroup/:eventgroupId/new_daytheme", + component: AdminDaythemeCreateComponent, canActivate: [requireAdmin], }, ] diff --git a/frontend/src/admin/eventgroup/admin-eventgroup.service.ts b/frontend/src/admin/eventgroup/admin-eventgroup.service.ts index a062f79d..2daeeb5b 100755 --- a/frontend/src/admin/eventgroup/admin-eventgroup.service.ts +++ b/frontend/src/admin/eventgroup/admin-eventgroup.service.ts @@ -4,6 +4,7 @@ import { api } from "../../api" export interface AdminEventgroupData { id: number + title: string [k: string]: any } diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 67f8fa6d..6c168927 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -2,7 +2,6 @@ @import "./common/template"; @import "./common/events"; -@import "./admin/daytheme/daytheme.scss"; @import "./admin/event/event.scss"; @import "./admin/eventgroup/eventgroup.scss"; @import "./admin/order/new.scss";