сервискей для привилегии
This commit is contained in:
parent
4f11fb0215
commit
6081e83aee
@ -312,6 +312,17 @@ export const CreatePromocodeForm = ({ createPromocode }: Props) => {
|
|||||||
name="privilegeId"
|
name="privilegeId"
|
||||||
as={Select}
|
as={Select}
|
||||||
label="Привилегия"
|
label="Привилегия"
|
||||||
|
|
||||||
|
onChange={({ target }: SelectChangeProps) => {
|
||||||
|
const currentPrivilege = privileges.find(
|
||||||
|
(item) => item.privilegeId === target.value
|
||||||
|
);
|
||||||
|
|
||||||
|
setFieldValue("serviceKey", currentPrivilege?.serviceKey);
|
||||||
|
setFieldValue("privilegeId", currentPrivilege?.privilegeId);
|
||||||
|
|
||||||
|
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
border: "2px solid",
|
border: "2px solid",
|
||||||
|
Loading…
Reference in New Issue
Block a user