Add more permissions
This commit is contained in:
@@ -19,9 +19,13 @@ import { router, usePage } from "@inertiajs/vue3";
|
||||
|
||||
const props = defineProps({
|
||||
person: Object,
|
||||
personEdit: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
edit: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: true,
|
||||
},
|
||||
tabColor: {
|
||||
type: String,
|
||||
@@ -584,7 +588,7 @@ const submitSms = () => {
|
||||
<CusTab name="person" title="Oseba">
|
||||
<div class="flex justify-end mb-2">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800">
|
||||
<button @click="openDrawerUpdateClient">
|
||||
<button @click="openDrawerUpdateClient" v-if="edit && personEdit">
|
||||
<UserEditIcon size="lg" css="text-gray-500 hover:text-gray-800" />
|
||||
</button>
|
||||
</span>
|
||||
@@ -636,7 +640,7 @@ const submitSms = () => {
|
||||
</CusTab>
|
||||
<CusTab name="addresses" title="Naslovi">
|
||||
<div class="flex justify-end mb-2">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800" v-if="edit">
|
||||
<button>
|
||||
<PlusIcon
|
||||
@click="openDrawerAddAddress(false, 0)"
|
||||
@@ -653,7 +657,7 @@ const submitSms = () => {
|
||||
<FwbBadge type="yellow">{{ address.country }}</FwbBadge>
|
||||
<FwbBadge>{{ address.type.name }}</FwbBadge>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex items-center gap-2" v-if="edit">
|
||||
<button>
|
||||
<EditIcon
|
||||
@click="openDrawerAddAddress(true, address.id)"
|
||||
@@ -678,7 +682,7 @@ const submitSms = () => {
|
||||
</CusTab>
|
||||
<CusTab name="phones" title="Telefonske">
|
||||
<div class="flex justify-end mb-2">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800" v-if="edit">
|
||||
<button>
|
||||
<PlusIcon
|
||||
@click="operDrawerAddPhone(false, 0)"
|
||||
@@ -707,14 +711,14 @@ const submitSms = () => {
|
||||
>
|
||||
SMS
|
||||
</button>
|
||||
<button>
|
||||
<button v-if="edit">
|
||||
<EditIcon
|
||||
@click="operDrawerAddPhone(true, phone.id)"
|
||||
size="md"
|
||||
css="text-gray-500 hover:text-gray-800"
|
||||
/>
|
||||
</button>
|
||||
<button @click="openConfirm('phone', phone.id, phone.nu)">
|
||||
<button @click="openConfirm('phone', phone.id, phone.nu)" v-if="edit">
|
||||
<TrashBinIcon size="md" css="text-red-600 hover:text-red-700" />
|
||||
</button>
|
||||
</div>
|
||||
@@ -725,7 +729,7 @@ const submitSms = () => {
|
||||
</CusTab>
|
||||
<CusTab name="emails" title="Email">
|
||||
<div class="flex justify-end mb-2">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800" v-if="edit">
|
||||
<button>
|
||||
<PlusIcon
|
||||
@click="openDrawerAddEmail(false, 0)"
|
||||
@@ -742,7 +746,10 @@ const submitSms = () => {
|
||||
v-for="(email, idx) in getEmails(person)"
|
||||
:key="idx"
|
||||
>
|
||||
<div class="text-sm leading-5 md:text-sm text-gray-500 flex justify-between">
|
||||
<div
|
||||
class="text-sm leading-5 md:text-sm text-gray-500 flex justify-between"
|
||||
v-if="edit"
|
||||
>
|
||||
<div class="flex gap-2">
|
||||
<FwbBadge v-if="email?.label">{{ email.label }}</FwbBadge>
|
||||
<FwbBadge v-else type="indigo">Email</FwbBadge>
|
||||
@@ -777,7 +784,7 @@ const submitSms = () => {
|
||||
</CusTab>
|
||||
<CusTab name="trr" title="TRR">
|
||||
<div class="flex justify-end mb-2">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800">
|
||||
<span class="border-b-2 border-gray-500 hover:border-gray-800" v-if="edit">
|
||||
<button>
|
||||
<PlusIcon
|
||||
@click="openDrawerAddTrr(false, 0)"
|
||||
@@ -794,7 +801,10 @@ const submitSms = () => {
|
||||
v-for="(acc, idx) in getTRRs(person)"
|
||||
:key="idx"
|
||||
>
|
||||
<div class="text-sm leading-5 md:text-sm text-gray-500 flex justify-between">
|
||||
<div
|
||||
class="text-sm leading-5 md:text-sm text-gray-500 flex justify-between"
|
||||
v-if="edit"
|
||||
>
|
||||
<div class="flex gap-2">
|
||||
<FwbBadge v-if="acc?.bank_name">{{ acc.bank_name }}</FwbBadge>
|
||||
<FwbBadge v-if="acc?.holder_name" type="indigo">{{
|
||||
|
||||
Reference in New Issue
Block a user