fix: Include drafts when loading templates (#7100)

* fix: Include drafts when loading templates

* fetch drafts when mounting templates settings
This commit is contained in:
Hemachandar
2024-06-21 17:06:22 +05:30
committed by GitHub
parent 1bf9012992
commit b6d178943a
2 changed files with 8 additions and 1 deletions

View File

@@ -23,6 +23,10 @@ function Templates() {
const { fetchTemplates, templates, templatesAlphabetical } = documents;
const sort = param.get("sort") || "recent";
React.useEffect(() => {
void documents.fetchDrafts();
}, [documents]);
return (
<Scene
icon={<ShapesIcon />}

View File

@@ -97,7 +97,10 @@ router.post(
};
if (template) {
where = { ...where, template: true };
where = {
...where,
template: true,
};
}
// if a specific user is passed then add to filters. If the user doesn't