Entrega dashboard e correccoes transversais preservando Ofertas instalado
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import CurrencySelect from '@/components/currency-select';
|
||||
import { useEffect, useState } from 'react';
|
||||
import {
|
||||
compareBusinessScenarios,
|
||||
@@ -23,48 +24,48 @@ const emptyPlan: BusinessFinancialPlanInput = {
|
||||
fxRate: '',
|
||||
fxDate: '',
|
||||
fxSource: '',
|
||||
openingCash: '0',
|
||||
openingCash: '',
|
||||
products: [
|
||||
{
|
||||
label: 'Produto ou serviço',
|
||||
monthlyUnits: '100',
|
||||
unitPrice: '1000',
|
||||
unitVariableCost: '400',
|
||||
monthlyUnits: '',
|
||||
unitPrice: '',
|
||||
unitVariableCost: '',
|
||||
},
|
||||
],
|
||||
monthlyCollections: '100000',
|
||||
monthlyCollections: '',
|
||||
salesCollectionLagMonths: null,
|
||||
salesCollectionPercent: '100',
|
||||
salesCollectionPercent: '',
|
||||
salesRecoverySchedule: [],
|
||||
openingReceivablesCollectionMonth: null,
|
||||
openingReceivablesCollectionPercent: '100',
|
||||
openingReceivablesCollectionPercent: '',
|
||||
openingReceivablesInstallments: [],
|
||||
openingPayablesInstallments: [],
|
||||
monthlyVariableCostPayments: '40000',
|
||||
monthlyVariableCostPayments: '',
|
||||
monthlyVariableCostPaymentsByPeriod: null,
|
||||
monthlyInventoryPurchases: '40000',
|
||||
monthlyInventoryPurchases: '',
|
||||
inventoryPurchaseLeadMonths: 0,
|
||||
inventoryPurchaseSchedule: null,
|
||||
useInventoryPurchaseSchedule: false,
|
||||
useProductInventorySchedule: false,
|
||||
useSupplierPaymentTerms: false,
|
||||
monthlyOperatingExpenses: '20000',
|
||||
monthlyOperatingPayments: '20000',
|
||||
monthlyPayrollExpense: '15000',
|
||||
monthlyPayrollPayments: '15000',
|
||||
assetInvestment: '100000',
|
||||
inventory: '20000',
|
||||
receivables: '10000',
|
||||
payables: '5000',
|
||||
equity: '80000',
|
||||
shareholderLoans: '0',
|
||||
bankLoanProceeds: '50000',
|
||||
grants: '0',
|
||||
assetDepreciation: '100000',
|
||||
monthlyOperatingExpenses: '',
|
||||
monthlyOperatingPayments: '',
|
||||
monthlyPayrollExpense: '',
|
||||
monthlyPayrollPayments: '',
|
||||
assetInvestment: '',
|
||||
inventory: '',
|
||||
receivables: '',
|
||||
payables: '',
|
||||
equity: '',
|
||||
shareholderLoans: '',
|
||||
bankLoanProceeds: '',
|
||||
grants: '',
|
||||
assetDepreciation: '',
|
||||
depreciationLifeMonths: 60,
|
||||
monthlyInterestExpense: '0',
|
||||
monthlyInterestPayment: '0',
|
||||
monthlyPrincipalRepayment: '0',
|
||||
monthlyInterestExpense: '',
|
||||
monthlyInterestPayment: '',
|
||||
monthlyPrincipalRepayment: '',
|
||||
periods: 12,
|
||||
};
|
||||
|
||||
@@ -913,30 +914,23 @@ export function SimulationBusinessPlan({
|
||||
</div>
|
||||
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<label className="block text-sm font-medium">
|
||||
Moeda (código ISO)
|
||||
<input
|
||||
list="plan-currency-options"
|
||||
maxLength={3}
|
||||
pattern="[A-Z]{3}"
|
||||
Moeda
|
||||
<CurrencySelect
|
||||
label="Moeda"
|
||||
codes={simulationCurrencyOptions}
|
||||
value={currency}
|
||||
onChange={(event) => {
|
||||
const value = event.target.value.toUpperCase();
|
||||
onChange={(value) => {
|
||||
onCurrencyChange(value);
|
||||
savePlan({ ...plan, currency: value });
|
||||
}}
|
||||
className="mt-1 w-full rounded border p-2"
|
||||
aria-invalid={Boolean(
|
||||
currency && !isSimulationCurrency(currency),
|
||||
)}
|
||||
error={
|
||||
currency && !isSimulationCurrency(currency)
|
||||
? 'Confirme a moeda seleccionada.'
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</label>
|
||||
<datalist id="plan-currency-options">
|
||||
{simulationCurrencyOptions.map((code) => (
|
||||
<option key={code} value={code}>
|
||||
{code}
|
||||
</option>
|
||||
))}
|
||||
</datalist>
|
||||
|
||||
<p className="text-sm text-slate-700">
|
||||
O plano financeiro aceita moedas ISO suportadas com duas
|
||||
casas decimais. Se um investidor indicar uma moeda com
|
||||
@@ -952,31 +946,22 @@ export function SimulationBusinessPlan({
|
||||
</p>
|
||||
<label className="block text-sm font-medium">
|
||||
Moeda de apresentação (opcional)
|
||||
<input
|
||||
list="plan-presentation-currency-options"
|
||||
maxLength={3}
|
||||
pattern="[A-Z]{3}"
|
||||
<CurrencySelect
|
||||
label="Moeda de apresentação"
|
||||
codes={simulationCurrencyOptions}
|
||||
value={plan.presentationCurrency ?? ''}
|
||||
onChange={(event) =>
|
||||
update(
|
||||
'presentationCurrency',
|
||||
event.target.value.toUpperCase(),
|
||||
)
|
||||
onChange={(value) =>
|
||||
update('presentationCurrency', value)
|
||||
}
|
||||
className="mt-1 w-full rounded border p-2"
|
||||
aria-invalid={Boolean(
|
||||
error={
|
||||
plan.presentationCurrency &&
|
||||
!isSimulationCurrency(plan.presentationCurrency),
|
||||
)}
|
||||
!isSimulationCurrency(plan.presentationCurrency)
|
||||
? 'Confirme a moeda seleccionada.'
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
</label>
|
||||
<datalist id="plan-presentation-currency-options">
|
||||
{simulationCurrencyOptions.map((code) => (
|
||||
<option key={code} value={code}>
|
||||
{code}
|
||||
</option>
|
||||
))}
|
||||
</datalist>
|
||||
|
||||
{plan.presentationCurrency &&
|
||||
plan.presentationCurrency !== currency && (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user