|
| 1 | +<script> |
| 2 | + import { _ } from 'svelte-i18n'; |
| 3 | + import { format } from 'normalizer/money'; |
| 4 | + import Leave from './_Leave.svelte'; |
| 5 | +
|
| 6 | + export let items; |
| 7 | +</script> |
| 8 | + |
| 9 | +<table |
| 10 | + class="w-full px-4 py-3 mb-8 whitespace-no-wrap bg-white rounded-lg shadow-md dark:bg-gray-800"> |
| 11 | + <thead> |
| 12 | + <tr |
| 13 | + class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"> |
| 14 | + <th class="px-4 py-3">{$_('human_resources.payslips.user')}</th> |
| 15 | + <th class="px-4 py-3">{$_('human_resources.payslips.contract')}</th> |
| 16 | + <th class="px-4 py-3">{$_('human_resources.payslips.joining_date')}</th> |
| 17 | + <th class="px-4 py-3">{$_('human_resources.payslips.annual_earnings')}</th> |
| 18 | + <th class="px-4 py-3">{$_('human_resources.payslips.monthly_earnings')}</th> |
| 19 | + <th class="px-4 py-3">{$_('human_resources.payslips.working_time')}</th> |
| 20 | + <th class="px-4 py-3">{$_('human_resources.payslips.transport_fee')}</th> |
| 21 | + <th class="px-4 py-3">{$_('human_resources.payslips.meal_tickets')}</th> |
| 22 | + <th class="px-4 py-3">{$_('human_resources.payslips.health_insurance')}</th> |
| 23 | + <th class="px-4 py-3">{$_('human_resources.payslips.paid_leaves')}</th> |
| 24 | + <th class="px-4 py-3">{$_('human_resources.payslips.unpaid_leaves')}</th> |
| 25 | + <th class="px-4 py-3">{$_('human_resources.payslips.sick_leaves')}</th> |
| 26 | + <th class="px-4 py-3">{$_('human_resources.payslips.exceptional_leaves')}</th> |
| 27 | + </tr> |
| 28 | + </thead> |
| 29 | + |
| 30 | + <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
| 31 | + {#each items as { firstName, lastName, contract, isExecutivePosition, joiningDate, |
| 32 | + annualEarnings, monthlyEarnings, workingTime, transportFee, mealTickets, |
| 33 | + healthInsurance, paidLeaves, unpaidLeaves, sickLeaves, exceptionalLeaves }} |
| 34 | + <tr class="text-gray-700 dark:text-gray-400"> |
| 35 | + <td class="px-4 py-3 text-sm"> |
| 36 | + {firstName} {lastName} |
| 37 | + </td> |
| 38 | + <td class="px-4 py-3 text-sm">{contract} {isExecutivePosition ? $_('human_resources.payslips.executive_position') : ''}</td> |
| 39 | + <td class="px-4 py-3 text-sm">{joiningDate}</td> |
| 40 | + <td class="px-4 py-3 text-sm">{format(annualEarnings)}</td> |
| 41 | + <td class="px-4 py-3 text-sm">{format(monthlyEarnings)}</td> |
| 42 | + <td class="px-4 py-3 text-sm">{$_(`human_resources.users.form.working_time.${workingTime}`)}</td> |
| 43 | + <td class="px-4 py-3 text-sm">{format(transportFee)}</td> |
| 44 | + <td class="px-4 py-3 text-sm">{mealTickets}</td> |
| 45 | + <td class="px-4 py-3 text-sm">{$_(`common.${healthInsurance}`)}</td> |
| 46 | + <td class="px-4 py-3 text-sm"><Leave userLeaves={paidLeaves}></Leave></td> |
| 47 | + <td class="px-4 py-3 text-sm"><Leave userLeaves={unpaidLeaves}></Leave></td> |
| 48 | + <td class="px-4 py-3 text-sm"><Leave userLeaves={sickLeaves}></Leave></td> |
| 49 | + <td class="px-4 py-3 text-sm"><Leave userLeaves={exceptionalLeaves}></Leave></td> |
| 50 | + </tr> |
| 51 | + {/each} |
| 52 | + </tbody> |
| 53 | +</table> |
0 commit comments