fear: change requests to RTK query
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good

This commit is contained in:
2025-02-02 11:59:27 +03:00
parent ad1f948641
commit a00aaff29d
12 changed files with 145 additions and 238 deletions

View File

@@ -5,10 +5,8 @@ import { useTranslation } from 'react-i18next';
import MasterActionsMenu from '../MasterActionsMenu';
import { getTimeSlot } from '../../lib';
import EditableWrapper from '../Editable/Editable';
import { armService } from '../../api/arm';
const MasterItem = ({ name, phone, id, schedule }) => {
const { updateMaster } = armService();
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.arm.master',
});
@@ -16,12 +14,7 @@ const MasterItem = ({ name, phone, id, schedule }) => {
return (
<Tr>
<Td>
<EditableWrapper
id={id}
as={'name'}
value={name}
onSubmit={updateMaster}
/>
<EditableWrapper id={id} as={'name'} value={name} />
</Td>
<Td>
{schedule?.length > 0 ? (
@@ -37,12 +30,7 @@ const MasterItem = ({ name, phone, id, schedule }) => {
)}
</Td>
<Td>
<EditableWrapper
id={id}
as={'phone'}
value={phone}
onSubmit={updateMaster}
/>
<EditableWrapper id={id} as={'phone'} value={phone} />
</Td>
<Td>
<MasterActionsMenu id={id} />