@saooti/octopus-sdk 36.0.13 → 36.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "36.0.13",
3
+ "version": "36.0.15",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -5,8 +5,8 @@
5
5
  width="330"
6
6
  height="330"
7
7
  class="img-box"
8
- :title="$t('Image')+ ' '+radio.name"
9
- :alt="$t('Image')+ ' '+radio.name"
8
+ :title="$t('Canal name image',{name:radio.name})"
9
+ :alt="$t('Canal name image',{name:radio.name})"
10
10
  >
11
11
  <button
12
12
  class="image-play-button"
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="module-box">
3
- <h2 class="big-h2 mb-3 height-40">{{ $t('Program') }}</h2>
3
+ <h2 class="big-h2 mb-3 height-40">
4
+ {{ $t('Program') }}
5
+ </h2>
4
6
  <div class="border">
5
7
  <div class="d-flex align-items-center w-100">
6
8
  <button
@@ -10,8 +12,8 @@
10
12
  :class="day.date==daySelected?'bg-primary text-white':''"
11
13
  @click="changeDate(day.date)"
12
14
  >
13
- <span class="text-capitalize">{{day.dayOfWeek}}</span>
14
- <span>{{day.title}}</span>
15
+ <span class="text-capitalize">{{ day.dayOfWeek }}</span>
16
+ <span>{{ day.title }}</span>
15
17
  </button>
16
18
  </div>
17
19
  <div class="d-flex flex-column p-3">
@@ -20,14 +22,21 @@
20
22
  :error-text="error?$t(`Error`):undefined"
21
23
  />
22
24
  <template v-if="!loading && !error">
23
- <div v-if="!planning[daySelected].length" class="text-center">{{$t('No programming')}}</div>
25
+ <div
26
+ v-if="!planning[daySelected].length"
27
+ class="text-center"
28
+ >
29
+ {{ $t('No programming') }}
30
+ </div>
24
31
  <div
25
- v-else
26
32
  v-for="planningItem in planning[daySelected]"
27
- :key="planningItem.occurrence.occurrenceId"
33
+ v-else
34
+ :key="planningItem.occurrence.occurrenceId +''+ planningItem.occurrence.liveId"
28
35
  class="d-flex align-items-center mb-3"
29
36
  >
30
- <div class="program-item-date fw-bold flex-shrink-0">{{dateDisplay(planningItem.occurrence.startDate)}}</div>
37
+ <div class="program-item-date fw-bold flex-shrink-0">
38
+ {{ dateDisplay(planningItem.occurrence.startDate) }}
39
+ </div>
31
40
  <component
32
41
  :is="planningItem.podcast.availability.visibility ? 'router-link' : 'div'"
33
42
  class="d-flex align-items-center text-dark"
@@ -46,13 +55,23 @@
46
55
  :alt="$t('Episode name image', {name:planningItem.podcast.title})"
47
56
  >
48
57
  <div class="d-flex flex-column">
49
- <div class="flex-grow-1 text-truncate mb-2">{{planningItem.occurrence.podcastData.title}}</div>
58
+ <div class="d-flex align-items-center mb-2">
59
+ <div
60
+ v-if="planningItem.occurrence.liveId"
61
+ class="bg-complementary text-white p-1 me-1"
62
+ >
63
+ {{ $t('Live') }}
64
+ </div>
65
+ <div class="flex-grow-1 text-truncate">
66
+ {{ planningItem.occurrence.podcastData.title }}
67
+ </div>
68
+ </div>
69
+
50
70
  <ParticipantDescription
51
71
  :participants="planningItem.podcast.animators"
52
72
  />
53
73
  </div>
54
74
  </component>
55
-
56
75
  </div>
57
76
  </template>
58
77
  </div>
@@ -74,6 +93,7 @@ import { defineComponent } from 'vue';
74
93
  import { Canal } from '@/stores/class/radio/canal';
75
94
  import { PlanningOccurrence } from '@/stores/class/radio/recurrence';
76
95
  import { Podcast } from '@/stores/class/general/podcast';
96
+ import { PlanningLive } from '@/stores/class/radio/live';
77
97
  export default defineComponent({
78
98
  name: 'RadioPlanning',
79
99
 
@@ -90,7 +110,7 @@ export default defineComponent({
90
110
 
91
111
  data() {
92
112
  return {
93
- planning: {} as {[key: number]:Array<{podcast: Podcast, occurrence: PlanningOccurrence}>},
113
+ planning: {} as {[key: number]:Array<{podcast: Podcast, occurrence: PlanningOccurrence|PlanningLive}>},
94
114
  daySelected: dayjs().valueOf(),
95
115
  arrayDays: [] as Array<{title: string, date: number, dayOfWeek: string }>,
96
116
  loading: true as boolean,
@@ -128,11 +148,17 @@ export default defineComponent({
128
148
  this.loading = true;
129
149
  this.error = false;
130
150
  try {
131
- const occurrences = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'planning/occurrence/list',{
151
+ const params = {
132
152
  canalId: this.radio?.id,
133
153
  from: this.startOfDay,
134
154
  to: this.endOfDay
135
- });
155
+ };
156
+ let occurrences: Array<PlanningOccurrence|PlanningLive> = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'planning/occurrence/list',params);
157
+ const lives = await octopusApi.fetchDataWithParams<Array<PlanningOccurrence>>( 14, 'live/list',params);
158
+ if(lives.length){
159
+ occurrences = occurrences.concat(lives);
160
+ occurrences.sort((a,b) => (a.startDate > b.startDate) ? 1 : ((b.startDate > a.startDate) ? -1 : 0))
161
+ }
136
162
  this.planning[this.daySelected] = [];
137
163
  for (let oc of occurrences) {
138
164
  if(oc.podcastId){
@@ -113,7 +113,7 @@ export default defineComponent({
113
113
  size: this.dsize,
114
114
  query: this.query,
115
115
  organisationId: this.organisation,
116
- ambianceType:"NONE",
116
+ type:"NONE",
117
117
  sort: this.sort,
118
118
  };
119
119
  try {
package/src/locale/de.ts CHANGED
@@ -322,4 +322,7 @@ export default{
322
322
  'In the process of being published': 'Im Prozess der Veröffentlichung',
323
323
  "Radio":"Radio",
324
324
  "Currently":"Momentan",
325
+ "Program":"Programm",
326
+ "No programming":"Nicht programmieren",
327
+ 'Canal name image': 'Kanalbild {name}',
325
328
  }
package/src/locale/en.ts CHANGED
@@ -329,4 +329,7 @@ export default{
329
329
  'In the process of being published': 'In the process of being published',
330
330
  "Radio":"Radio",
331
331
  "Currently":"Currently",
332
+ "Program":"Program",
333
+ "No programming":"No programming",
334
+ 'Canal name image': 'Channel image {name}',
332
335
  };
package/src/locale/es.ts CHANGED
@@ -322,4 +322,7 @@ export default{
322
322
  'In the process of being published': 'En proceso de publicación',
323
323
  "Radio":"Radio",
324
324
  "Currently":"Actualmente",
325
+ "Program":"Programa",
326
+ "No programming":"No programa",
327
+ 'Canal name image': 'Imagen del canal {name}',
325
328
  }
package/src/locale/fr.ts CHANGED
@@ -329,7 +329,7 @@ export default{
329
329
  'In the process of being published': 'En cours de publication',
330
330
  "Radio":"Radio",
331
331
  "Currently":"Actuellement",
332
-
333
332
  "Program":"Programme",
334
333
  "No programming":"Aucune programmation",
334
+ 'Canal name image': 'Image du canal {name}',
335
335
  };
package/src/locale/it.ts CHANGED
@@ -319,4 +319,7 @@ export default{
319
319
  'In the process of being published': 'In corso di pubblicazione',
320
320
  "Radio":"Radio",
321
321
  "Currently":"Attualmente",
322
+ "Program":"Programma",
323
+ "No programming":"Non programmazione",
324
+ 'Canal name image': 'Immagine del canale {name}',
322
325
  };
package/src/locale/sl.ts CHANGED
@@ -322,4 +322,7 @@ export default{
322
322
  'In the process of being published': 'V postopku objave',
323
323
  "Radio":"Radio",
324
324
  "Currently":"Trenutno",
325
+ "Program":"Program",
326
+ "No programming":"Ne programiranje",
327
+ 'Canal name image': 'Slika kanala {name}',
325
328
  }