feat: prettier

This commit is contained in:
2024-09-27 04:47:04 +03:00
parent c5f839d9ef
commit de4fe450ab
253 changed files with 11322 additions and 10004 deletions

View File

@@ -1,32 +1,32 @@
import PositionsTable from "../../components/PositionsTable/PositionsTable.tsx";
import usePositionsList from "../../hooks/usePositionsList.tsx";
import {PositionSchema, PositionService} from "../../../../client";
import {notifications} from "../../../../shared/lib/notifications.ts";
import { PositionSchema, PositionService } from "../../../../client";
import { notifications } from "../../../../shared/lib/notifications.ts";
const RolesAndPositionsTab = () => {
const {objects: positions, refetch} = usePositionsList();
const { objects: positions, refetch } = usePositionsList();
const onCreate = (position: PositionSchema) => {
PositionService.createPosition({
requestBody: {
data: position
}
}).then(async ({ok, message}) => {
notifications.guess(ok, {message});
data: position,
},
}).then(async ({ ok, message }) => {
notifications.guess(ok, { message });
if (!ok) return;
await refetch();
})
}
});
};
const onDelete = (position: PositionSchema) => {
PositionService.deletePosition({
requestBody: {
positionKey: position.key
}
}).then(async ({ok, message}) => {
notifications.guess(ok, {message});
positionKey: position.key,
},
}).then(async ({ ok, message }) => {
notifications.guess(ok, { message });
if (!ok) return;
await refetch();
})
}
});
};
return (
<PositionsTable
@@ -34,6 +34,6 @@ const RolesAndPositionsTab = () => {
onCreate={onCreate}
onDelete={onDelete}
/>
)
}
export default RolesAndPositionsTab;
);
};
export default RolesAndPositionsTab;