WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

222 lines
9.5 KiB
PHP

@if ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
add-new
path="{{ $path }}"
name="{{ $name }}"
label="{!! $label !!}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
option-style="height: 4rem;"
{{ $attributes }}
>
@if (! empty($option))
<x-slot name="option">
{!! $option !!}
</x-slot>
@else
<template #option="{option}">
<span class="w-full flex h-16 items-center">
<div class="w-12 h-12 flex items-center justify-center text-2xl font-regular border border-gray-300 rounded-full p-6">
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-if="! option.option.logo">
@{{ option.option.initials }}
</span>
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-else>
<img v-if="option.option.logo"
:src="'{{ url("/" . company_id()) }}/uploads/' + option.option.logo.id"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
:title="option.option.name"
>
<img v-else
:src="'{{ url("/") }}' + '/public/img/user.svg'"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
/>
</span>
</div>
<div class="flex flex-col text-black text-sm font-medium ltr:ml-2 rtl:mr-2 sm:ltr:ml-4 sm:rtl:mr-4">
<span>@{{ option.option.name }}</span>
<span>@{{ option.option.email }}</span>
</div>
</span>
</template>
@endif
</x-form.group.select>
@elseif (($attributes->has('withoutRemote') || $attributes->has('without-remote')) && (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new')))
<x-form.group.select
add-new
path="{{ $path }}"
name="{{ $name }}"
label="{!! $label !!}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
option-style="height: 4rem;"
{{ $attributes }}
>
@if (! empty($option))
<x-slot name="option">
{!! $option !!}
</x-slot>
@else
<template #option="{option}">
<span class="w-full flex h-16 items-center">
<div class="w-12 h-12 flex items-center justify-center text-2xl font-regular border border-gray-300 rounded-full p-6">
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-if="! option.option.logo">
@{{ option.option.initials }}
</span>
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-else>
<img v-if="option.option.logo"
:src="'{{ url("/" . company_id()) }}/uploads/' + option.option.logo.id"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
:title="option.option.name"
>
<img v-else
:src="'{{ url("/") }}' + '/public/img/user.svg'"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
/>
</span>
</div>
<div class="flex flex-col text-black text-sm font-medium ltr:ml-2 rtl:mr-2 sm:ltr:ml-4 sm:rtl:mr-4">
<span>@{{ option.option.name }}</span>
<span>@{{ option.option.email }}</span>
</div>
</span>
</template>
@endif
</x-form.group.select>
@elseif ((! $attributes->has('withoutRemote') && ! $attributes->has('without-remote')) && ($attributes->has('withoutAddNew') || $attributes->has('without-add-new')))
<x-form.group.select
remote
remote_action="{{ $remoteAction }}"
name="{{ $name }}"
label="{!! $label !!}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
option-style="height: 4rem;"
{{ $attributes }}
>
@if (! empty($option))
<x-slot name="option">
{!! $option !!}
</x-slot>
@else
<template #option="{option}">
<span class="w-full flex h-16 items-center">
<div class="w-12 h-12 flex items-center justify-center text-2xl font-regular border border-gray-300 rounded-full p-6">
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-if="! option.option.logo">
@{{ option.option.initials }}
</span>
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-else>
<img v-if="option.option.logo"
:src="'{{ url("/" . company_id()) }}/uploads/' + option.option.logo.id"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
:title="option.option.name"
>
<img v-else
:src="'{{ url("/") }}' + '/public/img/user.svg'"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
/>
</span>
</div>
<div class="flex flex-col text-black text-sm font-medium ltr:ml-2 rtl:mr-2 sm:ltr:ml-4 sm:rtl:mr-4">
<span>@{{ option.option.name }}</span>
<span>@{{ option.option.email }}</span>
</div>
</span>
</template>
@endif
</x-form.group.select>
@else
<x-form.group.select
name="{{ $name }}"
label="{!! $label !!}"
:options="$contacts"
:selected="$selected"
:multiple="$multiple"
:group="$group"
form-group-class="{{ $formGroupClass }}"
:required="$required"
:readonly="$readonly"
:disabled="$disabled"
option-style="height: 4rem;"
{{ $attributes }}
>
@if (! empty($option))
<x-slot name="option">
{!! $option !!}
</x-slot>
@else
<template #option="{option}">
<span class="w-full flex h-16 items-center">
<div class="w-12 h-12 flex items-center justify-center text-2xl font-regular border border-gray-300 rounded-full p-6">
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-if="! option.option.logo">
@{{ option.option.initials }}
</span>
<span class="w-12 h-12 flex items-center justify-center text-2xl font-regular p-6" v-else>
<img v-if="option.option.logo"
:src="'{{ url("/" . company_id()) }}/uploads/' + option.option.logo.id"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
:title="option.option.name"
>
<img v-else
:src="'{{ url("/") }}' + '/public/img/user.svg'"
class="absolute w-12 h-12 rounded-full hidden lg:block"
:alt="option.option.name"
/>
</span>
</div>
<div class="flex flex-col text-black text-sm font-medium ltr:ml-2 rtl:mr-2 sm:ltr:ml-4 sm:rtl:mr-4">
<span>@{{ option.option.name }}</span>
<span>@{{ option.option.email }}</span>
</div>
</span>
</template>
@endif
</x-form.group.select>
@endif