mobile
This commit is contained in:
@@ -18,6 +18,7 @@ import { notifyApiError, notifySuccess } from '@/api/errors'
|
||||
import { activateSet, archiveSet, createSet, fetchSets, renameSet } from '@/api/sets'
|
||||
import type { AttractionSet } from '@/api/types'
|
||||
import { AreaTreeSelect } from '@/components/AreaTreeSelect'
|
||||
import { useIsMobile } from '@/hooks/useIsMobile'
|
||||
import { setStatusMeta } from '@/utils/format'
|
||||
import { SetItemsModal } from '@/pages/sets/SetItemsModal'
|
||||
|
||||
@@ -27,6 +28,7 @@ interface NameFormValues {
|
||||
|
||||
export function SetListPage() {
|
||||
const queryClient = useQueryClient()
|
||||
const isMobile = useIsMobile()
|
||||
const [searchParams, setSearchParams] = useSearchParams()
|
||||
const [areaId, setAreaId] = useState<string | null>(searchParams.get('area'))
|
||||
const [createOpen, setCreateOpen] = useState(false)
|
||||
@@ -165,14 +167,24 @@ export function SetListPage() {
|
||||
<Typography.Title level={3} className="page-title">
|
||||
Наборы
|
||||
</Typography.Title>
|
||||
<Space>
|
||||
<Space
|
||||
size="middle"
|
||||
direction={isMobile ? 'vertical' : 'horizontal'}
|
||||
style={isMobile ? { width: '100%' } : undefined}
|
||||
>
|
||||
<AreaTreeSelect
|
||||
value={areaId}
|
||||
onChange={changeArea}
|
||||
placeholder="Зона (обязательно)"
|
||||
allowClear
|
||||
style={isMobile ? { width: '100%' } : undefined}
|
||||
/>
|
||||
<Button type="primary" disabled={!areaId} onClick={() => setCreateOpen(true)}>
|
||||
<Button
|
||||
type="primary"
|
||||
block={isMobile}
|
||||
disabled={!areaId}
|
||||
onClick={() => setCreateOpen(true)}
|
||||
>
|
||||
Создать набор
|
||||
</Button>
|
||||
</Space>
|
||||
@@ -186,6 +198,7 @@ export function SetListPage() {
|
||||
columns={columns}
|
||||
dataSource={sets}
|
||||
loading={setsQuery.isLoading}
|
||||
scroll={{ x: 'max-content' }}
|
||||
pagination={false}
|
||||
locale={{ emptyText: <Empty description="В зоне пока нет наборов" /> }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user