🐛 Review PR
This commit is contained in:
parent
7665857f2a
commit
b8ea4fca5c
@ -38,8 +38,4 @@ export default class RadioBox extends React.Component<IProps> {
|
||||
</Typography>
|
||||
);
|
||||
}
|
||||
|
||||
public override componentDidMount(): void {
|
||||
console.log(this.props);
|
||||
}
|
||||
}
|
||||
|
@ -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<IPropsClass, IState> {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedFolder: null,
|
||||
selectedOption: "existing_customer",
|
||||
selectedOption: ESelectedOption.EXISTING_CUSTOMER,
|
||||
availableCustomers: [],
|
||||
selectedCustomers: [],
|
||||
existingCustomers: [],
|
||||
@ -133,7 +137,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
|
||||
|
||||
if (availableCustomers.length === 0) {
|
||||
this.setState({
|
||||
selectedOption: "new_customer",
|
||||
selectedOption: ESelectedOption.NEW_CUSTOMER,
|
||||
});
|
||||
}
|
||||
|
||||
@ -190,11 +194,11 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
|
||||
}
|
||||
|
||||
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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user