Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- export let customer;
- export let tasks = [];
- export let onTaskStart;
- </script>
- <table class="table is-bordered is-striped">
- <thead>
- <tr>
- <th>Name</th>
- <th>Status</th>
- <th>Owner</th>
- </tr>
- </thead>
- <tbody>
- {#each tasks as t}
- <tr>
- <th>{t.task}</th>
- <td>Not Done</td>
- <td>{t.customerByCustomerId.name}</td>
- {#if !customer}
- <td>
- <button
- class="button"
- on:click={() => onTaskStart(t.id)}
- disabled={t.status === 'working' || t.status == 'done'}>
- Start Working
- </button>
- </td>
- {/if}
- </tr>
- {/each}
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement