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

61 lines
2.2 KiB
PHP

@if (! $attributes->has('withoutAddNew') && ! $attributes->has('without-add-new'))
<x-form.group.select
add-new
:path="$path"
name="{{ $name }}"
label="{{ trans_choice('general.accounts', 1) }}"
:options="$accounts"
:option_field="[
'key' => 'id',
'value' => 'title'
]"
:selected="$selected"
:required="$required"
change="onChangeAccount"
form-group-class="{{ $formGroupClass }}"
option-style="height: 4rem;"
{{ $attributes }}
>
<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">
@{{ option.option.initials }}
</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.title }}</span>
<span>@{{ option.option.number }}</span>
</div>
</span>
</template>
</x-form.group.select>
@else
<x-form.group.select
name="{{ $name }}"
label="{{ trans_choice('general.accounts', 1) }}"
:options="$accounts"
:option_field="[
'key' => 'id',
'value' => 'title'
]"
:selected="$selected"
:required="$required"
change="onChangeAccount"
form-group-class="{{ $formGroupClass }}"
option-style="height: 4rem;"
{{ $attributes }}
>
<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">
@{{ option.option.initials }}
</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.title }}</span>
<span>@{{ option.option.number }}</span>
</div>
</span>
</template>
</x-form.group.select>
@endif