From 61063d5bfde93bbd603edd0c0ad44744b3cc37df Mon Sep 17 00:00:00 2001
From: Fabrice Sznajderman
Date: Wed, 3 Apr 2024 09:27:21 +0200
Subject: [PATCH 1/3] adjustments
---
front/src/app/components/fillPercentage.vue | 22 ++++---
front/src/app/components/planning.vue | 11 ++--
front/src/app/components/sub/speaker.vue | 63 ++++++++++++++-----
front/src/app/models.ts | 17 +++--
.../main/scala/org/floxx/api/slotApi.scala | 8 +--
5 files changed, 83 insertions(+), 38 deletions(-)
diff --git a/front/src/app/components/fillPercentage.vue b/front/src/app/components/fillPercentage.vue
index fea3b36..a40ae0d 100644
--- a/front/src/app/components/fillPercentage.vue
+++ b/front/src/app/components/fillPercentage.vue
@@ -5,10 +5,10 @@
-
+
@@ -124,6 +124,7 @@ import CircleProgress from "vue3-circle-progress";
import { defineComponent, ref } from "@vue/runtime-core";
import { useToast } from "vue-toastification";
import speaker from "./sub/speaker.vue";
+import {TrackHitInfo, Slot} from "../models"
import _ from "lodash";
import VueSlider from "vue-slider-component";
import "vue-slider-component/theme/antd.css";
@@ -178,13 +179,14 @@ export default defineComponent({
headers: shared.tokenHandle(),
})
.then((response) => response.json())
- .then((p) => {
+ .then((p:TrackHitInfo) => {
this.title = p.slot.title;
this.kind = p.slot.kind;
this.room = p.slot.roomId;
this.day = p.slot.day;
this.fromTime = p.slot.fromTime;
- initPercentage.bind(this)(p.hitInfo.percentage);
+
+ initPercentage.bind(this)(p.hitInfo);
if (_.isNull(p.overflow)) {
this.value = 0;
} else {
@@ -254,12 +256,12 @@ export default defineComponent({
},
});
-function initPercentage(perc) {
- if (!_.isNull(perc)) {
- this.currentFill = perc;
- this.currentColor = shared.colorByPercentage(perc);
- if (perc == 100) {
- this.switchOverflow.bind(this)(perc);
+function initPercentage(hitInfo) {
+ if (!_.isNull(hitInfo)) {
+ this.currentFill = hitInfo.percentage;
+ this.currentColor = shared.colorByPercentage(hitInfo.percentage);
+ if (hitInfo.percentage == 100) {
+ this.switchOverflow.bind(this)(hitInfo.percentage);
}
}
}
diff --git a/front/src/app/components/planning.vue b/front/src/app/components/planning.vue
index 4fd6c75..3be32c3 100644
--- a/front/src/app/components/planning.vue
+++ b/front/src/app/components/planning.vue
@@ -30,8 +30,6 @@
{{ slot.slot.fromTime }} -
{{ slot.slot.toTime }}
-
-
{{ displayUser(slot.user) }}
@@ -55,6 +53,7 @@
{{ slot.slot.fromTime }} -
{{ slot.slot.toTime }}
+
{{ displayUser(slot.user) }}
@@ -141,6 +140,10 @@
{{ currentConf.fromTime }} -> {{ currentConf.toTime }} - RedCoat :
{{ actualUserNameSelected }}
+
+
Speaker(s) {{ currentConf.slotId.toString() }}
+
+
@@ -394,7 +397,7 @@ export default defineComponent({