From 7924acd23ff0bbd55e8483d9f3d91f7420e82462 Mon Sep 17 00:00:00 2001 From: Redsandyg Date: Sat, 21 Jun 2025 15:02:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=B5=20agentCommissionRate=20=D0=B8=D0=B7?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=20AccountProfile=20=D0=B8=20AccountProfileCompany,=20?= =?UTF-8?q?=D0=B0=20=D1=82=D0=B0=D0=BA=D0=B6=D0=B5=20=D1=81=D0=BE=D0=BE?= =?UTF-8?q?=D1=82=D0=B2=D0=B5=D1=82=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D1=8B?= =?UTF-8?q?=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81=D0=B0?= =?UTF-8?q?.=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D1=8B=20=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=B5=20SaleCa?= =?UTF-8?q?tegoriesTable=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=83?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=81=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3=D0=BE=20API-?= =?UTF-8?q?=D1=8D=D0=BD=D0=B4=D0=BF=D0=BE=D0=B8=D0=BD=D1=82=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AccountProfile.tsx | 3 --- src/components/AccountProfileCompany.tsx | 6 ------ src/components/SaleCategoriesTable.tsx | 6 +++--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/components/AccountProfile.tsx b/src/components/AccountProfile.tsx index 60b547c..d8ccac6 100644 --- a/src/components/AccountProfile.tsx +++ b/src/components/AccountProfile.tsx @@ -23,7 +23,6 @@ interface ProfileData { registrationDate: string; company: string; commissionRate: number; - agentCommissionRate: number; companyKey: string; address?: string; birthDate?: string; @@ -135,7 +134,6 @@ const AccountProfile: React.FC = ({ 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) { @@ -178,7 +176,6 @@ const AccountProfile: React.FC = ({ onNameChange }) => { company={profileData.company} companyKey={profileData.companyKey} commissionRate={profileData.commissionRate} - agentCommissionRate={profileData.agentCommissionRate} onCopy={handleCopy} /> {isEditing && ( diff --git a/src/components/AccountProfileCompany.tsx b/src/components/AccountProfileCompany.tsx index 9fef8b6..083fb26 100644 --- a/src/components/AccountProfileCompany.tsx +++ b/src/components/AccountProfileCompany.tsx @@ -6,7 +6,6 @@ interface AccountProfileCompanyProps { company: string; companyKey: string; commissionRate: number; - agentCommissionRate: number; onCopy: () => void; } @@ -14,7 +13,6 @@ const AccountProfileCompany: React.FC = ({ company, companyKey, commissionRate, - agentCommissionRate, onCopy }) => (
@@ -37,10 +35,6 @@ const AccountProfileCompany: React.FC = ({
{commissionRate}%
-
- -
{agentCommissionRate}%
-
); diff --git a/src/components/SaleCategoriesTable.tsx b/src/components/SaleCategoriesTable.tsx index 5c9c138..b280533 100644 --- a/src/components/SaleCategoriesTable.tsx +++ b/src/components/SaleCategoriesTable.tsx @@ -28,7 +28,7 @@ const SaleCategoriesTable: React.FC = () => { try { const token = Cookies.get("access_token"); if (!token) return; - const res = await fetch("/api/account/category", { + const res = await fetch("/api/category", { method: "GET", headers: { "Content-Type": "application/json", @@ -52,7 +52,7 @@ const SaleCategoriesTable: React.FC = () => { const token = Cookies.get("access_token"); if (!token) return; try { - const res = await fetch("/api/account/category", { + const res = await fetch("/api/category", { method: "POST", headers: { "Content-Type": "application/json", @@ -84,7 +84,7 @@ const SaleCategoriesTable: React.FC = () => { const token = Cookies.get("access_token"); if (!token) return; try { - const res = await fetch("/api/account/category", { + const res = await fetch("/api/category", { method: "POST", headers: { "Content-Type": "application/json",