|
|
|
|
@@ -149,13 +149,13 @@
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="px-5 py-[10px] font-bold text-primary-500 border border-primary-500">Payé</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center text-neutral-500 border border-primary-500 border-r-2">-</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBase25Minutes) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBonus25Minutes) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500 border-r-2">{{ currentPayment ? formatMinutes(-(currentPayment.paidBase25Minutes + currentPayment.paidBonus25Minutes)) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBase50Minutes) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBonus50Minutes) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500 border-r-2">{{ currentPayment ? formatMinutes(-(currentPayment.paidBase50Minutes + currentPayment.paidBonus50Minutes)) : '0 h' }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ formatMinutes(paidTotal) }}</td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBase25Minutes) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -currentPayment.paidBase25Minutes : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBonus25Minutes) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -currentPayment.paidBonus25Minutes : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500 border-r-2">{{ currentPayment ? formatMinutes(-(currentPayment.paidBase25Minutes + currentPayment.paidBonus25Minutes)) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -(currentPayment.paidBase25Minutes + currentPayment.paidBonus25Minutes) : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBase50Minutes) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -currentPayment.paidBase50Minutes : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ currentPayment ? formatMinutes(-currentPayment.paidBonus50Minutes) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -currentPayment.paidBonus50Minutes : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500 border-r-2">{{ currentPayment ? formatMinutes(-(currentPayment.paidBase50Minutes + currentPayment.paidBonus50Minutes)) : '0 h' }} <span class="text-neutral-400">/ {{ formatCentiemes(currentPayment ? -(currentPayment.paidBase50Minutes + currentPayment.paidBonus50Minutes) : 0) }}</span></td>
|
|
|
|
|
<td class="px-4 py-[10px] text-center font-bold text-primary-500 border border-primary-500">{{ formatMinutes(paidTotal) }} <span class="text-neutral-400">/ {{ formatCentiemes(paidTotal) }}</span></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<!-- Reste row -->
|
|
|
|
|
@@ -187,41 +187,41 @@
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-4">
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Base 25% (heures)</label>
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Base 25% (centièmes)</label>
|
|
|
|
|
<input
|
|
|
|
|
v-model.number="paymentForm.base25Hours"
|
|
|
|
|
type="number"
|
|
|
|
|
step="0.5"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
class="mt-2 w-full rounded-md border border-neutral-300 px-3 py-2 text-base text-neutral-900 focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-secondary-500/20"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-4">
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Heures 25% (heures)</label>
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Heures 25% (centièmes)</label>
|
|
|
|
|
<input
|
|
|
|
|
v-model.number="paymentForm.bonus25Hours"
|
|
|
|
|
type="number"
|
|
|
|
|
step="0.5"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
class="mt-2 w-full rounded-md border border-neutral-300 px-3 py-2 text-base text-neutral-900 focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-secondary-500/20"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-4">
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Base 50% (heures)</label>
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Base 50% (centièmes)</label>
|
|
|
|
|
<input
|
|
|
|
|
v-model.number="paymentForm.base50Hours"
|
|
|
|
|
type="number"
|
|
|
|
|
step="0.5"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
class="mt-2 w-full rounded-md border border-neutral-300 px-3 py-2 text-base text-neutral-900 focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-secondary-500/20"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-6">
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Heures 50% (heures)</label>
|
|
|
|
|
<label class="block text-sm font-medium text-neutral-700">Heures 50% (centièmes)</label>
|
|
|
|
|
<input
|
|
|
|
|
v-model.number="paymentForm.bonus50Hours"
|
|
|
|
|
type="number"
|
|
|
|
|
step="0.5"
|
|
|
|
|
step="0.01"
|
|
|
|
|
min="0"
|
|
|
|
|
class="mt-2 w-full rounded-md border border-neutral-300 px-3 py-2 text-base text-neutral-900 focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-secondary-500/20"
|
|
|
|
|
/>
|
|
|
|
|
@@ -500,10 +500,10 @@ const paymentForm = reactive({
|
|
|
|
|
const prefillFromExistingPayment = (month: number) => {
|
|
|
|
|
const existing = props.summary?.monthPayments.find((p) => p.month === month) ?? null
|
|
|
|
|
if (existing) {
|
|
|
|
|
paymentForm.base25Hours = existing.paidBase25Minutes / 60
|
|
|
|
|
paymentForm.bonus25Hours = existing.paidBonus25Minutes / 60
|
|
|
|
|
paymentForm.base50Hours = existing.paidBase50Minutes / 60
|
|
|
|
|
paymentForm.bonus50Hours = existing.paidBonus50Minutes / 60
|
|
|
|
|
paymentForm.base25Hours = Math.round(existing.paidBase25Minutes / 60 * 100) / 100
|
|
|
|
|
paymentForm.bonus25Hours = Math.round(existing.paidBonus25Minutes / 60 * 100) / 100
|
|
|
|
|
paymentForm.base50Hours = Math.round(existing.paidBase50Minutes / 60 * 100) / 100
|
|
|
|
|
paymentForm.bonus50Hours = Math.round(existing.paidBonus50Minutes / 60 * 100) / 100
|
|
|
|
|
} else {
|
|
|
|
|
paymentForm.base25Hours = 0
|
|
|
|
|
paymentForm.bonus25Hours = 0
|
|
|
|
|
@@ -516,6 +516,14 @@ watch(() => paymentForm.month, (newMonth) => {
|
|
|
|
|
prefillFromExistingPayment(newMonth)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
watch(() => paymentForm.base25Hours, (value) => {
|
|
|
|
|
paymentForm.bonus25Hours = Math.round(value * 0.25 * 100) / 100
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
watch(() => paymentForm.base50Hours, (value) => {
|
|
|
|
|
paymentForm.bonus50Hours = Math.round(value * 0.50 * 100) / 100
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const openPaymentDrawer = () => {
|
|
|
|
|
paymentForm.month = currentMonth.value
|
|
|
|
|
prefillFromExistingPayment(currentMonth.value)
|
|
|
|
|
|