🐛 Review PR
This commit is contained in:
parent
7665857f2a
commit
b8ea4fca5c
@ -38,8 +38,4 @@ export default class RadioBox extends React.Component<IProps> {
|
|||||||
</Typography>
|
</Typography>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override componentDidMount(): void {
|
|
||||||
console.log(this.props);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,14 @@ import { NextRouter, useRouter } from "next/router";
|
|||||||
import BasePage from "../../Base";
|
import BasePage from "../../Base";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
|
|
||||||
|
enum ESelectedOption {
|
||||||
|
EXISTING_CUSTOMER = "existing_customer",
|
||||||
|
NEW_CUSTOMER = "new_customer",
|
||||||
|
}
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
type IState = {
|
type IState = {
|
||||||
selectedFolder: IDashBoardFolder | null;
|
selectedFolder: IDashBoardFolder | null;
|
||||||
selectedOption: "new_customer" | "existing_customer";
|
selectedOption: ESelectedOption;
|
||||||
availableCustomers: Customer[];
|
availableCustomers: Customer[];
|
||||||
selectedCustomers: readonly IOption[];
|
selectedCustomers: readonly IOption[];
|
||||||
existingCustomers: IOption[];
|
existingCustomers: IOption[];
|
||||||
@ -38,7 +42,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
|
|||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
selectedFolder: null,
|
selectedFolder: null,
|
||||||
selectedOption: "existing_customer",
|
selectedOption: ESelectedOption.EXISTING_CUSTOMER,
|
||||||
availableCustomers: [],
|
availableCustomers: [],
|
||||||
selectedCustomers: [],
|
selectedCustomers: [],
|
||||||
existingCustomers: [],
|
existingCustomers: [],
|
||||||
@ -133,7 +137,7 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
|
|||||||
|
|
||||||
if (availableCustomers.length === 0) {
|
if (availableCustomers.length === 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedOption: "new_customer",
|
selectedOption: ESelectedOption.NEW_CUSTOMER,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,11 +194,11 @@ class AddClientToFolderClass extends BasePage<IPropsClass, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onExistingClientSelected(): void {
|
private onExistingClientSelected(): void {
|
||||||
this.setState({ selectedOption: "existing_customer" });
|
this.setState({ selectedOption: ESelectedOption.EXISTING_CUSTOMER });
|
||||||
}
|
}
|
||||||
|
|
||||||
private onNewClientSelected(): void {
|
private onNewClientSelected(): void {
|
||||||
this.setState({ selectedOption: "new_customer" });
|
this.setState({ selectedOption: ESelectedOption.NEW_CUSTOMER });
|
||||||
}
|
}
|
||||||
|
|
||||||
private async onFormSubmit(
|
private async onFormSubmit(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user