Updated so the new payment prefills with all of the corporate's payment information

This commit is contained in:
Tiago Ribeiro
2023-12-07 16:36:57 +00:00
parent a526e76c70
commit 6f5dd86cd1
2 changed files with 11 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers,
);
const [userAmount, setUserAmount] = useState(user.type === "corporate" ? user.corporateInformation?.companyInformation.userAmount : undefined);
const [paymentValue, setPaymentValue] = useState(user.type === "corporate" ? user.corporateInformation?.payment?.value : undefined);
const [paymentCurrency, setPaymentCurrency] = useState(user.type === "corporate" ? user.corporateInformation?.payment?.currency : undefined);
const [paymentCurrency, setPaymentCurrency] = useState(user.type === "corporate" ? user.corporateInformation?.payment?.currency : "EUR");
const [monthlyDuration, setMonthlyDuration] = useState(user.type === "corporate" ? user.corporateInformation?.monthlyDuration : undefined);
const {stats} = useStats(user.id);