Uso somente neste agendamento; não será incluído no cadastro de compromissos.
{hasFinanceTx ? 'Já lançado no financeiro' : `Lançar no financeiro (${DB.money0(svc ? svc.price : manualPrice)})`}
!hasFinanceTx && setF((prev) => ({ ...prev, launchFinance: !prev.launchFinance, financeDueDate: prev.financeDueDate || DB.iso(DB.today) }))} />
{launchFinanceOn &&
{hasFinanceTx ? 'O lançamento já foi criado no financeiro.' : 'Será lançado como A receber nesta data.'}
}
{serviceCoveredByMonthlyBilling && !launchFinanceOn &&
Esta aula já faz parte da mensalidade automática; o lançamento individual ficou desativado por padrão.
}
{'Hor\u00e1rios livres em comum'}
{selectedProIds.length} participante{selectedProIds.length > 1 ? 's' : ''}
{commonFreeSlots.length ? (
{commonFreeSlots.map((slot) => (
setF((prev) => ({ ...prev, start: slot.start, end: slot.end }))}>
{slot.start} - {slot.end}
))}
) : (
{'Nenhum hor\u00e1rio livre encontrado neste dia para todos os selecionados.'}
)}
Não se repete Toda semana
A cada 15 dias Todo mês
{f.repeat !== 'nao' &&
Em branco, os {terms.appt.toLowerCase()}s serão criados por 1 ano.
}
{f.repeat === 'mes' && (
{monthlyWeekendOptions.map((opt) => {opt.label} )}
Quando o mês não tiver esse dia, o sistema usa o último dia válido e depois aplica esta regra.
)}
Confirmado Pendente
0 ? 4 : 10 }}>Dias e horários {apptIsFeminine ? 'das próximas' : 'dos próximos'} {terms.appt.toLowerCase()}s
{weeklyPlanLimit > 0 &&
Este plano permite {weeklyPlanLimit} {weeklyPlanLimit === 1 ? 'dia' : 'dias'} por semana.
}
{['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'].map((dayName, w) => {
const repeatDays = f.repeatDays || {};
const isSelected = !!repeatDays[w];
const limitReached = weeklyPlanLimit > 0 && Object.keys(repeatDays).length >= weeklyPlanLimit;
const isDisabled = !isSelected && limitReached;
return (
{
if (!isSelected) {
if (isDisabled) {
toast(`Este plano permite somente ${weeklyPlanLimit} ${weeklyPlanLimit === 1 ? 'dia' : 'dias'} por semana.`, 'info');
return;
}
setF({ ...f, repeatDays: { ...repeatDays, [w]: { start: f.start || '09:00', end: f.end || '10:00' } } });
} else {
const copy = { ...repeatDays };
delete copy[w];
setF({ ...f, repeatDays: copy });
}
}} style={{
padding: '6px 14px', borderRadius: 20, cursor: isDisabled ? 'not-allowed' : 'pointer', fontSize: 13, fontWeight: 600,
background: isSelected ? 'var(--primary)' : 'var(--surface-3)',
color: isSelected ? '#fff' : 'var(--text-1)',
border: isSelected ? '1px solid var(--primary)' : '1px solid var(--border)',
transition: 'all 0.2s', userSelect: 'none', opacity: isDisabled ? .5 : 1
}}>
{dayName.substring(0, 3)}
);
})}
{Object.keys(f.repeatDays || {}).length > 0 && (
{Object.keys(f.repeatDays || {}).map((wStr) => {
const w = Number(wStr);
const rd = (f.repeatDays || {})[w];
return (
{['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'][w]}
{
const st = e.target.value;
const ed = st ? defaultEnd(st, effectiveServiceId) : rd.end;
setF({ ...f, repeatDays: { ...f.repeatDays, [w]: { start: st, end: ed } } });
}}>
Início
{times.map(t => {t} )}
até
{
setF({ ...f, repeatDays: { ...f.repeatDays, [w]: { ...rd, end: e.target.value } } });
}}>
Fim
{endTimes.map(t => {t} )}
);
})}
)}
A partir do dia seguinte {apptIsFeminine ? 'à primeira' : 'ao primeiro'} {terms.appt.toLowerCase()}, os dias selecionados gerarão repetições semanais nos horários definidos, até a data final ou por 1 ano se ela ficar em branco.