diff --git a/src/models/EventConference.js b/src/models/EventConference.js
index ab170e4b..a49bdb89 100644
--- a/src/models/EventConference.js
+++ b/src/models/EventConference.js
@@ -1,4 +1,5 @@
import { Route } from 'react-router-dom'
+import { useState } from 'react'
import ModelEditPage from '../pages/ModelEditPage'
import ModelsPage from '../pages/ModelsPage'
@@ -26,12 +27,11 @@ export default class EventConference {
'SSD': 'SSD',
'conferenceRoom': 'Aula',
}
-
this.schema = null
-
this.IndexPage = ModelsPage
this.ViewPage = ModelViewPage
this.EditPage = ModelEditPage
+ this.Filters = ConferencesFilters
}
// absolute url of objects index
@@ -73,3 +73,38 @@ export default class EventConference {
return [indexRouter, viewRouter, editRouter].filter(Boolean)
}
}
+
+function ConferencesFilters({filter}) {
+ const setFilterFields = filter.setFilter
+ const [year, setYear] = useState(0)
+ const currentYear = new Date().getFullYear()
+ const startYear = 2016
+ const years = Array.from({ length: currentYear - startYear + 1 }, (_, i) => currentYear - i)
+
+ return <>
+
+ >
+}
\ No newline at end of file
diff --git a/src/models/EventPhdCourse.js b/src/models/EventPhdCourse.js
index 79969144..3eb638ba 100644
--- a/src/models/EventPhdCourse.js
+++ b/src/models/EventPhdCourse.js
@@ -1,5 +1,6 @@
import { Route } from 'react-router-dom'
import { Link } from 'react-router-dom'
+import { useState } from 'react'
import ModelsPage from '../pages/ModelsPage'
import PhdCourseEditPage from '../pages/PhdCourseEditPage'
@@ -34,12 +35,11 @@ export default class EventPhdCourse {
'endDate': 'Data Fine',
'lecturers': 'Docente/i',
}
-
this.schema = null
-
this.IndexPage = ModelsPage
this.ViewPage = PhdCourseViewPage
this.EditPage = PhdCourseEditPage
+ this.Filters = PhdCoursesFilters
}
// absolute url of objects index
@@ -91,3 +91,38 @@ export default class EventPhdCourse {
return [indexRouter, viewRouter, editRouter].filter(Boolean)
}
}
+
+function PhdCoursesFilters({filter}) {
+ const setFilterFields = filter.setFilter
+ const [year, setYear] = useState(0)
+ const currentYear = new Date().getFullYear()
+ const startYear = 2023
+ const years = Array.from({ length: currentYear - startYear + 1 }, (_, i) => currentYear - i)
+
+ return <>
+
+ >
+}
\ No newline at end of file
diff --git a/src/models/EventSeminar.js b/src/models/EventSeminar.js
index 4739fde0..26c02fa3 100644
--- a/src/models/EventSeminar.js
+++ b/src/models/EventSeminar.js
@@ -27,9 +27,7 @@ export default class EventSeminar {
'category': 'Categoria',
'startDatetime': 'Inizio',
}
-
this.schema = null
-
this.IndexPage = ModelsPage
this.ViewPage = ModelViewPage
this.EditPage = ModelEditPage
@@ -80,9 +78,13 @@ function SeminarsFilters({filter}) {
const setFilterFields = filter.setFilter
const [year, setYear] = useState(0)
const currentYear = new Date().getFullYear()
- const years = Array.from({length: 10} , (_, i) => currentYear + 1 - i)
+ const startYear = 2013
+ const years = Array.from({ length: currentYear - startYear + 1 }, (_, i) => currentYear - i)
+
return <>
-