fix: Include drafts when loading templates (#7100)
* fix: Include drafts when loading templates * fetch drafts when mounting templates settings
This commit is contained in:
@@ -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 />}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user