@saooti/octopus-sdk 40.1.21 → 40.2.1-SNAPSHOT

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 (36) hide show
  1. package/index.ts +7 -1
  2. package/package.json +1 -1
  3. package/plateform.conf +1 -1
  4. package/src/components/composable/player/usePlayerLive.ts +1 -1
  5. package/src/components/display/accessibility/AccessibilityModal.vue +7 -7
  6. package/src/components/display/comments/CommentSection.vue +1 -1
  7. package/src/components/display/emission/EmissionPlayerItem.vue +1 -1
  8. package/src/components/display/list/SwiperList.vue +1 -1
  9. package/src/components/display/podcasts/PodcastItemInfo.vue +1 -1
  10. package/src/components/display/podcasts/PodcastModuleBox.vue +121 -118
  11. package/src/components/display/podcasts/PodcastRawTranscript.vue +5 -18
  12. package/src/components/display/sharing/PlayerAnonymousModal.vue +54 -0
  13. package/src/components/display/sharing/QrCode.vue +26 -28
  14. package/src/components/display/sharing/ShareAnonymous.vue +291 -0
  15. package/src/components/display/sharing/ShareNewsletter.vue +216 -0
  16. package/src/components/display/sharing/ShareSocialsButtons.vue +110 -0
  17. package/src/components/display/sharing/SubscribeButtons.vue +2 -0
  18. package/src/components/misc/ClassicNav.vue +9 -3
  19. package/src/components/misc/ClassicPopover.vue +1 -1
  20. package/src/components/misc/modal/NewsletterModal.vue +14 -192
  21. package/src/components/misc/modal/QrCodeModal.vue +2 -1
  22. package/src/components/pages/EmissionPage.vue +47 -61
  23. package/src/components/pages/ParticipantPage.vue +17 -7
  24. package/src/components/pages/PlaylistPage.vue +13 -9
  25. package/src/components/pages/PodcastPage.vue +15 -38
  26. package/src/components/pages/RadioPage.vue +12 -7
  27. package/src/components/pages/VideoPage.vue +0 -2
  28. package/src/locale/de.ts +2 -2
  29. package/src/locale/en.ts +2 -2
  30. package/src/locale/es.ts +2 -2
  31. package/src/locale/fr.ts +6 -6
  32. package/src/locale/it.ts +2 -2
  33. package/src/locale/sl.ts +2 -2
  34. package/src/router/router.ts +3 -8
  35. package/src/stores/class/config/commentsConfig.ts +2 -2
  36. package/src/components/display/sharing/ShareButtons.vue +0 -351
