fix: show doctype's whatsapp templates
This commit is contained in:
parent
9b73d60442
commit
f302371275
@ -782,6 +782,7 @@
|
|||||||
<WhatsappTemplateSelectorModal
|
<WhatsappTemplateSelectorModal
|
||||||
v-if="whatsappEnabled"
|
v-if="whatsappEnabled"
|
||||||
v-model="showWhatsappTemplates"
|
v-model="showWhatsappTemplates"
|
||||||
|
:doctype="doctype"
|
||||||
@send="(t) => sendTemplate(t)"
|
@send="(t) => sendTemplate(t)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -52,6 +52,10 @@
|
|||||||
import { TextEditor, createListResource } from 'frappe-ui'
|
import { TextEditor, createListResource } from 'frappe-ui'
|
||||||
import { ref, computed, nextTick, watch, onMounted } from 'vue'
|
import { ref, computed, nextTick, watch, onMounted } from 'vue'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
doctype: String,
|
||||||
|
})
|
||||||
|
|
||||||
const show = defineModel()
|
const show = defineModel()
|
||||||
const searchInput = ref('')
|
const searchInput = ref('')
|
||||||
|
|
||||||
@ -64,7 +68,7 @@ const templates = createListResource({
|
|||||||
doctype: 'WhatsApp Templates',
|
doctype: 'WhatsApp Templates',
|
||||||
cache: ['whatsappTemplates'],
|
cache: ['whatsappTemplates'],
|
||||||
fields: ['name', 'template', 'footer'],
|
fields: ['name', 'template', 'footer'],
|
||||||
filters: { status: 'APPROVED' },
|
filters: { status: 'APPROVED', for_doctype: ['in', [props.doctype, '']]},
|
||||||
orderBy: 'modified desc',
|
orderBy: 'modified desc',
|
||||||
pageLength: 99999,
|
pageLength: 99999,
|
||||||
auto: true,
|
auto: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user