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