Добавлено новое поле agentCommissionRate в компоненты AccountProfile и AccountProfileCompany для отображения процента комиссии агента. Обновлены соответствующие метки и значения в интерфейсе.

This commit is contained in:
Redsandyg 2025-06-10 14:16:16 +03:00
parent 5380866af3
commit 4e0409949c
2 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,7 @@ interface ProfileData {
registrationDate: string;
company: string;
commissionRate: number;
agentCommissionRate: number;
companyKey: string;
address?: string;
birthDate?: string;
@ -134,6 +135,7 @@ const AccountProfile: React.FC<AccountProfileProps> = ({ onNameChange }) => {
registrationDate: data.create_dttm || "",
company: data.company?.name || "",
commissionRate: data.company?.commission || 0,
agentCommissionRate: data.company?.agent_commission || 0,
companyKey: data.company?.key || "",
});
if (onNameChange) {
@ -176,6 +178,7 @@ const AccountProfile: React.FC<AccountProfileProps> = ({ onNameChange }) => {
company={profileData.company}
companyKey={profileData.companyKey}
commissionRate={profileData.commissionRate}
agentCommissionRate={profileData.agentCommissionRate}
onCopy={handleCopy}
/>
{isEditing && (

View File

@ -6,6 +6,7 @@ interface AccountProfileCompanyProps {
company: string;
companyKey: string;
commissionRate: number;
agentCommissionRate: number;
onCopy: () => void;
}
@ -13,6 +14,7 @@ const AccountProfileCompany: React.FC<AccountProfileCompanyProps> = ({
company,
companyKey,
commissionRate,
agentCommissionRate,
onCopy
}) => (
<div className={styles.card}>
@ -32,9 +34,13 @@ const AccountProfileCompany: React.FC<AccountProfileCompanyProps> = ({
</div>
</div>
<div>
<label className={styles.label}>Процент комиссии</label>
<label className={styles.label}>Процент комиссии компании</label>
<div className={styles.commissionValue}>{commissionRate}%</div>
</div>
<div>
<label className={styles.label}>Процент комиссии агента</label>
<div className={styles.commissionValue}>{agentCommissionRate}%</div>
</div>
</div>
</div>
);