@saooti/octopus-sdk 35.1.7 → 35.2.0

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 (152) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +17 -8
  3. package/src/api/classicCrud.ts +6 -7
  4. package/src/components/display/categories/CategoryChooser.vue +4 -2
  5. package/src/components/display/categories/CategoryFilter.vue +22 -25
  6. package/src/components/display/categories/CategoryList.vue +18 -17
  7. package/src/components/display/comments/AddCommentModal.vue +5 -2
  8. package/src/components/display/comments/CommentInput.vue +14 -9
  9. package/src/components/display/comments/CommentItem.vue +7 -3
  10. package/src/components/display/comments/CommentList.vue +1 -1
  11. package/src/components/display/comments/CommentPlayer.vue +7 -4
  12. package/src/components/display/comments/CommentSection.vue +7 -4
  13. package/src/components/display/emission/EmissionInlineList.vue +1 -1
  14. package/src/components/display/emission/EmissionItem.vue +3 -3
  15. package/src/components/display/emission/EmissionList.vue +5 -2
  16. package/src/components/display/emission/EmissionPlayerItem.vue +24 -18
  17. package/src/components/display/filter/AdvancedSearch.vue +2 -2
  18. package/src/components/display/filter/CategorySearchFilter.vue +11 -11
  19. package/src/components/display/filter/ProductorSearch.vue +12 -11
  20. package/src/components/display/filter/RubriqueFilter.vue +13 -15
  21. package/src/components/display/list/ListPaginate.vue +1 -1
  22. package/src/components/display/live/LiveItem.vue +11 -9
  23. package/src/components/display/live/LiveList.vue +7 -7
  24. package/src/components/display/organisation/OrganisationChooser.vue +5 -3
  25. package/src/components/display/participant/ParticipantItem.vue +3 -3
  26. package/src/components/display/participant/ParticipantList.vue +4 -1
  27. package/src/components/display/playlist/PlaylistItem.vue +6 -3
  28. package/src/components/display/playlist/PlaylistList.vue +5 -3
  29. package/src/components/display/playlist/PodcastList.vue +1 -1
  30. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +1 -1
  31. package/src/components/display/podcasts/AnimatorsItem.vue +5 -2
  32. package/src/components/display/podcasts/ParticipantDescription.vue +5 -2
  33. package/src/components/display/podcasts/PodcastImage.vue +15 -19
  34. package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
  35. package/src/components/display/podcasts/PodcastInlineListClassic.vue +6 -6
  36. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +15 -11
  37. package/src/components/display/podcasts/PodcastItem.vue +1 -1
  38. package/src/components/display/podcasts/PodcastItemInfo.vue +3 -3
  39. package/src/components/display/podcasts/PodcastList.vue +8 -3
  40. package/src/components/display/podcasts/PodcastModuleBox.vue +3 -3
  41. package/src/components/display/podcasts/PodcastPlayBar.vue +12 -11
  42. package/src/components/display/podcasts/PodcastSwiperList.vue +6 -6
  43. package/src/components/display/rubriques/RubriqueList.vue +13 -15
  44. package/src/components/display/sharing/QrCode.vue +10 -6
  45. package/src/components/display/sharing/ShareButtons.vue +1 -1
  46. package/src/components/display/sharing/ShareButtonsIntern.vue +1 -1
  47. package/src/components/display/sharing/ShareDistribution.vue +1 -1
  48. package/src/components/display/sharing/SharePlayer.vue +6 -3
  49. package/src/components/display/sharing/SharePlayerTypes.vue +1 -1
  50. package/src/components/misc/Footer.vue +19 -12
  51. package/src/components/misc/HomeDropdown.vue +6 -3
  52. package/src/components/misc/LeftMenu.vue +18 -19
  53. package/src/components/misc/TopBar.vue +21 -24
  54. package/src/components/misc/modal/ClipboardModal.vue +1 -1
  55. package/src/components/misc/modal/NewsletterModal.vue +8 -5
  56. package/src/components/misc/player/Player.vue +16 -14
  57. package/src/components/misc/player/PlayerCompact.vue +4 -4
  58. package/src/components/misc/player/PlayerProgressBar.vue +8 -8
  59. package/src/components/misc/player/PlayerTimeline.vue +1 -1
  60. package/src/components/mixins/handle403.ts +6 -1
  61. package/src/components/mixins/imageProxy.ts +1 -1
  62. package/src/components/mixins/init.ts +7 -4
  63. package/src/components/mixins/orgaComputed.ts +4 -4
  64. package/src/components/mixins/organisationFilter.ts +8 -5
  65. package/src/components/mixins/player/playerComment.ts +24 -30
  66. package/src/components/mixins/player/playerDisplay.ts +38 -67
  67. package/src/components/mixins/player/playerLive.ts +16 -15
  68. package/src/components/mixins/player/playerLogic.ts +54 -64
  69. package/src/components/mixins/player/playerTranscript.ts +16 -10
  70. package/src/components/pages/Category.vue +7 -9
  71. package/src/components/pages/Emission.vue +2 -2
  72. package/src/components/pages/Emissions.vue +9 -6
  73. package/src/components/pages/Error403Page.vue +5 -2
  74. package/src/components/pages/Home.vue +13 -8
  75. package/src/components/pages/Lives.vue +11 -9
  76. package/src/components/pages/PageNotFound.vue +10 -5
  77. package/src/components/pages/Participant.vue +2 -2
  78. package/src/components/pages/Participants.vue +2 -2
  79. package/src/components/pages/Playlist.vue +2 -2
  80. package/src/components/pages/Playlists.vue +2 -2
  81. package/src/components/pages/Podcast.vue +7 -4
  82. package/src/components/pages/Podcasts.vue +9 -7
  83. package/src/components/pages/Search.vue +1 -1
  84. package/src/main.ts +6 -4
  85. package/src/stores/ApiStore.ts +65 -0
  86. package/src/stores/AuthStore.ts +43 -0
  87. package/src/stores/FilterStore.ts +63 -0
  88. package/src/stores/GeneralStore.ts +57 -0
  89. package/src/stores/PlayerStore.ts +134 -0
  90. package/src/{store → stores}/class/general/playlist.ts +1 -1
  91. package/tsconfig.json +0 -1
  92. package/src/store/ApiStore.ts +0 -33
  93. package/src/store/AppStore.ts +0 -76
  94. package/src/store/PlayerStore.ts +0 -87
  95. package/src/store/classStore/typeApiStore.ts +0 -43
  96. package/src/store/classStore/typeAppStore.ts +0 -81
  97. package/src/store/classStore/typeAuthStore.ts +0 -44
  98. package/src/store/classStore/typePlayerStore.ts +0 -15
  99. package/src/vuex-shim.d.ts +0 -8
  100. /package/src/{store/paramStore.ts → stores/ParamSdkStore.ts} +0 -0
  101. /package/src/{store → stores}/class/adserver/adserverConfig.ts +0 -0
  102. /package/src/{store → stores}/class/adserver/adserverOtherEmission.ts +0 -0
  103. /package/src/{store → stores}/class/adserver/adserverTiming.ts +0 -0
  104. /package/src/{store → stores}/class/cartouchier/cartouche.ts +0 -0
  105. /package/src/{store → stores}/class/cartouchier/cartouchier.ts +0 -0
  106. /package/src/{store → stores}/class/conference/conference.ts +0 -0
  107. /package/src/{store → stores}/class/conference/conferenceMessage.ts +0 -0
  108. /package/src/{store → stores}/class/conference/conferenceParticipant.ts +0 -0
  109. /package/src/{store → stores}/class/conference/pad.ts +0 -0
  110. /package/src/{store → stores}/class/conference/studioCall.ts +0 -0
  111. /package/src/{store → stores}/class/contract/contract.ts +0 -0
  112. /package/src/{store → stores}/class/contract/contractOrganisation.ts +0 -0
  113. /package/src/{store → stores}/class/ftp/ftpEmission.ts +0 -0
  114. /package/src/{store → stores}/class/ftp/ftpParam.ts +0 -0
  115. /package/src/{store → stores}/class/ftp/testFtpEmission.ts +0 -0
  116. /package/src/{store → stores}/class/general/audioView.ts +0 -0
  117. /package/src/{store → stores}/class/general/category.ts +0 -0
  118. /package/src/{store → stores}/class/general/classicSelectType.ts +0 -0
  119. /package/src/{store → stores}/class/general/comment.ts +0 -0
  120. /package/src/{store → stores}/class/general/customPlayer.ts +0 -0
  121. /package/src/{store → stores}/class/general/emission.ts +0 -0
  122. /package/src/{store → stores}/class/general/fetchParam.ts +0 -0
  123. /package/src/{store → stores}/class/general/initState.ts +0 -0
  124. /package/src/{store → stores}/class/general/interfacePageable.ts +0 -0
  125. /package/src/{store → stores}/class/general/ituneCategory.ts +0 -0
  126. /package/src/{store → stores}/class/general/listReturn.ts +0 -0
  127. /package/src/{store → stores}/class/general/media.ts +0 -0
  128. /package/src/{store → stores}/class/general/organisation.ts +0 -0
  129. /package/src/{store → stores}/class/general/pageable.ts +0 -0
  130. /package/src/{store → stores}/class/general/participant.ts +0 -0
  131. /package/src/{store → stores}/class/general/player.ts +0 -0
  132. /package/src/{store → stores}/class/general/podcast.ts +0 -0
  133. /package/src/{store → stores}/class/general/sortPageable.ts +0 -0
  134. /package/src/{store → stores}/class/general/soundcastCategory.ts +0 -0
  135. /package/src/{store → stores}/class/ouestFrance/ofTag.ts +0 -0
  136. /package/src/{store → stores}/class/ouestFrance/ofTagInfo.ts +0 -0
  137. /package/src/{store → stores}/class/ouestFrance/ofTagPage.ts +0 -0
  138. /package/src/{store → stores}/class/ouestFrance/ofTagSeo.ts +0 -0
  139. /package/src/{store → stores}/class/ouestFrance/ofTagVente.ts +0 -0
  140. /package/src/{store → stores}/class/ouestFrance/ofTagWithParents.ts +0 -0
  141. /package/src/{store → stores}/class/rss/aggregator.ts +0 -0
  142. /package/src/{store → stores}/class/rss/rssEmission.ts +0 -0
  143. /package/src/{store → stores}/class/rss/rssInfo.ts +0 -0
  144. /package/src/{store → stores}/class/rubrique/rubriquage.ts +0 -0
  145. /package/src/{store → stores}/class/rubrique/rubriquageFilter.ts +0 -0
  146. /package/src/{store → stores}/class/rubrique/rubrique.ts +0 -0
  147. /package/src/{store → stores}/class/stat/statArrayIncome.ts +0 -0
  148. /package/src/{store → stores}/class/stat/statArrayObject.ts +0 -0
  149. /package/src/{store → stores}/class/stat/statGraph.ts +0 -0
  150. /package/src/{store → stores}/class/user/person.ts +0 -0
  151. /package/src/{store → stores}/class/user/profile.ts +0 -0
  152. /package/src/{store → stores}/class/user/userKeycloak.ts +0 -0
