Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export default {
access: 'Access',
answers: 'Answers',
answer: 'Answer',
webinars: "Webinars",
'webinars.screenSaves': 'Screen saves',
'menu.Webinars': 'Webinars',
'menu.NewWebinar': 'New webinar',
'menu.Courses': 'Courses',
Expand Down
6 changes: 6 additions & 0 deletions src/locales/pl-PL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ export default {
'menu.Other activities.StationaryEvents': 'Wydarzenia stacjonarne',
'menu.Other activities.Questionnaire Form': 'Ankiety',
'menu.Other activities.Dictionary': 'Słownik',
'menu.Other activities.Word': 'Słowo',
'stationary_event.edit': 'Formularz Wydarzenia stacjonarne',
'menu.My Profile': 'Mój profil',
'menu.My Profile.My Profile': 'Mój profil',
Webinars: "Webinary",
'webinars.screenSaves': 'Zapis Ekranu',
stationary_event: 'Wydarzenie stacjonarne',
'menu.reset': 'reset',
finished_at: 'Data zakończenia',
Expand Down Expand Up @@ -235,6 +240,7 @@ export default {
recording_will_be_deleted: 'Po tym czasie zostanie ono skasowane',
engagement_rating: 'Ocena zaangażowania',
ai_analysis_average: 'Średni wynik analizy AI dla całego nagrania {modelType}.',
ai_warn_video_buffer: "Video nagrania jest obecnie przetwarzane, zdjęcia podglądu nagrania na wykresie w poszczególnych przedziałach czasowych mogą być obecnie niedostępne. Spróbuj ponowanie za kilka minut.",
consultationFragment: "konsultacji",
webinarFragment: "webinaru",
resolution: 'Rozdzielczość danych',
Expand Down
6 changes: 1 addition & 5 deletions src/pages/Consultations/components/EffectivenessAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const EffectivenessAnalysis = ({
page: current,
date_from,
date_to,
...createTableOrderObject(sort, 'term'),
...createTableOrderObject(sort, 'id'),
});

setLoading(false);
Expand All @@ -282,10 +282,6 @@ export const EffectivenessAnalysis = ({
}
}}
columns={columns}
pagination={{
pageSize: 10,
showSizeChanger: true,
}}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ import type {
} from '@/pages/Consultations/components/types';
import { getAnalyticsChartFrames, getModelAnalytics } from '@/services/escola-lms/consultations';
import {
ANALYSIS_COLORS, EmotionKey, formatRating, getLabelColorByValue,
ANALYSIS_COLORS, EmotionKey, formatRating,
getRatingLabelColorByValue
} from '@/utils/utils';
import { PageContainer } from '@ant-design/pro-components';
import { Card, Col, Select, Space, Typography, message } from 'antd';
import React, { useEffect, useMemo, useState } from 'react';
import styled from 'styled-components';
import { FormattedMessage, Link, useParams, useSelectedRoutes } from 'umi';
import {WarningOutlined} from "@ant-design/icons";

const { Text } = Typography;

const PageWrapper = styled.div`
padding: 0;
min-height: 100vh;
background: ${ANALYSIS_COLORS.bgLight};
border-radius: 10px;
`;

const StyledCard = styled(Card)`
Expand Down Expand Up @@ -65,6 +68,20 @@ const SectionTitle = styled(Text)`
font-size: 16px;
`;

const VideoScreenWarning = styled.div`
display: flex;
flex-direction: row;
align-items: center;
gap: 10px;
color: ${ANALYSIS_COLORS.orange};
`;

const VideoScreenWarningText = styled(Text)`
margin: 0;
color: ${ANALYSIS_COLORS.orange};
`;


const TIME_OPTIONS = [
{ value: 15, label: <FormattedMessage id="time.seconds" values={{ value: 15 }} /> },
{ value: 30, label: <FormattedMessage id="time.seconds" values={{ value: 30 }} /> },
Expand All @@ -79,17 +96,11 @@ const EffectivenessAnalysisDetails = () => {
const [analysisMeta, setAnalysisMeta] = useState<AnalysisMeta | null>(null);
const [chartData, setChartData] = useState<ChartPoint[]>([]);
const routes = useSelectedRoutes();
const color = useMemo(
() => getLabelColorByValue(analysisMeta?.rating ? analysisMeta.rating : 0),
[analysisMeta?.rating],
);
const ratingColor = useMemo(
() => getRatingLabelColorByValue(analysisMeta?.rating ? analysisMeta.rating : 0),
[analysisMeta?.rating],
);

console.log(color, 'color');

const modelType = useMemo(() => {
const currentRoute = routes[routes.length - 1]?.route as any;
return currentRoute?.modelType;
Expand Down Expand Up @@ -220,7 +231,14 @@ const EffectivenessAnalysisDetails = () => {
</Select>
</ResolutionPicker>
</ControlsRow>

{analysisMeta?.processing_video && (
<VideoScreenWarning>
<WarningOutlined/>
<VideoScreenWarningText>
<FormattedMessage id="ai_warn_video_buffer"/>
</VideoScreenWarningText>
</VideoScreenWarning>
)}
{chartData && (
<AnalysisCharts
chartData={chartData}
Expand Down
Loading
Loading