Evernote
Feature
💡
Feature → Backend + Frontend
Enterprise
All future commands will apply to this enterprise.
create ent "Your Evernote"
about: "Tap into the potential of the internet with Web Clipper"
timeZone: "Asia/Kolkata"
displayDateFormat: "dd/MM/yyyy, HH:mm:ss"
Backend
1. Module
To modularize the code, create Notes module.
ensure module "Evernote"
2. Roles
ensure role Member
3. Variables
ensure var VarSetOfTextNotesCategory kind: setOfText
modules: ["Evernote"]
deploy: fixedOnDeploy
value: "<root>
<node key='keyAddress'>Address</node>
<node key='keyAgreement'>Agreement</node>
<node key='keyContact'>Contact</node>
<node key='keyEvent'>Event</node>
<node key='keyFinancial'>Financial</node>
<node key='keyLink'>Link</node>
<node key='keyLocation'>Location</node>
<node key='keyOutlook'>Outlook</node>
<node key='keyOther'>Other</node>
</root>"
4. NoteSheet
ensure spreadsheet: NoteSheet
withFields: [
"Date",
"Title",
"Category",
"Divider",
"Notes"
]
ofTypes: [date, text, pickText, divider, paragraph]
modules: ["Evernote"]
readRoleSet: [Member]
insertRoleSet: [Member]
updateRoleSet: [Member]
removeRoleSet: [Member]
ensure spreadsheet NoteSheet
searchables: [Date, Title, Category, Notes]
queryables: [Date]
ensure form EntityNote
modules: ["Evernote"]
commentRoleSet: [Member]
ensure section: Details
ensure field Date defaultValue: "now"
ensure field Title autoFocus: true
ensure field Category sourceVar: VarSetOfTextNotesCategory
defaultOptionId: "keyOther"
ensure field Divider dividerKind: thick
ensure field Notes flexHeight: true
ensure section: Attachments
ensure field Attachments kind: setOfDocument fileTypeSet: ["any"]
Frontend
1. Actions
a. AddNote
ensure action AddNote kind: rowInsert
modules: ["Evernote"]
icon: "AddCircleOutlineRounded"
spreadsheet: NoteSheet
sendMessageToInbox: true
b. EditNoteSheet
// switch context to NoteSheet
ensure spreadsheet NoteSheet
//*************
// Table layout
//*************
ensure layoutSpreadsheet Table kind: table
columnSizeSet: ["Flex"]
showComps: [Date, Title, Notes, Attachments]
//****************
// Calendar layout
//****************
ensure layoutSpreadsheet Calendar kind: calendar
showFields: [Category, Notes]
fromDateField: Date
titleField: Title
//*********************
// Switch layout config
//*********************
ensure layoutSpreadsheet Table allowToSwitchLayouts: [Calendar]
ensure layoutSpreadsheet Calendar allowToSwitchLayouts: [Table]
ensure spreadsheet NoteSheet asideDefaultLayout: Calendar
//*******************************
// Action to expose EditNoteSheet
//*******************************
ensure action EditNoteSheet kind: spreadsheetEditor
modules: ["Evernote"]
icon: "ListAltRounded"
spreadsheet: NoteSheet
layoutSpreadsheet: Calendar
2. Prompts
ensure root
promptMap.acceptPromptViaEmail: true
promptMap.acceptPromptViaWhatsapp: true
//** prompt, PromptAddNoteTitle
ensure prompt PromptAddNoteTitle
modules: ["Evernote"]
action: AddNote
promptText: "note ${f:Title}"
permissionRoles: [Member]
//** prompt, PromptAddNoteCompact
ensure prompt PromptAddNoteCompact
modules: ["Evernote"]
action: AddNote
promptText: "note ${f:Title}${sep}${f:Notes}"
permissionRoles: [Member]
//** prompt, PromptAddNoteWithoutDate
ensure prompt PromptAddNoteWithoutDate
modules: ["Evernote"]
action: AddNote
promptText: "note ${f:Title}${sep}${f:Category}${sep}${f:Notes}"
permissionRoles: [Member]
//** prompt, PromptAddNote
ensure prompt PromptAddNote
modules: ["Evernote"]
action: AddNote
promptText: "note ${f:Date}${sep}${f:Title}${sep}${f:Category}${sep}${f:Notes}"
permissionRoles: [Member]
3. Group actions
ensure group Evernote
modules: ["Evernote"]
hideActionMenu: true
pinnedActions: [AddNote, EditNoteSheet]
actionPermission: {
'AddNote': {
'roles': [
'Member'
]
},
'EditNoteSheet': {
'roles': [
'Member'
]
}
}
Deploy
deploy ent