forked from frappe/builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebPage.ts
More file actions
55 lines (53 loc) · 868 Bytes
/
webPage.ts
File metadata and controls
55 lines (53 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { createListResource } from "frappe-ui";
const webPages = createListResource({
method: "GET",
doctype: "Builder Page",
fields: [
"name",
"route",
"page_name",
"preview",
"page_title",
"meta_image",
"creation",
"published",
"dynamic_route",
"modified_by",
"modified",
"is_template",
"authenticated_access",
"project_folder",
"owner",
],
filters: {
is_template: 0,
},
cache: "pages",
pageLength: 50,
});
const templates = createListResource({
method: "GET",
doctype: "Builder Page",
fields: [
"name",
"route",
"blocks",
"page_name",
"preview",
"page_title",
"creation",
"published",
"dynamic_route",
"modified",
"is_template",
"template_name",
"owner",
],
filters: {
is_template: 1,
},
cache: "templates",
orderBy: "modified desc",
pageLength: 50,
});
export { templates, webPages };