1
0
forked from test/crm

fix: show doctype's whatsapp templates

This commit is contained in:
Shariq Ansari 2024-05-13 10:31:35 +05:30
parent 9b73d60442
commit f302371275
2 changed files with 6 additions and 1 deletions

View File

@ -782,6 +782,7 @@
<WhatsappTemplateSelectorModal
v-if="whatsappEnabled"
v-model="showWhatsappTemplates"
:doctype="doctype"
@send="(t) => sendTemplate(t)"
/>
</template>

View File

@ -52,6 +52,10 @@
import { TextEditor, createListResource } from 'frappe-ui'
import { ref, computed, nextTick, watch, onMounted } from 'vue'
const props = defineProps({
doctype: String,
})
const show = defineModel()
const searchInput = ref('')
@ -64,7 +68,7 @@ const templates = createListResource({
doctype: 'WhatsApp Templates',
cache: ['whatsappTemplates'],
fields: ['name', 'template', 'footer'],
filters: { status: 'APPROVED' },
filters: { status: 'APPROVED', for_doctype: ['in', [props.doctype, '']]},
orderBy: 'modified desc',
pageLength: 99999,
auto: true,