import React, {Component} from 'react'; import {connect} from 'react-redux'; import OrderDocumentsGroup from './OrderDocumentsGroup.jsx'; import {orderTexts} from '../../../constants/ordersConstants'; import WiaasBox from "../../../mainComponents/box/WiaasBox"; import {API_SERVER} from "../../../config"; import FileDownloader from "../../../helpers/FileDownloader"; const fileHandler = new FileDownloader(); class OrderDocuments extends Component { downloadDocument(orderId, document){ const fileUrl = `${API_SERVER}/wp-json/wiaas/order/${orderId}/document/${document.key}`; fileHandler.download(fileUrl, `${document.name}.${document.extension}`); } render() { const {orderInfo} = this.props; return (