website cleanup
This commit is contained in:
@@ -7,13 +7,21 @@ import { CompleteOnboardingOutputDTO } from '../types/generated/CompleteOnboardi
|
||||
export class CompleteOnboardingViewModel {
|
||||
success: boolean;
|
||||
driverId?: string;
|
||||
errorMessage?: string;
|
||||
|
||||
constructor(dto: CompleteOnboardingOutputDTO) {
|
||||
this.success = dto.success;
|
||||
if (dto.driverId !== undefined) this.driverId = dto.driverId;
|
||||
if (dto.errorMessage !== undefined) this.errorMessage = dto.errorMessage;
|
||||
}
|
||||
|
||||
/** UI-specific: Whether onboarding was successful */
|
||||
get isSuccessful(): boolean {
|
||||
return this.success;
|
||||
}
|
||||
|
||||
/** UI-specific: Whether there was an error */
|
||||
get hasError(): boolean {
|
||||
return !!this.errorMessage;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user