section_template
id
internal_name
title
is_canvas // remember: canvas_key == internal_name
DIRECTORY:
/{$section->internal_name}
default.php
summary.php
processor.php
form.php
actions.php
*WILDCARD* there may be /template from (C) to enable smart-update of text into the free text field.
----------------------------------------------------------------
@foreach($sections as $section)
{{$section->title}} [edit/view toggle] MAYBE:: [templates] OPTIONAL:: [actions...]
--------------------------------------------------------------------------
VIEW-MODE:
{{$section->summary_html}} - DONE
--------------------------------------------------------------------------
EDIT-MODE: // if [name=data], just listen for changes to [name=data] and auto-save / replace summary_html.
@if($section->section_template->canvas_key) // PAST_MEDICAL_HISTORY
@include(/vijay-folder/{{$section->section_template->canvas_key}}.php) // expected:
@elseif(file_exists('form.php') // PHYSICAL_ACTIVITY - DONE
@include('form.php') // may contain
@else // CC
// always - DONE
- DONE
$section->content_data['value']
--------------------------------------------------------------------------
@endforeach
====================================================================================================
WHEN update on section... DONE
// take the $data - DONE
// check if processor.php. - DONE
// if not,
// assume it's mud - the new contentData as is replaces. !!! NOT $request->all(), $request->get('data') - DONE
// save it
// generate summary_html...
// run summary.php if there, ob_start/flush... etc. - DONE
// else, use data->value as the summary_html. - DONE
=====================================================================================================