@saooti/octopus-sdk 37.0.6 → 37.0.8

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 (236) hide show
  1. package/README.md +2 -2
  2. package/index.ts +22 -22
  3. package/package.json +26 -22
  4. package/src/App.vue +69 -60
  5. package/src/api/classicCrud.ts +12 -12
  6. package/src/api/initialize.ts +1 -1
  7. package/src/assets/transition.scss +34 -22
  8. package/src/components/display/aggregator/RssSection.vue +3 -3
  9. package/src/components/display/categories/CategoryChooser.vue +73 -60
  10. package/src/components/display/categories/CategoryFilter.vue +134 -90
  11. package/src/components/display/categories/CategoryList.vue +76 -62
  12. package/src/components/display/comments/AddCommentModal.vue +44 -44
  13. package/src/components/display/comments/CommentBasicView.vue +38 -30
  14. package/src/components/display/comments/CommentInput.vue +121 -106
  15. package/src/components/display/comments/CommentItem.vue +144 -102
  16. package/src/components/display/comments/CommentList.vue +117 -85
  17. package/src/components/display/comments/CommentParentInfo.vue +18 -15
  18. package/src/components/display/comments/CommentPlayer.vue +39 -41
  19. package/src/components/display/comments/CommentSection.vue +68 -53
  20. package/src/components/display/edit/EditBox.vue +7 -7
  21. package/src/components/display/edit/EditBoxRadio.vue +3 -4
  22. package/src/components/display/edit/EditCommentBox.vue +34 -36
  23. package/src/components/display/emission/EmissionInlineList.vue +75 -63
  24. package/src/components/display/emission/EmissionItem.vue +47 -35
  25. package/src/components/display/emission/EmissionList.vue +118 -83
  26. package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
  27. package/src/components/display/filter/AdvancedSearch.vue +81 -73
  28. package/src/components/display/filter/CategorySearchFilter.vue +27 -25
  29. package/src/components/display/filter/DateFilter.vue +38 -38
  30. package/src/components/display/filter/MonetizableFilter.vue +16 -14
  31. package/src/components/display/filter/ProductorSearch.vue +55 -47
  32. package/src/components/display/filter/RubriqueChoice.vue +42 -27
  33. package/src/components/display/filter/RubriqueFilter.vue +130 -85
  34. package/src/components/display/filter/SearchOrder.vue +16 -11
  35. package/src/components/display/list/ListPaginate.vue +72 -70
  36. package/src/components/display/list/PaginateParams.vue +29 -30
  37. package/src/components/display/list/PaginateSection.vue +210 -0
  38. package/src/components/display/list/SwiperList.vue +28 -32
  39. package/src/components/display/live/CountDown.vue +12 -14
  40. package/src/components/display/live/LiveHorizontalList.vue +60 -50
  41. package/src/components/display/live/LiveItem.vue +42 -26
  42. package/src/components/display/live/LiveList.vue +92 -65
  43. package/src/components/display/live/RadioCurrently.vue +47 -42
  44. package/src/components/display/live/RadioImage.vue +40 -42
  45. package/src/components/display/live/RadioItem.vue +15 -22
  46. package/src/components/display/live/RadioList.vue +24 -21
  47. package/src/components/display/live/RadioPlanning.vue +105 -68
  48. package/src/components/display/organisation/OrganisationChooser.vue +58 -42
  49. package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
  50. package/src/components/display/participant/ParticipantItem.vue +89 -77
  51. package/src/components/display/participant/ParticipantList.vue +90 -60
  52. package/src/components/display/playlist/PlaylistItem.vue +32 -35
  53. package/src/components/display/playlist/PlaylistList.vue +70 -52
  54. package/src/components/display/playlist/PodcastList.vue +61 -50
  55. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
  56. package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
  57. package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
  58. package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
  59. package/src/components/display/podcasts/PodcastImage.vue +129 -131
  60. package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
  61. package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
  62. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
  63. package/src/components/display/podcasts/PodcastItem.vue +96 -90
  64. package/src/components/display/podcasts/PodcastItemInfo.vue +61 -65
  65. package/src/components/display/podcasts/PodcastList.vue +115 -84
  66. package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
  67. package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
  68. package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
  69. package/src/components/display/podcasts/TagList.vue +33 -37
  70. package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
  71. package/src/components/display/rubriques/RubriqueList.vue +117 -89
  72. package/src/components/display/sharing/PlayerParameters.vue +45 -42
  73. package/src/components/display/sharing/QrCode.vue +52 -46
  74. package/src/components/display/sharing/ShareButtons.vue +18 -18
  75. package/src/components/display/sharing/ShareButtonsIntern.vue +100 -78
  76. package/src/components/display/sharing/ShareDistribution.vue +101 -67
  77. package/src/components/display/sharing/SharePlayer.vue +207 -127
  78. package/src/components/display/sharing/SharePlayerColors.vue +15 -15
  79. package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
  80. package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
  81. package/src/components/display/sharing/SubscribeButtons.vue +83 -32
  82. package/src/components/display/studio/RecordingItemButton.vue +3 -3
  83. package/src/components/form/ClassicCheckbox.vue +32 -31
  84. package/src/components/form/ClassicDatePicker.vue +47 -49
  85. package/src/components/form/ClassicInputText.vue +99 -98
  86. package/src/components/form/ClassicLoading.vue +11 -14
  87. package/src/components/form/ClassicMultiselect.vue +125 -126
  88. package/src/components/form/ClassicRadio.vue +15 -18
  89. package/src/components/form/ClassicSearch.vue +17 -23
  90. package/src/components/form/ClassicSelect.vue +35 -27
  91. package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +103 -118
  92. package/src/components/misc/AcpmImage.vue +6 -6
  93. package/src/components/misc/ClassicAccordion.vue +73 -0
  94. package/src/components/misc/ClassicNav.vue +117 -0
  95. package/src/components/misc/ClassicPopover.vue +212 -0
  96. package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
  97. package/src/components/misc/ErrorMessage.vue +9 -17
  98. package/src/components/misc/FooterSection.vue +198 -0
  99. package/src/components/misc/HomeDropdown.vue +60 -60
  100. package/src/components/misc/LeftMenu.vue +115 -79
  101. package/src/components/misc/ProgressBar.vue +36 -32
  102. package/src/components/misc/SnackBar.vue +169 -0
  103. package/src/components/misc/TopBar.vue +162 -116
  104. package/src/components/misc/modal/ClassicModal.vue +99 -103
  105. package/src/components/misc/modal/ClipboardModal.vue +21 -23
  106. package/src/components/misc/modal/MessageModal.vue +22 -28
  107. package/src/components/misc/modal/NewsletterModal.vue +139 -113
  108. package/src/components/misc/modal/QrCodeModal.vue +14 -17
  109. package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
  110. package/src/components/misc/player/PlayerCompact.vue +47 -62
  111. package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
  112. package/src/components/misc/player/PlayerLarge.vue +62 -61
  113. package/src/components/misc/player/PlayerProgressBar.vue +40 -30
  114. package/src/components/misc/player/PlayerTimeline.vue +32 -36
  115. package/src/components/misc/player/radio/RadioHistory.vue +62 -59
  116. package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
  117. package/src/components/mixins/cookies.ts +11 -10
  118. package/src/components/mixins/displayMethods.ts +5 -4
  119. package/src/components/mixins/handle403.ts +9 -9
  120. package/src/components/mixins/imageProxy.ts +14 -7
  121. package/src/components/mixins/init.ts +31 -16
  122. package/src/components/mixins/orgaComputed.ts +7 -7
  123. package/src/components/mixins/organisationFilter.ts +36 -22
  124. package/src/components/mixins/player/playerComment.ts +46 -37
  125. package/src/components/mixins/player/playerDisplay.ts +122 -87
  126. package/src/components/mixins/player/playerLive.ts +65 -43
  127. package/src/components/mixins/player/playerLogic.ts +133 -88
  128. package/src/components/mixins/player/playerTranscript.ts +48 -30
  129. package/src/components/mixins/radio/fetchRadioData.ts +40 -23
  130. package/src/components/mixins/selenium.ts +2 -2
  131. package/src/components/mixins/tagOfMixins.ts +11 -11
  132. package/src/components/pages/CategoryPage.vue +43 -0
  133. package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
  134. package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
  135. package/src/components/pages/Error403Page.vue +20 -19
  136. package/src/components/pages/HomePage.vue +144 -0
  137. package/src/components/pages/LivesPage.vue +66 -0
  138. package/src/components/pages/PageNotFound.vue +33 -22
  139. package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
  140. package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
  141. package/src/components/pages/PlaylistPage.vue +175 -0
  142. package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
  143. package/src/components/pages/PodcastPage.vue +365 -0
  144. package/src/components/pages/PodcastsPage.vue +152 -0
  145. package/src/components/pages/RadioPage.vue +131 -0
  146. package/src/components/pages/RubriquePage.vue +45 -0
  147. package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
  148. package/src/helper/dom.ts +1 -1
  149. package/src/helper/duration.ts +10 -4
  150. package/src/helper/useEventListener.ts +7 -8
  151. package/src/i18n.ts +31 -30
  152. package/src/locale/de.ts +272 -257
  153. package/src/locale/educationen.ts +13 -13
  154. package/src/locale/educationfr.ts +1 -1
  155. package/src/locale/en.ts +332 -324
  156. package/src/locale/es.ts +334 -318
  157. package/src/locale/fr.ts +339 -324
  158. package/src/locale/it.ts +341 -328
  159. package/src/locale/messages.ts +9 -9
  160. package/src/locale/sl.ts +324 -319
  161. package/src/main.ts +28 -31
  162. package/src/router/router.ts +218 -198
  163. package/src/shims-tsx.d.ts +1 -1
  164. package/src/shims-vue.d.ts +1 -1
  165. package/src/stores/ApiStore.ts +44 -44
  166. package/src/stores/AuthStore.ts +21 -15
  167. package/src/stores/CommentStore.ts +13 -11
  168. package/src/stores/FilterStore.ts +25 -15
  169. package/src/stores/GeneralStore.ts +15 -15
  170. package/src/stores/ParamSdkStore.ts +179 -137
  171. package/src/stores/PlayerStore.ts +139 -125
  172. package/src/stores/class/adserver/adserverConfig.ts +1 -1
  173. package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
  174. package/src/stores/class/cartouchier/cartouche.ts +4 -4
  175. package/src/stores/class/cartouchier/cartouchier.ts +2 -2
  176. package/src/stores/class/conference/conference.ts +10 -9
  177. package/src/stores/class/conference/conferenceMessage.ts +2 -2
  178. package/src/stores/class/conference/conferenceParticipant.ts +1 -1
  179. package/src/stores/class/conference/studioCall.ts +6 -6
  180. package/src/stores/class/contract/contractOrganisation.ts +5 -5
  181. package/src/stores/class/ftp/ftpEmission.ts +9 -9
  182. package/src/stores/class/ftp/testFtpEmission.ts +4 -4
  183. package/src/stores/class/general/audioView.ts +19 -19
  184. package/src/stores/class/general/category.ts +1 -1
  185. package/src/stores/class/general/classicSelectType.ts +2 -3
  186. package/src/stores/class/general/customPlayer.ts +8 -8
  187. package/src/stores/class/general/emission.ts +20 -20
  188. package/src/stores/class/general/fetchParam.ts +8 -2
  189. package/src/stores/class/general/initState.ts +31 -31
  190. package/src/stores/class/general/interfacePageable.ts +13 -13
  191. package/src/stores/class/general/ituneCategory.ts +4 -4
  192. package/src/stores/class/general/listReturn.ts +12 -12
  193. package/src/stores/class/general/media.ts +7 -7
  194. package/src/stores/class/general/organisation.ts +9 -9
  195. package/src/stores/class/general/pageable.ts +10 -10
  196. package/src/stores/class/general/participant.ts +7 -7
  197. package/src/stores/class/general/player.ts +30 -28
  198. package/src/stores/class/general/playlist.ts +17 -19
  199. package/src/stores/class/general/podcast.ts +19 -19
  200. package/src/stores/class/general/sortPageable.ts +4 -4
  201. package/src/stores/class/general/soundcastCategory.ts +7 -7
  202. package/src/stores/class/ouestFrance/ofTag.ts +34 -34
  203. package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
  204. package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
  205. package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
  206. package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
  207. package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
  208. package/src/stores/class/radio/canal.ts +4 -4
  209. package/src/stores/class/radio/live.ts +6 -6
  210. package/src/stores/class/radio/mix.ts +16 -16
  211. package/src/stores/class/radio/playlistMedia.ts +7 -7
  212. package/src/stores/class/radio/recurrence.ts +54 -54
  213. package/src/stores/class/rss/rssEmission.ts +13 -13
  214. package/src/stores/class/rss/rssInfo.ts +7 -7
  215. package/src/stores/class/rubrique/rubriquage.ts +2 -2
  216. package/src/stores/class/rubrique/rubrique.ts +1 -1
  217. package/src/stores/class/stat/statArrayIncome.ts +5 -5
  218. package/src/stores/class/stat/statArrayObject.ts +26 -26
  219. package/src/stores/class/stat/statGraph.ts +6 -6
  220. package/src/stores/class/user/person.ts +4 -2
  221. package/src/stores/class/user/profile.ts +4 -2
  222. package/src/stores/class/user/userKeycloak.ts +4 -5
  223. package/src/components/display/list/Paginate.vue +0 -181
  224. package/src/components/misc/Accordion.vue +0 -78
  225. package/src/components/misc/Footer.vue +0 -169
  226. package/src/components/misc/Nav.vue +0 -119
  227. package/src/components/misc/Popover.vue +0 -193
  228. package/src/components/misc/Snackbar.vue +0 -168
  229. package/src/components/pages/Category.vue +0 -41
  230. package/src/components/pages/Home.vue +0 -125
  231. package/src/components/pages/Lives.vue +0 -64
  232. package/src/components/pages/Playlist.vue +0 -164
  233. package/src/components/pages/Podcast.vue +0 -307
  234. package/src/components/pages/Podcasts.vue +0 -146
  235. package/src/components/pages/Radio.vue +0 -122
  236. package/src/components/pages/Rubrique.vue +0 -42
