({ heading, scripts, surveys })
| 29 | }; |
| 30 | |
| 31 | const ScriptList = ({ heading, scripts, surveys }) => { |
| 32 | return ( |
| 33 | <div> |
| 34 | <h3>{heading}</h3> |
| 35 | <table className="admin-scripts-table"> |
| 36 | <thead> |
| 37 | <tr> |
| 38 | <th>Script</th> |
| 39 | <th>Description</th> |
| 40 | <th>Arguments</th> |
| 41 | <th>Actions</th> |
| 42 | <th>Done</th> |
| 43 | </tr> |
| 44 | </thead> |
| 45 | <tbody> |
| 46 | {scripts.map((script) => ( |
| 47 | <Script key={script.id} {...script} surveys={surveys} /> |
| 48 | ))} |
| 49 | </tbody> |
| 50 | </table> |
| 51 | </div> |
| 52 | ); |
| 53 | }; |
| 54 | const Script = ({ id, description, args, done, surveys }) => { |
| 55 | const defaultSurvey = surveys[0]; |
| 56 | const defaultEditionIds = defaultSurvey.editions.map((e) => e.id); |
nothing calls this directly
no outgoing calls
no test coverage detected