render() {
        const { modalTitle, movies } = this.state;
        const { onConcluirClick } = this.props;

        return (
            <div id="modal-movies" data-backdrop="static" data-keyboard="true" className="modal fade" tabIndex="-1" role="dialog" aria-labelledby="modal-movies" aria-hidden="true">
                <div className="modal-dialog" role="document">
                    <div className="modal-content">
                        <div className="modal-header">
                            <h5 className="modal-title" id="modal-movies">{modalTitle}</h5>
                            <button type="button" className="close" data-dismiss="modal" aria-label="Close" onClick={() => { this.clearModal() }}>
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div className="modal-body" style={{
                            maxHeight: `${440}px`,
                            overflow: "auto",
                            paddingTop: "0"
                        }}>
                            <div className="list-group-flush">
                                {this.getModalBody(movies)}
                            </div>
                        </div>
                        <div className="modal-footer">
                            <button type="button" className="btn btn-secondary" data-dismiss="modal" onClick={() => { this.clearModal() }}>Cancelar</button>
                            <button type="button" className="btn btn-primary" onClick={() => {
                                onConcluirClick({
                                    filmesId: Array.from(
                                        $('.modal-body .custom-control-input:checked').map((idx, input) =>
                                            parseInt(input.getAttribute('data-id'))
                                        )
                                    )
                                }).then(() => {
                                    this.hideModal();
                                })
                            }}>Concluir</button>
                        </div>
                    </div>
                </div>
            </div>
        );
    }
/**
     * Renderia o componente modal de filmes 
     */
Renderia o componente modal de filmes
Renderia o componente modal de filmes
render() {
        const { modalTitle, movies } = this.state;
        const { onConcluirClick } = this.props;
        return (
            <div id="modal-movies" data-backdrop="static" data-keyboard="true" className="modal fade" tabIndex="-1" role="dialog" aria-labelledby="modal-movies" aria-hidden="true">
                <div className="modal-dialog" role="document">
                    <div className="modal-content">
                        <div className="modal-header">
                            <h5 className="modal-title" id="modal-movies">{modalTitle}</h5>
                            <button type="button" className="close" data-dismiss="modal" aria-label="Close" onClick={() => { this.clearModal() }}>
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div className="modal-body" style={{
                            maxHeight: `${440}px`,
                            overflow: "auto",
                            paddingTop: "0"
                        }}>
                            <div className="list-group-flush">
                                {this.getModalBody(movies)}
                            </div>
                        </div>
                        <div className="modal-footer">
                            <button type="button" className="btn btn-secondary" data-dismiss="modal" onClick={() => { this.clearModal() }}>Cancelar</button>
                            <button type="button" className="btn btn-primary" onClick={() => {
                                onConcluirClick({
                                    filmesId: Array.from(
                                        $('.modal-body .custom-control-input:checked').map((idx, input) =>
                                            parseInt(input.getAttribute('data-id'))
                                        )
                                    )
                                }).then(() => {
                                    this.hideModal();
                                })
                            }}>Concluir</button>
                        </div>
                    </div>
                </div>
            </div>
        );
    }
render ( ) { const { modalTitle , movies } = this . state ; const { onConcluirClick } = this . props ; return ( < div id = "modal-movies" data-backdrop = "static" data-keyboard = "true" className = "modal fade" tabIndex = "-1" role = "dialog" aria-labelledby = "modal-movies" aria-hidden = "true" > < div className = "modal-dialog" role = "document" > < div className = "modal-content" > < div className = "modal-header" > < h5 className = "modal-title" id = "modal-movies" > { modalTitle } < / h5 > < button type = "button" className = "close" data-dismiss = "modal" aria-label = "Close" onClick = { ( ) => { this . clearModal ( ) } } > < span aria-hidden = "true" > &times; < / span > < / button > < / div > < div className = "modal-body" style = { { maxHeight : ` ${ 440 } ` , overflow : "auto" , paddingTop : "0" } } > < div className = "list-group-flush" > { this . getModalBody ( movies ) } < / div > < / div > < div className = "modal-footer" > < button type = "button" className = "btn btn-secondary" data-dismiss = "modal" onClick = { ( ) => { this . clearModal ( ) } } > Cancelar < / button > < button type = "button" className = "btn btn-primary" onClick = { ( ) => { onConcluirClick ( { filmesId : Array . from ( $ ( '.modal-body .custom-control-input:checked' ) . map ( ( idx , input ) => parseInt ( input . getAttribute ( 'data-id' ) ) ) ) } ) . then ( ( ) => { this . hideModal ( ) ; } ) } } > Concluir < / button > < / div > < / div > < / div > < / div > ) ; }
Renderia o componente modal de filmes
Renderia o componente modal de filmes