Merged develop into feature/VBV-689-person-cs-error
This commit is contained in:
commit
685ef5f828
Binary file not shown.
Binary file not shown.
|
|
@ -11,7 +11,18 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</nav>
|
</nav>
|
||||||
<main v-if="feedbackData">
|
<main v-if="feedbackData">
|
||||||
<h1 class="mb-2">{{ $t("feedback.feedbackPageTitle") }}</h1>
|
<div class="flex items-center justify-between">
|
||||||
|
<h2 class="mb-2">{{ $t("feedback.feedbackPageTitle") }}</h2>
|
||||||
|
<button
|
||||||
|
v-if="feedbackType == 'uk'"
|
||||||
|
class="flex"
|
||||||
|
data-cy="export-button"
|
||||||
|
@click="exportData"
|
||||||
|
>
|
||||||
|
<it-icon-export></it-icon-export>
|
||||||
|
<span class="ml inline-block">{{ $t("a.Als Excel exportieren") }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<p class="mb-10">
|
<p class="mb-10">
|
||||||
<span class="font-bold" data-cy="feedback-data-amount">
|
<span class="font-bold" data-cy="feedback-data-amount">
|
||||||
{{ feedbackData.amount }}
|
{{ feedbackData.amount }}
|
||||||
|
|
@ -37,6 +48,9 @@ import type { FeedbackData, FeedbackType } from "@/types";
|
||||||
import FeedbackPageVV from "@/pages/cockpit/FeedbackPageVV.vue";
|
import FeedbackPageVV from "@/pages/cockpit/FeedbackPageVV.vue";
|
||||||
import FeedbackPageUK from "@/pages/cockpit/FeedbackPageUK.vue";
|
import FeedbackPageUK from "@/pages/cockpit/FeedbackPageUK.vue";
|
||||||
import { useExpertCockpitPageData } from "@/pages/cockpit/cockpitPage/composables";
|
import { useExpertCockpitPageData } from "@/pages/cockpit/cockpitPage/composables";
|
||||||
|
import { exportFeedback } from "@/services/dashboard";
|
||||||
|
import { useUserStore } from "@/stores/user";
|
||||||
|
import { openDataAsXls } from "@/utils/export";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
courseSlug: string;
|
courseSlug: string;
|
||||||
|
|
@ -46,9 +60,22 @@ const props = defineProps<{
|
||||||
log.debug("FeedbackPage created", props.circleId);
|
log.debug("FeedbackPage created", props.circleId);
|
||||||
const { loading } = useExpertCockpitPageData(props.courseSlug);
|
const { loading } = useExpertCockpitPageData(props.courseSlug);
|
||||||
const courseSession = useCurrentCourseSession();
|
const courseSession = useCurrentCourseSession();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
const feedbackData = ref<FeedbackData | undefined>(undefined);
|
const feedbackData = ref<FeedbackData | undefined>(undefined);
|
||||||
const feedbackType = ref<FeedbackType | undefined>(undefined);
|
const feedbackType = ref<FeedbackType | undefined>(undefined);
|
||||||
|
|
||||||
|
async function exportData() {
|
||||||
|
const data = await exportFeedback(
|
||||||
|
{
|
||||||
|
courseSessionIds: [Number(courseSession.value.id)],
|
||||||
|
circleIds: [Number(props.circleId)],
|
||||||
|
},
|
||||||
|
userStore.language
|
||||||
|
);
|
||||||
|
openDataAsXls(data.encoded_data, data.file_name);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("FeedbackPage mounted");
|
log.debug("FeedbackPage mounted");
|
||||||
feedbackData.value = await itGet(
|
feedbackData.value = await itGet(
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import ItCheckbox from "@/components/ui/ItCheckbox.vue";
|
import ItCheckbox from "@/components/ui/ItCheckbox.vue";
|
||||||
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
import ItDropdownSelect from "@/components/ui/ItDropdownSelect.vue";
|
||||||
import ItPersonRow from "@/components/ui/ItPersonRow.vue";
|
import ItPersonRow from "@/components/ui/ItPersonRow.vue";
|
||||||
import { useCourseSessionDetailQuery } from "@/composables";
|
import { useCourseSessionDetailQuery, useCurrentCourseSession } from "@/composables";
|
||||||
import type { AttendanceUserStatus } from "@/gql/graphql";
|
import type { AttendanceUserStatus } from "@/gql/graphql";
|
||||||
import { ATTENDANCE_CHECK_MUTATION } from "@/graphql/mutations";
|
import { ATTENDANCE_CHECK_MUTATION } from "@/graphql/mutations";
|
||||||
import type { DropdownSelectable } from "@/types";
|
import type { DropdownSelectable } from "@/types";
|
||||||
|
|
@ -13,10 +13,15 @@ import { computed, onMounted, reactive, watch } from "vue";
|
||||||
import { useTranslation } from "i18next-vue";
|
import { useTranslation } from "i18next-vue";
|
||||||
import { ATTENDANCE_CHECK_QUERY } from "@/graphql/queries";
|
import { ATTENDANCE_CHECK_QUERY } from "@/graphql/queries";
|
||||||
import { graphqlClient } from "@/graphql/client";
|
import { graphqlClient } from "@/graphql/client";
|
||||||
|
import { exportAttendance } from "@/services/dashboard";
|
||||||
|
import { openDataAsXls } from "@/utils/export";
|
||||||
|
import { useUserStore } from "@/stores/user";
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const attendanceMutation = useMutation(ATTENDANCE_CHECK_MUTATION);
|
const attendanceMutation = useMutation(ATTENDANCE_CHECK_MUTATION);
|
||||||
const courseSessionDetailResult = useCourseSessionDetailQuery();
|
const courseSessionDetailResult = useCourseSessionDetailQuery();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const courseSession = useCurrentCourseSession();
|
||||||
|
|
||||||
const attendanceCourses = computed(() => {
|
const attendanceCourses = computed(() => {
|
||||||
return courseSessionDetailResult.courseSessionDetail.value?.attendance_courses ?? [];
|
return courseSessionDetailResult.courseSessionDetail.value?.attendance_courses ?? [];
|
||||||
|
|
@ -26,6 +31,13 @@ const courseSessionDetail = computed(() => {
|
||||||
return courseSessionDetailResult.courseSessionDetail.value;
|
return courseSessionDetailResult.courseSessionDetail.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const attendanceCourseCircleId = computed(() => {
|
||||||
|
const selectedAttendandeCourse = attendanceCourses.value.find(
|
||||||
|
(course) => course.id === state.attendanceCourseSelected.id
|
||||||
|
);
|
||||||
|
return selectedAttendandeCourse?.learning_content?.circle?.id;
|
||||||
|
});
|
||||||
|
|
||||||
const presenceCoursesDropdownOptions = computed(() => {
|
const presenceCoursesDropdownOptions = computed(() => {
|
||||||
return attendanceCourses.value.map(
|
return attendanceCourses.value.map(
|
||||||
(attendanceCourse) =>
|
(attendanceCourse) =>
|
||||||
|
|
@ -114,6 +126,17 @@ function editAgain() {
|
||||||
state.attendanceSaved = false;
|
state.attendanceSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function exportData() {
|
||||||
|
const data = await exportAttendance(
|
||||||
|
{
|
||||||
|
courseSessionIds: [Number(courseSession.value.id)],
|
||||||
|
circleIds: [Number(attendanceCourseCircleId.value)],
|
||||||
|
},
|
||||||
|
userStore.language
|
||||||
|
);
|
||||||
|
openDataAsXls(data.encoded_data, data.file_name);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
log.debug("AttendanceCheckPage mounted");
|
log.debug("AttendanceCheckPage mounted");
|
||||||
loadAttendanceData();
|
loadAttendanceData();
|
||||||
|
|
@ -141,8 +164,18 @@ watch(
|
||||||
<span>{{ $t("general.back") }}</span>
|
<span>{{ $t("general.back") }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="pb-4 text-xl font-bold">{{ $t("Anwesenheit Präsenzkurse") }}</div>
|
<div class="flex items-center justify-between">
|
||||||
|
<h3 class="pb-4 text-xl font-bold">{{ $t("Anwesenheit Präsenzkurse") }}</h3>
|
||||||
|
<button
|
||||||
|
v-if="state.attendanceSaved"
|
||||||
|
class="flex"
|
||||||
|
data-cy="export-button"
|
||||||
|
@click="exportData"
|
||||||
|
>
|
||||||
|
<it-icon-export></it-icon-export>
|
||||||
|
<span class="ml inline-block">{{ $t("a.Als Excel exportieren") }}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<section v-if="attendanceCourses.length && state.attendanceCourseSelected">
|
<section v-if="attendanceCourses.length && state.attendanceCourseSelected">
|
||||||
<div class="flex flex-row justify-between bg-white p-6">
|
<div class="flex flex-row justify-between bg-white p-6">
|
||||||
<ItDropdownSelect
|
<ItDropdownSelect
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:gunicorn]
|
[program:gunicorn]
|
||||||
command=newrelic-admin run-program gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker
|
command=newrelic-admin run-program gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker --workers 8 --worker-connections 1000 --backlog 2048 --timeout 60 --keep-alive 3
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stdout_logfile=/dev/stdout
|
stdout_logfile=/dev/stdout
|
||||||
stdout_logfile_maxbytes=0
|
stdout_logfile_maxbytes=0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue