Other permissions changed

This commit is contained in:
Simon Pocrnjič
2025-10-31 12:26:58 +01:00
parent 07b1deda21
commit 0d9c8c8b30
7 changed files with 180 additions and 133 deletions
@@ -7,6 +7,7 @@ import axios from "axios";
const props = defineProps({
show: { type: Boolean, default: false },
contract: { type: Object, default: null },
edit: { type: Boolean, default: true },
});
const emit = defineEmits(["close"]);
@@ -99,20 +100,27 @@ watch(
<div>
<div class="text-sm text-gray-800">
{{
Intl.NumberFormat('de-DE', { style: 'currency', currency: p.currency || 'EUR' }).format(p.amount ?? 0)
Intl.NumberFormat("de-DE", {
style: "currency",
currency: p.currency || "EUR",
}).format(p.amount ?? 0)
}}
</div>
<div class="text-xs text-gray-500">
<span>{{ formatDate(p.paid_at) }}</span>
<span v-if="p.reference" class="ml-2">Sklic: {{ p.reference }}</span>
<span v-if="p.balance_before !== undefined" class="ml-2">
Stanje pred: {{
Intl.NumberFormat('de-DE', { style: 'currency', currency: p.currency || 'EUR' }).format(p.balance_before ?? 0)
Stanje pred:
{{
Intl.NumberFormat("de-DE", {
style: "currency",
currency: p.currency || "EUR",
}).format(p.balance_before ?? 0)
}}
</span>
</div>
</div>
<div class="flex items-center gap-2">
<div class="flex items-center gap-2" v-if="edit">
<button
type="button"
class="inline-flex items-center gap-1 px-2 py-1 rounded text-red-700 hover:bg-red-50"
@@ -129,13 +137,21 @@ watch(
</template>
<template #footer>
<div class="flex justify-end gap-2 w-full">
<button type="button" class="px-3 py-2 rounded bg-gray-200 hover:bg-gray-300" @click="loadPayments">
<button
type="button"
class="px-3 py-2 rounded bg-gray-200 hover:bg-gray-300"
@click="loadPayments"
>
Osveži
</button>
<button type="button" class="px-3 py-2 rounded bg-indigo-600 text-white hover:bg-indigo-700" @click="close">
<button
type="button"
class="px-3 py-2 rounded bg-indigo-600 text-white hover:bg-indigo-700"
@click="close"
>
Zapri
</button>
</div>
</template>
</DialogModal>
</template>
</template>