feat: format date
This commit is contained in:
parent
3664ddf6d7
commit
2077c83f18
|
|
@ -810,7 +810,7 @@ export type PresenceRecordStatisticsType = {
|
|||
circle_id: Scalars['ID']['output'];
|
||||
course_session_id: Scalars['ID']['output'];
|
||||
details_url: Scalars['String']['output'];
|
||||
due_date: Scalars['String']['output'];
|
||||
due_date: Scalars['DateTime']['output'];
|
||||
generation: Scalars['String']['output'];
|
||||
participants_present: Scalars['Int']['output'];
|
||||
participants_total: Scalars['Int']['output'];
|
||||
|
|
|
|||
|
|
@ -72,12 +72,19 @@ type PresenceRecordStatisticsType {
|
|||
course_session_id: ID!
|
||||
generation: String!
|
||||
circle_id: ID!
|
||||
due_date: String!
|
||||
due_date: DateTime!
|
||||
participants_present: Int!
|
||||
participants_total: Int!
|
||||
details_url: String!
|
||||
}
|
||||
|
||||
"""
|
||||
The `DateTime` scalar type represents a DateTime
|
||||
value as specified by
|
||||
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
|
||||
"""
|
||||
scalar DateTime
|
||||
|
||||
type AttendanceSummaryStatisticsType {
|
||||
_id: ID!
|
||||
days_completed: Int!
|
||||
|
|
@ -126,13 +133,6 @@ type AssignmentStatisticsRecordType {
|
|||
details_url: String!
|
||||
}
|
||||
|
||||
"""
|
||||
The `DateTime` scalar type represents a DateTime
|
||||
value as specified by
|
||||
[iso8601](https://en.wikipedia.org/wiki/ISO_8601).
|
||||
"""
|
||||
scalar DateTime
|
||||
|
||||
type AssignmentCompletionMetricsType {
|
||||
_id: ID!
|
||||
passed_count: Int!
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import type { CourseStatisticsType, PresenceRecordStatisticsType } from "@/gql/g
|
|||
import StatisticFilterList from "@/components/dashboard/StatisticFilterList.vue";
|
||||
import ItProgress from "@/components/ui/ItProgress.vue";
|
||||
import { useCourseStatistics } from "@/composables";
|
||||
import { getDateString } from "@/components/dueDates/dueDatesUtils";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const dashboardStore = useDashboardStore();
|
||||
|
||||
|
|
@ -55,7 +57,9 @@ const attendanceStats = (present: number, total: number) => {
|
|||
</div>
|
||||
<div class="mt-4">
|
||||
{{ $t("a.Termin") }}:
|
||||
{{ (item as PresenceRecordStatisticsType).due_date }}
|
||||
{{
|
||||
getDateString(dayjs((item as PresenceRecordStatisticsType).due_date))
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from django.utils import timezone
|
|||
from vbv_lernwelt.course.models import CourseSessionUser
|
||||
from vbv_lernwelt.course_session.models import CourseSessionAttendanceCourse
|
||||
from vbv_lernwelt.course_session.services.attendance import AttendanceUserStatus
|
||||
from vbv_lernwelt.notify.email.email_services import format_swiss_datetime
|
||||
|
||||
|
||||
class AttendanceSummaryStatisticsType(graphene.ObjectType):
|
||||
|
|
@ -21,7 +20,7 @@ class PresenceRecordStatisticsType(graphene.ObjectType):
|
|||
course_session_id = graphene.ID(required=True)
|
||||
generation = graphene.String(required=True)
|
||||
circle_id = graphene.ID(required=True)
|
||||
due_date = graphene.String(required=True)
|
||||
due_date = graphene.DateTime(required=True)
|
||||
participants_present = graphene.Int(required=True)
|
||||
participants_total = graphene.Int(required=True)
|
||||
details_url = graphene.String(required=True)
|
||||
|
|
@ -71,7 +70,7 @@ def attendance_day_presences(
|
|||
course_session_id=course_session.id, # noqa
|
||||
generation=course_session.generation, # noqa
|
||||
circle_id=circle.id, # noqa
|
||||
due_date=format_swiss_datetime(attendance_day.due_date.end), # noqa
|
||||
due_date=attendance_day.due_date.end, # noqa
|
||||
participants_present=participants_present, # noqa
|
||||
participants_total=participants_total, # noqa
|
||||
details_url=url, # noqa
|
||||
|
|
|
|||
Loading…
Reference in New Issue