Quellcode durchsuchen

Merge branch 'master' into dev-vj

Vijayakrishnan Krishnan vor 5 Jahren
Ursprung
Commit
632fca468f

+ 112 - 0
app/Http/Controllers/NoteController.php

@@ -0,0 +1,112 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Http;
+use App\HttpModels\ClientLobbyModel;
+use App\HttpModels\MeetingModel;
+use App\Models\AppSession;
+use Cookie;
+
+use App\Models\Note;
+use App\Models\Client;
+use App\Models\Section;
+use App\Models\SectionTemplate;
+
+class NoteController extends Controller
+{
+
+    public function renderNote($noteUid, Request $request)
+    {
+
+        $note = Note::where('uid', $noteUid)->first();
+        $client = Client::where('id', $note->client_id)->first();
+
+        return view('client/note', compact('note', 'client'));
+    }
+
+    public function sectionCreateForm($note_uid, $section_template_uid, Request $request)
+    {
+        $note = Note::where('uid', $note_uid)->first();
+        $sectionTemplate = SectionTemplate::where('uid', $section_template_uid)->first();
+        $section = null; // convenience
+        include(storage_path('sections/' . $sectionTemplate->internal_name . '/form.blade.php'));
+    }
+
+    public function sectionUpdateForm($section_uid, Request $request)
+    {
+        $section = Section::where('uid', $section_uid)->first();
+        $note = Note::where('id', $section->note_id)->first();
+        $sectionTemplate = SectionTemplate::where('id', $section->section_template_id)->first();
+        include(storage_path('sections/' . $sectionTemplate->internal_name . '/form.blade.php'));
+    }
+
+    public function processFormSubmit(Request $request)
+    {
+        // for CREATE
+        $note_uid =  $request->note_uid;
+        $section_template_uid =  $request->section_template_uid;
+        
+        // for UPDATE
+        $section_uid =  $request->section_uid;
+
+        $section = $section_uid ? Section::where('uid', $section_uid)->first() : null;
+        $note = null;
+        $sectionTemplate = null;
+        
+        if($section == null){
+            $note = Note::where('uid', $note_uid)->first();
+            $sectionTemplate = SectionTemplate::where('uid', $section_template_uid)->first();
+        } else {
+            $note = Note::where('id', $section->note_id)->first();
+            $sectionTemplate = SectionTemplate::where('id', $section->section_template_id)->first();
+        }
+
+        $newContentData = [];
+        
+        // we wish to pass THESE arguments into this include: 
+        // if CREATE, $note and $sectionTemplate, and $request
+        // if UPDATE, $section, and $request
+        include(storage_path('sections/' . $sectionTemplate->internal_name . '/processor.php'));
+
+        // now, create summaryHtml appropriate
+        ob_start();
+        include(storage_path('sections/' . $sectionTemplate->internal_name . '/summary.php'));
+        $newSummaryHtml = ob_get_contents();
+        ob_end_clean();
+
+        if($section){
+            // call Java to update section
+            $data = [
+                'uid' => $section->uid,
+                'contentData' => json_encode($newContentData),
+                'summaryHtml' => $newSummaryHtml
+            ];
+            $response = $this->calljava($request, '/section/update', $data);
+            //TODO: handle if response->success == false
+        }else{
+            // call Java to create section
+            $data = [
+                'noteUid' => $note->uid,
+                'sectionTemplateUid' => $sectionTemplate->uid,
+                'contentData' => json_encode($newContentData),
+                'summaryHtml' => $newSummaryHtml
+            ];
+
+            $response = $this->callJava($request, '/section/create', $data);
+            dd($response);
+            //TODO: handle if response->success == false
+        }
+        return redirect(route('patients.view.notes',$note->client->uid));
+    }
+
+    private function callJava($request, $endPoint, $data){
+        $url = env('BACKEND_URL', 'http://localhost:8080') . $endPoint;
+        $response = Http::asForm()
+        ->withHeaders(['sessionKey'=>$request->cookie('sessionKey')])
+        ->post($url, $data)
+        ->json();
+        return $response;
+    }
+}

+ 4 - 1
app/Http/Controllers/PatientController.php

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
 
 use App\Models\Client;
 use App\Models\Pro;
