@saooti/octopus-sdk 31.0.33 → 31.0.36

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 (90) hide show
  1. package/README.md +6 -1
  2. package/index.ts +5 -2
  3. package/package.json +1 -1
  4. package/public/css/fonts/saooti-ui.eot +0 -0
  5. package/public/css/fonts/saooti-ui.svg +4 -1
  6. package/public/css/fonts/saooti-ui.ttf +0 -0
  7. package/public/css/fonts/saooti-ui.woff +0 -0
  8. package/public/css/fonts/style.css +14 -5
  9. package/public/img/403.jpeg +0 -0
  10. package/public/img/404.svg +242 -0
  11. package/src/assets/bootstrap-diff.scss +25 -24
  12. package/src/assets/general.scss +57 -2
  13. package/src/assets/modal.scss +5 -4
  14. package/src/assets/share.scss +2 -0
  15. package/src/components/display/categories/CategoryFilter.vue +12 -26
  16. package/src/components/display/categories/CategoryList.vue +14 -20
  17. package/src/components/display/comments/AddCommentModal.vue +19 -36
  18. package/src/components/display/comments/CommentBasicView.vue +3 -6
  19. package/src/components/display/comments/CommentInput.vue +8 -21
  20. package/src/components/display/comments/CommentItem.vue +8 -8
  21. package/src/components/display/comments/CommentList.vue +12 -61
  22. package/src/components/display/comments/CommentPlayer.vue +0 -3
  23. package/src/components/display/comments/CommentSection.vue +6 -14
  24. package/src/components/display/emission/EmissionInlineList.vue +5 -10
  25. package/src/components/display/emission/EmissionItem.vue +5 -10
  26. package/src/components/display/emission/EmissionList.vue +66 -68
  27. package/src/components/display/filter/AdvancedSearch.vue +19 -45
  28. package/src/components/display/filter/CategoryFilter.vue +11 -20
  29. package/src/components/display/filter/MonetizableFilter.vue +7 -14
  30. package/src/components/display/filter/ProductorSearch.vue +69 -78
  31. package/src/components/display/filter/RubriqueChoice.vue +1 -4
  32. package/src/components/display/filter/RubriqueFilter.vue +1 -5
  33. package/src/components/display/list/ListPaginate.vue +150 -0
  34. package/src/components/display/list/Paginate.vue +219 -0
  35. package/src/components/display/live/LiveHorizontalList.vue +56 -40
  36. package/src/components/display/organisation/OrganisationChooser.vue +7 -12
  37. package/src/components/display/participant/ParticipantItem.vue +6 -17
  38. package/src/components/display/participant/ParticipantList.vue +53 -46
  39. package/src/components/display/playlist/PlaylistItem.vue +1 -4
  40. package/src/components/display/playlist/PlaylistList.vue +60 -63
  41. package/src/components/display/playlist/PodcastList.vue +74 -101
  42. package/src/components/display/podcasts/AnimatorsItem.vue +17 -28
  43. package/src/components/display/podcasts/ParticipantDescription.vue +3 -11
  44. package/src/components/display/podcasts/PodcastFilterList.vue +8 -16
  45. package/src/components/display/podcasts/PodcastImage.vue +86 -92
  46. package/src/components/display/podcasts/PodcastItem.vue +1 -2
  47. package/src/components/display/podcasts/PodcastItemInfo.vue +12 -12
  48. package/src/components/display/podcasts/PodcastList.vue +61 -81
  49. package/src/components/display/podcasts/PodcastModuleBox.vue +19 -25
  50. package/src/components/display/podcasts/PodcastSwiperList.vue +2 -3
  51. package/src/components/display/podcasts/TagList.vue +0 -2
  52. package/src/components/display/sharing/QrCode.vue +2 -11
  53. package/src/components/display/sharing/ShareButtons.vue +44 -329
  54. package/src/components/display/sharing/ShareButtonsIntern.vue +209 -0
  55. package/src/components/display/sharing/SharePlayer.vue +21 -53
  56. package/src/components/display/sharing/SplitButton.vue +42 -0
  57. package/src/components/display/sharing/SubscribeButtons.vue +46 -39
  58. package/src/components/misc/Footer.vue +1 -4
  59. package/src/components/misc/HomeDropdown.vue +26 -24
  60. package/src/components/misc/LeftMenu.vue +3 -7
  61. package/src/components/misc/TopBar.vue +9 -16
  62. package/src/components/misc/modal/ClipboardModal.vue +1 -1
  63. package/src/components/misc/modal/MessageModal.vue +1 -1
  64. package/src/components/misc/modal/QrCodeModal.vue +1 -1
  65. package/src/components/misc/modal/ShareModalPlayer.vue +5 -5
  66. package/src/components/mixins/organisationFilter.ts +6 -0
  67. package/src/components/mixins/player/playerLive.ts +1 -1
  68. package/src/components/pages/Category.vue +1 -1
  69. package/src/components/pages/Emission.vue +0 -6
  70. package/src/components/pages/Emissions.vue +1 -1
  71. package/src/components/pages/Error403Page.vue +44 -8
  72. package/src/components/pages/PageNotFound.vue +55 -0
  73. package/src/components/pages/Participant.vue +0 -15
  74. package/src/components/pages/Participants.vue +1 -1
  75. package/src/components/pages/Playlist.vue +2 -2
  76. package/src/components/pages/Playlists.vue +1 -1
  77. package/src/components/pages/Podcast.vue +1 -3
  78. package/src/components/pages/Podcasts.vue +11 -8
  79. package/src/components/pages/Rubrique.vue +1 -1
  80. package/src/locale/de.ts +3 -0
  81. package/src/locale/en.ts +9 -0
  82. package/src/locale/es.ts +3 -0
  83. package/src/locale/fr.ts +10 -1
  84. package/src/locale/it.ts +3 -0
  85. package/src/locale/sl.ts +3 -0
  86. package/src/router/router.ts +2 -0
  87. package/src/sass/_variables.scss +0 -1
  88. package/src/store/class/general/playlist.ts +1 -1
  89. package/src/store/paramStore.ts +7 -11
  90. package/src/store/typeAppStore.ts +20 -2