package/index.ts CHANGED
@@ -49,7 +49,13 @@ export const getOrganisationChooser = () => import("./src/components/display/org
49
49
  export const getPodcastFilterList = () => import("./src/components/display/podcasts/PodcastFilterList.vue");
50
50
  export const getPodcastInlineList = () => import("./src/components/display/podcasts/PodcastInlineList.vue");
51
51
  export const getPodcastList = () => import("./src/components/display/podcasts/PodcastList.vue");
52
- export const getShareButtons = () => import("./src/components/display/sharing/ShareButtons.vue");
52
+ export const getShareButtons = () => import("./src/components/display/sharing/ShareSocialsButtons.vue");
53
+ export const getShareAnonymous = () => import("./src/components/display/sharing/ShareAnonymous.vue");
54
+ export const getShareNewsletter = () => import("./src/components/display/sharing/ShareNewsletter.vue");
55
+ export const getQrCode = () => import("./src/components/display/sharing/QrCode.vue");
56
+
57
+
58
+
53
59
  export const getEmissionInlineList = () => import("./src/components/display/emission/EmissionInlineList.vue");
54
60
  export const getRubriqueChooser = () => import("./src/components/display/rubriques/RubriqueChooser.vue");
55
61
  export const getCommentList = () => import("./src/components/display/comments/CommentList.vue");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "40.1.21",
3
+ "version": "40.2.1-SNAPSHOT",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
package/plateform.conf CHANGED
@@ -1 +1 @@
1
- dev2.saooti.org
1
+ preprod.saooti.org
@@ -8,7 +8,7 @@ import dayjs from "dayjs";
8
8
  let Hls:any = null;
9
9
  /* eslint-enable*/
10
10
  const maxMinutesSessionId = 1;
11
- export const usePlayerLive = (hlsReady: Ref<Boolean>)=>{
11
+ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
12
12
 
13
13
  const { listenTime, initLiveDownloadId, setDownloadId, onTimeUpdateProgress } = usePlayerLogicProgress();
14
14
 
@@ -75,6 +75,13 @@ export default defineComponent({
75
75
  },
76
76
 
77
77
  emits: ["close", "save"],
78
+ data() {
79
+ return {
80
+ fontSize :16 as number,
81
+ background: "white" as string,
82
+ color: "black" as string,
83
+ };
84
+ },
78
85
  computed:{
79
86
  isMaxSize(){
80
87
  return this.fontSize>=30;
@@ -86,13 +93,6 @@ export default defineComponent({
86
93
  return 'font-size:'+this.fontSize+'px; background:'+this.background+'; color:'+this.color;
87
94
  }
88
95
  },
89
- data() {
90
- return {
91
- fontSize :16 as number,
92
- background: "white" as string,
93
- color: "black" as string,
94
- };
95
- },
96
96
  created(){
97
97
  this.initAccessibility();
98
98
  },
@@ -21,7 +21,7 @@
21
21
  v-model:nb-comments="nbComments"
22
22
  :class="inStudio? 'mt-2':'mt-5'"
23
23
  :podcast="podcast"
24
- :isFlatList="inStudio"
24
+ :is-flat-list="inStudio"
25
25
  :reload="reload"
26
26
  :config="configPodcast"
27
27
  :event-to-handle="eventToHandle"
@@ -59,7 +59,7 @@
59
59
  </router-link>
60
60
  <PodcastPlayBar
61
61
  v-else
62
- :displayButonPlay="true"
62
+ :display-buton-play="true"
63
63
  :podcast="p"
64
64
  />
65
65
  </div>
@@ -14,7 +14,7 @@
14
14
  @slide-change="slideChange"
15
15
  >
16
16
  <swiper-slide v-for="(obj, index) in listObject" :key="obj">
17
- <slot name="octopusSlide" :option="obj" :index="index" v-if="composableInit" />
17
+ <slot v-if="composableInit" name="octopusSlide" :option="obj" :index="index" />
18
18
  </swiper-slide>
19
19
  </swiper>
20
20
  </template>
@@ -11,7 +11,7 @@
11
11
  params: { podcastId: podcast.podcastId },
12
12
  }"
13
13
  class="text-dark flex-grow-1 title-podcast-item basic-line-clamp three-line"
14
- :podcast.title="$t('Episode name page', { name: podcast.title })"
14
+ :title="$t('Episode name page', { name: podcast.title })"
15
15
  >
16
16
  {{ podcast.title }}
17
17
  </router-link>
@@ -1,115 +1,130 @@
1
1
  <template>
2
2
  <section v-if="podcast" class="module-box">
3
- <div class="mb-2 d-flex">
4
- <div class="w-100">
5
- <PodcastImage
6
- :class="[
7
- isLiveReadyToRecord &&
8
- podcastConference &&
9
- 'null' !== podcastConference &&
10
- podcastConference.status
11
- ? podcastConference.status.toLowerCase() + '-shadow'
12
- : '',
13
- ]"
14
- class="me-3"
15
- :hide-play="isLiveReadyToRecord"
16
- :podcast="podcast"
17
- :playing-podcast="playingPodcast"
18
- :fetch-conference="podcastConference"
19
- :is-animator-live="isOctopusAndAnimator"
20
- />
21
- <div class="d-flex justify-content-between flex-wrap mb-2">
22
- <time
23
- v-if="0 !== date.length" :class="!isLiveReady ? 'me-5' : ''"
24
- :datetime="podcast.pubDate">
25
- {{ date }}
26
- </time>
3
+ <RecordingItemButton
4
+ v-if="!!podcastConference && isLiveReadyToRecord && isOctopusAndAnimator"
5
+ :podcast="podcast"
6
+ :live="true"
7
+ :recording="podcastConference"
8
+ @delete-item="removeDeleted"
9
+ @validate-podcast="$emit('updatePodcast', $event)"
10
+ />
11
+ <EditBox
12
+ v-else-if="editRight && isEditBox"
13
+ :podcast="podcast"
14
+ :display-studio-access="isDebriefing"
15
+ @validate-podcast="$emit('updatePodcast', $event)"
16
+ />
17
+ <div class="mb-2 w-100">
18
+ <PodcastImage
19
+ :class="[
20
+ isLiveReadyToRecord &&
21
+ podcastConference &&
22
+ 'null' !== podcastConference &&
23
+ podcastConference.status
24
+ ? podcastConference.status.toLowerCase() + '-shadow'
25
+ : '',
26
+ ]"
27
+ class="me-3"
28
+ :hide-play="isLiveReadyToRecord"
29
+ :podcast="podcast"
30
+ :playing-podcast="playingPodcast"
31
+ :fetch-conference="podcastConference"
32
+ :is-animator-live="isOctopusAndAnimator"
33
+ />
34
+ <div class="d-flex justify-content-between flex-wrap mb-2">
35
+ <time
36
+ v-if="0 !== date.length" :class="!isLiveReady ? 'me-5' : ''"
37
+ :datetime="podcast.pubDate">
38
+ {{ date }}
39
+ </time>
40
+ <div v-if="isLiveReady" class="text-danger">
41
+ {{ $t("Episode record in live") }}
42
+ </div>
43
+ <div class="d-flex flex-column align-items-end flex-grow-1">
27
44
  <time :datetime="durationIso">
28
45
  {{ duration }}
29
46
  </time>
30
- <div v-if="isLiveReady" class="text-danger">
31
- {{ $t("Episode record in live") }}
32
- </div>
47
+ <ShareAnonymous v-if="!editRight" :podcast="podcast" :organisation-id="podcast.organisation.id"/>
33
48
  </div>
34
- <h2 class="mb-3">
35
- {{ podcast.title }}
36
- </h2>
37
- <PodcastPlannedSpinner v-if="isPlannedInProcessor"/>
38
- <Countdown v-if="isCounter" :time-remaining="timeRemaining" />
39
- <!-- eslint-disable vue/no-v-html -->
40
- <div
41
- class="description-text html-wysiwyg-content"
42
- v-html="urlify(podcast.description)"
49
+ </div>
50
+ <h2 class="mb-3">
51
+ {{ podcast.title }}
52
+ </h2>
53
+ <PodcastPlannedSpinner v-if="isPlannedInProcessor"/>
54
+ <Countdown v-if="isCounter" :time-remaining="timeRemaining" />
55
+ <!-- eslint-disable vue/no-v-html -->
56
+ <div
57
+ class="description-text html-wysiwyg-content"
58
+ v-html="urlify(podcast.description)"
59
+ />
60
+ <!-- eslint-enable -->
61
+ <div class="my-3">
62
+ <div class="mb-1">
63
+ {{ $t("Emission") + " : " }}
64
+ <router-link
65
+ :to="{
66
+ name: 'emission',
67
+ params: { emissionId: podcast.emission.emissionId },
68
+ }"
69
+ :title="$t('Series name page', { name: podcast.emission.name })"
70
+ >
71
+ {{ podcast.emission.name }}
72
+ </router-link>
73
+ </div>
74
+ <ParticipantDescription :participants="podcast.animators" />
75
+ <ParticipantDescription
76
+ :participants="podcast.guests"
77
+ :is-guest="true"
43
78
  />
44
- <!-- eslint-enable -->
45
- <div class="my-3">
46
- <div class="mb-1">
47
- {{ $t("Emission") + " : " }}
48
- <router-link
49
- :to="{
50
- name: 'emission',
51
- params: { emissionId: podcast.emission.emissionId },
52
- }"
53
- :title="$t('Series name page', { name: podcast.emission.name })"
54
- >
55
- {{ podcast.emission.name }}
56
- </router-link>
57
- </div>
58
- <ParticipantDescription :participants="podcast.animators" />
59
- <ParticipantDescription
60
- :participants="podcast.guests"
61
- :is-guest="true"
62
- />
63
- <div v-if="!isPodcastmaker" class="mb-1">
64
- {{ $t("Producted by : ") }}
65
- <router-link
66
- :to="{
67
- name: 'productor',
68
- params: { productorId: podcast.organisation.id },
69
- }"
70
- >
71
- {{ podcast.organisation.name }}
72
- </router-link>
73
- </div>
74
- <div v-if="'' !== photoCredit" class="mb-1">
75
- {{ $t("Photo credits") + " : " + photoCredit }}
76
- </div>
77
- <div v-if="'' !== audioCredit" class="mb-1">
78
- {{ $t("Audio credits") + " : " + audioCredit }}
79
- </div>
80
- <div v-if="'' !== authorCredit" class="mb-1">
81
- {{ $t("Author credits") + " : " + authorCredit }}
82
- </div>
83
- <a
84
- v-if="podcast.article && !isGarRole"
85
- class="btn d-flex align-items-center my-2 w-fit-content mb-1"
86
- :href="podcast.article"
87
- rel="noreferrer noopener"
88
- target="_blank"
89
- :title="$t('New window', {text : $t('See associated article')})"
79
+ <div v-if="!isPodcastmaker" class="mb-1">
80
+ {{ $t("Producted by : ") }}
81
+ <router-link
82
+ :to="{
83
+ name: 'productor',
84
+ params: { productorId: podcast.organisation.id },
85
+ }"
90
86
  >
