website refactor
This commit is contained in:
@@ -1,27 +1,18 @@
|
||||
/**
|
||||
* Reset Password View Data Builder
|
||||
*
|
||||
*
|
||||
* Transforms ResetPasswordPageDTO into ViewData for the reset password template.
|
||||
* Deterministic, side-effect free, no business logic.
|
||||
*/
|
||||
|
||||
import { ResetPasswordPageDTO } from '@/lib/services/auth/types/ResetPasswordPageDTO';
|
||||
|
||||
export interface ResetPasswordViewData {
|
||||
token: string;
|
||||
returnTo: string;
|
||||
showSuccess: boolean;
|
||||
successMessage?: string;
|
||||
formState: any; // Will be managed by client component
|
||||
isSubmitting: boolean;
|
||||
submitError?: string;
|
||||
}
|
||||
import { ResetPasswordViewData } from './types/ResetPasswordViewData';
|
||||
|
||||
export class ResetPasswordViewDataBuilder {
|
||||
static build(data: ResetPasswordPageDTO): ResetPasswordViewData {
|
||||
static build(apiDto: ResetPasswordPageDTO): ResetPasswordViewData {
|
||||
return {
|
||||
token: data.token,
|
||||
returnTo: data.returnTo,
|
||||
token: apiDto.token,
|
||||
returnTo: apiDto.returnTo,
|
||||
showSuccess: false,
|
||||
formState: {
|
||||
fields: {
|
||||
|
||||
Reference in New Issue
Block a user