{"size": 1749, "ext": "js", "max_stars_repo_path": "resources/js/components/paymentmethods/PaymentMethodList.js", "max_stars_repo_name": "Jesusvalopez/storeAdministrator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/components/paymentmethods/PaymentMethodList.js", "max_issues_repo_name": "Jesusvalopez/storeAdministrator", "max_issues_repo_issues_event_min_datetime": "2020-06-13T20:47:53.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T04:05:06.000Z", "max_forks_repo_path": "resources/js/components/paymentmethods/PaymentMethodList.js", "max_forks_repo_name": "Jesusvalopez/storeAdministrator", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 33.0, "max_line_length": 145, "alphanum_fraction": 0.4385363065}
import React, {Component} from 'react';

const PaymentMethodList = ({payment_methods, onClick, onClickEdit}) => (



    <div className="col-md-12">
        <div className="box">
            <div className="box-header with-border">
                <h3 className="box-title">Medio de pago</h3>
            </div>

            <div className="box-body col-md-offset-3 col-md-6">
                <table className="table table-bordered">
                    <thead>

                    <tr>
                        <th className="text-center">Nombre</th>
                        <th className="text-center">Comisión</th>
                        <th className="text-center">Acciones</th>
                    </tr>
                    </thead>
                    <tbody>
                    {payment_methods.map((payment_method) => (
                        <tr key={payment_method.id}>
                            <td className="text-center">{payment_method.name}</td>
                            <td className="text-center">{payment_method.comission}%
                            </td>
                            <td className="text-center"><a href="#" className="btn btn-primary" onClick={() => onClickEdit(payment_method.id)}><i
                                className="fa fa-edit" ></i></a> <a
                                href="#" className="btn btn-danger" onClick={() => onClick(payment_method.id)}><i
                                className="fa fa-times"></i></a></td>

                        </tr>
                    ))}

                    </tbody>

                </table>
            </div>

            <div className="box-footer clearfix">

            </div>
        </div>

    </div>
)


export default PaymentMethodList;

