feat: small refactor, address now is telegram

This commit is contained in:
2024-04-28 19:58:41 +03:00
parent 95e256bcff
commit 532bb738bd
10 changed files with 50 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
import {useDebouncedValue} from "@mantine/hooks";
import {Autocomplete, AutocompleteProps, TextInput, TextInputProps} from "@mantine/core";
import {Autocomplete, AutocompleteProps, TextInputProps} from "@mantine/core";
import {FC, useEffect, useState} from "react";
import {Client} from "../../../types/Client.ts";
import {ClientService} from "../../../client";
@@ -71,23 +71,13 @@ const ClientAutocomplete: FC<Props> = ({onSelect, addressRestProps, nameRestProp
} : {}}
/>
{withAddress &&
<TextInput
placeholder={'Клиент: адрес'}
styles={{
input: {
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
}
}}
value={selectedClient?.address || ''}
onChange={event => {
selectClient(prevState => prevState && {...prevState, address: event.target.value})
}}
/>
}
</>
)
}
export default ClientAutocomplete;
export default ClientAutocomplete;