Вот пример как надо писать view:
```
import { Button, Space, Table } from "antd";
import React, { useEffect, useState } from "react";
import { EditOutlined, DeleteOutlined, PlusCircleOutlined } from '@ant-design/icons';
import ProductService from "../../api/services/product-service";
import { ProductDialog } from "../../components/dialogs/product-dialog/ProductDialog";

export const ProductView = ({
    ...props
}) => {
    const columns = [
        {
            title: 'Код',
            dataIndex: 'id',
            key: 'id',
        },
        {
            title: 'Наименование',
            dataIndex: 'title',
            key: 'title',
        },
        {
            title: 'Действия',
            key: 'actions',
            render: (text, record) => {
                return (
                    <Space size="middle">
                        <div onClick={() => updateRecordHandler(record)}>
                            <EditOutlined />
                        </div>
                        <div onClick={() => deleteRecordHandler(record.id)}>
                            <DeleteOutlined />
                        </div>
                    </Space>
                )
            }
        }
    ];

    const [list, setList] = useState([]);
    const [currentRecord, setCurrentRecord] = useState(null);
    const [visible, setVisible] = useState(false);

    useEffect(() => {
        const fetchData = async () => {
            const records = await ProductService.getAllRecords();
            setList(records);
        };
  
        fetchData();
    }, []);

    const createRecordHandler = () => {
        setCurrentRecord(null);
        setVisible(true);
    };

    const updateRecordHandler = (record) => {
        setCurrentRecord(record);
        setVisible(true);
    };

    const deleteRecordHandler = async (recordId) => {
        await ProductService.removeRecord(recordId);
        setList(list.filter(item => item.id !== recordId));
    };

    return (
        <div style={{ padding: 16 }}>
            <Table dataSource={list} columns={columns} rowKey="id" />
            <Button type="primary" icon={<PlusCircleOutlined />} onClick={createRecordHandler}>
                Создать
            </Button>
            <ProductDialog
                visible={visible}
                onOk={(record) => {
                    if (currentRecord) {
                        setList(list.map(item => item.id === currentRecord.id ? { ...record } : item));
                    } else {
                        setList([...list, record]);
                    }
                    setCurrentRecord(null);
                    setVisible(false);
                }}
                onCancel={() => setVisible(false)}
                currentRecord={currentRecord}
            />
        </div>
    );
}
```
Теперь для модели department-model:
```
const Sequelize = require('sequelize');
const sequelize = require('../connection');

const DepartmentModel = sequelize.define(
    'department',
    {
        id: {
            type: Sequelize.INTEGER,
            primaryKey: true,
            autoIncrement: true,
            allowNull: false,
        },
        name: {
            type: Sequelize.STRING(50),
            allowNull: false,
        },
    },
    {
		tableName: 'department',
        timestamps: false,      // Отключаем временные метки
    }
);

module.exports = DepartmentModel;
```
Напиши вью DepartmentView.jsx