summaryrefslogtreecommitdiff
path: root/src/services/contractors
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-26 01:56:04 +0300
committereug-vs <eug-vs@keemail.me>2021-03-26 01:56:04 +0300
commitef742ea9b2f246f74eae74169675a331679ad41c (patch)
tree693e92f3e6c2897038875550a12bbc1191b6d5c0 /src/services/contractors
parent865b41114060765308d560181f4996c0aa7a3e74 (diff)
downloadcommercel-ui-ef742ea9b2f246f74eae74169675a331679ad41c.tar.gz
feat: add strong typing where possible
Diffstat (limited to 'src/services/contractors')
-rw-r--r--src/services/contractors/ContractorPanel.tsx3
-rw-r--r--src/services/contractors/index.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/services/contractors/ContractorPanel.tsx b/src/services/contractors/ContractorPanel.tsx
index f7ed8ad..6e703b5 100644
--- a/src/services/contractors/ContractorPanel.tsx
+++ b/src/services/contractors/ContractorPanel.tsx
@@ -1,9 +1,10 @@
import React from 'react';
import Button from '../../components/Button';
import { PanelProps } from '../../lib/ServiceContext';
+import { Contractor } from '../types';
-const ContractorPanel: React.FC<PanelProps> = ({ item }) => {
+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">
diff --git a/src/services/contractors/index.ts b/src/services/contractors/index.ts
index 2341f3a..9730eff 100644
--- a/src/services/contractors/index.ts
+++ b/src/services/contractors/index.ts
@@ -1,8 +1,9 @@
import Form from './ContractorForm';
import Panel from './ContractorPanel';
import { ServiceParams } from '../../lib/ServiceContext';
+import { Contractor } from '../types';
-const service: ServiceParams = {
+const service: ServiceParams<Contractor> = {
route: 'contractors',
name: 'Контрагенты',
nameSingular: 'Контрагент',