fix: admin users
Deploy banu-front / deploy (push) Failing after 16s

This commit is contained in:
sajjadtalkhabi
2026-06-10 20:55:54 +03:30
parent b8ccbcc030
commit b9fa65b84f
51 changed files with 373 additions and 255 deletions
+4 -3
View File
@@ -85,7 +85,7 @@ const props = defineProps({
name: { type: String, default: '' },
label: { type: String, default: '' },
placeholder: { type: String, default: 'انتخاب کنید' },
options: { type: Array, required: true },
options: { type: Array, default: () => [] },
optionLabel: { type: String, default: 'name' },
optionValue: { type: String, default: 'id' },
multiple: { type: Boolean, default: false },
@@ -118,13 +118,14 @@ const isSelected = (opt) => {
const selectedLabel = computed(() => {
const value = props.modelValue
if (value === undefined || value === null || value === '') return props.placeholder
const options = props.options ?? []
if (props.multiple && Array.isArray(value)) {
const selected = props.options.filter((o) => value.includes(o[props.optionValue]))
const selected = options.filter((o) => value.includes(o[props.optionValue]))
if (selected.length === 0) return props.placeholder
if (selected.length <= 2) return selected.map((s) => s[props.optionLabel]).join('، ')
return `${selected.length} مورد انتخاب شده`
}
const found = props.options.find((o) => o[props.optionValue] === value)
const found = options.find((o) => o[props.optionValue] === value)
return found ? found[props.optionLabel] : props.placeholder
})