сервискей для привилегии

This commit is contained in:
Nastya 2024-04-11 22:48:10 +03:00
parent 4f11fb0215
commit 6081e83aee

@ -312,6 +312,17 @@ export const CreatePromocodeForm = ({ createPromocode }: Props) => {
name="privilegeId"
as={Select}
label="Привилегия"
onChange={({ target }: SelectChangeProps) => {
const currentPrivilege = privileges.find(
(item) => item.privilegeId === target.value
);
setFieldValue("serviceKey", currentPrivilege?.serviceKey);
setFieldValue("privilegeId", currentPrivilege?.privilegeId);
}}
sx={{
width: "100%",
border: "2px solid",