Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.   export let customer;
  3.   export let tasks = [];
  4.   export let onTaskStart;
  5. </script>
  6.  
  7. <table class="table is-bordered is-striped">
  8.   <thead>
  9.     <tr>
  10.       <th>Name</th>
  11.       <th>Status</th>
  12.       <th>Owner</th>
  13.     </tr>
  14.   </thead>
  15.   <tbody>
  16.     {#each tasks as t}
  17.       <tr>
  18.         <th>{t.task}</th>
  19.         <td>Not Done</td>
  20.         <td>{t.customerByCustomerId.name}</td>
  21.         {#if !customer}
  22.           <td>
  23.             <button
  24.               class="button"
  25.               on:click={() => onTaskStart(t.id)}
  26.               disabled={t.status === 'working' || t.status == 'done'}>
  27.               Start Working
  28.             </button>
  29.           </td>
  30.         {/if}
  31.       </tr>
  32.     {/each}
  33.   </tbody>
  34. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement