From 687c1bbb670a23ecd06358f6bef08cf46be5cf24 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Mon, 17 Jul 2023 19:47:14 +0100 Subject: [PATCH] fix fmt --- Accounts/src/Pages/Register.tsx | 91 ++++++++++++++++----------------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/Accounts/src/Pages/Register.tsx b/Accounts/src/Pages/Register.tsx index 90fa3965d4..77bc111c69 100644 --- a/Accounts/src/Pages/Register.tsx +++ b/Accounts/src/Pages/Register.tsx @@ -9,7 +9,7 @@ import LoginUtil from '../Utils/Login'; import { JSONObject } from 'Common/Types/JSON'; import UserUtil from 'CommonUI/src/Utils/User'; import Navigation from 'CommonUI/src/Utils/Navigation'; -import { BILLING_ENABLED, DASHBOARD_URL, IS_BILLING } from 'CommonUI/src/Config'; +import { BILLING_ENABLED, DASHBOARD_URL } from 'CommonUI/src/Config'; import URL from 'Common/Types/API/URL'; import { SIGNUP_API_URL } from '../Utils/ApiPaths'; import Fields from 'CommonUI/src/Components/Forms/Types/Fields'; @@ -21,7 +21,6 @@ const RegisterPage: FunctionComponent = () => { Navigation.navigate(DASHBOARD_URL); } - let formFields: Fields = [ { field: { @@ -40,62 +39,62 @@ const RegisterPage: FunctionComponent = () => { placeholder: 'Jeff Smith', required: true, title: 'Full Name', - }]; + }, + ]; if (BILLING_ENABLED) { - formFields = formFields.concat([{ - field: { - companyName: true, + formFields = formFields.concat([ + { + field: { + companyName: true, + }, + fieldType: FormFieldSchemaType.Text, + placeholder: 'Acme, Inc.', + required: true, + title: 'Company Name', }, - fieldType: FormFieldSchemaType.Text, - placeholder: 'Acme, Inc.', + { + field: { + companyPhoneNumber: true, + }, + fieldType: FormFieldSchemaType.Phone, + required: true, + placeholder: '+11234567890', + title: 'Phone Number', + }, + ]); + } + + formFields = formFields.concat([ + { + field: { + password: true, + }, + fieldType: FormFieldSchemaType.Password, + validation: { + minLength: 6, + }, + placeholder: 'Password', + title: 'Password', required: true, - title: 'Company Name', }, { field: { - companyPhoneNumber: true, + confirmPassword: true, + } as any, + validation: { + minLength: 6, + toMatchField: 'password', }, - fieldType: FormFieldSchemaType.Phone, + fieldType: FormFieldSchemaType.Password, + placeholder: 'Confirm Password', + title: 'Confirm Password', + overideFieldKey: 'confirmPassword', required: true, - placeholder: '+11234567890', - title: 'Phone Number', - }]); - } - - formFields = formFields.concat([{ - field: { - password: true, + forceShow: true, }, - fieldType: FormFieldSchemaType.Password, - validation: { - minLength: 6, - }, - placeholder: 'Password', - title: 'Password', - required: true, - }, - { - field: { - confirmPassword: true, - } as any, - validation: { - minLength: 6, - toMatchField: 'password', - }, - fieldType: FormFieldSchemaType.Password, - placeholder: 'Confirm Password', - title: 'Confirm Password', - overideFieldKey: 'confirmPassword', - required: true, - forceShow: true, - }, ]); - - - - return (