From 3f36f908fa9c55d5702bfbb12d9fe9765ee446f0 Mon Sep 17 00:00:00 2001 From: adriano Date: Thu, 4 Sep 2025 09:04:38 -0300 Subject: [PATCH] feat: updated the rule to user see the total client cost --- frontend/components/transcription-table.tsx | 76 +++++++++++---------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/frontend/components/transcription-table.tsx b/frontend/components/transcription-table.tsx index 41ccc65..1a46bbd 100644 --- a/frontend/components/transcription-table.tsx +++ b/frontend/components/transcription-table.tsx @@ -310,22 +310,24 @@ export default function TranscriptionTable() { return (
{/* Card de Informações de Custo */} - {!userIsClient && costInfo && exchangeRate && ( + {costInfo && exchangeRate && (
- - - Custo Total HIT - - - -
- {formatCurrency(convertUsdToBrl(costInfo.total_cost_hit), "BRL")} -
-

- Empresa {costInfo.company_id} • {formatCurrency(costInfo.total_cost_hit, "USD")} -

-
-
+ {!userIsClient && ( + + + Custo Total HIT + + + +
+ {formatCurrency(convertUsdToBrl(costInfo.total_cost_hit), "BRL")} +
+

+ Empresa {costInfo.company_id} • {formatCurrency(costInfo.total_cost_hit, "USD")} +

+
+
+ )} @@ -342,25 +344,27 @@ export default function TranscriptionTable() { - - - Margem - - - -
- {formatCurrency(costInfo.total_client_cost - convertUsdToBrl(costInfo.total_cost_hit), "BRL")} -
-

- {( - ((costInfo.total_client_cost - convertUsdToBrl(costInfo.total_cost_hit)) / - costInfo.total_client_cost) * - 100 - ).toFixed(1)} - % de margem -

-
-
+ {!userIsClient && ( + + + Margem + + + +
+ {formatCurrency(costInfo.total_client_cost - convertUsdToBrl(costInfo.total_cost_hit), "BRL")} +
+

+ {( + ((costInfo.total_client_cost - convertUsdToBrl(costInfo.total_cost_hit)) / + costInfo.total_client_cost) * + 100 + ).toFixed(1)} + % de margem +

+
+
+ )}
)} @@ -492,8 +496,8 @@ export default function TranscriptionTable() { Preço Final LLM ($) Provider LLM {/* Model TTS */} - Provider STT - Preço Final STT ($) + Provider TTS + Preço Final TTS ($) Segundos Transcritos ) : (