panel minor fixes
Some checks failed
Deploy on push / deploy (push) Failing after 4m20s

This commit is contained in:
2025-09-16 11:48:19 +03:00
parent 78bc110685
commit 4ea32e3b83
11 changed files with 64 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
import { createEffect, createSignal, Show } from 'solid-js'
import { useData } from '../context/data'
import type { Role } from '../graphql/generated/schema'
import type { Role } from '../graphql/generated/graphql'
import {
GET_COMMUNITY_ROLE_SETTINGS_QUERY,
GET_COMMUNITY_ROLES_QUERY,

View File

@@ -1,6 +1,6 @@
import { Component, createMemo, createSignal, Show } from 'solid-js'
import { query } from '../graphql'
import { EnvVariable } from '../graphql/generated/schema'
import { EnvVariable } from '../graphql/generated/graphql'
import { ADMIN_UPDATE_ENV_VARIABLE_MUTATION } from '../graphql/mutations'
import formStyles from '../styles/Form.module.css'
import Button from '../ui/Button'

View File

@@ -1,5 +1,5 @@
import { Component, createEffect, createSignal, For, Show } from 'solid-js'
import type { AdminUserInfo } from '../graphql/generated/schema'
import type { AdminUserInfo } from '../graphql/generated/graphql'
import formStyles from '../styles/Form.module.css'
import Button from '../ui/Button'
import Modal from '../ui/Modal'
@@ -76,7 +76,7 @@ const UserEditModal: Component<UserEditModalProps> = (props) => {
email: props.user.email || '',
name: props.user.name || '',
slug: props.user.slug || '',
roles: (props.user.roles || []).map((roleName) => {
roles: (props.user.roles || []).map((roleName: string) => {
// Сначала пробуем найти по русскому названию (для обратной совместимости)
const russianId = ROLE_NAME_TO_ID[roleName]
if (russianId) return russianId
@@ -119,7 +119,7 @@ const UserEditModal: Component<UserEditModalProps> = (props) => {
email: props.user.email || '',
name: props.user.name || '',
slug: props.user.slug || '',
roles: (props.user.roles || []).map((roleName) => {
roles: (props.user.roles || []).map((roleName: string) => {
// Сначала пробуем найти по русскому названию (для обратной совместимости)
const russianId = ROLE_NAME_TO_ID[roleName]
if (russianId) return russianId
@@ -161,7 +161,7 @@ const UserEditModal: Component<UserEditModalProps> = (props) => {
const isCurrentlySelected = currentRoles.includes(roleId)
const newRoles = isCurrentlySelected
? currentRoles.filter((r) => r !== roleId) // Убираем роль
? currentRoles.filter((r: string) => r !== roleId) // Убираем роль
: [...currentRoles, roleId] // Добавляем роль
console.log('Current roles before:', currentRoles)
@@ -215,7 +215,7 @@ const UserEditModal: Component<UserEditModalProps> = (props) => {
await props.onSave({
...formData(),
// Конвертируем ID ролей обратно в названия для сервера
roles: (formData().roles || []).map((roleId) => ROLE_ID_TO_NAME[roleId]).join(',')
roles: (formData().roles || []).map((roleId: string) => ROLE_ID_TO_NAME[roleId]).join(',')
})
props.onClose()
} catch (error) {

View File

@@ -1,5 +1,5 @@
import { Component, For } from 'solid-js'
import type { AdminShoutInfo, Maybe, Topic } from '../graphql/generated/schema'
import { AdminShoutInfo, Maybe, Topic } from '~/graphql/generated/graphql'
import styles from '../styles/Modal.module.css'
import CodePreview from '../ui/CodePreview'
import Modal from '../ui/Modal'