瀏覽代碼

added spec

= 3 年之前
父節點
當前提交
03e372a828
共有 1 個文件被更改,包括 55 次插入0 次删除
  1. 55 0
      spec/note_implementation_spec_june_30_2021.txt

+ 55 - 0
spec/note_implementation_spec_june_30_2021.txt

@@ -0,0 +1,55 @@
+
+	section
+	
+		<vue-app>
+		
+			<edit-mode v-if="view == 'edit'"> 
+			
+			<summary-markup v-if="view == 'summary'" v-model="summaryHtml">
+			
+			<script>
+
+			{
+			
+				data: {
+					view:'edit',
+					summaryHtml:'{{$section->summary_html}}',
+					data: {
+						...
+					}
+				},
+				
+				methods: {
+					showEdit:function(){
+						// reload data
+						// view = 'edit'
+					}
+					showSummary:function(){
+						// reloadSummaryMarkup
+						// view = 'summary'
+					}
+					reloadData:function(){
+						//call php /note/section/{internalName}/getData
+						//php aggregates section data from the relevant pages / measurements / etc.
+						//php can use ob_start on /section/data.php
+					}
+					reloadSummaryMarkup:function(){
+						//call php to regenerate summary 
+						//php call java /api/section/updateSummaryHtml
+						//return summaryHtmlMarkup
+					}
+				},
+				
+				mount: function{
+				
+				}
+			}
+			</script>
+			
+		</vue-app>
+	
+		edit-mode
+		
+		summary-mode
+		
+			$section->summary_html