#7283 finish item card sections #588

Merged
jorgep merged 24 commits from 7283-itemSectionsMigration into dev 2024-08-12 12:08:46 +00:00
3 changed files with 13 additions and 8 deletions
Showing only changes of commit 239e796d2e - Show all commits

View File

@ -8,18 +8,18 @@ import { getCssVar } from 'quasar';
const $props = defineProps({
workerId: { type: Number, required: true },
description: { type: String, default: null },
jorgep marked this conversation as resolved Outdated

No siempre se quiere poner un title, ej. cuando hay un desplegable.

No siempre se quiere poner un title, ej. cuando hay un desplegable.

se puede directamente no definir la propiedad? así no es necesario el boolean?

se puede directamente no definir la propiedad? así no es necesario el boolean?
title: { type: [String, Boolean], default: null },
title: { type: [String], default: null },

Habilita

Habilita
color: { type: String, default: null },
});
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
const { t } = useI18n();
const src = computed(
() => `/api/Images/user/160x160/${$props.workerId}/download?access_token=${token}`
);
const title = computed(() =>
$props.title !== false ? $props.title || t('globals.system') : false
);
const title = computed(() => $props.title?.toUpperCase() || t('globals.system'));
const showLetter = ref(false);
const backgroundColor = computed(() => {
const color = $props.color || useColor(title.value);
@ -33,9 +33,9 @@ watch(src, () => (showLetter.value = false));
<QAvatar
:style="{ backgroundColor }"
v-bind="$attrs"
:title="title !== false ? title : undefined"
:title="title || t('globals.system')"
>
<template v-if="showLetter && title !== false">
<template v-if="showLetter">
{{ title.charAt(0) }}
</template>
<QImg v-else :src="src" spinner-color="white" @error="showLetter = true" />

View File

@ -94,7 +94,9 @@ const statesFilter = {
<VnAvatar
:worker-id="data.workerFk"
size="md"
:title="false"
:title="
workersOptions.find(({ id }) => id == data.workerFk)?.name
"
color="primary"
/>
</template>

View File

@ -15,6 +15,7 @@ const { t } = useI18n();
const businessTypes = ref([]);
const contactChannels = ref([]);
const title = ref();
</script>
<template>
<FetchData
@ -95,12 +96,14 @@ const contactChannels = ref([]);
:label="t('customer.basicData.salesPerson')"
:rules="validate('client.salesPersonFk')"
:use-like="false"
:emit-value="false"
@update:model-value="(val) => (title = val?.nickname)"
>
<template #prepend>
jorgep marked this conversation as resolved Outdated

los colores estan en quasar.variables.scss
usa las variables, de paso puedes reemplazar los orange que encuentres

los colores estan en quasar.variables.scss usa las variables, de paso puedes reemplazar los orange que encuentres
<VnAvatar
:worker-id="data.salesPersonFk"
color="primary"
:title="false"
:title="title"
/>
</template>
</VnSelect>