91
- <NewspaperVariantOutlineIcon class="me-1" />
92
- <div>{{ $t("See associated article") }}</div>
93
- </a>
94
- <PodcastPlayBar
95
- v-if="isProgressBar"
96
- :podcast="podcast"
97
- />
98
- <div v-if="editRight && !isPodcastmaker">
99
- <div
100
- v-if="
101
- podcast.annotations && 'RSS' === podcast.annotations.SOURCE_KIND
102
- "
103
- class="me-5 text-secondary"
104
- >
105
- {{ $t("From RSS") }}
106
- </div>
107
- <ErrorMessage v-if="'' !== errorMessage" :message="errorMessage" />
108
- </div>
109
- <div class="d-flex align-items-center flex-wrap">
110
- <LikeSection :edit-right="editRight" :podcast="podcast" />
111
- <DownloadPodcastButton v-if="isDownloadButton" :podcast="podcast" />
87
+ {{ podcast.organisation.name }}
88
+ </router-link>
89
+ </div>
90
+ <div v-if="'' !== photoCredit" class="mb-1">
91
+ {{ $t("Photo credits") + " : " + photoCredit }}
92
+ </div>
93
+ <div v-if="'' !== audioCredit" class="mb-1">
94
+ {{ $t("Audio credits") + " : " + audioCredit }}
95
+ </div>
96
+ <div v-if="'' !== authorCredit" class="mb-1">
97
+ {{ $t("Author credits") + " : " + authorCredit }}
98
+ </div>
99
+ <a
100
+ v-if="podcast.article && !isGarRole"
101
+ class="btn d-flex align-items-center my-2 w-fit-content mb-1"
102
+ :href="podcast.article"
103
+ rel="noreferrer noopener"
104
+ target="_blank"
105
+ :title="$t('New window', {text : $t('See associated article')})"
106
+ >
107
+ <NewspaperVariantOutlineIcon class="me-1" />
108
+ <div>{{ $t("See associated article") }}</div>
109
+ </a>
110
+ <PodcastPlayBar
111
+ v-if="isProgressBar"
112
+ :podcast="podcast"
113
+ />
114
+ <div v-if="editRight && !isPodcastmaker">
115
+ <div
116
+ v-if="
117
+ podcast.annotations && 'RSS' === podcast.annotations.SOURCE_KIND
118
+ "
119
+ class="me-5 text-secondary"
120
+ >
121
+ {{ $t("From RSS") }}
112
122
  </div>
