fear: change requests to RTK query
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good
This commit is contained in:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user