fix: validate simulator dates and reconcile QA calculations reports and language
This commit is contained in:
@@ -12,7 +12,7 @@ import { email } from '@/routes/password';
|
||||
export default function ForgotPassword({ status }: { status?: string }) {
|
||||
return (
|
||||
<>
|
||||
<Head title="Forgot password" />
|
||||
<Head title="Recuperar palavra-passe" />
|
||||
|
||||
{status && (
|
||||
<div className="mb-4 text-center text-sm font-medium text-green-600">
|
||||
@@ -25,7 +25,10 @@ export default function ForgotPassword({ status }: { status?: string }) {
|
||||
{({ processing, errors }) => (
|
||||
<>
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="email">Email address</Label>
|
||||
<Label htmlFor="email">
|
||||
{' '}
|
||||
Endereço de correio electrónico{' '}
|
||||
</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
@@ -46,8 +49,8 @@ export default function ForgotPassword({ status }: { status?: string }) {
|
||||
>
|
||||
{processing && (
|
||||
<LoaderCircle className="h-4 w-4 animate-spin" />
|
||||
)}
|
||||
Email password reset link
|
||||
)}{' '}
|
||||
Enviar ligação de recuperação{' '}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
@@ -64,6 +67,7 @@ export default function ForgotPassword({ status }: { status?: string }) {
|
||||
}
|
||||
|
||||
ForgotPassword.layout = {
|
||||
title: 'Forgot password',
|
||||
description: 'Enter your email to receive a password reset link',
|
||||
title: 'Recuperar palavra-passe',
|
||||
description:
|
||||
'Indique o seu email para receber a ligação de recuperação da palavra-passe',
|
||||
};
|
||||
|
||||
@@ -39,15 +39,19 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
Ambiente QA — conta {qaAccount.id}
|
||||
</p>
|
||||
<p>
|
||||
Para os cenários A/B: {qaAccount.email}. Use a password
|
||||
e o autenticador desta conta. Outros perfis devem usar
|
||||
as respetivas contas sintéticas QA.
|
||||
Para os cenários A/B: {qaAccount.email}. Use a
|
||||
palavra-passe e o autenticador desta conta. Outros
|
||||
perfis devem usar as respetivas contas sintéticas QA.
|
||||
</p>
|
||||
</aside>
|
||||
)}
|
||||
|
||||
{/* @chisel-passkeys */}
|
||||
<PasskeyVerify label="Entrar com chave de acesso" loadingLabel="A autenticar…" separator="Ou continuar com email" />
|
||||
<PasskeyVerify
|
||||
label="Entrar com chave de acesso"
|
||||
loadingLabel="A autenticar…"
|
||||
separator="Ou continuar com email"
|
||||
/>
|
||||
{/* @end-chisel-passkeys */}
|
||||
|
||||
<Form
|
||||
@@ -68,7 +72,10 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
tabIndex={1}
|
||||
autoComplete="email"
|
||||
placeholder="email@example.com"
|
||||
defaultValue={qaAccount?.email ?? participationIdentity().email}
|
||||
defaultValue={
|
||||
qaAccount?.email ??
|
||||
participationIdentity().email
|
||||
}
|
||||
/>
|
||||
<InputError
|
||||
message={errors.email ?? pageErrors.email}
|
||||
@@ -77,7 +84,9 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
|
||||
<div className="grid gap-2">
|
||||
<div className="flex items-center">
|
||||
<Label htmlFor="password">Palavra-passe</Label>
|
||||
<Label htmlFor="password">
|
||||
Palavra-passe
|
||||
</Label>
|
||||
{canResetPassword && (
|
||||
<TextLink
|
||||
href={request()}
|
||||
@@ -105,7 +114,9 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
name="remember"
|
||||
tabIndex={3}
|
||||
/>
|
||||
<Label htmlFor="remember">Manter sessão iniciada</Label>
|
||||
<Label htmlFor="remember">
|
||||
Manter sessão iniciada
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
@@ -143,5 +154,6 @@ export default function Login({ status, canResetPassword, qaAccount }: Props) {
|
||||
|
||||
Login.layout = {
|
||||
title: 'Entrar na sua conta',
|
||||
description: 'Entre para continuar a operação que escolheu. Os dados preenchidos permanecem guardados neste navegador.',
|
||||
description:
|
||||
'Entre para continuar a operação que escolheu. Os dados preenchidos permanecem guardados neste navegador.',
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ type Props = {
|
||||
export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||
return (
|
||||
<>
|
||||
<Head title="Reset password" />
|
||||
<Head title="Redefinir palavra-passe" />
|
||||
|
||||
<Form
|
||||
{...update.form()}
|
||||
@@ -43,14 +43,14 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||
</div>
|
||||
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="password">Password</Label>
|
||||
<Label htmlFor="password"> Palavra-passe </Label>
|
||||
<PasswordInput
|
||||
id="password"
|
||||
name="password"
|
||||
autoComplete="new-password"
|
||||
className="mt-1 block w-full"
|
||||
autoFocus
|
||||
placeholder="Password"
|
||||
placeholder="Palavra-passe"
|
||||
passwordrules={passwordRules}
|
||||
/>
|
||||
<InputError message={errors.password} />
|
||||
@@ -58,14 +58,15 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="password_confirmation">
|
||||
Confirm password
|
||||
{' '}
|
||||
Confirmar palavra-passe{' '}
|
||||
</Label>
|
||||
<PasswordInput
|
||||
id="password_confirmation"
|
||||
name="password_confirmation"
|
||||
autoComplete="new-password"
|
||||
className="mt-1 block w-full"
|
||||
placeholder="Confirm password"
|
||||
placeholder="Confirmar palavra-passe"
|
||||
passwordrules={passwordRules}
|
||||
/>
|
||||
<InputError
|
||||
@@ -80,8 +81,8 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||
disabled={processing}
|
||||
data-test="reset-password-button"
|
||||
>
|
||||
{processing && <Spinner />}
|
||||
Reset password
|
||||
{processing && <Spinner />} Redefinir
|
||||
palavra-passe{' '}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
@@ -91,6 +92,6 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||
}
|
||||
|
||||
ResetPassword.layout = {
|
||||
title: 'Reset password',
|
||||
description: 'Please enter your new password below',
|
||||
title: 'Redefinir palavra-passe',
|
||||
description: 'Introduza a nova palavra-passe',
|
||||
};
|
||||
|
||||
@@ -27,18 +27,18 @@ export default function TwoFactorChallenge({
|
||||
}>(() => {
|
||||
if (showRecoveryInput) {
|
||||
return {
|
||||
title: 'Recovery code',
|
||||
title: 'Código de recuperação',
|
||||
description:
|
||||
'Please confirm access to your account by entering one of your emergency recovery codes.',
|
||||
toggleText: 'login using an authentication code',
|
||||
'Confirme o acesso à conta com um dos seus códigos de recuperação.',
|
||||
toggleText: 'entrar com um código de autenticação',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
title: 'Authentication code',
|
||||
title: 'Código de autenticação',
|
||||
description:
|
||||
'Enter the authentication code provided by your authenticator application.',
|
||||
toggleText: 'login using a recovery code',
|
||||
'Introduza o código apresentado pela sua aplicação autenticadora.',
|
||||
toggleText: 'entrar com um código de recuperação',
|
||||
};
|
||||
}, [showRecoveryInput]);
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function TwoFactorChallenge({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head title="Two-factor authentication" />
|
||||
<Head title="Autenticação de dois factores" />
|
||||
|
||||
{qaAccount && (
|
||||
<p
|
||||
@@ -81,7 +81,7 @@ export default function TwoFactorChallenge({
|
||||
<Input
|
||||
name="recovery_code"
|
||||
type="text"
|
||||
placeholder="Enter recovery code"
|
||||
placeholder="Introduza um código de recuperação"
|
||||
autoFocus={showRecoveryInput}
|
||||
required
|
||||
/>
|
||||
@@ -123,7 +123,8 @@ export default function TwoFactorChallenge({
|
||||
className="w-full"
|
||||
disabled={processing}
|
||||
>
|
||||
Continue
|
||||
{' '}
|
||||
Continuar{' '}
|
||||
</Button>
|
||||
|
||||
<div className="text-muted-foreground text-center text-sm">
|
||||
|
||||
@@ -9,12 +9,13 @@ import { send } from '@/routes/verification';
|
||||
export default function VerifyEmail({ status }: { status?: string }) {
|
||||
return (
|
||||
<>
|
||||
<Head title="Email verification" />
|
||||
<Head title="Confirmação de email" />
|
||||
|
||||
{status === 'verification-link-sent' && (
|
||||
<div className="mb-4 text-center text-sm font-medium text-green-600">
|
||||
A new verification link has been sent to the email address
|
||||
you provided during registration.
|
||||
{' '}
|
||||
Foi enviada uma nova ligação de confirmação para o email
|
||||
indicado no registo.{' '}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -22,15 +23,16 @@ export default function VerifyEmail({ status }: { status?: string }) {
|
||||
{({ processing }) => (
|
||||
<>
|
||||
<Button disabled={processing} variant="secondary">
|
||||
{processing && <Spinner />}
|
||||
Resend verification email
|
||||
{processing && <Spinner />} Reenviar email de
|
||||
confirmação{' '}
|
||||
</Button>
|
||||
|
||||
<TextLink
|
||||
href={logout()}
|
||||
className="mx-auto block text-sm"
|
||||
>
|
||||
Log out
|
||||
{' '}
|
||||
Terminar sessão{' '}
|
||||
</TextLink>
|
||||
</>
|
||||
)}
|
||||
@@ -40,7 +42,6 @@ export default function VerifyEmail({ status }: { status?: string }) {
|
||||
}
|
||||
|
||||
VerifyEmail.layout = {
|
||||
title: 'Email verification',
|
||||
description:
|
||||
'Please verify your email address by clicking on the link we just emailed to you.',
|
||||
title: 'Confirmação de email',
|
||||
description: 'Confirme o seu email através da ligação que enviámos.',
|
||||
};
|
||||
|
||||
@@ -419,6 +419,9 @@ function PartnershipForm() {
|
||||
}
|
||||
|
||||
function Simulator() {
|
||||
const page = usePage<{ auth: { user: { id: number } | null } }>();
|
||||
const query = new URL(page.url, 'https://investmoz.invalid').searchParams;
|
||||
const scope = `${page.props.auth.user?.id ?? 'anonymous'}:${query.get('context') ?? ''}:${query.get('draft') ?? ''}`;
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
<p>
|
||||
@@ -428,7 +431,7 @@ function Simulator() {
|
||||
para rever mercado, localização, recursos, formalização e
|
||||
execução.
|
||||
</p>
|
||||
<SimulationForm />
|
||||
<SimulationForm key={scope} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,15 +6,15 @@ import { edit as editAppearance } from '@/routes/appearance';
|
||||
export default function Appearance() {
|
||||
return (
|
||||
<>
|
||||
<Head title="Appearance settings" />
|
||||
<Head title="Definições de aparência" />
|
||||
|
||||
<h1 className="sr-only">Appearance settings</h1>
|
||||
<h1 className="sr-only"> Definições de aparência </h1>
|
||||
|
||||
<div className="space-y-6">
|
||||
<Heading
|
||||
variant="small"
|
||||
title="Appearance settings"
|
||||
description="Update the appearance settings for your account"
|
||||
title="Definições de aparência"
|
||||
description="Escolha a aparência da sua conta"
|
||||
/>
|
||||
<AppearanceTabs />
|
||||
</div>
|
||||
@@ -25,7 +25,7 @@ export default function Appearance() {
|
||||
Appearance.layout = {
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Appearance settings',
|
||||
title: 'Definições de aparência',
|
||||
href: editAppearance(),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -34,15 +34,15 @@ export default function Profile(
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head title="Profile settings" />
|
||||
<Head title="Definições do perfil" />
|
||||
|
||||
<h1 className="sr-only">Profile settings</h1>
|
||||
<h1 className="sr-only"> Definições do perfil </h1>
|
||||
|
||||
<div className="space-y-6">
|
||||
<Heading
|
||||
variant="small"
|
||||
title="Profile"
|
||||
description="Update your name and email address"
|
||||
title="Perfil"
|
||||
description="Actualize o seu nome e endereço de correio electrónico"
|
||||
/>
|
||||
|
||||
<Form
|
||||
@@ -55,7 +55,7 @@ export default function Profile(
|
||||
{({ processing, errors }) => (
|
||||
<>
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="name">Name</Label>
|
||||
<Label htmlFor="name"> Nome </Label>
|
||||
|
||||
<Input
|
||||
id="name"
|
||||
@@ -64,7 +64,7 @@ export default function Profile(
|
||||
name="name"
|
||||
required
|
||||
autoComplete="name"
|
||||
placeholder="Full name"
|
||||
placeholder="Nome completo"
|
||||
/>
|
||||
|
||||
<InputError
|
||||
@@ -74,7 +74,10 @@ export default function Profile(
|
||||
</div>
|
||||
|
||||
<div className="grid gap-2">
|
||||
<Label htmlFor="email">Email address</Label>
|
||||
<Label htmlFor="email">
|
||||
{' '}
|
||||
Endereço de correio electrónico{' '}
|
||||
</Label>
|
||||
|
||||
<Input
|
||||
id="email"
|
||||
@@ -84,7 +87,7 @@ export default function Profile(
|
||||
name="email"
|
||||
required
|
||||
autoComplete="username"
|
||||
placeholder="Email address"
|
||||
placeholder="Endereço de correio electrónico"
|
||||
/>
|
||||
|
||||
<InputError
|
||||
@@ -98,22 +101,28 @@ export default function Profile(
|
||||
auth.user.email_verified_at === null && (
|
||||
<div>
|
||||
<p className="text-muted-foreground -mt-4 text-sm">
|
||||
Your email address is unverified.{' '}
|
||||
{' '}
|
||||
O seu endereço de correio
|
||||
electrónico ainda não foi
|
||||
confirmado.{' '}
|
||||
<Link
|
||||
href={send()}
|
||||
as="button"
|
||||
className="text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500"
|
||||
>
|
||||
Click here to re-send the
|
||||
verification email.
|
||||
{' '}
|
||||
Reenviar o email de
|
||||
confirmação.{' '}
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
{status ===
|
||||
'verification-link-sent' && (
|
||||
<div className="mt-2 text-sm font-medium text-green-600">
|
||||
A new verification link has been
|
||||
sent to your email address.
|
||||
{' '}
|
||||
Foi enviada uma nova ligação de
|
||||
confirmação para o seu
|
||||
email.{' '}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -125,7 +134,8 @@ export default function Profile(
|
||||
disabled={processing}
|
||||
data-test="update-profile-button"
|
||||
>
|
||||
Save
|
||||
{' '}
|
||||
Guardar{' '}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
@@ -141,7 +151,7 @@ export default function Profile(
|
||||
Profile.layout = {
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Profile settings',
|
||||
title: 'Definições do perfil',
|
||||
href: edit(),
|
||||
},
|
||||
],
|
||||
|
||||
@@ -151,7 +151,7 @@ export default function Security(props: Props) {
|
||||
Security.layout = {
|
||||
breadcrumbs: [
|
||||
{
|
||||
title: 'Security settings',
|
||||
title: 'Definições de segurança',
|
||||
href: edit(),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user