123
+ <ErrorMessage v-if="'' !== errorMessage" :message="errorMessage" />
124
+ </div>
125
+ <div class="d-flex align-items-center flex-wrap">
126
+ <LikeSection :edit-right="editRight" :podcast="podcast" />
127
+ <DownloadPodcastButton v-if="isDownloadButton" :podcast="podcast" />
113
128
  </div>
114
129
  </div>
115
130
  </div>
@@ -132,20 +147,6 @@
132
147
  :window-width="1000"
133
148
  :justify-center="false"
134
149
  />
135
- <RecordingItemButton
136
- v-if="!!podcastConference && isLiveReadyToRecord && isOctopusAndAnimator"
137
- :podcast="podcast"
138
- :live="true"
139
- :recording="podcastConference"
140
- @delete-item="removeDeleted"
141
- @validate-podcast="$emit('updatePodcast', $event)"
142
- />
143
- <EditBox
144
- v-else-if="editRight && isEditBox"
145
- :podcast="podcast"
146
- :display-studio-access="isDebriefing"
147
- @validate-podcast="$emit('updatePodcast', $event)"
148
- />
149
150
  </section>
150
151
  </template>
151
152
 
@@ -188,6 +189,7 @@ const PodcastPlannedSpinner = defineAsyncComponent(
188
189
  );
189
190
  const Countdown = defineAsyncComponent(() => import("../live/CountDown.vue"));
190
191
  const TagList = defineAsyncComponent(() => import("./TagList.vue"));
192
+ const ShareAnonymous = defineAsyncComponent(() => import("../sharing/ShareAnonymous.vue"));
191
193
  const PodcastRubriqueList = defineAsyncComponent(() => import("./PodcastRubriqueList.vue"));
192
194
  import { mapState } from "pinia";
193
195
  export default defineComponent({
@@ -207,7 +209,8 @@ export default defineComponent({
207
209
  DownloadPodcastButton,
208
210
  NewspaperVariantOutlineIcon,
209
211
  PodcastPlannedSpinner,
210
- PodcastRubriqueList
212
+ PodcastRubriqueList,
213
+ ShareAnonymous
211
214
  },
212
215
 
213
216
  props: {
@@ -80,15 +80,15 @@ export default defineComponent({
80
80
  },
81
81
  methods: {
82
82
  getAccessibility(){
83
- let fontSize = cookiesHelper.getCookie("octopus-font-size");
83
+ const fontSize = cookiesHelper.getCookie("octopus-font-size");
84
84
  if (null !== fontSize) {
85
85
  this.setCssProperty('--octopus-accessibility-font-size', fontSize);
86
86
  }
87
- let background = cookiesHelper.getCookie("octopus-background");
87
+ const background = cookiesHelper.getCookie("octopus-background");
88
88
  if (null !== background) {
89
89
  this.setCssProperty('--octopus-accessibility-background', background);
90
90
  }
91
- let color = cookiesHelper.getCookie("octopus-color");
91
+ const color = cookiesHelper.getCookie("octopus-color");
92
92
  if (null !== color) {
93
93
  this.setCssProperty('--octopus-accessibility-color', color);
94
94
  }
@@ -212,25 +212,12 @@ export default defineComponent({
212
212
  white-space: pre-wrap;
213
213
  background: var(--octopus-accessibility-background);
214
214
  color: var(--octopus-accessibility-color);
215
+ border: 2px solid var(--octopus-border-default);
216
+ border-radius: var(--octopus-border-radius);
215
217
 
216
218
  .transcription-text {
217
219
  overflow: hidden auto;
218
220
  }
219
-
220
- &::before {
221
- content: "";
222
- position: absolute;
223
- inset: 0;
224
- padding: 3px;
225
- background: repeating-conic-gradient(
226
- var(--octopus-secondary) 0 25%,
227
- var(--octopus-primary) 0 50%
228
- )
229
- 0 0/30px 30px round;
230
- mask:linear-gradient(black 0 0) content-box, linear-gradient(black 0 0);
231
- mask-composite: exclude;
232
- pointer-events: none;
233
- }
234
221
  }
235
222
  }
236
223
  </style>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <ClassicModal
3
+ id-modal="player-anonymous-modal"
4
+ :title-modal="$t('Share the player')"
5
+ @close="closePopup"
6
+ >
7
+ <template #body>
8
+ <SharePlayer
9
+ :podcast="podcast"
10
+ :emission="emission"
11
+ :exclusive="exclusive"
12
+ :not-exclusive="notExclusive"
13
+ :organisation-id="authOrgaId"
14
+ />
15
+ </template>
16
+ <template #footer>
17
+ <button class="btn btn-primary m-1" @click="closePopup">
18
+ {{ $t("Close") }}
19
+ </button>
20
+ </template>
21
+ </ClassicModal>
22
+ </template>
23
+
24
+ <script lang="ts">
25
+ import { Podcast } from "@/stores/class/general/podcast";
26
+ import ClassicModal from "../../misc/modal/ClassicModal.vue";
27
+ import SharePlayer from "./SharePlayer.vue";
28
+ import { useAuthStore } from "../../../stores/AuthStore";
29
+ import { defineComponent } from "vue";
30
+ import { Emission } from "@/stores/class/general/emission";
31
+ import { mapState } from "pinia";
32
+ export default defineComponent({
33
+ name: "PlayerAnonymousModal",
34
+ components: {
35
+ ClassicModal,
36
+ SharePlayer
37
+ },
38
+ props: {
39
+ podcast: { default: undefined, type: Object as () => Podcast },
40
+ emission: { default: undefined, type: Object as () => Emission },
41
+ exclusive: { default: false, type: Boolean },
42
+ notExclusive: { default: true, type: Boolean },
43
+ },
44
+ emits: ["close"],
45
+ computed:{
46
+ ...mapState(useAuthStore, ["authOrgaId"]),
47
+ },
48
+ methods: {
49
+ closePopup(): void {
50
+ this.$emit("close");
51
+ },
52
+ },
53
+ });
54
+ </script>
@@ -1,5 +1,20 @@
1
1
  <template>
2
2
  <div class="d-flex flex-column align-items-center">
3
+ <div class="d-flex align-items-center mb-3">
4
+ <div class="form-label me-3">
5
+ {{ $t("Choose color") }}
6
+ </div>
7
+ <VSwatches
8
+ v-model:model-value="color"
9
+ class="c-hand"
10
+ show-fallback
11
+ fallback-input-type="color"
12
+ colors="text-advanced"
13
+ popover-to="right"
14
+ popover-y="bottom"
15
+ :data-color="color"
16
+ />
17
+ </div>
3
18
  <qrcode-vue
4
19
  :value="url"
5
20
  :size="size"
@@ -8,14 +23,7 @@
8
23
  class="myQrCode"
9
24
  :margin="2"
10
25
  />
11
- <ClassicCheckbox
12
- v-if="'#000000' !== otherColor"
13
- v-model:text-init="isNotBlack"
14
- class="flex-shrink-0"
15
- id-checkbox="is-black-qr-code"
16
- :label="$t('Use organization color')"
17
- />
18
- <button class="btn m-3" @click="download">
26
+ <button class="btn btn-primary my-3" @click="download">
19
27
  {{ $t("Download") }}
20
28
  </button>
21
29
  <SnackBar ref="snackbar" position="bottom-left" />
@@ -23,12 +31,12 @@
23
31
  </template>
24
32
 
25
33
  <script lang="ts">
26
- import ClassicCheckbox from "../../form/ClassicCheckbox.vue";
34
+ import { VSwatches } from "vue3-swatches";
35
+ import "vue3-swatches/dist/style.css";
27
36
  import SnackBar from "../../misc/SnackBar.vue";
28
37
  import QrcodeVue from "qrcode.vue";
29
38
  import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
30
- import { useAuthStore } from "../../../stores/AuthStore";
31
- import { mapState, mapActions } from "pinia";
39
+ import { mapActions } from "pinia";
32
40
  import { defineComponent } from "vue";
33
41
  export default defineComponent({
34
42
  name: "QrCode",
@@ -36,29 +44,20 @@ export default defineComponent({
36
44
  components: {
37
45
  SnackBar,
38
46
  QrcodeVue,
39
- ClassicCheckbox,
47
+ VSwatches,
40
48
  },
41
49
  props: {
42
50
  url: { default: "", type: String },
51
+ orgaForColor: { default: undefined, type: String },
43
52
  },
44
53
  data() {
45
54
  return {
46
55
  size: 200 as number,
47
56
  color: "#000000" as string,
48
- otherColor: "#000000" as string,
49
- isNotBlack: false as boolean,
50
57
  };
51
58
  },
52
- computed: {
53
- ...mapState(useAuthStore, ["authOrganisation", "authOrgaId"]),
54
- },
55
- watch: {
56
- isNotBlack() {
57
- this.color = this.isNotBlack ? this.otherColor : "#000000";
58
- },
59
- },
60
59
  created() {
61
- this.initColor();
60
+ this.initDefaultColor();
62
61
  },
63
62
  methods: {
64
63
  ...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
@@ -74,12 +73,11 @@ export default defineComponent({
74
73
  );
75
74
  }
76
75
  },
77
- async initColor(): Promise<void> {
78
- if (undefined === this.authOrgaId) return;
79
- const orgaId = this.authOrgaId;
80
- const attributes = await this.getOrgaAttributes(orgaId ?? "");
76
+ async initDefaultColor(): Promise<void> {
77
+ if (undefined === this.orgaForColor) return;
78
+ const attributes = await this.getOrgaAttributes(this.orgaForColor);
81
79
  if (Object.hasOwn(attributes, "COLOR")) {
82
- this.otherColor = attributes.COLOR as string;
80
+ this.color = attributes.COLOR as string;
83
81
  }
84
82
  },
85
83
  },