diff --git a/src/ts/@overflow/noauthprobe/react/NoauthProbeList.tsx b/src/ts/@overflow/noauthprobe/react/NoauthProbeList.tsx index c094cc8..d91a1e6 100644 --- a/src/ts/@overflow/noauthprobe/react/NoauthProbeList.tsx +++ b/src/ts/@overflow/noauthprobe/react/NoauthProbeList.tsx @@ -7,6 +7,7 @@ import { import Domain from '@overflow/domain/api/model/Domain'; import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest'; import * as noauthListActions from '../redux/action/read_all_by_domain'; +import NoAuthProbe from '@overflow/noauthprobe/api/model/NoAuthProbe'; export function mapStateToProps(state: any): NoAuthProbeListStateProps { return { @@ -19,6 +20,12 @@ export function mapDispatchToProps(dispatch: Dispatch): NoAuthProbeListDisp onReadAllByDomain: (domain: Domain) => { dispatch(asyncRequestActions.request('NoAuthProbeService', 'readAllByDomain', noauthListActions.REQUEST, JSON.stringify(domain))); }, + registNoAuthProbe: (noauthProbe: NoAuthProbe[]) => { + // dispatch( + // asyncRequestActions.request( + // 'NoAuthProbeService', 'registForNoAuthProbes', noauthListActions.REQUEST, JSON.stringify(noauthProbe)) + // ); + }, }; } diff --git a/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx b/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx index 5e9f54c..d811b64 100644 --- a/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx +++ b/src/ts/@overflow/noauthprobe/react/components/NoauthProbeList.tsx @@ -16,6 +16,7 @@ export interface StateProps { export interface DispatchProps { onReadAllByDomain?(domain: Domain):void; + registNoAuthProbe?(noauthProbe: NoAuthProbe[]):void; } export type Props = StateProps & DispatchProps; @@ -65,14 +66,14 @@ export class NoauthProbeList extends React.Component { } public checkExist(probe: NoAuthProbe): boolean { - // if (this.state.selected.indexOf(id) === -1) { - // return false; - // } + if (this.state.selected.indexOf(probe) === -1) { + return false; + } return true; } public handleAccept(): void { - alert(this.state.selected); + this.props.registNoAuthProbe(this.state.selected); } public handleDeny(): void {