diff --git a/components/story/create/storyform.vue b/components/story/create/storyform.vue deleted file mode 100644 index 364f6fe..0000000 --- a/components/story/create/storyform.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - canDraft ? autoSave(values) : autoEdit(values, endpoint, endpointMethod) - " - > - - - - - - - - - - - Complete - - - - - { - if (e.moved) { - // log.debug(e.moved); - move(e.moved.oldIndex, e.moved.newIndex); - acData.chapters = lmove( - acData.chapters, - e.moved.oldIndex, - e.moved.newIndex, - ); - // log.debug(toRaw(acData.chapters.map((a) => toRaw(a)))); - } - } - " - > - - - - - {{ values.chapters[index]?.chapterTitle || "Untitled" }} - { - let localFields = toRaw(fields); - // log.debug(`${index} | ${element.index}`); - // log.debug('fields->', localFields); - acData.chapters.splice(index, 1); - remove(index); - // todo renumber - // renumber() - } - " - > - - - - - - - - - { - if (!Array.isArray(values.chapters)) { - // noinspection TypeScriptValidateTypes - setFieldValue('chapters', []); - } - const chaps = [...toRaw(values.chapters)]; - let lastIndex = chaps.length - 1; - if (lastIndex < 0) lastIndex = 0; - let lastChapter = chaps[lastIndex]; - // log.debug('chaptrs->', chaps); - // log.debug('lastIndex->', lastIndex, lastChapter); - let newChapter = Object.assign({}, defaultChapter, { - summary: lastChapter?.summary || '', - index: (lastChapter?.index || 0) + 1, - bands: lastChapter?.bands || [], - characters: lastChapter?.characters || [], - relationships: lastChapter?.relationships || [], - uuidKey: v4(), - genre: lastChapter?.genre || [], - }); - // log.debug('nc->', newChapter); - push(newChapter); - acData.chapters.push(newChapter); - } - " - > - Add chapter - - - - - {{ - submitText || "Post" - }} - - -