forked from verdnatura/salix-front
feat(VnSms): refs #6259 unify ticket and customer sms
This commit is contained in:
parent
8a36fc03b8
commit
f9b2faf918
|
@ -1,14 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount } from 'vue';
|
import { onBeforeMount } from 'vue';
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import { useSession } from 'src/composables/useSession';
|
|
||||||
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';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
url: { type: String, default: null },
|
url: { type: String, default: null },
|
||||||
where: { type: Object, default: () => {} },
|
where: { type: Object, default: () => {} },
|
||||||
body: { type: Object, default: () => {} },
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
|
@ -59,8 +57,7 @@ function formatNumber(number) {
|
||||||
<QCard
|
<QCard
|
||||||
flat
|
flat
|
||||||
bordered
|
bordered
|
||||||
class="card q-pa-md"
|
class="card q-pa-md q-mb-sm smsCard"
|
||||||
id="smsCard"
|
|
||||||
v-for="row of rows"
|
v-for="row of rows"
|
||||||
:key="row.smsFk"
|
:key="row.smsFk"
|
||||||
>
|
>
|
||||||
|
@ -80,14 +77,14 @@ function formatNumber(number) {
|
||||||
}}</QItemLabel>
|
}}</QItemLabel>
|
||||||
<QItemLabel>{{ row.sms.message }}</QItemLabel>
|
<QItemLabel>{{ row.sms.message }}</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection side top class="center">
|
<QItemSection side>
|
||||||
<QItemLabel caption>{{
|
<QItemLabel caption>{{
|
||||||
date.formatDate(
|
date.formatDate(
|
||||||
row.sms.created,
|
row.sms.created,
|
||||||
'YYYY-MM-DD HH:mm:ss'
|
'YYYY-MM-DD HH:mm:ss'
|
||||||
)
|
)
|
||||||
}}</QItemLabel>
|
}}</QItemLabel>
|
||||||
<QItemLabel>
|
<QItemLabel class="row center">
|
||||||
<QChip
|
<QChip
|
||||||
:color="
|
:color="
|
||||||
row.sms.status == 'OK'
|
row.sms.status == 'OK'
|
||||||
|
@ -107,12 +104,7 @@ function formatNumber(number) {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#smsCard {
|
.q-item__section--side {
|
||||||
margin-bottom: 2%;
|
|
||||||
max-width: 80em;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.center {
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,25 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useState } from 'src/composables/useState';
|
|
||||||
import VnSms from 'src/components/ui/VnSms.vue';
|
import VnSms from 'src/components/ui/VnSms.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = useState();
|
|
||||||
const user = state.getUser();
|
|
||||||
const id = route.params.id;
|
const id = route.params.id;
|
||||||
|
|
||||||
const where = {
|
const where = {
|
||||||
clientFk: id,
|
clientFk: id,
|
||||||
ticketFk: null,
|
ticketFk: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const body = {
|
|
||||||
claimFk: id,
|
|
||||||
workerFk: user.value.id,
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center">
|
<div class="column items-center">
|
||||||
<VnSms url="clientSms" :where="where" :body="body" />
|
<VnSms url="clientSms" :where="where" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,24 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useState } from 'src/composables/useState';
|
|
||||||
import VnSms from 'src/components/ui/VnSms.vue';
|
import VnSms from 'src/components/ui/VnSms.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = useState();
|
|
||||||
const user = state.getUser();
|
|
||||||
const id = route.params.id;
|
const id = route.params.id;
|
||||||
|
|
||||||
const where = {
|
const where = {
|
||||||
ticketFk: id,
|
ticketFk: id,
|
||||||
};
|
};
|
||||||
|
|
||||||
const body = {
|
|
||||||
claimFk: id,
|
|
||||||
workerFk: user.value.id,
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center">
|
<div class="column items-center">
|
||||||
<VnSms url="clientSms" :where="where" :body="body" />
|
<VnSms url="clientSms" :where="where" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue