@saooti/octopus-sdk 40.2.19 → 41.0.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.
- package/index.ts +2 -1
- package/package.json +4 -3
- package/src/App.vue +71 -95
- package/src/components/composable/player/usePlayerLive.ts +13 -4
- package/src/components/composable/player/usePlayerLogic.ts +6 -6
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/podcasts/usePodcastView.ts +3 -3
- package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +15 -8
- package/src/components/composable/useInit.ts +2 -2
- package/src/components/composable/useMetaTitleWatch.ts +2 -2
- package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
- package/src/components/display/categories/CategoryChooser.vue +144 -145
- package/src/components/display/categories/CategoryFilter.vue +172 -198
- package/src/components/display/categories/CategoryList.vue +122 -147
- package/src/components/display/comments/CommentInput.vue +100 -122
- package/src/components/display/comments/CommentList.vue +169 -191
- package/src/components/display/comments/CommentName.vue +35 -45
- package/src/components/display/comments/CommentParentInfo.vue +28 -34
- package/src/components/display/comments/CommentPlayer.vue +38 -50
- package/src/components/display/comments/CommentSection.vue +85 -103
- package/src/components/display/comments/item/CommentBasicView.vue +48 -61
- package/src/components/display/comments/item/CommentItem.vue +104 -115
- package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
- package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
- package/src/components/display/comments/like/LikeButton.vue +36 -41
- package/src/components/display/comments/like/LikeSection.vue +128 -136
- package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
- package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
- package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
- package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
- package/src/components/display/edit/EditBox.vue +9 -8
- package/src/components/display/edit/EditBoxRadio.vue +1 -5
- package/src/components/display/emission/EmissionInlineList.vue +82 -97
- package/src/components/display/emission/EmissionItem.vue +57 -69
- package/src/components/display/emission/EmissionList.vue +189 -218
- package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
- package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
- package/src/components/display/emission/EmissionPresentationList.vue +51 -61
- package/src/components/display/filter/AdvancedSearch.vue +151 -176
- package/src/components/display/filter/CategorySearchFilter.vue +43 -46
- package/src/components/display/filter/DateFilter.vue +76 -91
- package/src/components/display/filter/MonetizableFilter.vue +27 -30
- package/src/components/display/filter/ProductorSearch.vue +87 -90
- package/src/components/display/filter/RubriqueChoice.vue +58 -63
- package/src/components/display/filter/RubriqueFilter.vue +154 -169
- package/src/components/display/filter/SearchOrder.vue +35 -35
- package/src/components/display/list/ListPaginate.vue +72 -93
- package/src/components/display/list/PaginateParams.vue +36 -40
- package/src/components/display/list/PaginateSection.vue +113 -124
- package/src/components/display/list/SwiperList.vue +97 -109
- package/src/components/display/live/CountDown.vue +15 -9
- package/src/components/display/live/CountdownOctopus.vue +16 -10
- package/src/components/display/live/LiveHorizontalList.vue +95 -103
- package/src/components/display/live/LiveItem.vue +64 -73
- package/src/components/display/live/LiveList.vue +125 -137
- package/src/components/display/live/RadioCurrently.vue +66 -73
- package/src/components/display/live/RadioImage.vue +39 -50
- package/src/components/display/live/RadioItem.vue +9 -14
- package/src/components/display/live/RadioList.vue +39 -53
- package/src/components/display/live/RadioPlanning.vue +210 -222
- package/src/components/display/organisation/OrganisationChooser.vue +116 -122
- package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
- package/src/components/display/participant/ParticipantInlineList.vue +42 -58
- package/src/components/display/participant/ParticipantItem.vue +66 -74
- package/src/components/display/participant/ParticipantList.vue +116 -141
- package/src/components/display/playlist/PlaylistItem.vue +33 -46
- package/src/components/display/playlist/PlaylistList.vue +115 -144
- package/src/components/display/playlist/PodcastList.vue +90 -103
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
- package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
- package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
- package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
- package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
- package/src/components/display/podcasts/PodcastImage.vue +96 -99
- package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
- package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
- package/src/components/display/podcasts/PodcastItem.vue +48 -63
- package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
- package/src/components/display/podcasts/PodcastList.vue +182 -206
- package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
- package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
- package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
- package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
- package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
- package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
- package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
- package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
- package/src/components/display/podcasts/TagList.vue +48 -50
- package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
- package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
- package/src/components/display/rubriques/RubriqueList.vue +140 -160
- package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
- package/src/components/display/sharing/FormatSwitch.vue +16 -11
- package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
- package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
- package/src/components/display/sharing/PlayerParameters.vue +69 -71
- package/src/components/display/sharing/QrCode.vue +55 -67
- package/src/components/display/sharing/ShareAnonymous.vue +160 -178
- package/src/components/display/sharing/ShareDistribution.vue +103 -117
- package/src/components/display/sharing/ShareNewsletter.vue +154 -161
- package/src/components/display/sharing/SharePlayer.vue +273 -295
- package/src/components/display/sharing/SharePlayerColors.vue +25 -16
- package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
- package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
- package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
- package/src/components/display/sharing/SubscribeButtons.vue +184 -207
- package/src/components/display/studio/RecordingItemButton.vue +1 -4
- package/src/components/form/ClassicCheckbox.vue +26 -30
- package/src/components/form/ClassicContentEditable.vue +37 -33
- package/src/components/form/ClassicCopyButton.vue +40 -44
- package/src/components/form/ClassicDatePicker.vue +114 -114
- package/src/components/form/ClassicEmojiPicker.vue +20 -28
- package/src/components/form/ClassicInputText.vue +116 -120
- package/src/components/form/ClassicLoading.vue +7 -12
- package/src/components/form/ClassicMultiselect.vue +115 -117
- package/src/components/form/ClassicRadio.vue +21 -16
- package/src/components/form/ClassicRadioLabel.vue +23 -22
- package/src/components/form/ClassicSearch.vue +24 -19
- package/src/components/form/ClassicSelect.vue +47 -38
- package/src/components/form/ClassicWysiwyg.vue +116 -123
- package/src/components/icons/AmazonMusicIcon.vue +7 -10
- package/src/components/icons/ApplePodcastIcon.vue +7 -11
- package/src/components/icons/BlueSkyIcon.vue +8 -11
- package/src/components/icons/DeezerIcon.vue +8 -11
- package/src/components/icons/EditFtpIcon.vue +8 -11
- package/src/components/icons/IHeartIcon.vue +8 -11
- package/src/components/icons/PlayVideoIcon.vue +7 -10
- package/src/components/icons/PlayerFmIcon.vue +7 -10
- package/src/components/icons/PocketCastIcon.vue +8 -11
- package/src/components/icons/PodcastAddictIcon.vue +7 -10
- package/src/components/icons/RadiolineIcon.vue +8 -11
- package/src/components/icons/TuninIcon.vue +8 -11
- package/src/components/icons/XIcon.vue +7 -10
- package/src/components/misc/AcpmImage.vue +6 -7
- package/src/components/misc/ClassicAccordion.vue +26 -31
- package/src/components/misc/ClassicLazy.vue +86 -90
- package/src/components/misc/ClassicNav.vue +16 -20
- package/src/components/misc/ClassicPopover.vue +271 -282
- package/src/components/misc/ClassicSpinner.vue +5 -27
- package/src/components/misc/ErrorMessage.vue +11 -12
- package/src/components/misc/FooterGarSection.vue +33 -41
- package/src/components/misc/FooterSection.vue +94 -131
- package/src/components/misc/HomeDropdown.vue +83 -105
- package/src/components/misc/MobileMenu.vue +101 -111
- package/src/components/misc/ProgressBar.vue +53 -62
- package/src/components/misc/TopBar.vue +98 -120
- package/src/components/misc/TopBarMainContent.vue +114 -133
- package/src/components/misc/modal/ClassicModal.vue +40 -33
- package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
- package/src/components/misc/modal/ClipboardModal.vue +27 -30
- package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
- package/src/components/misc/modal/MessageModal.vue +50 -47
- package/src/components/misc/modal/NewsletterModal.vue +30 -31
- package/src/components/misc/modal/QrCodeModal.vue +21 -21
- package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
- package/src/components/misc/player/PlayerCompact.vue +6 -4
- package/src/components/misc/player/PlayerComponent.vue +8 -9
- package/src/components/misc/player/PlayerLarge.vue +9 -8
- package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
- package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
- package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
- package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
- package/src/components/misc/player/elements/PlayerImage.vue +51 -57
- package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
- package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
- package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
- package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
- package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
- package/src/components/misc/player/radio/RadioHistory.vue +80 -99
- package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
- package/src/components/misc/player/video/PlayerVideo.vue +27 -40
- package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
- package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
- package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
- package/src/components/pages/CategoryPage.vue +28 -33
- package/src/components/pages/EmissionPage.vue +113 -132
- package/src/components/pages/EmissionsPage.vue +2 -0
- package/src/components/pages/Error403Page.vue +21 -20
- package/src/components/pages/HomePage.vue +91 -100
- package/src/components/pages/LivesPage.vue +35 -37
- package/src/components/pages/MapPage.vue +209 -241
- package/src/components/pages/PageLogout.vue +8 -11
- package/src/components/pages/PageNotFound.vue +9 -5
- package/src/components/pages/ParticipantPage.vue +96 -110
- package/src/components/pages/ParticipantsPage.vue +3 -0
- package/src/components/pages/PlaylistPage.vue +112 -117
- package/src/components/pages/PlaylistsPage.vue +9 -2
- package/src/components/pages/PodcastPage.vue +224 -238
- package/src/components/pages/PodcastsPage.vue +9 -2
- package/src/components/pages/RadioPage.vue +56 -70
- package/src/components/pages/RubriquePage.vue +7 -3
- package/src/components/pages/SearchPage.vue +31 -36
- package/src/components/pages/TagPage.vue +11 -9
- package/src/components/pages/VideoPage.vue +14 -11
- package/src/helper/displayHelper.ts +1 -1
- package/src/helper/loadScript.ts +4 -4
- package/src/i18n.ts +2 -2
- package/src/main.ts +1 -1
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/FilterStore.ts +1 -1
- package/src/stores/VastStore.ts +2 -2
- package/src/stores/class/general/player.ts +1 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +0 -113
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/icomoon.woff2 +0 -0
- package/public/css/fonts/style.css +0 -352
- package/sonarqube-scanner.js +0 -10
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
id="organisation-chooser"
|
|
5
5
|
ref="selectOrganisation"
|
|
6
6
|
option-label="name"
|
|
7
|
-
:label="label
|
|
7
|
+
:label="label ??t('select productor')"
|
|
8
8
|
:display-label="displayLabel"
|
|
9
9
|
:max-element="maxElement"
|
|
10
10
|
:width="width"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
option-selected-custom-templating="optionTemplating"
|
|
15
15
|
:no-deselect="noDeselect"
|
|
16
16
|
@on-search="onSearchOrganisation"
|
|
17
|
-
@selected="
|
|
17
|
+
@selected="emit('selected', $event)"
|
|
18
18
|
>
|
|
19
19
|
<template v-if="isImage" #optionTemplating="{ option }">
|
|
20
20
|
<div
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
width="32"
|
|
27
27
|
height="32"
|
|
28
28
|
class="me-2"
|
|
29
|
-
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
alt=""
|
|
30
31
|
|
|
31
|
-
:title="
|
|
32
|
+
:title="t('Organisation name image', { name: option.name })"
|
|
32
33
|
/>
|
|
33
34
|
<span>
|
|
34
35
|
{{ option.name }}
|
|
@@ -38,138 +39,131 @@
|
|
|
38
39
|
</ClassicMultiselect>
|
|
39
40
|
</template>
|
|
40
41
|
|
|
41
|
-
<script lang="ts">
|
|
42
|
+
<script setup lang="ts">
|
|
42
43
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
43
|
-
import { mapActions, mapState } from "pinia";
|
|
44
44
|
import {useImageProxy} from "../../composable/useImageProxy";
|
|
45
45
|
import {useSelenium} from "../../composable/useSelenium";
|
|
46
46
|
import classicApi from "../../../api/classicApi";
|
|
47
47
|
import ClassicMultiselect from "../../form/ClassicMultiselect.vue";
|
|
48
|
-
import {
|
|
48
|
+
import { computed, onBeforeMount, ref, Ref, useTemplateRef, watch } from "vue";
|
|
49
49
|
import {
|
|
50
50
|
emptyOrgaData,
|
|
51
51
|
Organisation,
|
|
52
52
|
} from "@/stores/class/general/organisation";
|
|
53
53
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
54
54
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
55
|
-
|
|
56
|
-
components: {
|
|
57
|
-
ClassicMultiselect,
|
|
58
|
-
},
|
|
59
|
-
props: {
|
|
60
|
-
defaultanswer: { default: "", type: String },
|
|
61
|
-
orgaIdSelected: { default: undefined, type: String },
|
|
62
|
-
reset: { default: false, type: Boolean },
|
|
63
|
-
width: { default: "100%", type: String },
|
|
64
|
-
isImage: { default: true, type: Boolean },
|
|
65
|
-
inModal: { default: false, type: Boolean },
|
|
66
|
-
noDeselect: { default: true, type: Boolean },
|
|
67
|
-
label:{default: undefined, type: String },
|
|
68
|
-
displayLabel: { default: false, type: Boolean },
|
|
69
|
-
},
|
|
70
|
-
emits: ["selected"],
|
|
71
|
-
setup(){
|
|
72
|
-
const { seleniumFormat } = useSelenium();
|
|
73
|
-
const { useProxyImageUrl } = useImageProxy();
|
|
74
|
-
return { seleniumFormat, useProxyImageUrl }
|
|
75
|
-
},
|
|
76
|
-
data() {
|
|
77
|
-
return {
|
|
78
|
-
maxElement: 50 as number,
|
|
79
|
-
organisationChosen: undefined as Organisation | undefined,
|
|
80
|
-
initLoaded: false as boolean,
|
|
81
|
-
};
|
|
82
|
-
},
|
|
55
|
+
import { useI18n } from "vue-i18n";
|
|
83
56
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
57
|
+
//Props
|
|
58
|
+
const props = defineProps({
|
|
59
|
+
defaultanswer: { default: "", type: String },
|
|
60
|
+
orgaIdSelected: { default: undefined, type: String },
|
|
61
|
+
reset: { default: false, type: Boolean },
|
|
62
|
+
width: { default: "100%", type: String },
|
|
63
|
+
isImage: { default: true, type: Boolean },
|
|
64
|
+
inModal: { default: false, type: Boolean },
|
|
65
|
+
noDeselect: { default: true, type: Boolean },
|
|
66
|
+
label:{default: undefined, type: String },
|
|
67
|
+
displayLabel: { default: false, type: Boolean },
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
//Emits
|
|
71
|
+
const emit = defineEmits(["selected"]);
|
|
72
|
+
|
|
73
|
+
//Data
|
|
74
|
+
const maxElement = ref(50);
|
|
75
|
+
const organisationChosen: Ref<Organisation | undefined> = ref(undefined);
|
|
76
|
+
const initLoaded = ref(false);
|
|
77
|
+
const selectOrganisationRef = useTemplateRef('selectOrganisation');
|
|
78
|
+
|
|
79
|
+
//Composables
|
|
80
|
+
const { t } = useI18n();
|
|
81
|
+
const { seleniumFormat } = useSelenium();
|
|
82
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
83
|
+
const authStore = useAuthStore();
|
|
84
|
+
const saveFetchStore = useSaveFetchStore();
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
//Computed
|
|
88
|
+
const getDefaultOrganisation = computed(() => {
|
|
89
|
+
if ("" === props.defaultanswer) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
return emptyOrgaData(props.defaultanswer);
|
|
93
|
+
});
|
|
94
|
+
const myOrganisation = computed(() => {
|
|
95
|
+
if (!authStore.authOrgaId) return undefined;
|
|
96
|
+
return {
|
|
97
|
+
...authStore.authOrganisation,
|
|
98
|
+
...{
|
|
99
|
+
name: `${t("Edit my organisation")} (${
|
|
100
|
+
authStore.authOrganisation.name
|
|
101
|
+
})`,
|
|
122
102
|
},
|
|
123
|
-
}
|
|
103
|
+
};
|
|
104
|
+
});
|
|
124
105
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
);
|
|
158
|
-
if (foundIndex) {
|
|
159
|
-
notNullOrga[foundIndex] = this.myOrganisation;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
(
|
|
164
|
-
this.$refs.selectOrganisation as InstanceType<typeof ClassicMultiselect>
|
|
165
|
-
).afterSearch(notNullOrga, response.count);
|
|
106
|
+
|
|
107
|
+
//Watch
|
|
108
|
+
watch(()=>props.orgaIdSelected, () => {
|
|
109
|
+
if (!props.orgaIdSelected) {
|
|
110
|
+
organisationChosen.value = getDefaultOrganisation.value;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (
|
|
114
|
+
props.orgaIdSelected &&
|
|
115
|
+
organisationChosen.value?.id !== props.orgaIdSelected
|
|
116
|
+
) {
|
|
117
|
+
fetchOrganisation();
|
|
118
|
+
}
|
|
119
|
+
}, {immediate: true});
|
|
120
|
+
watch(()=>props.reset, () => {
|
|
121
|
+
organisationChosen.value = getDefaultOrganisation.value;
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
onBeforeMount(()=>organisationChosen.value = getDefaultOrganisation.value)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
//Methods
|
|
128
|
+
async function onSearchOrganisation(query?: string): Promise<void> {
|
|
129
|
+
const response = await classicApi.fetchData<
|
|
130
|
+
ListClassicReturn<Organisation>
|
|
131
|
+
>({
|
|
132
|
+
api: 0,
|
|
133
|
+
path: "organisation/search",
|
|
134
|
+
parameters: {
|
|
135
|
+
query: query,
|
|
136
|
+
first: 0,
|
|
137
|
+
size: maxElement.value,
|
|
166
138
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
139
|
+
});
|
|
140
|
+
let notNullOrga = response.result.filter((o: Organisation | null) => {
|
|
141
|
+
return null !== o;
|
|
142
|
+
});
|
|
143
|
+
if (getDefaultOrganisation.value) {
|
|
144
|
+
notNullOrga.unshift(getDefaultOrganisation.value);
|
|
145
|
+
}
|
|
146
|
+
if (myOrganisation.value) {
|
|
147
|
+
if (undefined === query) {
|
|
148
|
+
notNullOrga = notNullOrga.filter((obj: Organisation) => {
|
|
149
|
+
return obj.id !== authStore.authOrgaId;
|
|
150
|
+
});
|
|
151
|
+
notNullOrga.splice(1, 0, myOrganisation.value);
|
|
152
|
+
} else {
|
|
153
|
+
const foundIndex = notNullOrga.findIndex(
|
|
154
|
+
(obj: Organisation) => obj.id === authStore.authOrgaId,
|
|
170
155
|
);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
156
|
+
if (foundIndex) {
|
|
157
|
+
notNullOrga[foundIndex] = myOrganisation.value;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
(selectOrganisationRef?.value as InstanceType<typeof ClassicMultiselect>).afterSearch(notNullOrga, response.count);
|
|
162
|
+
}
|
|
163
|
+
async function fetchOrganisation(): Promise<void> {
|
|
164
|
+
organisationChosen.value = await saveFetchStore.getOrgaData(
|
|
165
|
+
props.orgaIdSelected ?? "",
|
|
166
|
+
);
|
|
167
|
+
initLoaded.value = true;
|
|
168
|
+
}
|
|
175
169
|
</script>
|
|
@@ -4,71 +4,63 @@
|
|
|
4
4
|
v-model:text-init="actual"
|
|
5
5
|
:display-label="false"
|
|
6
6
|
id-select="organisation-chooser-footer"
|
|
7
|
-
:label="
|
|
7
|
+
:label="t('select productor')"
|
|
8
8
|
:transparent="true"
|
|
9
9
|
:options="[
|
|
10
10
|
{ title: organisation.name, value: organisation.id },
|
|
11
|
-
{ title:
|
|
11
|
+
{ title: t('No organisation filter'), value: 'NONE' },
|
|
12
12
|
]"
|
|
13
13
|
class="my-1"
|
|
14
14
|
/>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
|
-
<script lang="ts">
|
|
17
|
+
<script setup lang="ts">
|
|
18
18
|
import ClassicSelect from "../../form/ClassicSelect.vue";
|
|
19
19
|
import { Organisation } from "@/stores/class/general/organisation";
|
|
20
20
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
components:{
|
|
25
|
-
ClassicSelect
|
|
26
|
-
},
|
|
27
|
-
props: {
|
|
28
|
-
value: { default: undefined, type: String },
|
|
29
|
-
reset: { default: false, type: Boolean },
|
|
30
|
-
},
|
|
31
|
-
emits: ["selected"],
|
|
21
|
+
import { Ref, ref, watch } from "vue";
|
|
22
|
+
import { useI18n } from "vue-i18n";
|
|
32
23
|
|
|
33
|
-
data() {
|
|
34
|
-
return {
|
|
35
|
-
actual: "NONE" as string,
|
|
36
|
-
organisation: undefined as Organisation | undefined,
|
|
37
|
-
init: false as boolean,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (!this.init || this.value) {
|
|
47
|
-
this.fetchOrganisation();
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
reset(): void {
|
|
52
|
-
this.actual = "NONE";
|
|
53
|
-
},
|
|
54
|
-
actual(){
|
|
55
|
-
this.$emit(
|
|
56
|
-
"selected",
|
|
57
|
-
"NONE" === this.actual ? undefined : this.organisation,
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
25
|
+
//Props
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
value: { default: undefined, type: String },
|
|
28
|
+
reset: { default: false, type: Boolean },
|
|
29
|
+
})
|
|
61
30
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
31
|
+
//Emits
|
|
32
|
+
const emit = defineEmits(["selected"]);
|
|
33
|
+
|
|
34
|
+
//Data
|
|
35
|
+
const actual = ref("NONE");
|
|
36
|
+
const organisation: Ref<Organisation | undefined> = ref(undefined);
|
|
37
|
+
const init = ref(false);
|
|
38
|
+
|
|
39
|
+
//Composables
|
|
40
|
+
const { t } = useI18n();
|
|
41
|
+
const SaveFetchStore = useSaveFetchStore();
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
//Watch
|
|
45
|
+
watch(()=>props.value, async () => {
|
|
46
|
+
if (!init.value || props.value) {
|
|
47
|
+
fetchOrganisation();
|
|
48
|
+
}
|
|
49
|
+
}, {deep: true, immediate: true});
|
|
50
|
+
watch(()=>props.reset, async () => {
|
|
51
|
+
actual.value = "NONE";
|
|
52
|
+
});
|
|
53
|
+
watch(actual, async () => {
|
|
54
|
+
emit("selected","NONE" === actual.value ? undefined : organisation.value);
|
|
73
55
|
});
|
|
56
|
+
|
|
57
|
+
//Methods
|
|
58
|
+
async function fetchOrganisation(): Promise<void> {
|
|
59
|
+
if (!props.value) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
organisation.value = await SaveFetchStore.getOrgaData(props.value);
|
|
63
|
+
actual.value = organisation.value.id;
|
|
64
|
+
init.value = true;
|
|
65
|
+
}
|
|
74
66
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="d-flex flex-column p-3 list-participants">
|
|
3
3
|
<h2 class="mb-3">{{ title }}</h2>
|
|
4
4
|
<ClassicLoading
|
|
5
|
-
:loading-text="loading ?
|
|
5
|
+
:loading-text="loading ? t('Loading participants ...') : undefined"
|
|
6
6
|
/>
|
|
7
7
|
<SwiperList
|
|
8
8
|
v-if="!loading && allParticipants.length"
|
|
@@ -25,76 +25,60 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script lang="ts">
|
|
28
|
+
<script setup lang="ts">
|
|
29
29
|
import ParticipantItem from "./ParticipantItem.vue";
|
|
30
30
|
import SwiperList from "../list/SwiperList.vue";
|
|
31
31
|
import classicApi from "../../../api/classicApi";
|
|
32
32
|
import {useErrorHandler} from "../../composable/useErrorHandler";
|
|
33
33
|
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
34
|
-
import {
|
|
34
|
+
import { onMounted, Ref, ref } from "vue";
|
|
35
35
|
import { AxiosError } from "axios";
|
|
36
36
|
import { ListClassicReturn } from "@/stores/class/general/listReturn";
|
|
37
37
|
import { Participant } from "@/stores/class/general/participant";
|
|
38
|
-
|
|
39
|
-
name: "ParticipantInlineList",
|
|
38
|
+
import { useI18n } from "vue-i18n";
|
|
40
39
|
|
|
41
|
-
components: {
|
|
42
|
-
ParticipantItem,
|
|
43
|
-
ClassicLoading,
|
|
44
|
-
SwiperList,
|
|
45
|
-
},
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
const {handle403} = useErrorHandler();
|
|
56
|
-
return { handle403 }
|
|
57
|
-
},
|
|
41
|
+
//Props
|
|
42
|
+
const props = defineProps({
|
|
43
|
+
organisationId: { default: undefined, type: String },
|
|
44
|
+
href: { default: undefined, type: String },
|
|
45
|
+
buttonText: { default: undefined, type: String },
|
|
46
|
+
itemSize: { default: undefined, type: Number },
|
|
47
|
+
title: { default: "", type: String },
|
|
48
|
+
})
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
//Data
|
|
51
|
+
const loading = ref(true);
|
|
52
|
+
const allParticipants: Ref<Array<Participant>> = ref([]);
|
|
53
|
+
|
|
54
|
+
//Composables
|
|
55
|
+
const { t } = useI18n();
|
|
56
|
+
const {handle403} = useErrorHandler();
|
|
65
57
|
|
|
66
|
-
|
|
67
|
-
this.fetchNext();
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
async fetchNext(): Promise<void> {
|
|
71
|
-
try {
|
|
72
|
-
const data = await classicApi.fetchData<ListClassicReturn<Participant>>({
|
|
73
|
-
api: 0,
|
|
74
|
-
path: "participant/search",
|
|
75
|
-
parameters: {
|
|
76
|
-
first: 0,
|
|
77
|
-
size: 12,
|
|
78
|
-
organisationId: this.organisationId,
|
|
79
|
-
order: "LAST_PODCAST_DESC",
|
|
80
|
-
},
|
|
81
|
-
specialTreatement: true,
|
|
82
|
-
});
|
|
83
|
-
this.allParticipants = this.allParticipants.concat(
|
|
84
|
-
data.result.filter((part: Participant | null) => null !== part),
|
|
85
|
-
);
|
|
86
|
-
this.loading = false;
|
|
87
|
-
} catch (error) {
|
|
88
|
-
this.handle403(error as AxiosError);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
58
|
+
onMounted(()=>fetchNext())
|
|
91
59
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
60
|
+
//Methods
|
|
61
|
+
async function fetchNext(): Promise<void> {
|
|
62
|
+
try {
|
|
63
|
+
const data = await classicApi.fetchData<ListClassicReturn<Participant>>({
|
|
64
|
+
api: 0,
|
|
65
|
+
path: "participant/search",
|
|
66
|
+
parameters: {
|
|
67
|
+
first: 0,
|
|
68
|
+
size: 12,
|
|
69
|
+
organisationId: props.organisationId,
|
|
70
|
+
order: "LAST_PODCAST_DESC",
|
|
71
|
+
},
|
|
72
|
+
specialTreatement: true,
|
|
73
|
+
});
|
|
74
|
+
allParticipants.value = allParticipants.value.concat(
|
|
75
|
+
data.result.filter((part: Participant | null) => null !== part),
|
|
76
|
+
);
|
|
77
|
+
loading.value = false;
|
|
78
|
+
} catch (error) {
|
|
79
|
+
handle403(error as AxiosError);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
98
82
|
</script>
|
|
99
83
|
<style lang="scss">
|
|
100
84
|
.octopus-app {
|