@@ -1,8 +1,5 @@
1
1
  <template>
2
- <div
3
- v-if="radio"
4
- class="d-flex border w-100 p-3"
5
- >
2
+ <div v-if="radio" class="d-flex border w-100 p-3">
6
3
  <RadioImage :radio="radio" />
7
4
  <router-link
8
5
  :to="{
@@ -15,10 +12,7 @@
15
12
  <div class="emission-name mb-2">
16
13
  {{ radio.name }}
17
14
  </div>
18
- <div
19
- v-if="radio.description"
20
- class="ten-line-clamp"
21
- >
15
+ <div v-if="radio.description" class="ten-line-clamp">
22
16
  {{ radio.description }}
23
17
  </div>
24
18
  <RadioCurrently :radio="radio" />
@@ -27,28 +21,27 @@
27
21
  </template>
28
22
 
29
23
  <script lang="ts">
30
- import { useFilterStore } from '@/stores/FilterStore';
31
- import { mapState } from 'pinia';
32
- import imageProxy from '../../mixins/imageProxy';
33
- import RadioImage from './RadioImage.vue';
34
- import RadioCurrently from './RadioCurrently.vue';
35
- import { defineComponent } from 'vue';
36
- import { Canal } from '@/stores/class/radio/canal';
24
+ import { useFilterStore } from "@/stores/FilterStore";
25
+ import { mapState } from "pinia";
26
+ import imageProxy from "../../mixins/imageProxy";
27
+ import RadioImage from "./RadioImage.vue";
28
+ import RadioCurrently from "./RadioCurrently.vue";
29
+ import { defineComponent } from "vue";
30
+ import { Canal } from "@/stores/class/radio/canal";
37
31
  export default defineComponent({
38
- name: 'RadioItem',
32
+ name: "RadioItem",
39
33
 
40
34
  components: {
41
35
  RadioCurrently,
42
- RadioImage
36
+ RadioImage,
43
37
  },
44
38
  mixins: [imageProxy],
45
39
 
46
40
  props: {
47
- radio: { default: undefined, type: Object as ()=>Canal},
41
+ radio: { default: undefined, type: Object as () => Canal },
48
42
  },
49
- computed:{
50
- ...mapState(useFilterStore, ['filterOrgaId']),
43
+ computed: {
44
+ ...mapState(useFilterStore, ["filterOrgaId"]),
51
45
  },
52
- })
46
+ });
53
47
  </script>
