@saooti/octopus-sdk 41.1.15 → 41.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/index.ts +29 -2
  3. package/package.json +1 -1
  4. package/src/api/groupsApi.ts +214 -0
  5. package/src/api/podcastApi.ts +47 -9
  6. package/src/components/buttons/ActionButton.vue +99 -0
  7. package/src/components/buttons/index.ts +5 -0
  8. package/src/components/composable/route/types.ts +11 -3
  9. package/src/components/composable/route/useAdvancedParamInit.ts +40 -13
  10. package/src/components/composable/useErrorHandler.ts +3 -2
  11. package/src/components/composable/useNotifications.ts +50 -0
  12. package/src/components/display/emission/EmissionGroupChooser.vue +56 -0
  13. package/src/components/display/emission/EmissionList.vue +8 -2
  14. package/src/components/display/filter/AdvancedSearch.vue +83 -23
  15. package/src/components/display/list/ListPaginate.vue +4 -1
  16. package/src/components/display/podcasts/PodcastList.vue +12 -5
  17. package/src/components/display/podcasts/PodcastPlayButton.vue +2 -2
  18. package/src/components/display/podcasts/TagList.vue +4 -1
  19. package/src/components/form/ClassicMultiselect.vue +43 -37
  20. package/src/components/icons.ts +13 -0
  21. package/src/components/misc/ClassicAlert.vue +8 -1
  22. package/src/components/misc/ClassicBigChip.vue +84 -0
  23. package/src/components/misc/ClassicDataTable.vue +98 -0
  24. package/src/components/misc/ClassicDataTable_Internal.vue +132 -0
  25. package/src/components/misc/ClassicHelpButton.vue +3 -3
  26. package/src/components/misc/ClassicNotifications.vue +23 -0
  27. package/src/components/misc/ClassicPopover.vue +1 -0
  28. package/src/components/pages/EmissionPage.vue +2 -2
  29. package/src/components/pages/EmissionsPage.vue +10 -15
  30. package/src/components/pages/PodcastPage.vue +1 -1
  31. package/src/components/pages/PodcastsPage.vue +8 -20
  32. package/src/helper/fetchHelper.ts +1 -0
  33. package/src/locale/de.ts +2 -0
  34. package/src/locale/en.ts +2 -0
  35. package/src/locale/es.ts +2 -0
  36. package/src/locale/fr.ts +5 -3
  37. package/src/locale/it.ts +2 -0
  38. package/src/locale/sl.ts +2 -0
  39. package/src/router/router.ts +14 -288
  40. package/src/router/routes.ts +236 -0
  41. package/src/router/utils.ts +43 -2
  42. package/src/stores/class/general/emission.ts +8 -2
  43. package/src/style/_variables.scss +3 -0
  44. package/src/style/bootstrap.scss +5 -0
@@ -1,291 +1,17 @@
1
1
  import {
2
2
  createRouter,
3
3
  createWebHistory,
4
- RouteLocationNormalized,
5
- RouteRecordRaw,
6
4
  } from "vue-router";
7
- import classicApi from "@/api/classicApi";
5
+ import classicApi from "../api/classicApi";
8
6
  import { AuthStore } from "../stores/AuthStore";
9
- import fetchHelper from "@/helper/fetchHelper";
10
- import { setupRouter } from "./utils";
7
+ import fetchHelper from "../helper/fetchHelper";
8
+ import { setupRouter } from "./utils";
9
+ import { routes } from "./routes";
11
10
 
12
- import { ROUTE_PARAMS } from "../components/composable/route/useRouteUpdateParams";
11
+ const Home = () => import("../components/pages/HomePage.vue");
13
12
 
