1use crate::descriptor::{ACCOUNT, Action, Form, Kind, TEXT, field};
4use crate::tags::ACCOUNT_TAGS;
5
6pub const ACCOUNT_MERGE: Form = Form {
9 name: "account-merge",
10 title: "Merge accounts",
11 fields: &[
12 field("into", "Into", ACCOUNT, true),
13 field("from", "From", ACCOUNT, true),
14 ],
15 action: Action::Mutation,
16};
17
18pub const ACCOUNT_CREATE: Form = Form {
20 name: "account-create",
21 title: "Create account",
22 fields: &[
23 field("name", "Name", TEXT, true),
24 field("parent", "Parent", ACCOUNT, false),
25 ],
26 action: Action::Mutation,
27};
28
29pub const ACCOUNT_EDIT: Form = Form {
32 name: "account-edit",
33 title: "Edit account",
34 fields: &[
35 field("id", "Id", Kind::Hidden, true),
36 field("revision", "Revision", Kind::Hidden, true),
37 field("name", "Name", TEXT, true),
38 field("parent", "Parent", ACCOUNT, false),
39 ACCOUNT_TAGS,
40 ],
41 action: Action::LoadMutation,
42};