@@ -51,13 +51,15 @@
51
51
  import ListPaginate from '../list/ListPaginate.vue';
52
52
  import octopusApi from '@saooti/octopus-api';
53
53
  import { handle403 } from '../../mixins/handle403';
54
- import { state } from '../../../store/paramStore';
54
+ import { state } from '../../../stores/ParamSdkStore';
55
55
  import { Emission, emptyEmissionData } from '@/store/class/general/emission';
56
56
  import { Rubrique } from '@/store/class/rubrique/rubrique';
57
57
  import { defineComponent, defineAsyncComponent } from 'vue';
58
58
  import { FetchParam } from '@/store/class/general/fetchParam';
59
59
  import { AxiosError } from 'axios';
60
60
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
61
+ import { useFilterStore } from '@/stores/FilterStore';
62
+ import { mapState } from 'pinia';
61
63
  const EmissionItem = defineAsyncComponent(() => import('./EmissionItem.vue'));
62
64
  const EmissionPlayerItem = defineAsyncComponent(() => import('./EmissionPlayerItem.vue'));
63
65
  export default defineComponent({
@@ -102,6 +104,7 @@ export default defineComponent({
102
104
  },
103
105
 
104
106
  computed: {
107
+ ...mapState(useFilterStore, ['filterOrgaId']),
105
108
  displayArray(): Array<Emission>{
106
109
  if(this.isMobile){
107
110
  return this.emissions;
@@ -134,7 +137,7 @@ export default defineComponent({
134
137
  }
135
138
  },
136
139
  organisation(): string|undefined {
137
- return this.organisationId ?this.organisationId:this.$store.state.filter.organisationId;
140
+ return this.organisationId ?this.organisationId:this.filterOrgaId;
138
141
  },
139
142
  },
140
143
  watch: {
@@ -6,7 +6,7 @@
6
6
  :to="{
7
7
  name: 'emission',
8
8
  params: { emissionId: emission.emissionId },
9
- query: { productor: $store.state.filter.organisationId },
9
+ query: { productor: filterOrgaId },
10
10
  }"
11
11
  class="d-flex flex-column text-dark"
12
12
  >
@@ -61,7 +61,7 @@
61
61
  :to="{
62
62
  name: 'podcast',
63
63
  params: { podcastId: p.podcastId },
64
- query: { productor: $store.state.filter.organisationId },
64
+ query: { productor: filterOrgaId },
65
65
  }"
66
66
  class="text-dark fw-bold two-line-clamp"
67
67
  >
@@ -74,7 +74,7 @@
74
74
  :to="{
75
75
  name: 'podcast',
76
76
  params: { podcastId: p.podcastId },
77
- query: { productor: $store.state.filter.organisationId },
77
+ query: { productor: filterOrgaId },
78
78
  }"
79
79
  class="d-flex flex-column define-width text-dark"
80
80
  >
@@ -97,9 +97,9 @@
97
97
  </div>
98
98
  <button
99
99
  v-if="
100
- $store.state.player.podcast !== p ||
101
- ($store.state.player.podcast === p &&
102
- 'PAUSED' === $store.state.player.status)
100
+ playerPodcast !== p ||
101
+ (playerPodcast === p &&
102
+ 'PAUSED' === playerStatus)
103
103
  "
104
104
  class="play-button-box bg-secondary"
105
105
  @click="play(p)"
@@ -129,7 +129,7 @@
129
129
  :to="{
130
130
  name: 'emission',
131
131
  params: { emissionId: emission.emissionId },
132
- query: { productor: $store.state.filter.organisationId },
132
+ query: { productor: filterOrgaId },
133
133
  }"
134
134
  class="btn"
135
135
  >
@@ -143,10 +143,13 @@
143
143
  import octopusApi from '@saooti/octopus-api';
144
144
  import { Emission } from '@/store/class/general/emission';
145
145
  import { Podcast } from '@/store/class/general/podcast';
146
- import { state } from '../../../store/paramStore';
146
+ import { state } from '../../../stores/ParamSdkStore';
147
147
  import PodcastPlayBar from '../podcasts/PodcastPlayBar.vue';
148
148
  import imageProxy from '../../mixins/imageProxy';
149
149
  import displayMethods from '../../mixins/displayMethods';
150
+ import { usePlayerStore } from '@/stores/PlayerStore';
151
+ import { useFilterStore } from '@/stores/FilterStore';
152
+ import { mapState, mapActions } from 'pinia';
150
153
  import { defineComponent } from 'vue'
151
154
  export default defineComponent({
152
155
  name: 'EmissionPlayerItem',
@@ -169,6 +172,8 @@ export default defineComponent({
169
172
  },
170
173
 
171
174
  computed: {
175
+ ...mapState(useFilterStore, ['filterOrgaId']),
176
+ ...mapState(usePlayerStore, ['playerPodcast', 'playerStatus']),
172
177
  isProgressBar(): boolean{
173
178
  return (state.emissionsPage.progressBar as boolean);
174
179
  },
@@ -204,6 +209,17 @@ export default defineComponent({
204
209
  }
205
210
  },
206
211
  methods: {
212
+ ...mapActions(usePlayerStore, ['playerPlay', 'playerChangeStatus']),
213
+ play(podcast: Podcast): void {
214
+ if (podcast === this.playerPodcast) {
215
+ this.playerChangeStatus(false);
216
+ } else {
217
+ this.playerPlay(podcast);
218
+ }
219
+ },
220
+ pause(): void {
221
+ this.playerChangeStatus(true);
222
+ },
207
223
  async loadPodcasts(): Promise<void> {
208
224
  const nb = this.nbPodcasts ? this.nbPodcasts : 2;
209
225
  const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',{
@@ -228,16 +244,6 @@ export default defineComponent({
228
244
  }
229
245
  });
230
246
  },
231
- play(podcast: Podcast): void {
232
- if (podcast === this.$store.state.player.podcast) {
233
- this.$store.commit('player/pause', false);
234
- } else {
235
- this.$store.commit('player/playPodcast', podcast);
236
- }
237
- },
238
- pause(): void {
239
- this.$store.commit('player/pause', true);
240
- },
241
247
  },
242
248
  })
243
249
  </script>
@@ -74,7 +74,7 @@
74
74
  </template>
75
75
 
76
76
  <script lang="ts">
77
- import { state } from '../../../store/paramStore';
77
+ import { state } from '../../../stores/ParamSdkStore';
78
78
  import { orgaComputed } from '../../mixins/orgaComputed';
79
79
  import CategorySearchFilter from './CategorySearchFilter.vue';
80
80
  import DateFilter from './DateFilter.vue';
@@ -136,7 +136,7 @@ export default defineComponent({
136
136
  true === state.generalParameters.isAdmin;
137
137
  },
138
138
  organisation(): string|undefined {
139
- return this.organisationId??this.filterOrga;
139
+ return this.organisationId??this.filterOrgaId;
140
140
  },
141
141
  textNotVisible(): string {
142
142
  return this.isEmission? this.$t('Consider podcasts no visible') : this.$t('See podcasts no visible');
@@ -17,7 +17,8 @@
17
17
  <script lang="ts">
18
18
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
19
19
  import CategoryChooser from '../categories/CategoryChooser.vue';
20
- import { Category } from '@/store/class/general/category';
20
+ import { useFilterStore } from '@/stores/FilterStore';
21
+ import { mapState, mapActions } from 'pinia';
21
22
  import { defineComponent } from 'vue'
22
23
  export default defineComponent({
23
24
  components: {
@@ -34,9 +35,7 @@ export default defineComponent({
34
35
  };
35
36
  },
36
37
  computed: {
37
- categoryFilter(): Category|undefined{
38
- return this.$store.state.filter.iab;
39
- },
38
+ ...mapState(useFilterStore, ['filterIab']),
40
39
  },
41
40
  watch: {
42
41
  isCategory(): void {
@@ -63,15 +62,15 @@ export default defineComponent({
63
62
  this.isInternChanged = false;
64
63
  });
65
64
  },
66
- categoryFilter:{
65
+ filterIab:{
67
66
  deep: true,
68
67
  handler(){
69
68
  if(this.isInternChanged){
70
69
  return;
71
70
  }
72
71
  this.isInternChanged = true;
73
- this.iabId = this.categoryFilter ? this.categoryFilter.id : 0;
74
- this.isCategory = this.categoryFilter ? true : false;
72
+ this.iabId = this.filterIab ? this.filterIab.id : 0;
73
+ this.isCategory = this.filterIab ? true : false;
75
74
  this.$emit('updateCategory', this.iabId);
76
75
  this.$nextTick(() => {
77
76
  this.isInternChanged = false;
@@ -81,8 +80,8 @@ export default defineComponent({
81
80
  },
82
81
 
83
82
  created() {
84
- if(this.categoryFilter){
85
- this.iabId = this.categoryFilter.id;
83
+ if(this.filterIab){
84
+ this.iabId = this.filterIab.id;
86
85
  this.isCategory = true;
87
86
  }
88
87
  this.$nextTick(() => {
@@ -90,15 +89,16 @@ export default defineComponent({
90
89
  });
91
90
  },
92
91
  methods: {
92
+ ...mapActions(useFilterStore, ['filterUpdateIab']),
93
93
  resetCategoryFilter(): void{
94
- if(!this.categoryFilter || this.isInit){
94
+ if(!this.filterIab || this.isInit){
95
95
  return;
96
96
  }
97
97
  const queries = this.$route.query;
98
98
  if (queries.iabId) {
99
99
  this.$router.replace({ query: {...queries, ...{iabId: undefined} } });
100
100
  }
101
- this.$store.commit('filterIab', undefined);
101
+ this.filterUpdateIab(undefined);
102
102
  }
103
103
  },
104
104
  })
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="d-flex align-items-center my-3">
3
3
  <div
4
- v-if="!isPodcastmaker && !filterOrga"
4
+ v-if="!isPodcastmaker && !filterOrgaId"
5
5
  class="filter-organisation-chooser"
6
6
  >
7
7
  <OrganisationChooser
@@ -42,9 +42,11 @@
42
42
 
43
43
  <script lang="ts">
44
44
  import ClassicSearch from '../../form/ClassicSearch.vue';
45
- import { state } from '../../../store/paramStore';
45
+ import { state } from '../../../stores/ParamSdkStore';
46
46
  import orgaFilter from '../../mixins/organisationFilter';
47
47
  import { Organisation } from '@/store/class/general/organisation';
48
+ import { useFilterStore } from '@/stores/FilterStore';
49
+ import { mapState, mapActions } from 'pinia';
48
50
  import { defineComponent, defineAsyncComponent } from 'vue';
49
51
  const OrganisationChooser = defineAsyncComponent(() => import('../organisation/OrganisationChooser.vue'));
50
52
  const ClassicCheckbox = defineAsyncComponent(() => import('../../form/ClassicCheckbox.vue'));
@@ -70,6 +72,7 @@ export default defineComponent({
70
72
  };
71
73
  },
72
74
  computed: {
75
+ ...mapState(useFilterStore, ['filterOrgaId']),
73
76
  isPodcastmaker(): boolean {
74
77
  return (state.generalParameters.podcastmaker as boolean);
75
78
  },
@@ -79,30 +82,28 @@ export default defineComponent({
79
82
  if ('playlist' === this.type) return this.$t('Look for playlist name');
80
83
  return this.$t('Look for podcast name');
81
84
  },
82
- filterOrga(): string {
83
- return this.$store.state.filter.organisationId;
84
- },
85
85
  },
86
86
  watch: {
87
- filterOrga():void{
88
- this.keepOrganisation = undefined!==this.filterOrga;
89
- if (this.filterOrga) {
90
- this.$emit('update:organisationId', this.filterOrga);
87
+ filterOrgaId():void{
88
+ this.keepOrganisation = undefined!==this.filterOrgaId;
89
+ if (this.filterOrgaId) {
90
+ this.$emit('update:organisationId', this.filterOrgaId);
91
91
  }
92
92
  },
93
93
  },
94
94
  async created() {
95
95
  if (!this.organisationId) return;
96
- if(this.$store.state.filter.organisationId === this.organisationId){
96
+ if(this.filterOrgaId === this.organisationId){
97
97
  this.keepOrganisation = true;
98
98
  }
99
99
  },
100
100
  methods: {
101
+ ...mapActions(useFilterStore, ['filterUpdateOrga']),
101
102
  onOrganisationSelected(organisation: Organisation): void {
102
103
  if (this.$route.query.productor) {
103
104
  this.$router.push({ query: { productor: undefined } });
104
105
  }
105
- this.$store.commit('filterOrga', {orgaId: undefined});
106
+ this.filterUpdateOrga({orgaId: undefined});
106
107
  this.keepOrganisation = false;
107
108
  if (organisation && organisation.id) {
108
109
  this.$emit('update:organisationId', organisation.id);
@@ -41,6 +41,8 @@ import octopusApi from '@saooti/octopus-api';
41
41
  import ClassicCheckbox from '../../form/ClassicCheckbox.vue';
42
42
  import { Rubriquage } from '@/store/class/rubrique/rubriquage';
43
43
  import { RubriquageFilter } from '@/store/class/rubrique/rubriquageFilter';
44
+ import { useFilterStore } from '@/stores/FilterStore';
45
+ import { mapState, mapActions } from 'pinia';
44
46
  import { defineComponent, defineAsyncComponent } from 'vue';
45
47
  const RubriqueChoice = defineAsyncComponent(() => import('./RubriqueChoice.vue'));
46
48
  export default defineComponent({
@@ -70,14 +72,9 @@ export default defineComponent({
70
72
  },
71
73
 
72
74
  computed: {
73
- filterOrga(): string {
74
- return this.$store.state.filter.organisationId;
75
- },
75
+ ...mapState(useFilterStore, ['filterRubrique', 'filterOrgaId']),
76
76
  organisation(): string|undefined {
77
- return this.organisationId ?this.organisationId: this.filterOrga;
78
- },
79
- rubriqueFilter(): Array<RubriquageFilter>{
80
- return this.$store.state.filter.rubriqueFilter;
77
+ return this.organisationId ?this.organisationId: this.filterOrgaId;
81
78
  },
82
79
  availableRubriquage(): Array<Rubriquage>{
83
80
  if(this.arrayFilter.length){
@@ -138,18 +135,18 @@ export default defineComponent({
138
135
  });
139
136
  }
140
137
  },
141
- rubriqueFilter:{
138
+ filterRubrique:{
142
139
  deep: true,
143
140
  async handler(){
144
141
  if(this.isInternChanged || !this.modifyFilter){
145
142
  return;
146
143
  }
147
144
  this.isInternChanged = true;
148
- if(this.saveOrganisation !== this.filterOrga){
145
+ if(this.saveOrganisation !== this.filterOrgaId){
149
146
  await this.fetchTopics(false);
150
147
  }
151
- if(this.rubriqueFilter.length){
152
- this.arrayFilter = Array.from(this.rubriqueFilter);
148
+ if(this.filterRubrique.length){
149
+ this.arrayFilter = Array.from(this.filterRubrique);
153
150
  this.isRubriquage = true;
154
151
  }else if(this.rubriquageData[0].rubriquageId){
155
152
  this.arrayFilter = [{rubriquageId: this.rubriquageData[0].rubriquageId, rubriqueId: 0, nameRubriquage:this.rubriquageData[0].title, nameRubrique:""}];
@@ -172,8 +169,8 @@ export default defineComponent({
172
169
  this.arrayFilter = Array.from(this.initRubriqueFilter);
173
170
  this.isRubriquage = true;
174
171
  }
175
- }else if(this.rubriqueFilter.length){
176
- this.arrayFilter = Array.from(this.rubriqueFilter);
172
+ }else if(this.filterRubrique.length){
173
+ this.arrayFilter = Array.from(this.filterRubrique);
177
174
  this.isRubriquage = true;
178
175
  }
179
176
  this.fetchTopics(false);
@@ -182,6 +179,7 @@ export default defineComponent({
182
179
  });
183
180
  },
184
181
  methods: {
182
+ ...mapActions(useFilterStore, ['filterUpdateRubrique']),
185
183
  deleteRubriqueChoice(index: number): void{
186
184
  this.arrayFilter.splice(index,1);
187
185
  },
@@ -229,14 +227,14 @@ export default defineComponent({
229
227
  }
230
228
  },
231
229
  resetRubriqueFilter(): void{
232
- if(0===this.rubriqueFilter.length || this.isInit || !this.modifyFilter){
230
+ if(0===this.filterRubrique.length || this.isInit || !this.modifyFilter){
233
231
  return;
234
232
  }
235
233
  const queries = this.$route.query;
236
234
  if (queries.rubriquesId) {
237
235
  this.$router.replace({ query: {...queries, ...{rubriquesId: undefined} } });
238
236
  }
239
- this.$store.commit('filterRubrique', []);
237
+ this.filterUpdateRubrique([]);
240
238
  }
241
239
  },
242
240
  })
@@ -51,7 +51,7 @@
51
51
  <script lang="ts">
52
52
  import domHelper from '../../../helper/dom';
53
53
  import ClassicLoading from '../../form/ClassicLoading.vue';
54
- import { state } from '../../../store/paramStore';
54
+ import { state } from '../../../stores/ParamSdkStore';
55
55
  import Paginate from './Paginate.vue';
56
56
  import { defineComponent } from 'vue'
57
57
  export default defineComponent({
@@ -8,7 +8,7 @@
8
8
  :to="{
9
9
  name: 'podcast',
10
10
  params: { podcastId: live.podcastId },
11
- query: { productor: $store.state.filter.organisationId },
11
+ query: { productor: filterOrgaId },
12
12
  }"
13
13
  >
14
14
  <div class="fw-bold">
@@ -25,7 +25,7 @@
25
25
  :to="{
26
26
  name: 'podcast',
27
27
  params: { podcastId: live.podcastId },
28
- query: { productor: $store.state.filter.organisationId },
28
+ query: { productor: filterOrgaId },
29
29
  }"
30
30
  >
31
31
  <PodcastImage
@@ -50,7 +50,7 @@
50
50
  :to="{
51
51
  name: 'podcast',
52
52
  params: { podcastId: live.podcastId },
53
- query: { productor: $store.state.filter.organisationId },
53
+ query: { productor: filterOrgaId },
54
54
  }"
55
55
  >
56
56
  {{ live.title }}
@@ -60,7 +60,7 @@
60
60
  :to="{
61
61
  name: 'emission',
62
62
  params: { emissionId: live.emission.emissionId },
63
- query: { productor: $store.state.filter.organisationId },
63
+ query: { productor: filterOrgaId },
64
64
  }"
65
65
  >
66
66
  {{ live.emission.name }}
@@ -91,7 +91,7 @@
91
91
  :to="{
92
92
  name: 'participant',
93
93
  params: { participantId: animator.participantId },
94
- query: { productor: $store.state.filter.organisationId },
94
+ query: { productor: filterOrgaId },
95
95
  }"
96
96
  >
97
97
  {{ getName(animator) }}
@@ -104,7 +104,7 @@
104
104
  :to="{
105
105
  name: 'productor',
106
106
  params: { productorId: live.organisation.id },
107
- query: { productor: $store.state.filter.organisationId },
107
+ query: { productor: filterOrgaId },
108
108
  }"
109
109
  >
110
110
  {{ live.organisation.name }}
@@ -123,7 +123,7 @@
123
123
  </template>
124
124
 
125
125
  <script lang="ts">
126
- import { state } from '../../../store/paramStore';
126
+ import { state } from '../../../stores/ParamSdkStore';
127
127
  import octopusApi from '@saooti/octopus-api';
128
128
  import PodcastImage from '../podcasts/PodcastImage.vue';
129
129
  import crudApi from '@/api/classicCrud';
@@ -133,7 +133,8 @@ import humanizeDuration from 'humanize-duration';
133
133
  import displayMethods from '../../mixins/displayMethods';
134
134
  import { Podcast } from '@/store/class/general/podcast';
135
135
  import { Participant } from '@/store/class/general/participant';
136
-
136
+ import { useFilterStore } from '@/stores/FilterStore';
137
+ import { mapState } from 'pinia';
137
138
  import { defineComponent, defineAsyncComponent } from 'vue';
138
139
  const RecordingItemButton = defineAsyncComponent(() => import('@/components/display/studio/RecordingItemButton.vue'));
139
140
  export default defineComponent({
@@ -157,6 +158,7 @@ export default defineComponent({
157
158
  },
158
159
 
159
160
  computed: {
161
+ ...mapState(useFilterStore, ['filterOrgaId']),
160
162
  isEditBox(): boolean {
161
163
  return (state.podcastPage.EditBox as boolean);
162
164
  },
@@ -223,7 +225,7 @@ export default defineComponent({
223
225
  } catch {
224
226
  this.$emit('deleteItem', this.index);
225
227
  if(this.fetchConference.conferenceId){
226
- await crudApi.deleteData(this.$store.state, 9 ,'conference/'+this.fetchConference.conferenceId);
228
+ await crudApi.deleteData(9 ,'conference/'+this.fetchConference.conferenceId);
227
229
  }
228
230
  }
229
231
  },
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- v-if="filterOrga || organisationId"
3
+ v-if="filterOrgaId || organisationId"
4
4
  class="d-flex flex-column align-items-center"
5
5
  >
6
6
  <ClassicLoading
@@ -42,7 +42,9 @@ import octopusApi from '@saooti/octopus-api';
42
42
  import dayjs from 'dayjs';
43
43
  import localizedFormat from 'dayjs/plugin/localizedFormat';
44
44
  dayjs.extend(localizedFormat);
45
- import { state } from '../../../store/paramStore';
45
+ import { useFilterStore } from '@/stores/FilterStore';
46
+ import { mapState } from 'pinia';
47
+ import { state } from '../../../stores/ParamSdkStore';
46
48
  import { Conference } from '@/store/class/conference/conference';
47
49
  import { defineComponent } from 'vue'
48
50
  import { AxiosError } from 'axios';
@@ -69,6 +71,7 @@ export default defineComponent({
69
71
  },
70
72
 
71
73
  computed: {
74
+ ...mapState(useFilterStore, ['filterOrgaId']),
72
75
  livesArray(): Array<{status:string, title:string, lives:Array<Conference>}>{
73
76
  return [
74
77
  {status: "RECORDING", title:this.$t('In live'), lives:[]},
@@ -83,10 +86,7 @@ export default defineComponent({
83
86
  return this.loaded && !this.livesArray[0].lives.length && !this.livesArray[2].lives.length && !this.livesArray[3].lives.length;
84
87
  },
85
88
  filterOrgaUsed(): string|undefined {
86
- return this.filterOrga?this.filterOrga:this.organisationId;
87
- },
88
- filterOrga(): string {
89
- return this.$store.state.filter.organisationId;
89
+ return this.filterOrgaId?this.filterOrgaId:this.organisationId;
90
90
  },
91
91
  displayNextLiveMessage(): string {
92
92
  if (0 !== this.livesArray[0].lives.length) return '';
@@ -120,7 +120,7 @@ export default defineComponent({
120
120
  this.loaded = true;
121
121
  }
122
122
  },
123
- filterOrga(): void {
123
+ filterOrgaId(): void {
124
124
  if(!this.loading){
125
125
  this.fetchContent();
126
126
  }
@@ -119,9 +119,10 @@ import { orgaComputed } from '../../mixins/orgaComputed';
119
119
  //@ts-ignore
120
120
  import VueMultiselect from 'vue-multiselect';
121
121
  import octopusApi from '@saooti/octopus-api';
122
- import { state } from '../../../store/paramStore';
122
+ import { state } from '../../../stores/ParamSdkStore';
123
123
  import { Organisation } from '@/store/class/general/organisation';
124
-
124
+ import { useAuthStore } from '@/stores/AuthStore';
125
+ import { mapState } from 'pinia';
125
126
  const ELEMENTS_COUNT = 50;
126
127
  const DEFAULT_ORGANISATION_ID = "";
127
128
  const DEFAULT_ORGANISATION_IMAGE = '/img/emptypodcast.webp';
@@ -163,6 +164,7 @@ export default defineComponent({
163
164
  },
164
165
 
165
166
  computed: {
167
+ ...mapState(useAuthStore, ['authOrganisation']),
166
168
  myOrganisation(): Organisation|undefined {
167
169
  if (!this.authenticated) return undefined;
168
170
  return {
@@ -188,7 +190,7 @@ export default defineComponent({
188
190
  async created() {
189
191
  if (
190
192
  this.authenticated &&
191
- undefined === this.$store.state.auth?.organisation.imageUrl
193
+ (undefined === this.authOrganisation.imageUrl ||'' === this.authOrganisation.imageUrl)
192
194
  ) {
193
195
  const data = await octopusApi.fetchData<Organisation>(0,`organisation/${this.myOrganisationId ?this.myOrganisationId:""}`);
194
196
  this.myImage = data.imageUrl;
@@ -7,7 +7,7 @@
7
7
  :to="{
8
8
  name: 'participant',
9
9
  params: { participantId: participant.participantId },
10
- query: { productor: filterOrga },
10
+ query: { productor: filterOrgaId },
11
11
  }"
12
12
  class="mt-3 text-dark"
13
13
  :title="$t('Participant')"
@@ -45,7 +45,7 @@
45
45
  :to="{
46
46
  name: 'productor',
47
47
  params: { productorId: participant.orga.id },
48
- query: { productor: filterOrga },
48
+ query: { productor: filterOrgaId },
49
49
  }"
50
50
  class="participant-producer"
51
51
  >
@@ -57,7 +57,7 @@
57
57
  <script lang="ts">
58
58
  import octopusApi from '@saooti/octopus-api';
59
59
  import { Participant } from '@/store/class/general/participant';
60
- import { state } from '../../../store/paramStore';
60
+ import { state } from '../../../stores/ParamSdkStore';
61
61
  import imageProxy from '../../mixins/imageProxy';
62
62
  import displayMethods from '../../mixins/displayMethods';
63
63
  import { orgaComputed } from '../../mixins/orgaComputed';
@@ -32,6 +32,8 @@ import ListPaginate from '../list/ListPaginate.vue';
32
32
  import { handle403 } from '../../mixins/handle403';
33
33
  import octopusApi from '@saooti/octopus-api';
34
34
  import ParticipantItem from './ParticipantItem.vue';
35
+ import { useFilterStore } from '@/stores/FilterStore';
36
+ import { mapState } from 'pinia';
35
37
  import { Participant, emptyParticipantData } from '@/store/class/general/participant';
36
38
  import { defineComponent } from 'vue'
37
39
  import { AxiosError } from 'axios';
@@ -67,6 +69,7 @@ export default defineComponent({
67
69
 
68
70
 
69
71
  computed: {
72
+ ...mapState(useFilterStore, ['filterOrgaId']),
70
73
  displayArray(): Array<Participant>{
71
74
  if(this.isMobile){
72
75
  return this.participants;
@@ -74,7 +77,7 @@ export default defineComponent({
74
77
  return this.participants.slice(this.dfirst, Math.min(this.dfirst + this.dsize,this.totalCount));
75
78
  },
76
79
  organisation(): string|undefined {
77
- return this.organisationId?this.organisationId:this.$store.state.filter.organisationId;
80
+ return this.organisationId?this.organisationId:this.filterOrgaId;
78
81
  },
79
82
  },
80
83
  watch: {
@@ -7,7 +7,7 @@
7
7
  :to="{
8
8
  name: 'playlist',
9
9
  params: { playlistId: playlist.playlistId },
10
- query: { productor: $store.state.filter.organisationId },
10
+ query: { productor: filterOrgaId },
11
11
  }"
12
12
  :title="$t('Playlist')"
13
13
  class="d-flex flex-grow-1 text-dark"
@@ -45,7 +45,7 @@
45
45
  :to="{
46
46
  name: 'productor',
47
47
  params: { productorId: playlist.organisation.id },
48
- query: { productor: $store.state.filter.organisationId },
48
+ query: { productor: filterOrgaId },
49
49
  }"
50
50
  class="emission-producer text-primary mt-auto"
51
51
  >
@@ -58,9 +58,11 @@
58
58
 
59
59
  <script lang="ts">
60
60
  import { Playlist } from '@/store/class/general/playlist';
61
- import { state } from '../../../store/paramStore';
61
+ import { state } from '../../../stores/ParamSdkStore';
62
62
  import imageProxy from '../../mixins/imageProxy';
63
63
  import displayMethods from '../../mixins/displayMethods';
64
+ import { useFilterStore } from '@/stores/FilterStore';
65
+ import { mapState } from 'pinia';
64
66
  import { defineComponent } from 'vue'
65
67
  export default defineComponent({
66
68
  name: 'PlaylistItem',
@@ -72,6 +74,7 @@ export default defineComponent({
72
74
  },
73
75
 
74
76
  computed: {
77
+ ...mapState(useFilterStore, ['filterOrgaId']),
75
78
  isPodcastmaker(): boolean {
76
79
  return (state.generalParameters.podcastmaker as boolean);
77
80
  },