@@ -87,46 +87,40 @@ export default defineComponent({
87
87
  filterOrga(): string {
88
88
  return this.$store.state.filter.organisationId;
89
89
  },
90
+ watchVariable(): string{
91
+ return `${this.isDisplay}|${this.categories}`;
92
+ },
93
+ reloadVariable():string{
94
+ return `${this.filterOrga}|${this.categoriesWatch}`;
95
+ }
90
96
  },
91
97
  watch: {
92
- isDisplay():void{
93
- this.$nextTick(() => {
94
- this.resizeWindow();
95
- });
96
- },
97
- categories: {
98
+ watchVariable: {
98
99
  deep: true,
100
+ immediate:true,
99
101
  handler(){
100
102
  this.$nextTick(() => {
101
103
  this.resizeWindow();
102
104
  });
103
105
  }
104
106
  },
105
- filterOrga(): void {
106
- if (this.filterOrga) {
107
- this.fetchCategories(this.filterOrga);
108
- }
109
- },
110
- categoriesWatch:{
107
+ reloadVariable:{
111
108
  deep: true,
109
+ immediate:true,
112
110
  handler(){
113
- if (this.filterOrga) {
114
- this.fetchCategories(this.filterOrga);
115
- }
111
+ if (this.filterOrga) {
112
+ this.fetchCategories(this.filterOrga);
113
+ }
116
114
  }
117
115
  }
118
116
  },
119
-
120
117
  mounted() {
121
118
  window.addEventListener('resize', this.resizeWindow);
122
- this.resizeWindow();
123
- if (this.filterOrga) {
124
- this.fetchCategories(this.filterOrga);
125
- }
126
119
  },
127
120
  beforeUnmount(): void {
128
121
  window.removeEventListener('resize', this.resizeWindow);
129
122
  },
123
+
130
124
  methods: {
131
125
  checkIfFilter(category: Category): void{
132
126
  if(!this.isFilter){
@@ -28,16 +28,10 @@
28
28
  {{ countName + ' / ' + maxName }}
29
29
  </p>
30
30
  <div
31
- v-if="sendError"
31
+ v-if="''!==errorText"
32
32
  class="mt-1 text-danger"
33
33
  >
34
- {{ $t('Recaptcha error') }}
35
- </div>
36
- <div
37
- v-if="isCaptchaTest"
38
- class="mt-1 text-danger"
39
- >
40
- {{ $t('Recaptcha not active') }}
34
+ {{ errorText }}
41
35
  </div>
42
36
  </template>
43
37
  <template v-else>
@@ -85,8 +79,12 @@ export default defineComponent({
85
79
  maxName : Constants.MAX_COMMENT_NAME as number
86
80
  };
87
81
  },
88
-
89
82
  computed: {
83
+ errorText():string {
84
+ if(this.isCaptchaTest) return this.$t('Recaptcha not active');
85
+ if(this.sendError) return this.$t('Recaptcha error');
86
+ return '';
87
+ },
90
88
  validName(): boolean{
91
89
  return this.countName <= this.maxName;
92
90
  },
@@ -102,45 +100,30 @@ export default defineComponent({
102
100
  this.displayCaptcha('block');
103
101
  this.initAuthenticatedName();
104
102
  },
105
-
106
103
  unmounted() {
107
104
  this.displayCaptcha('none');
108
105
  },
109
-
110
106
  methods: {
111
107
  initAuthenticatedName():void{
112
- if (state.generalParameters.authenticated) {
113
- this.name = (
114
- (this.$store.state.profile.firstname || '') +
115
- ' ' +
116
- (this.$store.state.profile.lastname || '')
117
- ).trim();
118
- this.needVerify = false;
119
- }
108
+ if (!state.generalParameters.authenticated) { return; }
109
+ this.name = (`${this.$store.state.profile.firstname||''} ${this.$store.state.profile.lastname||''}`).trim();
110
+ this.needVerify = false;
120
111
  },
121
112
  displayCaptcha(displayStyle: string): void{
122
113
  const captcha = document.getElementsByClassName('grecaptcha-badge')[0];
123
- if (captcha) {
124
- (captcha as HTMLElement).style.display = displayStyle;
125
- }
114
+ if (!captcha) {return;}
115
+ (captcha as HTMLElement).style.display = displayStyle;
126
116
  },
127
117
  async validateName(): Promise<void> {
128
- if (!this.needVerify || this.isCaptchaTest) {
129
- this.sendComment();
130
- return;
131
- }
132
- try {
133
- await this.$recaptchaLoaded()
134
- const token = await this.$recaptcha('login');
135
- this.sendError = false;
136
- const ok = await api.checkToken(token);
137
- if (!ok) {
118
+ if (this.needVerify && this.isCaptchaTest) {
119
+ try {
120
+ await this.$recaptchaLoaded()
121
+ const token = await this.$recaptcha('login');
122
+ this.sendError = !await api.checkToken(token);
123
+ } catch {
138
124
  this.sendError = true;
139
- return;
140
125
  }
141
- } catch {
142
- this.sendError = true;
143
- return;
126
+ if(this.sendError){return;}
144
127
  }
145
128
  this.sendComment();
146
129
  },
@@ -9,7 +9,7 @@
9
9
  :id="'popover-comment' + comment.comId"
10
10
  role="button"
11
11
  tabindex="-1"
12
- :class="editRight || isValid? '':'text-danger'"
12
+ :class="editRight || isValid? 'c-hand-auto':'text-danger'"
13
13
  class="me-2"
14
14
  >{{
15
15
  comment.name
@@ -78,13 +78,10 @@ export default defineComponent({
78
78
  return 'Valid'=== this.comment.status;
79
79
  },
80
80
  date(): string {
81
- if (this.comment.date)
82
- return moment(this.comment.date).format('D MMMM YYYY HH[h]mm');
83
- return '';
81
+ return this.comment.date ? moment(this.comment.date).format('D MMMM YYYY HH[h]mm') : '';
84
82
  },
85
83
  readMore(): string {
86
- if (this.summary) return this.$t('Read more').toString();
87
- return this.$t('Read less').toString();
84
+ return this.summary ? this.$t('Read more') : this.$t('Read less');
88
85
  },
89
86
  contentDisplay(): string {
90
87
  if (!this.summary){return this.comment.content;}
@@ -166,8 +166,7 @@ export default defineComponent({
166
166
  return true;
167
167
  },
168
168
  placeholder(): string {
169
- if (this.comment && this.comment.comId) return this.$t('Answer a comment').toString();
170
- return this.$t('Write a comment').toString();
169
+ return this.comment && this.comment.comId? this.$t('Answer a comment') : this.$t('Write a comment');
171
170
  },
172
171
  isCertified(): boolean {
173
172
  if (
@@ -180,8 +179,7 @@ export default defineComponent({
180
179
  return false;
181
180
  },
182
181
  userId(): string|undefined {
183
- if (state.generalParameters.authenticated) return this.$store.state.profile.userId;
184
- return undefined;
182
+ return state.generalParameters.authenticated ? this.$store.state.profile.userId : undefined;
185
183
  },
186
184
  phase(): string|undefined {
187
185
  if(undefined === this.podcast){
@@ -237,11 +235,8 @@ export default defineComponent({
237
235
  this.editName = false;
238
236
  },
239
237
  inputExceeded(text: string, font: string): number {
240
- const element = document.createElement('canvas');
241
- const context = element.getContext('2d');
242
- if(null === context){
243
- return 0;
244
- }
238
+ const context = document.createElement('canvas').getContext('2d');
239
+ if(null === context){return 0;}
245
240
  context.font = font;
246
241
  return context.measureText(text).width;
247
242
  },
@@ -259,27 +254,19 @@ export default defineComponent({
259
254
  let timeline = 0;
260
255
  if (
261
256
  undefined !== this.podcast &&(
262
- (this.$store.state.player.podcast &&
263
- this.$store.state.player.podcast.podcastId ===
264
- this.podcast.podcastId) ||
265
- (this.$store.state.player.live &&
266
- this.$store.state.player.live.livePodcastId ===
267
- this.podcast.podcastId))
257
+ (this.$store.state.player.podcast?.podcastId ===this.podcast.podcastId) ||
258
+ (this.$store.state.player.live?.livePodcastId ===this.podcast.podcastId))
268
259
  ) {
269
260
  timeline = Math.round(
270
261
  this.$store.state.player.elapsed * this.$store.state.player.total
271
262
  );
272
263
  if (this.podcast.duration && this.$store.state.player.podcast) {
273
264
  timeline = Math.round(
274
- timeline -
275
- (this.$store.state.player.total - this.podcast.duration / 1000)
265
+ timeline - (this.$store.state.player.total - this.podcast.duration / 1000)
276
266
  );
277
267
  }
278
- if (timeline < 0) {
279
- timeline = 0;
280
- }
281
268
  }
282
- return timeline;
269
+ return timeline < 0? 0 : timeline;
283
270
  },
284
271
  async postComment(name?: string): Promise<void> {
285
272
  if (name) {
@@ -50,21 +50,21 @@
50
50
  <div class="d-flex align-items-center mt-1">
51
51
  <button
52
52
  v-if="null === comment.commentIdReferer && 'Valid'=== comment.status"
53
- class="btn py-1 px-3 me-2"
53
+ class="btn d-flex align-items-center py-1 px-3 me-2"
54
54
  :data-selenium="'answer-button-comment-' + seleniumFormat(comment.name)"
55
55
  @click="answerComment"
56
56
  >
57
57
  {{ $t('To answer') }}
58
58
  </button>
59
- <div
59
+ <button
60
60
  v-if="
61
61
  (!isFlat && comment.relatedComments) ||
62
62
  (isFlat && comment.commentIdReferer)
63
63
  "
64
- class="d-flex align-items-center small-text primary-darker c-hand"
64
+ class="btn py-1 d-flex align-items-center px-3 me-2"
65
65
  @click="collapseVisible=!collapseVisible"
66
66
  >
67
- <div v-if="comment.relatedComments">
67
+ <span v-if="comment.relatedComments">
68
68
  <template v-if="!collapseVisible">
69
69
  {{ $t('Display answers', { nb: comment.relatedComments }) }}
70
70
  <i v-if="editRight">{{
@@ -76,15 +76,15 @@
76
76
  <template v-else>
77
77
  {{ $t('Hide answers') }}
78
78
  </template>
79
- </div>
80
- <div v-else>
79
+ </span>
80
+ <span v-else>
81
81
  {{ $t('In response to') }}
82
- </div>
82
+ </span>
83
83
  <span
84
84
  :class="collapseVisible? 'arrow-transform': ''"
85
85
  class="saooti-arrow_down"
86
86
  />
87
- </div>
87
+ </button>
88
88
  <EditCommentBox
89
89
  v-if="editRight"
90
90
  ref="editBox"
@@ -4,11 +4,8 @@
4
4
  :loading-text="loading?$t('Loading content ...'):undefined"
5
5
  :error-text="error?$t(`Comments loading error`):undefined"
6
6
  />
7
- <transition-group
7
+ <div
8
8
  v-show="!loading"
9
- tag="div"
10
- name="comment-list"
11
- class="my-transition-list-comments"
12
9
  >
13
10
  <CommentItem
14
11
  v-for="(c, indexCom) in comments"
@@ -22,7 +19,7 @@
22
19
  @deleteComment="deleteComment(c)"
23
20
  @updateComment="updateComment"
24
21
  />
25
- </transition-group>
22
+ </div>
26
23
  <button
27
24
  v-show="!allFetched && (!loading || 0!==first)"
28
25
  class="btn btn-primary mt-2"
@@ -101,13 +98,16 @@ export default defineComponent({
101
98
  return true;
102
99
  return false;
103
100
  },
101
+ watchVariable():string{
102
+ return `${this.reload}|${this.status}`
103
+ }
104
104
  },
105
105
  watch: {
106
- reload(): void {
107
- this.fetchContent();
108
- },
109
- status(): void {
110
- this.fetchContent();
106
+ watchVariable: {
107
+ immediate:true,
108
+ handler(){
109
+ this.fetchContent();
110
+ }
111
111
  },
112
112
  comments: {
113
113
  deep: true,
@@ -116,9 +116,6 @@ export default defineComponent({
116
116
  }
117
117
  },
118
118
  },
119
- created() {
120
- this.fetchContent();
121
- },
122
119
  methods: {
123
120
  async fetchContent(reset=true): Promise<void> {
124
121
  this.loading = true;
@@ -138,11 +135,7 @@ export default defineComponent({
138
135
  status:this.editRight && this.status?[this.status]: this.editRight? ['Valid','Pending', 'Invalid']:['Valid'],
139
136
  organisationId: undefined === this.podcastId? this.organisation: undefined,
140
137
  };
141
- if (!this.isFlat) {
142
- data = await octopusApi.fetchRootComments(param);
143
- } else {
144
- data = await octopusApi.fetchComments(param);
145
- }
138
+ data = this.isFlat ? await octopusApi.fetchComments(param) : await octopusApi.fetchRootComments(param);
146
139
  }
147
140
  if(reset){
148
141
  this.comments.length = 0;
@@ -231,46 +224,4 @@ export default defineComponent({
231
224
  },
232
225
  },
233
226
  })
234
- </script>
235
-
236
- <style lang="scss">
237
- @import '../../../sass/_variables.scss';
238
- .octopus-app{
239
- .my-transition-list-comments {
240
- position: relative;
241
- .comment-list-enter-active,
242
- .comment-list-leave-active {
243
- transition: 1200ms cubic-bezier(0.59, 0.12, 0.34, 0.95);
244
- transition-property: opacity, transform;
245
- background-color: $primaryColorReallyTransparent;
246
- }
247
-
248
- .comment-list-enter {
249
- opacity: 0;
250
- transform: translateX(50px) scaleY(0.5);
251
- background-color: $primaryColorReallyTransparent;
252
- }
253
-
254
- .comment-list-enter-to {
255
- opacity: 1;
256
- transform: translateX(0) scaleY(1);
257
- background-color: $primaryColorReallyTransparent;
258
- }
259
-
260
- .comment-list-leave-active {
261
- position: absolute;
262
- background-color: $primaryColorReallyTransparent;
263
- top: 0;
264
- left: 0;
265
- right: 0;
266
- }
267
-
268
- .comment-list-leave-to {
269
- opacity: 0;
270
- transform: scaleY(0);
271
- transform-origin: center top;
272
- background-color: $primaryColorReallyTransparent;
273
- }
274
- }
275
- }
276
- </style>
227
+ </script>
@@ -41,14 +41,11 @@ import { selenium } from '../../mixins/functions';
41
41
  import { defineComponent } from 'vue'
42
42
  export default defineComponent({
43
43
  name: 'CommentPlayer',
44
-
45
- components: {},
46
44
  mixins:[selenium],
47
45
  props: {
48
46
  comments: { default: undefined, type: Array as ()=>Array<CommentPodcast>},
49
47
  totalTime: { default: 0, type: Number},
50
48
  },
51
-
52
49
  data() {
53
50
  return {
54
51
  displayContent: undefined as CommentPodcast|undefined,
@@ -8,18 +8,13 @@
8
8
  class="mb-0 me-2"
9
9
  data-selenium="episode-comment-counter"
10
10
  >
11
- {{ $t("Podcast's comments") }}
12
- <template v-if="loaded && totalCount > 0">
13
- {{
14
- $t('()', { nb: totalCount })
15
- }}
16
- </template>
11
+ {{ commentTitle }}
17
12
  </h2>
18
13
  <button
19
14
  v-if="!isLive"
20
15
  :title="$t('Refresh')"
21
16
  class="btn admin-button saooti-refresh-stud"
22
- @click="reloadComments"
17
+ @click="reload = !reload"
23
18
  />
24
19
  </div>
25
20
  <CommentInput
@@ -51,18 +46,15 @@ import CommentListVue from './CommentList.vue';
51
46
  import { CommentPodcast } from '@/store/class/general/comment';
52
47
  export default defineComponent({
53
48
  name: 'CommentSection',
54
-
55
49
  components: {
56
50
  CommentList,
57
51
  CommentInput,
58
52
  },
59
53
  mixins:[cookies],
60
-
61
54
  props: {
62
55
  podcast: { default: undefined, type: Object as ()=>Podcast },
63
56
  fetchConference: { default: undefined, type: Object as ()=>Conference },
64
57
  },
65
-
66
58
  data() {
67
59
  return {
68
60
  totalCount: 0 as number,
@@ -70,8 +62,11 @@ export default defineComponent({
70
62
  reload: false as boolean,
71
63
  };
72
64
  },
73
-
74
65
  computed: {
66
+ commentTitle():string{
67
+ const count = this.loaded && this.totalCount > 0 ? this.$t('()', { nb: this.totalCount }) : '';
68
+ return this.$t("Podcast's comments")+count;
69
+ },
75
70
  isComments(): boolean {
76
71
  if (!this.podcast) return true;
77
72
  let podcastComment = 'INHERIT';
@@ -123,9 +118,6 @@ export default defineComponent({
123
118
  });
124
119
  this.totalCount = value.count;
125
120
  },
126
- reloadComments(): void {
127
- this.reload = !this.reload;
128
- },
129
121
  newComment(comment: CommentPodcast): void {
130
122
  (this.$refs.commentList as InstanceType<typeof CommentListVue>).addNewComment(comment, true);
131
123
  },
@@ -23,15 +23,9 @@
23
23
  </button>
24
24
  </div>
25
25
  </div>
26
- <div
27
- v-if="loading"
28
- class="d-flex justify-content-center"
29
- >
30
- <div class="spinner-border me-3" />
31
- <h3 class="mt-2">
32
- {{ $t('Loading emissions ...') }}
33
- </h3>
34
- </div>
26
+ <ClassicLoading
27
+ :loading-text="loading?$t('Loading emissions ...'):undefined"
28
+ />
35
29
  <transition-group
36
30
  v-show="
37
31
  (displayRubriquage && rubriques) || !(displayRubriquage && loaded)
@@ -73,7 +67,7 @@ import EmissionPlayerItem from './EmissionPlayerItem.vue';
73
67
  import { state } from '../../../store/paramStore';
74
68
  import { handle403 } from '../../mixins/handle403';
75
69
  const PHONE_WIDTH = 960;
76
-
70
+ import ClassicLoading from '../../form/ClassicLoading.vue';
77
71
  import { Emission } from '@/store/class/general/emission';
78
72
  import { Rubrique } from '@/store/class/rubrique/rubrique';
79
73
  import { defineComponent } from 'vue'
@@ -83,6 +77,7 @@ export default defineComponent({
83
77
 
84
78
  components: {
85
79
  EmissionPlayerItem,
80
+ ClassicLoading
86
81
  },
87
82
 
88
83
  mixins: [handle403],
@@ -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: filterOrga },
10
10
  }"
11
11
  :title="$t('Emission')"
12
12
  class="d-flex text-dark"
@@ -44,7 +44,7 @@
44
44
  :to="{
45
45
  name: 'productor',
46
46
  params: { productorId: emission.orga.id },
47
- query: { productor: $store.state.filter.organisationId },
47
+ query: { productor: filterOrga },
48
48
  }"
49
49
  >
50
50
  <div class="emission-producer">
@@ -57,6 +57,7 @@
57
57
  </template>
58
58
 
59
59
  <script lang="ts">
60
+ import { orgaComputed } from '../../mixins/orgaComputed';
60
61
  import { Emission } from '@/store/class/general/emission';
61
62
  import { state } from '../../../store/paramStore';
62
63
  import octopusApi from '@saooti/octopus-api';
@@ -65,7 +66,7 @@ import { defineComponent } from 'vue'
65
66
  export default defineComponent({
66
67
  name: 'EmissionItem',
67
68
 
68
- mixins: [displayMethods],
69
+ mixins: [displayMethods, orgaComputed],
69
70
 
70
71
  props: {
71
72
  emission: { default: ()=>({}), type: Object as ()=> Emission},
@@ -87,15 +88,9 @@ export default defineComponent({
87
88
  }
88
89
  return '';
89
90
  },
90
- organisationId(): string|undefined {
91
- return state.generalParameters.organisationId;
92
- },
93
- authenticated(): boolean {
94
- return (state.generalParameters.authenticated as boolean);
95
- },
96
91
  editRight(): boolean {
97
92
  if (
98
- (this.authenticated && this.organisationId === this.emission.orga.id) ||
93
+ (this.authenticated && this.myOrganisationId === this.emission.orga.id) ||
99
94
  state.generalParameters.isAdmin
100
95
  )
101
96
  return true;