diff --git a/src/front/Components/DesignSystem/RadioBox/index.tsx b/src/front/Components/DesignSystem/RadioBox/index.tsx index 60cdc63d..f41d50ce 100644 --- a/src/front/Components/DesignSystem/RadioBox/index.tsx +++ b/src/front/Components/DesignSystem/RadioBox/index.tsx @@ -38,8 +38,4 @@ export default class RadioBox extends React.Component { ); } - - public override componentDidMount(): void { - console.log(this.props); - } } diff --git a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx index 170655ad..da0e9378 100644 --- a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx @@ -20,10 +20,14 @@ import { NextRouter, useRouter } from "next/router"; import BasePage from "../../Base"; import classes from "./classes.module.scss"; +enum ESelectedOption { + EXISTING_CUSTOMER = "existing_customer", + NEW_CUSTOMER = "new_customer", +} type IProps = {}; type IState = { selectedFolder: IDashBoardFolder | null; - selectedOption: "new_customer" | "existing_customer"; + selectedOption: ESelectedOption; availableCustomers: Customer[]; selectedCustomers: readonly IOption[]; existingCustomers: IOption[]; @@ -38,7 +42,7 @@ class AddClientToFolderClass extends BasePage { super(props); this.state = { selectedFolder: null, - selectedOption: "existing_customer", + selectedOption: ESelectedOption.EXISTING_CUSTOMER, availableCustomers: [], selectedCustomers: [], existingCustomers: [], @@ -133,7 +137,7 @@ class AddClientToFolderClass extends BasePage { if (availableCustomers.length === 0) { this.setState({ - selectedOption: "new_customer", + selectedOption: ESelectedOption.NEW_CUSTOMER, }); } @@ -190,11 +194,11 @@ class AddClientToFolderClass extends BasePage { } private onExistingClientSelected(): void { - this.setState({ selectedOption: "existing_customer" }); + this.setState({ selectedOption: ESelectedOption.EXISTING_CUSTOMER }); } private onNewClientSelected(): void { - this.setState({ selectedOption: "new_customer" }); + this.setState({ selectedOption: ESelectedOption.NEW_CUSTOMER }); } private async onFormSubmit(