fix: show doctype's whatsapp templates
This commit is contained in:
parent
9b73d60442
commit
f302371275
@ -782,6 +782,7 @@
|
||||
<WhatsappTemplateSelectorModal
|
||||
v-if="whatsappEnabled"
|
||||
v-model="showWhatsappTemplates"
|
||||
:doctype="doctype"
|
||||
@send="(t) => sendTemplate(t)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user