|
|
|
@ -65,7 +65,6 @@ async function getYearNote(dateStr, rootNote) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!yearNote) {
|
|
|
|
if (!yearNote) {
|
|
|
|
yearNote = await createNote(rootNote.noteId, yearStr);
|
|
|
|
yearNote = await createNote(rootNote.noteId, yearStr);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await attributeService.createLabel(yearNote.noteId, YEAR_LABEL, yearStr);
|
|
|
|
await attributeService.createLabel(yearNote.noteId, YEAR_LABEL, yearStr);
|
|
|
|
await attributeService.createLabel(yearNote.noteId, 'sorted');
|
|
|
|
await attributeService.createLabel(yearNote.noteId, 'sorted');
|
|
|
|
@ -76,6 +75,7 @@ async function getYearNote(dateStr, rootNote) {
|
|
|
|
await attributeService.createRelation(yearNote.noteId, 'template', yearTemplateAttr.value);
|
|
|
|
await attributeService.createRelation(yearNote.noteId, 'template', yearTemplateAttr.value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return yearNote;
|
|
|
|
return yearNote;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -111,7 +111,6 @@ async function getMonthNote(dateStr, rootNote) {
|
|
|
|
const noteTitle = await getMonthNoteTitle(rootNote, monthNumber, dateObj);
|
|
|
|
const noteTitle = await getMonthNoteTitle(rootNote, monthNumber, dateObj);
|
|
|
|
|
|
|
|
|
|
|
|
monthNote = await createNote(yearNote.noteId, noteTitle);
|
|
|
|
monthNote = await createNote(yearNote.noteId, noteTitle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await attributeService.createLabel(monthNote.noteId, MONTH_LABEL, monthStr);
|
|
|
|
await attributeService.createLabel(monthNote.noteId, MONTH_LABEL, monthStr);
|
|
|
|
await attributeService.createLabel(monthNote.noteId, 'sorted');
|
|
|
|
await attributeService.createLabel(monthNote.noteId, 'sorted');
|
|
|
|
@ -122,6 +121,7 @@ async function getMonthNote(dateStr, rootNote) {
|
|
|
|
await attributeService.createRelation(monthNote.noteId, 'template', monthTemplateAttr.value);
|
|
|
|
await attributeService.createRelation(monthNote.noteId, 'template', monthTemplateAttr.value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return monthNote;
|
|
|
|
return monthNote;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -156,7 +156,6 @@ async function getDateNote(dateStr) {
|
|
|
|
const noteTitle = await getDateNoteTitle(rootNote, dayNumber, dateObj);
|
|
|
|
const noteTitle = await getDateNoteTitle(rootNote, dayNumber, dateObj);
|
|
|
|
|
|
|
|
|
|
|
|
dateNote = await createNote(monthNote.noteId, noteTitle);
|
|
|
|
dateNote = await createNote(monthNote.noteId, noteTitle);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await attributeService.createLabel(dateNote.noteId, DATE_LABEL, dateStr.substr(0, 10));
|
|
|
|
await attributeService.createLabel(dateNote.noteId, DATE_LABEL, dateStr.substr(0, 10));
|
|
|
|
|
|
|
|
|
|
|
|
@ -166,6 +165,7 @@ async function getDateNote(dateStr) {
|
|
|
|
await attributeService.createRelation(dateNote.noteId, 'template', dateTemplateAttr.value);
|
|
|
|
await attributeService.createRelation(dateNote.noteId, 'template', dateTemplateAttr.value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return dateNote;
|
|
|
|
return dateNote;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|