0
0
Fork 0

feat(VnSms): refs #6259 unify ticket and customer sms

This commit is contained in:
Pablo Natek 2023-12-26 09:53:47 +01:00
parent 8a36fc03b8
commit f9b2faf918
3 changed files with 6 additions and 30 deletions

View File

@ -1,14 +1,12 @@
<script setup>
import { onBeforeMount } from 'vue';
import { date } from 'quasar';
import { useSession } from 'src/composables/useSession';
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import VnAvatar from '../ui/VnAvatar.vue';
const $props = defineProps({
url: { type: String, default: null },
where: { type: Object, default: () => {} },
body: { type: Object, default: () => {} },
});
const filter = {
@ -59,8 +57,7 @@ function formatNumber(number) {
<QCard
flat
bordered
class="card q-pa-md"
id="smsCard"
class="card q-pa-md q-mb-sm smsCard"
v-for="row of rows"
:key="row.smsFk"
>
@ -80,14 +77,14 @@ function formatNumber(number) {
}}</QItemLabel>
<QItemLabel>{{ row.sms.message }}</QItemLabel>
</QItemSection>
<QItemSection side top class="center">
<QItemSection side>
<QItemLabel caption>{{
date.formatDate(
row.sms.created,
'YYYY-MM-DD HH:mm:ss'
)
}}</QItemLabel>
<QItemLabel>
<QItemLabel class="row center">
<QChip
:color="
row.sms.status == 'OK'
@ -107,12 +104,7 @@ function formatNumber(number) {
</div>
</template>
<style lang="scss" scoped>
#smsCard {
margin-bottom: 2%;
max-width: 80em;
width: 100%;
}
.center {
.q-item__section--side {
align-items: center;
}
</style>

View File

@ -1,25 +1,17 @@
<script setup>
import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnSms from 'src/components/ui/VnSms.vue';
const route = useRoute();
const state = useState();
const user = state.getUser();
const id = route.params.id;
const where = {
clientFk: id,
ticketFk: null,
};
const body = {
claimFk: id,
workerFk: user.value.id,
};
</script>
<template>
<div class="column items-center">
<VnSms url="clientSms" :where="where" :body="body" />
<VnSms url="clientSms" :where="where" />
</div>
</template>

View File

@ -1,24 +1,16 @@
<script setup>
import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnSms from 'src/components/ui/VnSms.vue';
const route = useRoute();
const state = useState();
const user = state.getUser();
const id = route.params.id;
const where = {
ticketFk: id,
};
const body = {
claimFk: id,
workerFk: user.value.id,
};
</script>
<template>
<div class="column items-center">
<VnSms url="clientSms" :where="where" :body="body" />
<VnSms url="clientSms" :where="where" />
</div>
</template>