front #8

Merged
mfnefd merged 14 commits from front into dev 2024-12-25 23:49:21 +04:00
Showing only changes of commit 8715e5949b - Show all commits

View File

@ -1,11 +1,12 @@
import { useState } from 'react';
import GreenhouseService, { HistoryData } from '../core/services/greenhouse-service';
import { Greenhouse, GreenhouseInfo, HeatingMode, WateringMode } from '../core/api/data-contracts';
import { useNavigate, useParams } from 'react-router-dom';
import { Link, useNavigate, useParams } from 'react-router-dom';
import GreenhouseDataDisplay from '../components/greenhouse/GreenhouseDataDisplay';
import GreenhouseSettingsForm from '../components/greenhouse/GreenhouseSettingsForm';
import GreenhouseManager from '../components/greenhouse/GreenhouseManager';
import GreenhouseCommandHistoryTable from '../components/greenhouse/GreenhouseCommandTable';
import { Button } from 'antd';
const GreenHousePage = () => {
const { id } = useParams();
@ -26,6 +27,9 @@ const GreenHousePage = () => {
return (
<div style={{ display: 'flex', flexDirection: 'column'}}>
<Button type='primary' className='m-2'>
<Link to={'/greenhouses/' + id + '/statistics'}>Получить статистику по данной теплице</Link>
</Button>
<div style={{ display: 'flex', flexDirection: 'row'}}>
<GreenhouseDataDisplay info={info} />
<GreenhouseManager />