putPrivilegies Price fix
This commit is contained in:
parent
8f94ec6492
commit
a7664bd3cd
@ -29,7 +29,7 @@ export const СardPrivilegie = ({ privilege }: CardPrivilegie) => {
|
||||
amount: 1,
|
||||
type: privilege.type,
|
||||
value: privilege.value,
|
||||
price: Number(inputValue),
|
||||
price: 100 * Number(inputValue),
|
||||
});
|
||||
|
||||
if (putedPrivilegieError) {
|
||||
@ -85,20 +85,10 @@ export const СardPrivilegie = ({ privilege }: CardPrivilegie) => {
|
||||
},
|
||||
}}
|
||||
placement="top"
|
||||
title={
|
||||
<Typography sx={{ fontSize: "16px" }}>
|
||||
{privilege.description}
|
||||
</Typography>
|
||||
}
|
||||
title={<Typography sx={{ fontSize: "16px" }}>{privilege.description}</Typography>}
|
||||
>
|
||||
<IconButton disableRipple>
|
||||
<svg
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<svg width="40" height="40" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M9.25 9.25H10V14.5H10.75"
|
||||
stroke="#7E2AEA"
|
||||
@ -118,9 +108,7 @@ export const СardPrivilegie = ({ privilege }: CardPrivilegie) => {
|
||||
</IconButton>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box
|
||||
sx={{ width: "600px", display: "flex", justifyContent: "space-around" }}
|
||||
>
|
||||
<Box sx={{ width: "600px", display: "flex", justifyContent: "space-around" }}>
|
||||
{inputOpen ? (
|
||||
<TextField
|
||||
type="number"
|
||||
@ -147,12 +135,10 @@ export const СardPrivilegie = ({ privilege }: CardPrivilegie) => {
|
||||
/>
|
||||
) : (
|
||||
<div ref={priceRef} style={{ color: "white", marginRight: "5px" }}>
|
||||
price: {privilege.price}
|
||||
price: {privilege.price / 100}
|
||||
</div>
|
||||
)}
|
||||
<Typography sx={{ color: "white" }}>
|
||||
{translationType[privilege.type]}
|
||||
</Typography>
|
||||
<Typography sx={{ color: "white" }}>{translationType[privilege.type]}</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
|
@ -107,9 +107,7 @@ const Users: React.FC = () => {
|
||||
});
|
||||
}, [selectedValue]);
|
||||
|
||||
const [selectedTariffs, setSelectedTariffs] = useState<GridSelectionModel>(
|
||||
[]
|
||||
);
|
||||
const [selectedTariffs, setSelectedTariffs] = useState<GridSelectionModel>([]);
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Button
|
||||
@ -144,9 +142,7 @@ const Users: React.FC = () => {
|
||||
<AccordionSummary
|
||||
sx={{ display: "flex" }}
|
||||
onClick={handleToggleAccordion}
|
||||
expandIcon={
|
||||
<ExpandMoreIcon sx={{ color: theme.palette.secondary.main }} />
|
||||
}
|
||||
expandIcon={<ExpandMoreIcon sx={{ color: theme.palette.secondary.main }} />}
|
||||
aria-controls="panel1a-content"
|
||||
id="panel1a-header"
|
||||
>
|
||||
@ -394,25 +390,11 @@ const Users: React.FC = () => {
|
||||
<ConditionalRender
|
||||
isLoading={false}
|
||||
role={selectedValue}
|
||||
childrenManager={
|
||||
<ServiceUsersDG
|
||||
users={manager}
|
||||
handleSelectionChange={setSelectedTariffs}
|
||||
/>
|
||||
}
|
||||
childrenUser={
|
||||
<ServiceUsersDG
|
||||
users={users}
|
||||
handleSelectionChange={setSelectedTariffs}
|
||||
/>
|
||||
}
|
||||
childrenManager={<ServiceUsersDG users={manager} handleSelectionChange={setSelectedTariffs} />}
|
||||
childrenUser={<ServiceUsersDG users={users} handleSelectionChange={setSelectedTariffs} />}
|
||||
/>
|
||||
</Box>
|
||||
<ModalUser
|
||||
open={openUserModal}
|
||||
setOpen={setOpenUserModal}
|
||||
userId={activeUserId}
|
||||
/>
|
||||
<ModalUser open={openUserModal} setOpen={setOpenUserModal} userId={activeUserId} />
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user