54
-
@@ -4,7 +4,7 @@
4
4
  class="d-flex flex-column align-items-start mt-3"
5
5
  >
6
6
  <h2 class="mb-0 big-h2 mb-3">
7
- {{ $t('Radio') }}
7
+ {{ $t("Radio") }}
8
8
  </h2>
9
9
  <template v-if="radio.length">
10
10
  <RadioItem
@@ -17,17 +17,17 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts">
20
- import RadioItem from './RadioItem.vue';
21
- import { handle403 } from '../../mixins/handle403';
22
- import { orgaComputed } from '../../mixins/orgaComputed';
23
- import octopusApi from '@saooti/octopus-api';
24
- import { useFilterStore } from '@/stores/FilterStore';
25
- import { mapState } from 'pinia';
26
- import { Canal } from '@/stores/class/radio/canal';
27
- import { defineComponent } from 'vue'
28
- import { AxiosError } from 'axios';
20
+ import RadioItem from "./RadioItem.vue";
21
+ import { handle403 } from "../../mixins/handle403";
22
+ import { orgaComputed } from "../../mixins/orgaComputed";
23
+ import octopusApi from "@saooti/octopus-api";
24
+ import { useFilterStore } from "@/stores/FilterStore";
25
+ import { mapState } from "pinia";
26
+ import { Canal } from "@/stores/class/radio/canal";
27
+ import { defineComponent } from "vue";
28
+ import { AxiosError } from "axios";
29
29
  export default defineComponent({
30
- name: 'Ecbd98d979bd4312Ad5eFc7c1c4a191c',
30
+ name: "Ecbd98d979bd4312Ad5eFc7c1c4a191c",
31
31
  components: {
32
32
  RadioItem,
33
33
  },
@@ -35,18 +35,18 @@ export default defineComponent({
35
35
  mixins: [handle403, orgaComputed],
36
36
 
37
37
  props: {
38
- organisationId: { default: undefined, type: String},
38
+ organisationId: { default: undefined, type: String },
39
39
  },
40
40
  data() {
41
41
  return {
42
- radio: [] as Array<Canal>
42
+ radio: [] as Array<Canal>,
43
43
  };
44
44
  },
45
-
45
+
46
46
  computed: {
47
- ...mapState(useFilterStore, ['filterOrgaId']),
48
- filterOrgaUsed(): string|undefined {
49
- return this.filterOrgaId?this.filterOrgaId:this.organisationId;
47
+ ...mapState(useFilterStore, ["filterOrgaId"]),
48
+ filterOrgaUsed(): string | undefined {
49
+ return this.filterOrgaId ? this.filterOrgaId : this.organisationId;
50
50
  },
51
51
  },
52
52
  watch: {
@@ -55,7 +55,7 @@ export default defineComponent({
55
55
  this.fetchContent();
56
56
  },
57
57
  immediate: true,
58
- }
58
+ },
59
59
  },
60
60
  methods: {
61
61
  async fetchContent(): Promise<void> {
@@ -64,11 +64,14 @@ export default defineComponent({
64
64
  return;
65
65
  }
66
66
  try {
67
- this.radio = await octopusApi.fetchData<Array<Canal>>(14, 'canal/orga/'+this.filterOrgaUsed+'/');
67
+ this.radio = await octopusApi.fetchData<Array<Canal>>(
68
+ 14,
69
+ "canal/orga/" + this.filterOrgaUsed + "/",
70
+ );
68
71
  } catch (error) {
69
- this.handle403((error as AxiosError));
72
+ this.handle403(error as AxiosError);
70
73
  }
71
74
  },
72
75
  },
73
- })
76
+ });
74
77
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="module-box">
3
3
  <h2 class="big-h2 mb-3 height-40">
4
- {{ $t('Program') }}
4
+ {{ $t("Program") }}
5
5
  </h2>
6
6
  <div class="border">
7
7
  <div class="d-flex align-items-center w-100">
@@ -9,7 +9,7 @@
9
9
  v-for="day in arrayDays"
10
10
  :key="day.date"
11
11
  class="d-flex flex-column align-items-center flex-grow-1"
12
- :class="day.date==daySelected?'bg-primary text-white':''"
12
+ :class="day.date == daySelected ? 'bg-primary text-white' : ''"
13
13
  @click="changeDate(day.date)"
14
14
  >
15
15
  <span class="text-capitalize">{{ day.dayOfWeek }}</span>
@@ -18,27 +18,32 @@
18
18
  </div>
19
19
  <div class="d-flex flex-column p-3">
20
20
  <ClassicLoading
21
- :loading-text="loading?$t('Loading content ...'):undefined"
22
- :error-text="error?$t(`Error`):undefined"
21
+ :loading-text="loading ? $t('Loading content ...') : undefined"
22
+ :error-text="error ? $t(`Error`) : undefined"
23
23
  />
24
24
  <template v-if="!loading && !error">
25
- <div
26
- v-if="!planning[daySelected].length"
27
- class="text-center"
28
- >
29
- {{ $t('No programming') }}
25
+ <div v-if="!planning[daySelected].length" class="text-center">
26
+ {{ $t("No programming") }}
30
27
  </div>
31
- <div
28
+ <div
32
29
  v-for="planningItem in planning[daySelected]"
33
30
  v-else
34
- :key="planningItem.occurrence.occurrenceId +''+ planningItem.occurrence.liveId"
31
+ :key="
32
+ planningItem.occurrence.occurrenceId +
33
+ '' +
34
+ planningItem.occurrence.liveId
35
+ "
35
36
  class="d-flex align-items-center mb-3"
36
37
  >
37
38
  <div class="program-item-date fw-bold flex-shrink-0">
38
39
  {{ dateDisplay(planningItem.occurrence.startDate) }}
39
40
  </div>
40
41
  <component
41
- :is="planningItem.podcast.availability.visibility ? 'router-link' : 'div'"
42
+ :is="
43
+ planningItem.podcast.availability.visibility
44
+ ? 'router-link'
45
+ : 'div'
46
+ "
42
47
  class="d-flex align-items-center text-dark"
43
48
  :to="{
44
49
  name: 'podcast',
@@ -51,16 +56,20 @@
51
56
  width="150"
52
57
  height="150"
53
58
  class="m-2"
54
- :title="$t('Episode name image', {name:planningItem.podcast.title})"
55
- :alt="$t('Episode name image', {name:planningItem.podcast.title})"
56
- >
59
+ :title="
60
+ $t('Episode name image', { name: planningItem.podcast.title })
61
+ "
62
+ :alt="
63
+ $t('Episode name image', { name: planningItem.podcast.title })
64
+ "
65
+ />
57
66
  <div class="d-flex flex-column">
58
67
  <div class="d-flex align-items-center mb-2">
59
- <div
68
+ <div
60
69
  v-if="planningItem.occurrence.liveId"
61
70
  class="bg-complementary text-white p-1 me-1"
62
71
  >
63
- {{ $t('Live') }}
72
+ {{ $t("Live") }}
64
73
  </div>
65
74
  <div class="flex-grow-1 text-truncate">
66
75
  {{ planningItem.occurrence.podcastData.title }}
@@ -80,95 +89,123 @@
80
89
  </template>
81
90
 
82
91
  <script lang="ts">
83
- import { useFilterStore } from '@/stores/FilterStore';
84
- import { mapState } from 'pinia';
85
- import dayjs from 'dayjs';
86
- import utc from 'dayjs/plugin/utc';
92
+ import { useFilterStore } from "@/stores/FilterStore";
93
+ import { mapState } from "pinia";
94
+ import dayjs from "dayjs";
95
+ import utc from "dayjs/plugin/utc";
87
96
  dayjs.extend(utc);
88
- import octopusApi from '@saooti/octopus-api';
89
- import imageProxy from '../../mixins/imageProxy';
90
- import ParticipantDescription from '../podcasts/ParticipantDescription.vue';
91
- import ClassicLoading from '../../form/ClassicLoading.vue';
92
- import { defineComponent } from 'vue';
93
- import { Canal } from '@/stores/class/radio/canal';
94
- import { PlanningOccurrence } from '@/stores/class/radio/recurrence';
95
- import { Podcast } from '@/stores/class/general/podcast';
96
- import { PlanningLive } from '@/stores/class/radio/live';
97
+ import octopusApi from "@saooti/octopus-api";
98
+ import imageProxy from "../../mixins/imageProxy";
99
+ import ParticipantDescription from "../podcasts/ParticipantDescription.vue";
100
+ import ClassicLoading from "../../form/ClassicLoading.vue";
101
+ import { defineComponent } from "vue";
102
+ import { Canal } from "@/stores/class/radio/canal";
103
+ import { PlanningOccurrence } from "@/stores/class/radio/recurrence";
104
+ import { Podcast } from "@/stores/class/general/podcast";
105
+ import { PlanningLive } from "@/stores/class/radio/live";
97
106
  export default defineComponent({
98
- name: 'RadioPlanning',
107
+ name: "RadioPlanning",
99
108
 
100
109
  components: {
101
110
  ClassicLoading,
102
- ParticipantDescription
111
+ ParticipantDescription,
103
112
  },
104
113
 
105
114
  mixins: [imageProxy],
106
115
 
107
116
  props: {
108
- radio: { default: undefined, type: Object as ()=>Canal},
117
+ radio: { default: undefined, type: Object as () => Canal },
109
118
  },
110
-
119
+
111
120
  data() {
112
121
  return {
113
- planning: {} as {[key: number]:Array<{podcast: Podcast, occurrence: PlanningOccurrence|PlanningLive}>},
122
+ planning: {} as {
123
+ [key: number]: Array<{
124
+ podcast: Podcast;
125
+ occurrence: PlanningOccurrence | PlanningLive;
126
+ }>;
127
+ },
114
128
  daySelected: dayjs().valueOf(),
115
- arrayDays: [] as Array<{title: string, date: number, dayOfWeek: string }>,
129
+ arrayDays: [] as Array<{
130
+ title: string;
131
+ date: number;
132
+ dayOfWeek: string;
133
+ }>,
116
134
  loading: true as boolean,
117
135
  error: false as boolean,
118
136
  };
119
137
  },
120
138
 
121
- computed:{
122
- ...mapState(useFilterStore, ['filterOrgaId']),
123
- startOfDay(): number{
124
- return dayjs(this.daySelected).utcOffset(0).startOf('date').valueOf();
139
+ computed: {
140
+ ...mapState(useFilterStore, ["filterOrgaId"]),
141
+ startOfDay(): number {
142
+ return dayjs(this.daySelected).utcOffset(0).startOf("date").valueOf();
125
143
  },
126
- endOfDay(): number{
127
- return dayjs(this.daySelected).utcOffset(0).endOf('date').valueOf();
144
+ endOfDay(): number {
145
+ return dayjs(this.daySelected).utcOffset(0).endOf("date").valueOf();
128
146
  },
129
147
  },
130
148
 
131
- mounted(){
149
+ mounted() {
132
150
  this.createArrayDays();
133
151
  this.fetchOccurrences();
134
152
  },
135
-
153
+
136
154
  methods: {
137
- createArrayDays(){
155
+ createArrayDays() {
138
156
  for (let index = -7; index < 3; index++) {
139
- const dayToAdd = dayjs().add(index, 'day');
140
- if(0===index){
157
+ const dayToAdd = dayjs().add(index, "day");
158
+ if (0 === index) {
141
159
  this.daySelected = dayToAdd.valueOf();
142
160
  }
143
- this.arrayDays.push({title: dayToAdd.format('D/MM'), dayOfWeek:dayToAdd.format('dddd'), date : dayToAdd.valueOf()});
161
+ this.arrayDays.push({
162
+ title: dayToAdd.format("D/MM"),
163
+ dayOfWeek: dayToAdd.format("dddd"),
164
+ date: dayToAdd.valueOf(),
165
+ });
144
166
  }
145
167
  },
146
- async fetchOccurrences(): Promise<void>{
147
- if(this.planning[this.daySelected]){return;}
168
+ async fetchOccurrences(): Promise<void> {
169
+ if (this.planning[this.daySelected]) {
170
+ return;
171
+ }
148
172
  this.loading = true;
149
173
  this.error = false;
150
174
  try {
151
175
  const params = {
152
176
  canalId: this.radio?.id,
153
177
  from: this.startOfDay,
154
- to: this.endOfDay
178
+ to: this.endOfDay,
155
179
  };
156
- let occurrences: Array<PlanningOccurrence|PlanningLive> = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'planning/occurrence/list',params);
157
- const lives = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'live/list',params);
158
- if(lives.length){
180
+ let occurrences: Array<PlanningOccurrence | PlanningLive> =
181
+ await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>(
182
+ 14,
183
+ "planning/occurrence/list",
184
+ params,
185
+ );
186
+ const lives = await octopusApi.fetchDataWithParams<
187
+ Array<PlanningOccurrence>
188
+ >(14, "live/list", params);
189
+ if (lives.length) {
159
190
  occurrences = occurrences.concat(lives);
160
- occurrences.sort((a,b) => {
161
- if(a.startDate > b.startDate){
191
+ occurrences.sort((a, b) => {
192
+ if (a.startDate > b.startDate) {
162
193
  return 1;
163
194
  }
164
- return (b.startDate > a.startDate) ? -1 : 0;
195
+ return b.startDate > a.startDate ? -1 : 0;
165
196
  });
166
197
  }
167
198
  this.planning[this.daySelected] = [];
168
199
  for (let oc of occurrences) {
169
- if(oc.podcastId){
170
- const data : Podcast = await octopusApi.fetchData<Podcast>(0, 'podcast/'+oc.podcastId);
171
- this.planning[this.daySelected].push({podcast: data, occurrence:oc});
200
+ if (oc.podcastId) {
201
+ const data: Podcast = await octopusApi.fetchData<Podcast>(
202
+ 0,
203
+ "podcast/" + oc.podcastId,
204
+ );
205
+ this.planning[this.daySelected].push({
206
+ podcast: data,
207
+ occurrence: oc,
208
+ });
172
209
  }
173
210
  }
174
211
  } catch {
@@ -176,20 +213,20 @@ export default defineComponent({
176
213
  }
177
214
  this.loading = false;
178
215
  },
179
- changeDate(date: number){
216
+ changeDate(date: number) {
180
217
  this.daySelected = date;
181
218
  this.fetchOccurrences();
182
219
  },
183
- dateDisplay(date: Date): string{
184
- return dayjs(date).format('HH:mm:ss');
185
- }
220
+ dateDisplay(date: Date): string {
221
+ return dayjs(date).format("HH:mm:ss");
222
+ },
186
223
  },
187
- })
224
+ });
188
225
  </script>
189
226
  <style lang="scss">
190
- .octopus-app{
191
- .program-item-date{
227
+ .octopus-app {
228
+ .program-item-date {
192
229
  width: 100px;
193
230
  }
194
231
  }
195
- </style>
232
+ </style>
@@ -12,13 +12,10 @@
12
12
  option-custom-templating="optionTemplating"
13
13
  option-selected-custom-templating="optionTemplating"
14
14
  :no-deselect="noDeselect"
15
- @onSearch="onSearchOrganisation"
15
+ @on-search="onSearchOrganisation"
16
16
  @selected="$emit('selected', $event)"
17
17
  >
18
- <template
19
- v-if="isImage"
20
- #optionTemplating="{option}"
21
- >
18
+ <template v-if="isImage" #optionTemplating="{ option }">
22
19
  <div
23
20
  class="d-flex align-items-center"
24
21
  :data-selenium="'organisation-chooser-' + seleniumFormat(option.name)"
@@ -29,7 +26,7 @@
29
26
  height="32"
30
27
  class="me-2"
31
28
  :alt="option.name"
32
- >
29
+ />
33
30
  <span>
34
31
  {{ option.name }}
35
32
  </span>
@@ -39,59 +36,69 @@
39
36
  </template>
40
37
 
41
38
  <script lang="ts">
42
- import { useAuthStore } from '@/stores/AuthStore';
43
- import { mapState } from 'pinia';
44
- import imageProxy from '../../mixins/imageProxy';
45
- import selenium from '../../mixins/selenium';
46
- import { orgaComputed } from '../../mixins/orgaComputed';
47
- import octopusApi from '@saooti/octopus-api';
48
- import ClassicMultiselect from '../../form/ClassicMultiselect.vue';
49
- import { defineComponent } from 'vue';
50
- import { emptyOrgaData, Organisation } from '@/stores/class/general/organisation';
39
+ import { useAuthStore } from "@/stores/AuthStore";
40
+ import { mapState } from "pinia";
41
+ import imageProxy from "../../mixins/imageProxy";
42
+ import selenium from "../../mixins/selenium";
43
+ import { orgaComputed } from "../../mixins/orgaComputed";
44
+ import octopusApi from "@saooti/octopus-api";
45
+ import ClassicMultiselect from "../../form/ClassicMultiselect.vue";
46
+ import { defineComponent } from "vue";
47
+ import {
48
+ emptyOrgaData,
49
+ Organisation,
50
+ } from "@/stores/class/general/organisation";
51
51
  export default defineComponent({
52
52
  components: {
53
53
  ClassicMultiselect,
54
54
  },
55
- mixins:[selenium, orgaComputed, imageProxy],
55
+ mixins: [selenium, orgaComputed, imageProxy],
56
56
  props: {
57
- defaultanswer: { default: '', type: String},
58
- orgaIdSelected: { default: undefined, type: String},
59
- reset: { default: false, type: Boolean},
60
- width: { default: '100%', type: String },
57
+ defaultanswer: { default: "", type: String },
58
+ orgaIdSelected: { default: undefined, type: String },
59
+ reset: { default: false, type: Boolean },
60
+ width: { default: "100%", type: String },
61
61
  isImage: { default: true, type: Boolean },
62
- inModal:{default: false, type: Boolean},
63
- noDeselect: {default: true, type: Boolean},
62
+ inModal: { default: false, type: Boolean },
63
+ noDeselect: { default: true, type: Boolean },
64
64
  },
65
- emits: ['selected'],
65
+ emits: ["selected"],
66
66
  data() {
67
67
  return {
68
68
  maxElement: 50 as number,
69
69
  organisationChosen: undefined as Organisation | undefined,
70
- initLoaded: false as boolean
70
+ initLoaded: false as boolean,
71
71
  };
72
72
  },
73
-
73
+
74
74
  computed: {
75
- ...mapState(useAuthStore, ['authOrganisation']),
76
- getDefaultOrganisation(): Organisation|undefined{
77
- if(''===this.defaultanswer){
75
+ ...mapState(useAuthStore, ["authOrganisation"]),
76
+ getDefaultOrganisation(): Organisation | undefined {
77
+ if ("" === this.defaultanswer) {
78
78
  return undefined;
79
79
  }
80
80
  return emptyOrgaData(this.defaultanswer);
81
81
  },
82
- myOrganisation(): Organisation|undefined {
82
+ myOrganisation(): Organisation | undefined {
83
83
  if (!this.authenticated) return undefined;
84
- return {...this.authOrganisation, ...{name: `${this.$t('Edit my organisation')} (${this.authOrganisation.name})`}};
85
- }
84
+ return {
85
+ ...this.authOrganisation,
86
+ ...{
87
+ name: `${this.$t("Edit my organisation")} (${
88
+ this.authOrganisation.name
89
+ })`,
90
+ },
91
+ };
92
+ },
86
93
  },
87
94
  watch: {
88
95
  orgaIdSelected: {
89
- immediate:true,
90
- handler(){
96
+ immediate: true,
97
+ handler() {
91
98
  if (!this.initLoaded && this.orgaIdSelected) {
92
99
  this.fetchOrganisation();
93
100
  }
94
- }
101
+ },
95
102
  },
96
103
  reset(): void {
97
104
  this.organisationChosen = this.getDefaultOrganisation;
@@ -103,12 +110,16 @@ export default defineComponent({
103
110
  },
104
111
  methods: {
105
112
  async onSearchOrganisation(query?: string): Promise<void> {
106
- const response = await octopusApi.fetchDataWithParams<{count: number;result:Array<Organisation>;sort: string;}>(0, 'organisation/search',{
113
+ const response = await octopusApi.fetchDataWithParams<{
114
+ count: number;
115
+ result: Array<Organisation>;
116
+ sort: string;
117
+ }>(0, "organisation/search", {
107
118
  query: query,
108
119
  first: 0,
109
- size: this.maxElement
120
+ size: this.maxElement,
110
121
  });
111
- let notNullOrga = response.result.filter((o: Organisation|null) => {
122
+ let notNullOrga = response.result.filter((o: Organisation | null) => {
112
123
  return null !== o;
113
124
  });
114
125
  if (this.getDefaultOrganisation) {
@@ -122,19 +133,24 @@ export default defineComponent({
122
133
  notNullOrga.splice(1, 0, this.myOrganisation);
123
134
  } else {
124
135
  const foundIndex = notNullOrga.findIndex(
125
- (obj: Organisation) => obj.id === this.myOrganisationId
136
+ (obj: Organisation) => obj.id === this.myOrganisationId,
126
137
  );
127
138
  if (foundIndex) {
128
139
  notNullOrga[foundIndex] = this.myOrganisation;
129
140
  }
130
141
  }
131
142
  }
132
- (this.$refs.selectOrganisation as InstanceType<typeof ClassicMultiselect>).afterSearch(notNullOrga,response.count);
143
+ (
144
+ this.$refs.selectOrganisation as InstanceType<typeof ClassicMultiselect>
145
+ ).afterSearch(notNullOrga, response.count);
133
146
  },
134
147
  async fetchOrganisation(): Promise<void> {
135
- this.organisationChosen = await octopusApi.fetchData<Organisation>(0,`organisation/${this.orgaIdSelected}`);
148
+ this.organisationChosen = await octopusApi.fetchData<Organisation>(
149
+ 0,
150
+ `organisation/${this.orgaIdSelected}`,
151
+ );
136
152
  this.initLoaded = true;
137
153
  },
138
154
  },
139
- })
140
- </script>
155
+ });
156
+ </script>