14
- /*--------------------------------------------------------------------------
15
- Composants publics
16
- --------------------------------------------------------------------------*/
17
-
18
- const Home = () => import("@/components/pages/HomePage.vue");
19
- const MapPage = () => import("@/components/pages/MapPage.vue");
20
- const PodcastsPage = () => import("@/components/pages/PodcastsPage.vue");
21
- const EmissionPage = () => import("@/components/pages/EmissionPage.vue");
22
- const EmissionsPage = () => import("@/components/pages/EmissionsPage.vue");
23
- const ParticpantsPage = () => import("@/components/pages/ParticipantsPage.vue");
24
- const PodcastPage = () => import("@/components/pages/PodcastPage.vue");
25
- const ParticipantPage = () => import("@/components/pages/ParticipantPage.vue");
26
- const SearchPage = () => import("@/components/pages/SearchPage.vue");
27
- const CategoryPage = () => import("@/components/pages/CategoryPage.vue");
28
- const RubriquePage = () => import("@/components/pages/RubriquePage.vue");
29
- const TagPage = () => import("@/components/pages/TagPage.vue");
30
- const LivesPage = () => import("@/components/pages/LivesPage.vue");
31
- const PlaylistPage = () => import("@/components/pages/PlaylistPage.vue");
32
- const PlaylistsPage = () => import("@/components/pages/PlaylistsPage.vue");
33
- const error403Page = () => import("@/components/pages/Error403Page.vue");
34
- const PageNotFound = () => import("@/components/pages/PageNotFound.vue");
35
- const RadioPage = () => import("@/components/pages/RadioPage.vue");
36
- const VideoPage = () => import("@/components/pages/VideoPage.vue");
37
- const PageLogout = () => import("@/components/pages/PageLogout.vue");
38
-
39
- const routes: Array<RouteRecordRaw> = [
40
- /*--------------------------------------------------------------------------
41
- Liens publics
42
- --------------------------------------------------------------------------*/
43
- {
44
- path: "/",
45
- name: "",
46
- component: Home,
47
- meta:{
48
- title: "Home"
49
- }
50
- },
51
- {
52
- path: "/main/pub/error",
53
- name: "error",
54
- component: error403Page,
55
- },
56
- {
57
- path: "/main/pub/home",
58
- name: "home",
59
- component: Home,
60
- meta:{
61
- title: "Home",
62
- }
63
- },
64
- {
65
- path: "/main/pub/map",
66
- name: "map",
67
- component: MapPage,
68
- meta:{
69
- title: "Site map",
70
- }
71
- },
72
- {
73
- path: "/main/pub/search/:query?",
74
- name: "search",
75
- component: SearchPage,
76
- props: (route: RouteLocationNormalized) => ({
77
- queryRoute: route.params.query,
78
- }),
79
- meta:{
80
- title: "Search",
81
- }
82
- },
83
- {
84
- path: "/main/pub/podcasts/",
85
- name: "podcasts",
86
- component: PodcastsPage,
87
- props: (route: RouteLocationNormalized) => ({
88
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
89
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
90
- routeQuery: route.query.q ?? "",
91
- routeMonetisable: route.query.m ?? "",
92
- routeIab: route.query.i ? parseInt(route.query.i.toString(), 10) : undefined,
93
- routeSort: route.query.s ?? "",
94
- routeIncludeHidden: route.query.h ?? "",
95
- routeFrom: route.query.from,
96
- routeTo: route.query.to,
97
- routeValidity:route.query.vl ?? "",
98
- routeOnlyVideo:route.query.v ?? "",
99
- routeOrga:route.query.o,
100
- routeRubriques :route.query.r ?? route.query.rubriquesId,
101
- routeBeneficiaries: route.query[ROUTE_PARAMS.Beneficiaries],
102
- }),
103
- meta:{
104
- title: "Podcasts",
105
- }
106
- },
107
- {
108
- path: "/main/pub/emissions/",
109
- name: "emissions",
110
- component: EmissionsPage,
111
- props: (route: RouteLocationNormalized) => ({
112
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
113
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
114
- routeQuery: route.query.q ?? "",
115
- routeMonetisable: route.query.m ?? "",
116
- routeIab: route.query.i ? parseInt(route.query.i.toString(), 10) : undefined,
117
- routeSort: route.query.s ?? "",
118
- routeIncludeHidden: route.query.h ?? "",
119
- routeFrom: route.query.from,
120
- routeTo: route.query.to,
121
- routeOrga:route.query.o,
122
- routeRubriques :route.query.r ?? route.query.rubriquesId,
123
- routeBeneficiaries: route.query[ROUTE_PARAMS.Beneficiaries],
124
- }),
125
- meta:{
126
- title: "Emissions",
127
- }
128
- },
129
- {
130
- path: "/main/pub/participants",
131
- name: "participants",
132
- component: ParticpantsPage,
133
- props: (route: RouteLocationNormalized) => ({
134
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
135
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
136
- routeOrga:route.query.o,
137
- routeQuery: route.query.q ?? "",
138
- }),
139
- meta:{
140
- title: "Speakers",
141
- }
142
- },
143
- {
144
- path: "/main/pub/emission/:emissionId(\\d+):title([^?]*)?:productor?",
145
- name: "emission",
146
- component: EmissionPage,
147
- props: (route: RouteLocationNormalized) => ({
148
- emissionId: parseInt(route.params.emissionId.toString(), 10),
149
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
150
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
151
- routeQuery: route.query.q ?? "",
152
- }),
153
- meta:{
154
- title: "",
155
- noScroll:true
156
- }
157
- },
158
- {
159
- path: "/main/pub/podcast/:podcastId(\\d+):title([^?]*)?:productor?",
160
- name: "podcast",
161
- component: PodcastPage,
162
- props: (route: RouteLocationNormalized) => ({
163
- podcastId: parseInt(route.params.podcastId.toString(), 10)
164
- }),
165
- meta:{
166
- title: ""
167
- }
168
- },
169
- {
170
- path: "/main/pub/video/:podcastId(\\d+):title([^?]*)?:productor?",
171
- name: "video",
172
- component: VideoPage,
173
- props: (route: RouteLocationNormalized) => ({
174
- podcastId: parseInt(route.params.podcastId.toString(), 10),
175
- }),
176
- meta:{
177
- title: ""
178
- }
179
- },
180
- {
181
- path: "/main/pub/participant/:participantId(\\d+):title([^?]*)?:productor?",
182
- name: "participant",
183
- component: ParticipantPage,
184
- props: (route: RouteLocationNormalized) => ({
185
- participantId: parseInt(route.params.participantId.toString(), 10),
186
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
187
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
188
- routeQuery: route.query.q ?? "",
189
- }),
190
- meta:{
191
- title: "",
192
- noScroll:true
193
- }
194
- },
195
- {
196
- path: "/main/pub/category/:iabId/:productor?",
197
- name: "category",
198
- component: CategoryPage,
199
- props: (route: RouteLocationNormalized) => ({
200
- iabId: parseInt(route.params.iabId.toString(), 10),
201
- productor: route.params.productor,
202
- }),
203
- meta:{
204
- title: "",
205
- }
206
- },
207
- {
208
- path: "/main/pub/rubrique/:rubriqueId(\\d+):title([^?]*)?:productor?",
209
- name: "rubrique",
210
- component: RubriquePage,
211
- props: (route: RouteLocationNormalized) => ({
212
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
213
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
214
- rubriqueId: parseInt(route.params.rubriqueId.toString(), 10),
215
- routeOrga:route.query.o,
216
- routeQuery: route.query.q ?? "",
217
- }),
218
- meta:{
219
- title: "",
220
- }
221
- },
222
- {
223
- path: "/main/pub/tag/:tag([^?]*)?:productor?",
224
- name: "tag",
225
- component: TagPage,
226
- props: (route: RouteLocationNormalized) => ({
227
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
228
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
229
- tag: route.params.tag,
230
- routeOrga:route.query.o,
231
- routeQuery: route.query.q ?? "",
232
- }),
233
- meta:{
234
- title: "",
235
- }
236
- },
237
- {
238
- path: "/main/pub/lives/:productor?",
239
- name: "lives",
240
- component: LivesPage,
241
- props: (route: RouteLocationNormalized) => ({
242
- productor: route.params.productor,
243
- }),
244
- meta:{
245
- title: "Radio & Live",
246
- }
247
- },
248
- {
249
- path: "/main/pub/radio/:canalId(\\d+):title([^?]*)?:productor?",
250
- name: "radio",
251
- component: RadioPage,
252
- props: (route: RouteLocationNormalized) => ({
253
- canalId: parseInt(route.params.canalId.toString(), 10),
254
- }),
255
- meta:{
256
- title: ""
257
- }
258
- },
259
- {
260
- path: "/main/pub/playlists/",
261
- name: "playlists",
262
- component: PlaylistsPage,
263
- props: (route: RouteLocationNormalized) => ({
264
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
265
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
266
- routeOrga:route.query.o,
267
- routeQuery: route.query.q ?? "",
268
- }),
269
- meta:{
270
- title: "Playlists"
271
- }
272
- },
273
- {
274
- path: "/main/pub/playlist/:playlistId(\\d+):title([^?]*)?:productor?",
275
- name: "playlist",
276
- component: PlaylistPage,
277
- props: (route: RouteLocationNormalized) => ({
278
- playlistId: parseInt(route.params.playlistId.toString(), 10),
279
- pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
280
- ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
281
- routeQuery: route.query.q ?? "",
282
- }),
283
- meta:{
284
- title: "",
285
- noScroll:true
286
- }
287
- },
288
- //Fake route to avoid errors
13
+ //Fake route to avoid errors
14
+ const fakeRoutes = [
289
15
  {
290
16
  path: "/",
291
17
  name: "backoffice",
@@ -328,13 +54,14 @@ const routes: Array<RouteRecordRaw> = [
328
54
  path: "/main/priv/distribution/:distrib/:id",
329
55
  component: Home,
330
56
  },
331
- { path: "/logout", component: PageLogout },
332
- { path: "/sso/logout", component: PageLogout },
333
- { path: "/:pathMatch(.*)*", component: PageNotFound },
334
57
  ];
58
+
335
59
  const router = createRouter({
336
60
  history: createWebHistory(),
337
- routes: routes,
61
+ routes: {
62
+ ...routes,
63
+ ...fakeRoutes
64
+ },
338
65
  scrollBehavior(to, from) {
339
66
  if (to.name === from.name && to.meta.noScroll) {
340
67
  return false;
@@ -345,7 +72,7 @@ const router = createRouter({
345
72
  });
346
73
 
347
74
  //Do in frontoffice but not podcastmakers
348
- async function getMyOrgaActive(authStore: AuthStore): Promise<string>{
75
+ async function getMyOrgaActive(authStore: AuthStore): Promise<void>{
349
76
  const orgaActive = await classicApi.fetchData<string>({
350
77
  api: 3,
351
78
  path: "user/active"
@@ -355,9 +82,8 @@ async function getMyOrgaActive(authStore: AuthStore): Promise<string>{
355
82
  await authStore.fetchProfile();
356
83
  fetchHelper.createAuthenticatedFetchHeader(true);
357
84
  }
358
- return orgaActive;
359
85
  }
360
86
 
361
87
  setupRouter(router, getMyOrgaActive);
362
88
 
363
- export default router;
89
+ export default router;
@@ -0,0 +1,236 @@
1
+ import { RouteRecordRaw, RouteLocationNormalized } from "vue-router";
2
+
3
+ import { getRouteProps, getSimpleRouteProps } from "./utils";
4
+
5
+ const Home = () => import("../components/pages/HomePage.vue");
6
+ const MapPage = () => import("../components/pages/MapPage.vue");
7
+ const PodcastsPage = () => import("../components/pages/PodcastsPage.vue");
8
+ const EmissionPage = () => import("../components/pages/EmissionPage.vue");
9
+ const EmissionsPage = () => import("../components/pages/EmissionsPage.vue");
10
+ const ParticpantsPage = () => import("../components/pages/ParticipantsPage.vue");
11
+ const PodcastPage = () => import("../components/pages/PodcastPage.vue");
12
+ const ParticipantPage = () => import("../components/pages/ParticipantPage.vue");
13
+ const SearchPage = () => import("../components/pages/SearchPage.vue");
14
+ const CategoryPage = () => import("../components/pages/CategoryPage.vue");
15
+ const RubriquePage = () => import("../components/pages/RubriquePage.vue");
16
+ const TagPage = () => import("../components/pages/TagPage.vue");
17
+ const LivesPage = () => import("../components/pages/LivesPage.vue");
18
+ const PlaylistPage = () => import("../components/pages/PlaylistPage.vue");
19
+ const PlaylistsPage = () => import("../components/pages/PlaylistsPage.vue");
20
+ const error403Page = () => import("../components/pages/Error403Page.vue");
21
+ const PageNotFound = () => import("../components/pages/PageNotFound.vue");
22
+ const RadioPage = () => import("../components/pages/RadioPage.vue");
23
+ const VideoPage = () => import("../components/pages/VideoPage.vue");
24
+ const PageLogout = () => import("../components/pages/PageLogout.vue");
25
+
26
+ export const routes: Array<RouteRecordRaw> = [
27
+ /*--------------------------------------------------------------------------
28
+ Liens publics
29
+ --------------------------------------------------------------------------*/
30
+ {
31
+ path: "/",
32
+ name: "",
33
+ component: Home,
34
+ meta:{
35
+ title: "Home"
36
+ }
37
+ },
38
+ {
39
+ path: "/main/pub/error",
40
+ name: "error",
41
+ component: error403Page,
42
+ },
43
+ {
44
+ path: "/main/pub/home",
45
+ name: "home",
46
+ component: Home,
47
+ meta:{
48
+ title: "Home",
49
+ }
50
+ },
51
+ {
52
+ path: "/main/pub/map",
53
+ name: "map",
54
+ component: MapPage,
55
+ meta:{
56
+ title: "Site map",
57
+ }
58
+ },
59
+ {
60
+ path: "/main/pub/search/:query?",
61
+ name: "search",
62
+ component: SearchPage,
63
+ props: (route: RouteLocationNormalized) => ({
64
+ queryRoute: route.params.query,
65
+ }),
66
+ meta:{
67
+ title: "Search",
68
+ }
69
+ },
70
+ {
71
+ path: "/main/pub/podcasts/",
72
+ name: "podcasts",
73
+ component: PodcastsPage,
74
+ props: getRouteProps,
75
+ meta:{
76
+ title: "Podcasts",
77
+ }
78
+ },
79
+ {
80
+ path: "/main/pub/emissions/",
81
+ name: "emissions",
82
+ component: EmissionsPage,
83
+ props: getRouteProps,
84
+ meta:{
85
+ title: "Emissions",
86
+ }
87
+ },
88
+ {
89
+ path: "/main/pub/participants",
90
+ name: "participants",
91
+ component: ParticpantsPage,
92
+ props: (route: RouteLocationNormalized) => ({
93
+ ...getSimpleRouteProps(route),
94
+ routeOrga:route.query.o,
95
+ }),
96
+ meta:{
97
+ title: "Speakers",
98
+ }
99
+ },
100
+ {
101
+ path: "/main/pub/emission/:emissionId(\\d+):title([^?]*)?:productor?",
102
+ name: "emission",
103
+ component: EmissionPage,
104
+ props: (route: RouteLocationNormalized) => ({
105
+ ...getSimpleRouteProps(route),
106
+ emissionId: parseInt(route.params.emissionId.toString(), 10),
107
+ }),
108
+ meta:{
109
+ title: "",
110
+ noScroll:true
111
+ }
112
+ },
113
+ {
114
+ path: "/main/pub/podcast/:podcastId(\\d+):title([^?]*)?:productor?",
115
+ name: "podcast",
116
+ component: PodcastPage,
117
+ props: (route: RouteLocationNormalized) => ({
118
+ podcastId: parseInt(route.params.podcastId.toString(), 10)
119
+ }),
120
+ meta:{
121
+ title: ""
122
+ }
123
+ },
124
+ {
125
+ path: "/main/pub/video/:podcastId(\\d+):title([^?]*)?:productor?",
126
+ name: "video",
127
+ component: VideoPage,
128
+ props: (route: RouteLocationNormalized) => ({
129
+ podcastId: parseInt(route.params.podcastId.toString(), 10),
130
+ }),
131
+ meta:{
132
+ title: ""
133
+ }
134
+ },
135
+ {
136
+ path: "/main/pub/participant/:participantId(\\d+):title([^?]*)?:productor?",
137
+ name: "participant",
138
+ component: ParticipantPage,
139
+ props: (route: RouteLocationNormalized) => ({
140
+ ...getSimpleRouteProps(route),
141
+ participantId: parseInt(route.params.participantId.toString(), 10),
142
+ }),
143
+ meta:{
144
+ title: "",
145
+ noScroll:true
146
+ }
147
+ },
148
+ {
149
+ path: "/main/pub/category/:iabId/:productor?",
150
+ name: "category",
151
+ component: CategoryPage,
152
+ props: (route: RouteLocationNormalized) => ({
153
+ iabId: parseInt(route.params.iabId.toString(), 10),
154
+ productor: route.params.productor,
155
+ }),
156
+ meta:{
157
+ title: "",
158
+ }
159
+ },
160
+ {
161
+ path: "/main/pub/rubrique/:rubriqueId(\\d+):title([^?]*)?:productor?",
162
+ name: "rubrique",
163
+ component: RubriquePage,
164
+ props: (route: RouteLocationNormalized) => ({
165
+ ...getSimpleRouteProps(route),
166
+ rubriqueId: parseInt(route.params.rubriqueId.toString(), 10),
167
+ routeOrga:route.query.o,
168
+ }),
169
+ meta:{
170
+ title: "",
171
+ }
172
+ },
173
+ {
174
+ path: "/main/pub/tag/:tag([^?]*)?:productor?",
175
+ name: "tag",
176
+ component: TagPage,
177
+ props: (route: RouteLocationNormalized) => ({
178
+ ...getSimpleRouteProps(route),
179
+ tag: route.params.tag,
180
+ routeOrga:route.query.o,
181
+ }),
182
+ meta:{
183
+ title: "",
184
+ }
185
+ },
186
+ {
187
+ path: "/main/pub/lives/:productor?",
188
+ name: "lives",
189
+ component: LivesPage,
190
+ props: (route: RouteLocationNormalized) => ({
191
+ productor: route.params.productor,
192
+ }),
193
+ meta:{
194
+ title: "Radio & Live",
195
+ }
196
+ },
197
+ {
198
+ path: "/main/pub/radio/:canalId(\\d+):title([^?]*)?:productor?",
199
+ name: "radio",
200
+ component: RadioPage,
201
+ props: (route: RouteLocationNormalized) => ({
202
+ canalId: parseInt(route.params.canalId.toString(), 10),
203
+ }),
204
+ meta:{
205
+ title: ""
206
+ }
207
+ },
208
+ {
209
+ path: "/main/pub/playlists/",
210
+ name: "playlists",
211
+ component: PlaylistsPage,
212
+ props: (route: RouteLocationNormalized) => ({
213
+ ...getSimpleRouteProps(route),
214
+ routeOrga:route.query.o,
215
+ }),
216
+ meta:{
217
+ title: "Playlists"
218
+ }
219
+ },
220
+ {
221
+ path: "/main/pub/playlist/:playlistId(\\d+):title([^?]*)?:productor?",
222
+ name: "playlist",
223
+ component: PlaylistPage,
224
+ props: (route: RouteLocationNormalized) => ({
225
+ ...getSimpleRouteProps(route),
226
+ playlistId: parseInt(route.params.playlistId.toString(), 10),
227
+ }),
228
+ meta:{
229
+ title: "",
230
+ noScroll:true
231
+ }
232
+ },
233
+ { path: "/logout", component: PageLogout },
234
+ { path: "/sso/logout", component: PageLogout },
235
+ { path: "/:pathMatch(.*)*", component: PageNotFound },
236
+ ];
@@ -5,6 +5,47 @@ import { Rubriquage } from "../stores/class/rubrique/rubriquage";
5
5
  import classicApi from "../api/classicApi";
6
6
  import { useAuthStore, AuthStore } from "../stores/AuthStore";
7
7
  import { deepEqual } from "../helper/equals";
8
+ import { RouteLocationNormalized } from "vue-router";
9
+ import { RouteProps } from "../components/composable/route/types";
10
+ import { ROUTE_PARAMS } from "../components/composable/route/types";
11
+
12
+ export function getSimpleRouteProps(route: RouteLocationNormalized): RouteProps {
13
+ return {
14
+ pr: route.query.pr ? parseInt(route.query.pr.toString(), 10) : undefined,
15
+ ps: route.query.ps ? parseInt(route.query.ps.toString(), 10) : undefined,
16
+ routeQuery: route.query.q as string ?? ""
17
+ };
18
+ }
19
+
20
+ /**
21
+ * Return route props used for filtering
22
+ */
23
+ export function getRouteProps(route: RouteLocationNormalized): RouteProps {
24
+ let routeEmissionGroups: number[]|undefined = undefined;
25
+ const reg = route.query[ROUTE_PARAMS.EmissionGroups];
26
+
27
+ if (reg !== undefined) {
28
+ if (Array.isArray(reg)) {
29
+ routeEmissionGroups = reg.map(g => parseInt(g, 10));
30
+ } else {
31
+ routeEmissionGroups = [parseInt(reg, 10)];
32
+ }
33
+ }
34
+
35
+ return {
36
+ ...getSimpleRouteProps(route),
37
+ routeMonetisable: route.query.m as string ?? "",
38
+ routeIab: route.query.i ? parseInt(route.query.i.toString(), 10) : undefined,
39
+ routeSort: route.query.s as string ?? "",
40
+ routeIncludeHidden: route.query.h as string ?? "",
41
+ routeFrom: route.query.from as string|undefined,
42
+ routeTo: route.query.to as string|undefined,
43
+ routeOrga:route.query.o as string|undefined,
44
+ routeRubriques :route.query.r as string ?? route.query.rubriquesId as string|undefined,
45
+ routeBeneficiaries: route.query[ROUTE_PARAMS.Beneficiaries] as string[]|undefined,
46
+ routeEmissionGroups
47
+ }
48
+ }
8
49
 
9
50
  async function changeOrgaFilter(orgaFilter: string, filterStore: FilterStore){
10
51
  const saveStore = useSaveFetchStore();
@@ -37,7 +78,7 @@ let resolved = false;
37
78
  /**
38
79
  * Utility function seting up the router with a custom beforeEach
39
80
  */
40
- export function setupRouter(router: Router, getMyOrgaActive: (authStore: AuthStore) => Promise<string>): void {
81
+ export function setupRouter(router: Router, getMyOrgaActive: (authStore: AuthStore) => Promise<void>): void {
41
82
  router.beforeResolve(async () =>{
42
83
  fetchMyOrgaActive = false;
43
84
  // Reinit variable to allow one redirect
@@ -109,4 +150,4 @@ export function setupRouter(router: Router, getMyOrgaActive: (authStore: AuthSto
109
150
  }
110
151
  }
111
152
  });
112
- }
153
+ }
@@ -3,6 +3,9 @@ import { Organisation } from "./organisation";
3
3
  import { Person } from "../user/person";
4
4
  import { ItuneCategory } from "./ituneCategory";
5
5
 
6
+ /**
7
+ * An emission
8
+ */
6
9
  export interface Emission {
7
10
  imageUrl?: string;
8
11
  annotations?: { [key: string]: string | number | boolean | undefined };
@@ -34,20 +37,23 @@ export interface Emission {
34
37
  visible?: boolean;
35
38
  /** An optional list of tags */
36
39
  tags?: string[];
40
+ /** The ids of groups this emission belongs to */
41
+ groupIds?: Array<number>
37
42
  }
38
43
 
39
- export function emptyEmissionData(): Emission {
44
+ export function emptyEmissionData(orga?: Organisation): Emission {
40
45
  return {
41
46
  emissionId: 0,
42
47
  name: "",
43
48
  description: "",
44
49
  imageUrl: "",
45
50
  iabIds: undefined,
46
- orga: {
51
+ orga: orga ?? {
47
52
  id: "",
48
53
  name: "",
49
54
  imageUrl: "",
50
55
  },
56
+ beneficiaries: [],
51
57
  rubriqueIds: [],
52
58
  monetisable: "UNDEFINED",
53
59
  limits: {},
@@ -39,4 +39,7 @@
39
39
 
40
40
  //Font-family
41
41
  --octopus-font-family: Montserrat,sans-serif,"Helvetica Neue";
42
+
43
+ // ClassicDataTable
44
+ --table-line-height: 48px;
42
45
  }
@@ -179,6 +179,11 @@ input:not([class^="vs__"]), button:not([class^="vs__"]), select:not([class^="vs_
179
179
  margin: 0.3rem;
180
180
  }
181
181
  }
182
+
183
+ &.btn-small {
184
+ font-size: 0.55rem;
185
+ padding: 0.2rem 0.4rem;
186
+ }
182
187
 
183
188
  &.admin-button{
184
189
  padding: 0.3rem;