1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

[hack] Fix type mismatch TypeScript error

This commit is contained in:
Dmitry Lyzo 2022-02-18 21:36:05 +03:00
parent b278ae3d3d
commit 61d1054c8c
2 changed files with 9 additions and 3 deletions

View file

@ -239,7 +239,7 @@ const UserEditPage: FunctionComponent = () => {
user.Policy.SyncPlayAccess = (page.querySelector('#selectSyncPlayAccess') as HTMLInputElement).value as SyncPlayUserAccessType;
}
window.ApiClient.updateUser(user).then(function () {
window.ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
window.ApiClient.updateUserPolicy(user.Id || '', user.Policy || {}).then(function () {
onSaveComplete();
});
});

View file

@ -1,4 +1,4 @@
import { AccessSchedule, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import { AccessSchedule, DynamicDayOfWeek, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
import globalize from '../../scripts/globalize';
import LibraryMenu from '../../scripts/libraryMenu';
@ -300,7 +300,13 @@ const UserParentalControl: FunctionComponent = () => {
};
(page.querySelector('.btnAddSchedule') as HTMLButtonElement).addEventListener('click', function () {
showSchedulePopup({}, -1);
showSchedulePopup({
Id: 0,
UserId: '',
DayOfWeek: DynamicDayOfWeek.Sunday,
StartHour: 0,
EndHour: 0
}, -1);
});
(page.querySelector('.btnAddBlockedTag') as HTMLButtonElement).addEventListener('click', function () {