+use App\Models\SectionTemplate;
 use Illuminate\Http\Request;
 
 class PatientController extends Controller
@@ -61,7 +62,9 @@ class PatientController extends Controller
 
     public function notes(Request $request, Client $patient )
     {
-        return view('app.patient.notes', compact('patient'));
+        $pros = Pro::all();
+        $sectionTemplates = SectionTemplate::all();
+        return view('app.patient.notes', compact('patient','pros', 'sectionTemplates'));
     }
 
     public function flowSheets(Request $request, Client $patient )

+ 1 - 1
app/Http/Middleware/VerifyCsrfToken.php

@@ -12,6 +12,6 @@ class VerifyCsrfToken extends Middleware
      * @var array
      */
     protected $except = [
-        //
+        "/process_form_submit"
     ];
 }

+ 20 - 8
app/Models/Note.php

@@ -6,18 +6,30 @@ namespace App\Models;
 
 class Note extends Model
 {
-   protected $table = "note";
+    protected $table = "note";
 
-    public function hcpPro(){
-        return $this->hasOne(Pro::class,'id', 'hcp_pro_id');
+    public function client()
+    {
+        return $this->hasOne(Client::class, 'id', 'client_id');
     }
 
-    public function allyPro(){
-        return $this->hasOne(Pro::class,'id', 'ally_pro_id');
+    public function hcpPro()
+    {
+        return $this->hasOne(Pro::class, 'id', 'hcp_pro_id');
     }
 
-   public function bills(){
-       return $this->hasMany(Bill::class, 'note_id', 'id');
-   }
+    public function allyPro()
+    {
+        return $this->hasOne(Pro::class, 'id', 'ally_pro_id');
+    }
+
+    public function bills()
+    {
+        return $this->hasMany(Bill::class, 'note_id', 'id');
+    }
 
+    public function sections()
+    {
+        return $this->hasMany(Section::class, 'note_id', 'id');
+    }
 }

+ 1 - 1
app/Models/Section.php

@@ -6,5 +6,5 @@ namespace App\Models;
 
 class Section extends Model
 {
-    //
+    protected $table = 'section';
 }

+ 1 - 1
app/Models/SectionTemplate.php

@@ -6,5 +6,5 @@ namespace App\Models;
 
 class SectionTemplate extends Model
 {
-    //
+    protected $table = 'section_template';
 }

+ 41 - 19
public/css/z.css

@@ -1,43 +1,65 @@
 .z {
     font-size: 0.81em;
-    padding: 40px 0;
 } .z button {
     background: #efefef;
     border: 1px solid #767676;
-    display: block;
     font-size: 0.9em;
-    margin-bottom: 2px;
     width: 64px;
+} .z form input {
+    display: block;
+    margin-bottom: 3px;
 } .z h4 {
     display: inline-block;
     margin: 0;
+} .z label {
+    font-weight: 500;
+    margin-bottom: 0;
+} .z ul {
+    margin: 0;
+    padding: 0;
+    list-style-type: none;
 }
 
+
 .z .hbox {
     align-items: center;
     display: flex;
 } .z .hbox > *:not(:first-child) {
-    margin-left: 7px;
+    margin-left: 10px;
 }
 
-.z [data-title]:before {
-    content: attr(data-title) ': ';
-    font-weight: 500;
+.z .vbox {
+    display: flex;
+    flex-direction: column;
+} .z .vbox > *:not(:first-child) {
+    margin-top: 2px;
 }
 
-.z .camera {
-    font-size: 16px;
-    opacity: 0.25;
-} .z .camera.yes {
-    opacity: 1;
+.z .separators {
+    display: flex;
+} .z .separators > *:empty {
+    display: none;
+} .z .separators > *:not(:first-child):before {
+    content: '|';
+    font-weight: bold;
+    margin: 0 5px;
 }
 
-.z .header > *:not(:first-child) {
-    margin-left: 20px;
-}
 
-.z .online-status {
-    color: #aaa;
-} .z .online-status.online {
-    color: #28a745;
+.z .header {}
+.z .thumbnail {
+    --shadow-color: #aaa;
+    --size: 64px;
+    align-items: center;
+    background: #ccc;
+    box-shadow: 0 0 20px var(--shadow-color);
+    border-radius: 50%;
+    display: flex;
+    flex-shrink: 0;
+    justify-content: center;
+    font-size: 18px;
+    height: var(--size);
+    width: var(--size);
+} .z .thumbnail.online {
+    --shadow-color: #50a746;
 }

+ 12 - 14
resources/views/app/patient/notes.blade.php

@@ -98,21 +98,19 @@
             </div>
             <div class="card-body">
                 <div>
-                    {{$note->free_text_html}}
-                    <div moe>
-                        <a href="" show start><i class="fa fa-edit"></i></a>
-                        <form url="/api/note/putFreeTextHtml">
-                            <input type="hidden" name="uid" value="{{$note->uid}}">
-                            <div class="form-group">
-                                <label for="" class="control-label">Free Text HTML</label>
-                                <textarea cols="30" rows="10" name="freeTextHtml" value="{{$note->free_text_html}}" class="form-control"></textarea>
-                            </div>
-                            <div class="form-group">
-                                <button class="btn btn-primary btn-sm" submit>Submit</button>
-                                <button class="btn btn-danger btn-sm" cancel>Cancel</button>
-                            </div>
-                        </form>
+                    @foreach ($sectionTemplates as $sectionTemplate)
+                        <a href="{{route('section_create_form', [$note->uid, $sectionTemplate->uid])}}" show start>add '{{$sectionTemplate->title}}' section</a> 
+                    @endforeach
+                    @if($note->sections->count())
+                    @foreach ($note->sections as $section)
+                    <div class="mt-2">
+                        <div>
+                            {!! $section->summary_html !!}
+                            <a href="{{route('section_update_form', $section->uid)}}">update section</a> 
+                        </div>
                     </div>
+                    @endforeach
+                    @endif
                     @if($note->bills->count())
                     <div class="mt-2">
                         <table class="table table-sm tabe-striped">

+ 172 - 99
resources/views/layouts/patient.blade.php

@@ -68,7 +68,104 @@
             </nav>
             <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
                 <div class="card mt-3">
-                    <div class="card-header">
+                    <div class=card-header>
+                        <?
+                            $thumbnail = $patient->profile_picture_base64;
+                            $initials = !$thumbnail ? substr($patient->name_first, 0, 1).substr($patient->name_last, 0, 1) : '';
+                            $online = $patient->is_online ? 'online' : '';
+                            $patientName = implode(', ', array_filter([$patient->name_last, $patient->name_first]));
+
+                            $confirmedCell = $patient->is_cell_number_confirmed ? $patient->cell_number : null;
+                            $confirmedEmail = $patient->is_email_address_confirmed ? $patient->email_address : null;
+                            $location = implode(', ', array_filter([$patient->home_address_city, $patient->home_address_state]));
+
+                            $mcpName = implode(', ', array_filter([$patient->mcp->name_last, $patient->mcp->name_first]));
+                            $cmName = $patient->cm ? implode(', ', array_filter([$patient->cm->name_last, $patient->cm->name_first])) : null;
+
+                            $memberSince = date_diff(date_create($patient->created_at), date_create('now'))->days;
+                            if ($memberSince > 30) $memberSince = date('F, Y', strtotime($patient->created_at));
+                            else if ($memberSince > 1) $memberSince .= ' days ago';
+                            else if ($memberSince === 1) $memberSince = 'yesterday';
+                            else if ($memberSince === 0) $memberSince = 'today';
+                        ?>
+
+                        <div class=z><div class=header>
+                            @if($patient->is_duplicate)
+                                <h5>This chart is a duplicate of <a href=javascript:void(0)>Cooper, Amiele</a>.</h5><br>
+                            @endif
+                            <div class=hbox>
+                                <div class="thumbnail {{$online}}" style="background-image:<?=$thumbnail?>"><?=$initials?></div>
+                                <section>
+                                    <div class=hbox>
+                                        <h4>{{$patientName}}</h4>
+                                        <i class=chart>[#{{$patient->chart_number}}]</i>
+                                    </div>
+                                    <div class=separators>
+                                        <div>{{$patient->dob}} ({{$patient->age_in_years}} y.o {{$patient->sex}})</div>
+                                        <div>
+                                            <label>MCN:</label>
+                                            @if($patient->was_medicare_validation_successful)
+                                                <span>
+                                                    Valid #,
+                                                    @if($patient->is_part_b_primary == 'YES')
+                                                        Medicare Part B
+                                                    @else
+                                                        Not Medicare Part B <i class="fa fa-times"></i>
+                                                        @if($patient->is_medicare_advantage == 'YES')
+                                                            , Medicare Advantage,
+                                                            {{$patient->medicare_advantage_plan}}
+                                                        @endif
+                                                    @endif
+                                                </span>
+                                            @else
+                                                <div moe>
+                                                    <a href="" start show>
+                                                        @if($patient->mcn)
+                                                            {{$patient->mcn}} INVALID! <i class="fa fa-times"></i>
+                                                        @else
+                                                            None provided.
+                                                        @endif
+                                                    </a>                                            
+                                                    <form url="/api/client/putMcn">
+                                                        <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                                        <input type="text" name="name_first" value="{{$patient->name_first}}">
+                                                        <input type="text" name="name_last" value="{{$patient->name_last}}">
+                                                        <input type="text" name="dob" value="{{$patient->dob}}">
+                                                        <input type="text" name="mcn" value="{{$patient->mcn}}">
+                                                        <div>
+                                                            <button submit>Submit</button>
+                                                            <button cancel>Cancel</button>
+                                                        </div>
+                                                    </form>
+                                                </div>
+                                            @endif
+                                        </div>
+                                    </div>
+                                    <ul class=hbox>
+                                        <li><i class="fa fa-phone-alt" aria-hidden="true"></i> {{$confirmedCell}}</li>
+                                        <li><i class="fa fa-envelope" aria-hidden="true"></i> {{$confirmedEmail}}</li>
+                                        <li><i class="fa fa-map-marker-alt" aria-hidden="true"></i> {{$location}}</li>
+                                    </ul>                            
+                                    <div class=separators>
+                                        <div>Joined <?=$memberSince?></div>
+                                        <div><label>PCP:</label> {{$mcpName}}</div>
+                                        <div><label>MA:</label> {{$cmName}}</div>
+                                    </div>
+                                </section>
+                                <section>
+                                    <div><label>Allergies:</label> Grass, Pollen, Latex</div>
+                                    <div><label>Next Appt:</label> {{$patient->mcp_onboarding_visit_date}}</div>
+                                </section>
+                                <section class=vbox>
+                                    <button>+ Note</button>
+                                    <button>Pt. Ed.</button>
+                                    <button>Video</button>
+                                </section>
+                            </div>
+                        </div></div> <!-- z -->
+                    </div>
+
+                    <div class="card-header" style=display:none>
                         @if($patient->is_duplicate)
                             <div class="alert alert-danger">
                                 This chart is a duplicate of: __________
@@ -270,48 +367,81 @@
                                         <i class="fa fa-plus-circle"></i>
                                         Note
                                     </a>
-                                    <form url="/api/note/createUsingFreeTextHtml" right>
+                                    <form url="/api/note/create" right>
                                         <input type="hidden" name="clientUid" value="{{$patient->uid}}">
-                                        <div class="form-group">
-                                            <label for="" class="control-label">HCP Pro</label>
-                                            <select name="hcpProUid" class="form-control">
-                                                <option value="">-- select hcp pro --</option>
-                                                @foreach ($pros as $pro)
-                                                    <option
-                                                        value="{{$pro->uid}}">{{$pro->name_display}}</option>
-                                                @endforeach
-                                            </select>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label">Ally Pro</label>
-                                            <select name="allyProUid" class="form-control">
-                                                <option value="">-- select ally pro --</option>
-                                                @foreach ($pros as $pro)
-                                                    <option
-                                                        value="{{$pro->uid}}">{{$pro->name_display}}</option>
-                                                @endforeach
-                                            </select>
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label text-left">Title</label>
-                                            <input type="text" name="title" class="form-control">
-                                        </div>
-                                        <div class="form-group">
-                                            <label for="" class="control-label text-left">Effective date</label>
-                                            <input type="date" name="effectiveDateEST" class="form-control">
-                                        </div>
-
-                                        <div class="form-group">
-                                            <label for="" class="control-label text-left">Effective time</label>
-                                            <input type="time" name="effectiveTime" class="form-control">
-                                        </div>
-
-                                        <div class="form-group">
-                                            <textarea name="freeTextHtml" id="" cols="30" rows="10" class="form-control"></textarea>
-                                        </div>
-                                        <div class="form-group">
-                                            <button class="btn btn-primary" submit>Submit</button>
-                                            <button class="btn btn-danger" cancel>Cancel</button>
+                                        <div class="row">
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">HCP Pro</label>
+                                                    <select name="hcpProUid" class="form-control">
+                                                        <option value="">-- select hcp pro --</option>
+                                                        @foreach ($pros as $pro)
+                                                            <option
+                                                                value="{{$pro->uid}}">{{$pro->name_display}}</option>
+                                                        @endforeach
+                                                    </select>
+                                                </div>
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">Ally Pro</label>
+                                                    <select name="allyProUid" class="form-control">
+                                                        <option value="">-- select ally pro --</option>
+                                                        @foreach ($pros as $pro)
+                                                            <option
+                                                                value="{{$pro->uid}}">{{$pro->name_display}}</option>
+                                                        @endforeach
+                                                    </select>
+                                                </div>
+                                                <div class="form-group">
+                                                    <label for="" class="control-label text-left">Title</label>
+                                                    <input type="text" name="title" class="form-control">
+                                                </div>
+                                                <div class="form-group">
+                                                    <label for="" class="control-label text-left">Effective date</label>
+                                                    <input type="date" name="effectiveDateEST" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label text-left">Effective time</label>
+                                                    <input type="time" name="effectiveTime" class="form-control">
+                                                </div>
+                                            </div>
+                                            <div class="col-md-6">
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">reason1</label> 
+                                                    <input type="text" name="reason1" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">reason2</label> 
+                                                    <input type="text" name="reason2" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">reason3</label> 
+                                                    <input type="text" name="reason3" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">reason3Plus</label> 
+                                                    <input type="text" name="reason3Plus" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">serviceLocation</label> 
+                                                    <input type="text" name="serviceLocation" class="form-control">
+                                                </div>
+        
+                                                <div class="form-group">
+                                                    <label for="" class="control-label">category</label> 
+                                                    <input type="text" name="category" class="form-control">
+                                                </div>
+                                            </div>
+                                            <div class="col-md-12">
+                                                <div class="form-group">
+                                                    <button class="btn btn-primary" submit>Submit</button>
+                                                    <button class="btn btn-danger" cancel>Cancel</button>
+                                                </div>
+                                            </div>
                                         </div>
                                     </form>
                                 </div>
@@ -364,63 +494,6 @@
                         </div>
                     </div>
                 </div>
-
-
-
-                <div class=z>
-                    @if($patient->is_duplicate)
-                        <h5>This chart is a duplicate of <a href=javascript:void(0)>Cooper, Amiele</a>.</h5><br>
-                    @endif
-                    <div class=hbox>
-                        <section>
-                            <div class=hbox>
-                                <i class="online-status online fa fa-circle" title=Online></i>
-                                <i class="camera yes fa fa-camera" title="Camera available"></i>
-                            </div>
-                            <h4>{{$patient->name_last}}, {{$patient->name_first}}</h4>
-                            <div>Born <b>{{$patient->dob}}</b>, <b>{{$patient->age_in_years}}</b> y.o {{$patient->sex}} [<i>#{{$patient->chart_number}}</i>]</div>
-                        </section>
-                        @if($patient->mcp)
-                        <section>
-                            <div data-title=PCP>{{$patient->mcp->name_last}}, {{$patient->mcp->name_first}}</div>
-                            <div data-title=MA>{{$patient->mcp->name_last}}, {{$patient->mcp->name_first}}</div>
-                        </section>
-                        @endif
-                        <section data-title=MCN>
-                            @if($patient->mcn)
-                                @if($patient->was_medicare_validation_successful)
-                                    <div>
-                                        Valid #,
-                                        @if($patient->is_part_b_primary == 'YES')
-                                            Medicare Part B <i class="fa fa-check"></i>
-                                        @else
-                                            Not Medicare Part B <i class="fa fa-times"></i>
-                                            @if($patient->is_medicare_advantage == 'YES')
-                                                , Medicare Advantage,
-                                                {{$patient->medicare_advantage_plan}}
-                                            @endif
-                                        @endif
-                                    </div>
-                                @else
-                                    {{$patient->mcn}}
-                                    <div>INVALID! <i class="fa fa-times"></i></div>
-                                @endif
-                            @else
-                                <div>None provided. <i class="fa fa-times"></i></div>
-                            @endif
-                        </section>
-                        <section>
-                            <div data-title=Allergies>Grass, Pollen, Latex</div>
-                            <div data-title=Focus>T2DM, CAD, HTN, Weight Loss</div>
-                            <div data-title="Next Appt">{{$patient->mcp_onboarding_visit_date}}</div>
-                        </section>
-                        <section>
-                            <button>+ Note</button>
-                            <button>Pt. Ed.</button>
-                            <button>Video</button>
-                        </section>
-                    </div>
-                </div> <!-- z -->
             </main>
         </div>
     </div>

+ 6 - 0
routes/web.php

@@ -76,4 +76,10 @@ Route::middleware('pro.auth')->group(function () {
     Route::get('/pro/meet/{uid?}', 'PracticeManagementController@meet');
     Route::get('/pro/get-opentok-session-key/{uid}', 'PracticeManagementController@getOpentokSessionKey');
 
+    //Notes stuff
+    Route::get('/note/{note_uid}', 'NoteController@renderNote')->name('render-note');
+    Route::get('/section_create_form/{note_uid}/{section_template_uid}', 'NoteController@sectionCreateForm')->name('section_create_form');
+    Route::get('/section_update_form/{section_uid}', 'NoteController@sectionUpdateForm')->name('section_update_form');
+    Route::post("/process_form_submit", 'NoteController@processFormSubmit')->name('process_form_submit');
+
 });

+ 43 - 0
storage/sections/test1/form.blade.php

@@ -0,0 +1,43 @@
+<?php
+$contentData = [
+    'nickname'=>'',
+    'favoriteColor'=>''
+]; 
+if($section){
+    $contentData = json_decode($section->content_data, true);
+}
+?>
+<div id="section_form">
+
+    <div class="card">
+        <div class="card-header">
+            <?php if(!$section):?>
+            <div class="alert alert-info">Create section</div>
+            <?php else: ?>
+            <div class="alert alert-info">Update section</div>
+            <?php endif; ?>
+        </div>
+        <div class="card-body">
+            <form method="POST" up-target="#note-container" action="/process_form_submit" up-history="false">
+                <?php if($section): ?>
+                    <input type="hidden" name="section_uid" value="<?= $section->uid?>">
+                <?php else: ?>
+                    <input type="hidden" name="note_uid" value="<?= $note->uid?>">
+                    <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
+                <?php endif; ?>
+                <div class="form-group">
+                    <label for="">Nickname</label>
+                    <input type="text" class="form-control" name="nickname" value="<?= $contentData['nickname'] ?>" placeholder="nickname">
+                </div>
+                <div class="form-group">
+                    <label for="">Favorite color</label>
+                    <input type="text" class="form-control" name="favoriteColor" value="<?= $contentData['favoriteColor'] ?>" placeholder="Favorite color">
+                </div>
+                <div class="form-group">
+                    <button class="btn btn-primary">Submit</button>
+                </div>
+            </form>
+        </div>
+
+    </div>
+</div>

+ 9 - 0
storage/sections/test1/processor.php

@@ -0,0 +1,9 @@
+<?php 
+
+$nickname = $request->get('nickname');
+$favoriteColor = $request->get('favoriteColor');
+
+$newContentData = [
+    'nickname'=>$nickname,
+    'favoriteColor'=>$favoriteColor
+];

+ 3 - 0
storage/sections/test1/summary.php

@@ -0,0 +1,3 @@
+<div class="p-5" style="background-color:<?= $newContentData['favoriteColor']; ?>; ">
+    <h1><?= $newContentData['nickname']; ?></h1>
+</div>