summaryrefslogtreecommitdiff
path: root/src/services/contractors/ContractorPanel.tsx
blob: 6e703b51a33db3f6f533c5c98484ee4e282f24e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react';
import Button from '../../components/Button';
import { PanelProps } from '../../lib/ServiceContext';
import { Contractor } from '../types';


const ContractorPanel: React.FC<PanelProps<Contractor>> = ({ item }) => {
  return (
    <div className="lg:m-4 p-4 flex flex-col lg:pl-16 lg:border-l">
      <span className="text-lg mb-10">
        Долг контрагента: <span className="font-bold">{item.debt}</span>
      </span>
      <div className="grid lg:grid-cols-2">
        <Button route={`/waybills?contractorId=${item._id}`} variant="outlined">
          Показать накладные
        </Button>
        <Button route={`/waybills/add?contractorId=${item._id}`}>
          Новая накладная
        </Button>
        <Button route={`/transfers?contractorId=${item._id}`} variant="outlined">
          Показать переводы
        </Button>
        <Button route={`/transfers/add?contractorId=${item._id}`}>
          Новый перевод
        </Button>
      </div>
    </div>
  );
};

export default ContractorPanel;