Merge pull request 'feat: update terminology from 'password' to 'kata sandi' across various components and pages' (#47) from feat/update-terminology-from-password-to-kata-sandi into dev
Reviewed-on: itm/siakad-itm#47
This commit is contained in:
commit
3418b3c44e
@ -85,6 +85,6 @@ public function resetPassword(User $user): RedirectResponse
|
|||||||
{
|
{
|
||||||
$this->service->resetPassword($user);
|
$this->service->resetPassword($user);
|
||||||
|
|
||||||
return Inertia::flash('toast', ['type' => 'success', 'message' => 'Password berhasil direset.'])->back();
|
return Inertia::flash('toast', ['type' => 'success', 'message' => 'Kata sandi berhasil direset.'])->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,11 @@ export default function PasswordInput({
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowPassword((prev) => !prev)}
|
onClick={() => setShowPassword((prev) => !prev)}
|
||||||
className="absolute inset-y-0 right-0 flex items-center rounded-r-md px-3 text-muted-foreground hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none"
|
className="absolute inset-y-0 right-0 flex items-center rounded-r-md px-3 text-muted-foreground hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none"
|
||||||
aria-label={showPassword ? 'Hide password' : 'Show password'}
|
aria-label={
|
||||||
|
showPassword
|
||||||
|
? 'Sembunyikan kata sandi'
|
||||||
|
: 'Tampilkan kata sandi'
|
||||||
|
}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
>
|
>
|
||||||
{showPassword ? (
|
{showPassword ? (
|
||||||
|
|||||||
@ -86,7 +86,7 @@ export function createLecturerColumns(
|
|||||||
onClick: () => handleEdit(lecturer),
|
onClick: () => handleEdit(lecturer),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Reset Password',
|
label: 'Reset Kata Sandi',
|
||||||
icon: <Key className="h-4 w-4" />,
|
icon: <Key className="h-4 w-4" />,
|
||||||
onClick: () => handleResetPassword(lecturer),
|
onClick: () => handleResetPassword(lecturer),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -101,7 +101,7 @@ export function createStudentColumns(
|
|||||||
onClick: () => handleEdit(student),
|
onClick: () => handleEdit(student),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Reset Password',
|
label: 'Reset Kata Sandi',
|
||||||
icon: <Key className="h-4 w-4" />,
|
icon: <Key className="h-4 w-4" />,
|
||||||
onClick: () => handleResetPassword(student),
|
onClick: () => handleResetPassword(student),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,17 +9,17 @@ import { store } from '@/routes/password/confirm';
|
|||||||
export default function ConfirmPassword() {
|
export default function ConfirmPassword() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head title="Konfirmasi password" />
|
<Head title="Konfirmasi Kata Sandi" />
|
||||||
|
|
||||||
<Form {...store.form()} resetOnSuccess={['password']}>
|
<Form {...store.form()} resetOnSuccess={['password']}>
|
||||||
{({ processing, errors }) => (
|
{({ processing, errors }) => (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<Label htmlFor="password">Password</Label>
|
<Label htmlFor="password">Kata Sandi</Label>
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
id="password"
|
id="password"
|
||||||
name="password"
|
name="password"
|
||||||
placeholder="Password"
|
placeholder="Kata Sandi"
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
@ -34,7 +34,7 @@ export default function ConfirmPassword() {
|
|||||||
data-test="confirm-password-button"
|
data-test="confirm-password-button"
|
||||||
>
|
>
|
||||||
{processing && <Spinner />}
|
{processing && <Spinner />}
|
||||||
Konfirmasi password
|
Konfirmasi Kata Sandi
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +45,7 @@ export default function ConfirmPassword() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConfirmPassword.layout = {
|
ConfirmPassword.layout = {
|
||||||
title: 'Konfirmasi password',
|
title: 'Konfirmasi Kata Sandi',
|
||||||
description:
|
description:
|
||||||
'Ini adalah area aman dari aplikasi. Silakan konfirmasi password Anda sebelum melanjutkan.',
|
'Ini adalah area aman dari aplikasi. Silakan konfirmasi kata sandi Anda sebelum melanjutkan.',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { email } from '@/routes/password';
|
|||||||
export default function ForgotPassword({ status }: { status?: string }) {
|
export default function ForgotPassword({ status }: { status?: string }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head title="Lupa password" />
|
<Head title="Lupa Kata Sandi" />
|
||||||
|
|
||||||
{status && (
|
{status && (
|
||||||
<div className="mb-4 text-center text-sm font-medium text-green-600">
|
<div className="mb-4 text-center text-sm font-medium text-green-600">
|
||||||
@ -46,7 +46,7 @@ export default function ForgotPassword({ status }: { status?: string }) {
|
|||||||
{processing && (
|
{processing && (
|
||||||
<LoaderCircle className="h-4 w-4 animate-spin" />
|
<LoaderCircle className="h-4 w-4 animate-spin" />
|
||||||
)}
|
)}
|
||||||
Kirim link reset password
|
Kirim link reset kata sandi
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@ -63,6 +63,6 @@ export default function ForgotPassword({ status }: { status?: string }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ForgotPassword.layout = {
|
ForgotPassword.layout = {
|
||||||
title: 'Lupa password',
|
title: 'Lupa Kata Sandi',
|
||||||
description: 'Masukkan email Anda untuk menerima link reset password',
|
description: 'Masukkan email Anda untuk menerima link reset kata sandi',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import { Form, Head } from '@inertiajs/react';
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/input-error';
|
||||||
import PasswordInput from '@/components/password-input';
|
import PasswordInput from '@/components/password-input';
|
||||||
import TextLink from '@/components/text-link';
|
import TextLink from '@/components/text-link';
|
||||||
@ -9,7 +10,6 @@ import { Separator } from '@/components/ui/separator';
|
|||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import { store } from '@/routes/login';
|
import { store } from '@/routes/login';
|
||||||
import { request } from '@/routes/password';
|
import { request } from '@/routes/password';
|
||||||
import { Form, Head } from '@inertiajs/react';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
status?: string;
|
status?: string;
|
||||||
@ -30,7 +30,10 @@ export default function Login({ status, canResetPassword }: Props) {
|
|||||||
<>
|
<>
|
||||||
<div className="grid gap-6">
|
<div className="grid gap-6">
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<Label htmlFor="username">Email/Username{' '}<span className="text-destructive">*</span></Label>
|
<Label htmlFor="username">
|
||||||
|
Email/Username{' '}
|
||||||
|
<span className="text-destructive">*</span>
|
||||||
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
id="username"
|
id="username"
|
||||||
type="text"
|
type="text"
|
||||||
@ -44,7 +47,12 @@ export default function Login({ status, canResetPassword }: Props) {
|
|||||||
|
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Label htmlFor="password">Kata Sandi{' '}<span className="text-destructive">*</span></Label>
|
<Label htmlFor="password">
|
||||||
|
Kata Sandi{' '}
|
||||||
|
<span className="text-destructive">
|
||||||
|
*
|
||||||
|
</span>
|
||||||
|
</Label>
|
||||||
{canResetPassword && (
|
{canResetPassword && (
|
||||||
<TextLink
|
<TextLink
|
||||||
href={request()}
|
href={request()}
|
||||||
@ -71,9 +79,7 @@ export default function Login({ status, canResetPassword }: Props) {
|
|||||||
name="remember"
|
name="remember"
|
||||||
tabIndex={3}
|
tabIndex={3}
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="remember">
|
<Label htmlFor="remember">Ingat saya</Label>
|
||||||
Ingat saya
|
|
||||||
</Label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -139,5 +145,6 @@ export default function Login({ status, canResetPassword }: Props) {
|
|||||||
|
|
||||||
Login.layout = {
|
Login.layout = {
|
||||||
title: 'Masuk ke akun Anda',
|
title: 'Masuk ke akun Anda',
|
||||||
description: 'Masukkan username dan password Anda di bawah ini untuk masuk',
|
description:
|
||||||
|
'Masukkan username dan kata sandi Anda di bawah ini untuk masuk',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,7 +16,7 @@ type Props = {
|
|||||||
export default function ResetPassword({ token, email, passwordRules }: Props) {
|
export default function ResetPassword({ token, email, passwordRules }: Props) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head title="Reset password" />
|
<Head title="Reset Kata Sandi" />
|
||||||
|
|
||||||
<Form
|
<Form
|
||||||
{...update.form()}
|
{...update.form()}
|
||||||
@ -43,14 +43,14 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<Label htmlFor="password">Password baru</Label>
|
<Label htmlFor="password">Kata Sandi Baru</Label>
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
id="password"
|
id="password"
|
||||||
name="password"
|
name="password"
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
className="mt-1 block w-full"
|
className="mt-1 block w-full"
|
||||||
autoFocus
|
autoFocus
|
||||||
placeholder="Password baru"
|
placeholder="Kata sandi baru"
|
||||||
passwordrules={passwordRules}
|
passwordrules={passwordRules}
|
||||||
/>
|
/>
|
||||||
<InputError message={errors.password} />
|
<InputError message={errors.password} />
|
||||||
@ -58,14 +58,14 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
|||||||
|
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
<Label htmlFor="password_confirmation">
|
<Label htmlFor="password_confirmation">
|
||||||
Konfirmasi password
|
Konfirmasi Kata Sandi
|
||||||
</Label>
|
</Label>
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
id="password_confirmation"
|
id="password_confirmation"
|
||||||
name="password_confirmation"
|
name="password_confirmation"
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
className="mt-1 block w-full"
|
className="mt-1 block w-full"
|
||||||
placeholder="Konfirmasi password"
|
placeholder="Konfirmasi kata sandi"
|
||||||
passwordrules={passwordRules}
|
passwordrules={passwordRules}
|
||||||
/>
|
/>
|
||||||
<InputError
|
<InputError
|
||||||
@ -81,7 +81,7 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
|||||||
data-test="reset-password-button"
|
data-test="reset-password-button"
|
||||||
>
|
>
|
||||||
{processing && <Spinner />}
|
{processing && <Spinner />}
|
||||||
Reset password
|
Reset kata sandi
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -91,6 +91,6 @@ export default function ResetPassword({ token, email, passwordRules }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResetPassword.layout = {
|
ResetPassword.layout = {
|
||||||
title: 'Reset password',
|
title: 'Reset Kata Sandi',
|
||||||
description: 'Masukkan password baru Anda di bawah ini',
|
description: 'Masukkan kata sandi baru Anda di bawah ini',
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user