forked from verdnatura/salix-front
fix(customer_sms: fix reload
This commit is contained in:
parent
88ea25cb83
commit
5bac9143e6
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount } from 'vue';
|
import { watch, computed } from 'vue';
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import VnAvatar from '../ui/VnAvatar.vue';
|
import VnAvatar from '../ui/VnAvatar.vue';
|
||||||
|
@ -10,31 +10,32 @@ const $props = defineProps({
|
||||||
where: { type: Object, default: () => {} },
|
where: { type: Object, default: () => {} },
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = {
|
const filter = computed(() => {
|
||||||
fields: ['smsFk'],
|
return {
|
||||||
include: {
|
fields: ['smsFk'],
|
||||||
relation: 'sms',
|
include: {
|
||||||
scope: {
|
relation: 'sms',
|
||||||
fields: [
|
scope: {
|
||||||
'senderFk',
|
fields: [
|
||||||
'sender',
|
'senderFk',
|
||||||
'destination',
|
'sender',
|
||||||
'message',
|
'destination',
|
||||||
'statusCode',
|
'message',
|
||||||
'status',
|
'statusCode',
|
||||||
'created',
|
'status',
|
||||||
],
|
'created',
|
||||||
include: {
|
],
|
||||||
relation: 'sender',
|
include: {
|
||||||
scope: {
|
relation: 'sender',
|
||||||
fields: ['name'],
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
...{ where: $props.where },
|
||||||
};
|
};
|
||||||
|
});
|
||||||
onBeforeMount(() => (filter.where = $props.where));
|
|
||||||
|
|
||||||
function formatNumber(number) {
|
function formatNumber(number) {
|
||||||
if (number.length <= 10) return number;
|
if (number.length <= 10) return number;
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import VnNotes from 'src/components/ui/VnNotes.vue';
|
import VnNotes from 'src/components/ui/VnNotes.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const noteFilter = {
|
const noteFilter = computed(() => {
|
||||||
order: 'created DESC',
|
return {
|
||||||
where: {
|
order: 'created DESC',
|
||||||
clientFk: `${route.params.id}`,
|
where: {
|
||||||
},
|
clientFk: `${route.params.id}`,
|
||||||
};
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import VnSms from 'src/components/ui/VnSms.vue';
|
import VnSms from 'src/components/ui/VnSms.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = route.params.id;
|
const where = computed(() => {
|
||||||
|
return {
|
||||||
const where = {
|
clientFk: route.params.id,
|
||||||
clientFk: id,
|
ticketFk: null,
|
||||||
ticketFk: null,
|
};
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center">
|
<VnSms url="clientSms" :where="where" />
|
||||||
<VnSms url="clientSms" :where="where" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue