feat: by ค่า currentCustomerName , imageUrl
This commit is contained in:
parent
342cb7dcbc
commit
0c2b624d0d
1 changed files with 15 additions and 3 deletions
|
|
@ -12,6 +12,9 @@ const { fetchListById } = userCustomer;
|
||||||
const inputSearch = ref<string>('');
|
const inputSearch = ref<string>('');
|
||||||
const branch = ref<CustomerBranch[]>();
|
const branch = ref<CustomerBranch[]>();
|
||||||
|
|
||||||
|
const currentCustomerName = ref<string>('');
|
||||||
|
const currentCustomerUrlImage = ref<string>('');
|
||||||
|
|
||||||
const prop = withDefaults(
|
const prop = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
color?: 'purple' | 'green';
|
color?: 'purple' | 'green';
|
||||||
|
|
@ -24,7 +27,11 @@ const prop = withDefaults(
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const result = await fetchListById(prop.customerId);
|
const result = await fetchListById(prop.customerId);
|
||||||
if (result) branch.value = result.branch;
|
if (result) {
|
||||||
|
currentCustomerName.value = result.customerName;
|
||||||
|
currentCustomerUrlImage.value = result.imageUrl;
|
||||||
|
branch.value = result.branch;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -45,11 +52,16 @@ onMounted(async () => {
|
||||||
style="border-radius: 0 0 40px 40px; position: relative"
|
style="border-radius: 0 0 40px 40px; position: relative"
|
||||||
>
|
>
|
||||||
<q-avatar no-padding size="50px">
|
<q-avatar no-padding size="50px">
|
||||||
<img src="https://cdn.quasar.dev/img/avatar1.jpg" />
|
<img
|
||||||
|
:src="
|
||||||
|
currentCustomerUrlImage ??
|
||||||
|
'https://cdn.quasar.dev/img/avatar1.jpg'
|
||||||
|
"
|
||||||
|
/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<div>
|
<div>
|
||||||
<div>นายสุขใจ แสนดี</div>
|
<div>{{ currentCustomerName }}</div>
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<i
|
<i
|
||||||
class="isax isax-frame5"
|
class="isax isax-frame5"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue