Ver Fonte

merged conflict

= há 4 anos atrás
pai
commit
07e91326f0

+ 19 - 0
app/Http/Controllers/isms_Controller.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Auth;
+
+class isms_Controller extends Controller
+{
+    public $selfName = 'isms_Controller';
+    public $dashboardName = 'dashboard';
+
+	// GET /isms
+	public function index(Request $request) {
+		$records = DB::table('isms')->get();
+		return response()->view('admin/isms/index', compact('records'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+}

+ 24 - 0
app/Http/Controllers/note_template_section_templates_Controller.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Auth;
+
+class note_template_section_templates_Controller extends Controller
+{
+    public $selfName = 'note_template_section_templates_Controller';
+    public $dashboardName = 'dashboard';
+
+	// GET /note_template_section_templates
+	public function index(Request $request) {
+		$records = DB::table('note_template_section_template')->get();
+		return response()->view('admin/note_template_section_templates/index', compact('records'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+
+	// GET /note_template_section_templates/view/{uid}
+	public function view(Request $request, $uid) {
+		return redirect("/note_template_section_templates/view/$uid/SUB_dashboard");
+	}
+}

+ 33 - 0
app/Http/Controllers/note_template_section_templates_SINGLE_Controller.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Auth;
+
+class note_template_section_templates_SINGLE_Controller extends Controller
+{
+    public $selfName = 'note_template_section_templates_SINGLE_Controller';
+    public $dashboardName = 'dashboard';
+
+	// GET /note_template_section_templates/view/{uid}/ACTION_updateHeading
+	public function ACTION_updateHeading(Request $request, $uid) {
+		$record = DB::table('note_template_section_template')->where('uid', $uid)->first();
+		if(!$record) {
+			$record = DB::table('note_template_section_template')->where('id', $uid)->first();
+			if($record) return redirect('/note_template_section_templates/view/' . $record->uid . '/ACTION_updateHeading');
+		}
+		return response()->view('admin/note_template_section_templates_SINGLE/ACTION_updateHeading', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+
+	// GET /note_template_section_templates/view/{uid}/SUB_dashboard
+	public function SUB_dashboard(Request $request, $uid) {
+		$record = DB::table('note_template_section_template')->where('uid', $uid)->first();
+		if(!$record) {
+			$record = DB::table('note_template_section_template')->where('id', $uid)->first();
+			if($record) return redirect('/note_template_section_templates/view/' . $record->uid . '/SUB_dashboard');
+		}
+		return response()->view('admin/note_template_section_templates_SINGLE/SUB_dashboard', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+}

+ 10 - 2
generatecv/tree.txt

@@ -1075,7 +1075,6 @@ ADMIN
         SUB
             dashboard
                 !grp:Pro Type:pro_type:Change:circle=>/pros/view/$uid/ACTION_setProType
-                !grp:Company:company_id:Change:circle=>/pros/view/$uid/ACTION_putCompany
                 !grp:Initiative:initiatives:Change:circle=>/pros/view/$uid/ACTION_setInitiative
                 !grp:Profile Slug:slug:Change:circle=>/pros/view/$uid/ACTION_putSlug
                 !grp:Profile Image:profile_image_file_path:Change:circle=>/pros/view/$uid/ACTION_updateProfileImage
@@ -1275,12 +1274,13 @@ ADMIN
             dashboard
             note_template_section_templates|note_template_section_template|add
                 id=note_template_section_template.note_template_id=>/note_template_section_templates/view/UID
-                !inc:@uid,section_template_id
+                !inc:@uid,section_template_id,heading
                 !qry:section_templates:SELECT id, title FROM section_template
                 !col:section_template_id:Section Template:~section_templates:title:id,=,$$section_template_id:all
                 add_new:note_template_section_template:create
                     noteTemplateUID:hidden=uid
                     sectionTemplateUID:record:section_template:uid,title
+                    heading
     invitations|invitation|add|view|icon:user-md
         !inc:@id,pro_id,first_name,last_name,dob,mcn,email,cell_number,memo,invitation_key,last_email_sent_at,last_sms_sent_at,has_invitation_been_viewed,guest_first_name,guest_last_name,guest_dob,guest_mcn,is_client_already_in_system,client_id,created_at,is_active
     invitations/add_new:create
@@ -1588,3 +1588,11 @@ ADMIN
             remove
         SUB
             dashboard
+    note_template_section_templates|note_template_section_template|view|icon:check
+    note_template_section_templates/view/{uid}
+        ACTIONS
+            updateHeading
+                heading=heading
+        SUB
+            dashboard
+    isms|isms|view|icon:phone

+ 50 - 0
resources/views/admin/isms/index.blade.php

@@ -0,0 +1,50 @@
+@extends('layouts.pro-logged-in')
+@section('content')
+
+    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
+        <div>Isms: List</div>
+        <div class="ml-auto">
+            <!-- _ADD_NEW_LINK_ -->
+        </div>
+    </h3>
+
+    <div class="table-responsive p-0 bg-white border stag-table stag-table-index">
+        <table class="table table-hover text-nowrap table-striped">
+            <thead>
+            <tr>
+<th>&nbsp;</th>
+<th>Message</th>
+<th>To Number</th>
+<th>From Number</th>
+<th>Was Sending Attempted</th>
+<th>Sending Attempted At</th>
+<th>Was Sending Successful</th>
+<th>Sending Attempt Response</th>
+<th>Created At</th>
+<th>Created By Session Id</th>
+<th>Type</th>
+<th>Detail Json</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($records as $record)
+                <tr>
+<td><a href="/isms/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
+<td><?= $record->message ?></td>
+<td><?= $record->to_number ?></td>
+<td><?= $record->from_number ?></td>
+<td><?= $record->was_sending_attempted ?></td>
+<td><?= friendly_date_time($record->sending_attempted_at) ?></td>
+<td><?= $record->was_sending_successful ?></td>
+<td><?= $record->sending_attempt_response ?></td>
+<td><?= friendly_date_time($record->created_at) ?></td>
+<td><?= $record->created_by_session_id ?></td>
+<td><?= $record->type ?></td>
+<td><?= $record->detail_json ?></td>
+                </tr>
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+@endsection

+ 1 - 0
resources/views/admin/note_template_section_templates/actions.blade.php

@@ -0,0 +1 @@
+<a up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href='/note_template_section_templates/view/<?= $record->uid ?>/ACTION_updateHeading?optimised=1' class='d-block btn btn-sm btn-default mb-3'>Update Heading</a>

+ 46 - 0
resources/views/admin/note_template_section_templates/index.blade.php

@@ -0,0 +1,46 @@
+@extends('layouts.pro-logged-in')
+@section('content')
+
+    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
+        <div>Note Template Section Templates: List</div>
+        <div class="ml-auto">
+            <!-- _ADD_NEW_LINK_ -->
+        </div>
+    </h3>
+
+    <div class="table-responsive p-0 bg-white border stag-table stag-table-index">
+        <table class="table table-hover text-nowrap table-striped">
+            <thead>
+            <tr>
+<th>&nbsp;</th>
+<th>Created At</th>
+<th>Type</th>
+<th>Position Index</th>
+<th>Created By Session Id</th>
+<th>Note Template Id</th>
+<th>Section Template Id</th>
+<th>Detail Json</th>
+<th>Is Removable</th>
+<th>Heading</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($records as $record)
+                <tr>
+<td><a href="/note_template_section_templates/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
+<td><?= friendly_date_time($record->created_at) ?></td>
+<td><?= $record->type ?></td>
+<td><?= $record->position_index ?></td>
+<td><?= $record->created_by_session_id ?></td>
+<td><?= $record->note_template_id ?></td>
+<td><?= $record->section_template_id ?></td>
+<td><?= $record->detail_json ?></td>
+<td><?= $record->is_removable ?></td>
+<td><?= $record->heading ?></td>
+                </tr>
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+@endsection

+ 3 - 0
resources/views/admin/note_template_section_templates/info.blade.php

@@ -0,0 +1,3 @@
+<h4 class="d-flex my-3 px-3 stag-heading stag-heading-info">
+    <div>Note Template Section Templates: Single [<?= $record->uid ?>]</div>
+</h4>

+ 1 - 0
resources/views/admin/note_template_section_templates/subs.blade.php

@@ -0,0 +1 @@
+<a href='/note_template_section_templates/view/<?= $record->uid ?>/SUB_dashboard' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_dashboard' ? 'bg-secondary text-white font-weight-bold' : '' }}{{ strpos(request()->route()->getActionMethod(), 'ACTION_') === 0 ? 'bg-secondary text-white font-weight-bold' : '' }}'>Dashboard</a>

+ 20 - 0
resources/views/admin/note_template_section_templates/view.blade.php

@@ -0,0 +1,20 @@
+@extends('layouts.pro-logged-in')
+@section('content')
+
+    <div class="card rounded-0">
+        <div class="border-bottom bg-light">@include('admin/note_template_section_templates/info')</div>
+        <div class="d-flex align-items-stretch">
+            <div class="inner-side-nav">
+                <div class="border-right h-100">
+                    @include('admin/note_template_section_templates/subs')
+                </div>
+            </div>
+            <div class="flex-grow-1 px-3 pb-3 mb-3 inner-content">
+                <div>
+                    @yield('content-inner')
+                </div>
+            </div>
+        </div>
+    </div>
+
+@endsection

+ 41 - 0
resources/views/admin/note_template_section_templates_SINGLE/ACTION_updateHeading.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.note_template_section_templates.view')
+@section('content-inner')
+
+    <div class="form-contents"><div class="failed-form-contents">
+
+    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
+        <div>Update Heading</div>
+        <div class="ml-auto">
+            <a class="text-secondary" href="#" up-close>
+                <i class="fa fa-times"></i>
+            </a>
+        </div>
+    </h4>
+
+    <form action="/post-to-api"
+          up-target="#main-content" up-history="false" up-fail-target=".failed-form-contents" up-reveal="false"
+          method="post" enctype="multipart/form-data"
+          class="border-top px-3 pt-3 pb-1 custom-submit">
+        @csrf
+
+        @if (session('message'))
+            <div class="alert alert-danger">{{ session('message') }}</div>
+        @endif
+
+        <input type="hidden" name="_uid" value="{{ $record->uid }}">
+        <input type="hidden" name="_api" value="/api/noteTemplateSectionTemplate/updateHeading">
+        <input type="hidden" name="_success" value="{{route('note_template_section_templates-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('note_template_section_templates_SINGLE-ACTION_updateHeading', ['uid' => $record->uid])}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Heading </label>
+<input class='form-control' type='text' name='heading' value='{{ old('heading') ? old('heading') : $record->heading }}' >
+</div>
+        <div class="form-group mb-3 d-flex justify-content-center">
+            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
+            <a href="{{route('note_template_section_templates-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 41 - 0
resources/views/admin/note_template_section_templates_SINGLE/SUB_dashboard.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.note_template_section_templates.view')
+@section('content-inner')
+
+    <div class="row mt-3">
+    <div class="col-8">
+
+        <div class="table-responsive p-0 bg-white table-sm stag-table border-top">
+            <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+                <thead>
+                <tr>
+                    <th colspan="2" class="px-2">Record Details</th>
+                </tr>
+                </thead>
+                <tbody>
+                <?php foreach($record as $k => $v): ?>
+                    <?php
+                    if($k === 'id' || $k === 'uid') continue;
+                    $displayValue = $record->$k;
+                    if(substr($k, -3) === '_at') {
+                        $displayValue = friendly_date_time($record->$k);
+                    }
+                    ?>
+                    <tr>
+                        <td class="px-2 text-secondary border-right w-50">{{ ucwords(str_replace("_", " ", $k)) }}</td>
+                        <td class="px-2 font-weight-bold w-50">{{ $displayValue }}</td>
+                    </tr>
+                <?php endforeach; ?>
+                </tbody>
+            </table>
+        </div>
+
+    </div>
+    <div class="col-4">
+        <div class="border-left h-100 pl-3">
+            @include('admin/note_template_section_templates/actions')
+        </div>
+    </div>
+</div>
+
+
+@endsection

+ 4 - 0
resources/views/admin/note_templates_SINGLE/ACTION_add_new_note_template_section_template.blade.php

@@ -36,6 +36,10 @@
 <option <?= $o->uid === (old('sectionTemplateUID') ? old('sectionTemplateUID') : '') ? 'selected' : '' ?> value='<?= $o->uid ?>'><?= $o->title ?> (<?= $o->uid ?>)</option>
 <?php endforeach; ?>
 </select>
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Heading </label>
+<input class='form-control' type='text' name='heading' value='{{ old('heading') ? old('heading') : '' }}' >
 </div>
         <div class="form-group mb-3 d-flex justify-content-center">
             <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>

+ 5 - 3
resources/views/admin/note_templates_SINGLE/SUB_note_template_section_templates.blade.php

@@ -17,15 +17,17 @@
                 <thead>
                 <tr>
                     <th>&nbsp;</th>
-<th>Section Template</th>
+                    <th>Section Template</th>
+                    <th>Heading</th>
+                    <th></th>
                 </tr>
                 </thead>
                 <tbody class="sortable" data-url="/api/noteTemplateSectionTemplate/sort">
                 @foreach($subRecords as $subRecord)
                     <tr data-uid="{{$subRecord->uid}}">
                         <td><a href="/note_template_section_templates/view/{{ $subRecord->uid }}"><i class="fas fa-share-square"></i></a></td>
-<td><?= value_from_rs($result_section_templates, 'title', [['id', '=', $subRecord->section_template_id], ], 'all'); ?></td>
-
+                        <td><?= value_from_rs($result_section_templates, 'title', [['id', '=', $subRecord->section_template_id], ], 'all'); ?></td>
+                        <td>{{ $subRecord->heading }}</td>
                         <td><a href=""><i class="fa fa-bars"></i></a></td>
                     </tr>
                 @endforeach

+ 41 - 0
resources/views/admin/pro_text_shortcuts_SINGLE/ACTION_updateHeading.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.pro_text_shortcuts.view')
+@section('content-inner')
+
+    <div class="form-contents"><div class="failed-form-contents">
+
+    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
+        <div>Update Heading</div>
+        <div class="ml-auto">
+            <a class="text-secondary" href="#" up-close>
+                <i class="fa fa-times"></i>
+            </a>
+        </div>
+    </h4>
+
+    <form action="/post-to-api"
+          up-target="#main-content" up-history="false" up-fail-target=".failed-form-contents" up-reveal="false"
+          method="post" enctype="multipart/form-data"
+          class="border-top px-3 pt-3 pb-1 custom-submit">
+        @csrf
+
+        @if (session('message'))
+            <div class="alert alert-danger">{{ session('message') }}</div>
+        @endif
+
+        <input type="hidden" name="_uid" value="{{ $record->uid }}">
+        <input type="hidden" name="_api" value="/api/proTextShortcut/updateHeading">
+        <input type="hidden" name="_success" value="{{route('pro_text_shortcuts-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('pro_text_shortcuts_SINGLE-ACTION_updateHeading', ['uid' => $record->uid])}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Heading </label>
+<input class='form-control' type='text' name='heading' value='{{ old('heading') ? old('heading') : $record->heading }}' >
+</div>
+        <div class="form-group mb-3 d-flex justify-content-center">
+            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
+            <a href="{{route('pro_text_shortcuts-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 3 - 0
resources/views/admin/pros_SINGLE/SUB_dashboard.blade.php

@@ -23,6 +23,7 @@
     <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
         <thead>
         <tr>
+<<<<<<< HEAD
             <th colspan="2" class="px-2">Company
                 <span class="ml-auto"><a up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href='/pros/view/<?= $record->uid ?>/ACTION_putCompany' title='Change?optimised=1'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Change</span></a></span>
             </th>
@@ -38,6 +39,8 @@
     <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
         <thead>
         <tr>
+=======
+>>>>>>> ec27b61d88858f4518272b9b3b5e85fbf58694fa
             <th colspan="2" class="px-2">Initiative
                 <span class="ml-auto"><a up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href='/pros/view/<?= $record->uid ?>/ACTION_setInitiative' title='Change?optimised=1'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Change</span></a></span>
             </th>

+ 14 - 0
resources/views/layouts/generated-links.blade.php

@@ -298,3 +298,17 @@
 		<p>Pro Text Shortcuts</p>
 	</a>
 </li>
+
+<li class='nav-item'>
+	<a href='/note_template_section_templates' class='nav-link {{ (isset(request()->route()->getController()->selfName) && strpos(request()->route()->getController()->selfName, 'note_template_section_templates') === 0 ? 'active' : '') }} '>
+		<i class='nav-icon fa fa-check'></i>
+		<p>Note Template Section Templates</p>
+	</a>
+</li>
+
+<li class='nav-item'>
+	<a href='/isms' class='nav-link {{ (isset(request()->route()->getController()->selfName) && strpos(request()->route()->getController()->selfName, 'isms') === 0 ? 'active' : '') }} '>
+		<i class='nav-icon fa fa-phone'></i>
+		<p>Isms</p>
+	</a>
+</li>

+ 22 - 5
routes/generated.php

@@ -758,6 +758,13 @@ Route::prefix('/pro_teams/view/{uid}')->group(function () {
 	Route::get('SUB_dashboard', 'pro_teams_SINGLE_Controller@SUB_dashboard')->name('pro_teams_SINGLE-SUB_dashboard');
 });
 
+// --- admin: pro_text_shortcuts --- //
+Route::prefix('/pro_text_shortcuts')->group(function () {
+	Route::get('', 'pro_text_shortcuts_Controller@index')->name('pro_text_shortcuts-index');
+	Route::get('add_new', 'pro_text_shortcuts_Controller@add_new')->name('pro_text_shortcuts-add_new');
+	Route::get('view/{uid}', 'pro_text_shortcuts_Controller@view')->name('pro_text_shortcuts-view');
+});
+
 // --- admin: pro_text_shortcuts_SINGLE --- //
 Route::prefix('/pro_text_shortcuts/view/{uid}')->group(function () {
 	Route::get('ACTION_update', 'pro_text_shortcuts_SINGLE_Controller@ACTION_update')->name('pro_text_shortcuts_SINGLE-ACTION_update');
@@ -765,9 +772,19 @@ Route::prefix('/pro_text_shortcuts/view/{uid}')->group(function () {
 	Route::get('SUB_dashboard', 'pro_text_shortcuts_SINGLE_Controller@SUB_dashboard')->name('pro_text_shortcuts_SINGLE-SUB_dashboard');
 });
 
-// --- admin: pro_text_shortcuts --- //
-Route::prefix('/pro_text_shortcuts')->group(function () {
-	Route::get('', 'pro_text_shortcuts_Controller@index')->name('pro_text_shortcuts-index');
-	Route::get('add_new', 'pro_text_shortcuts_Controller@add_new')->name('pro_text_shortcuts-add_new');
-	Route::get('view/{uid}', 'pro_text_shortcuts_Controller@view')->name('pro_text_shortcuts-view');
+// --- admin: note_template_section_templates --- //
+Route::prefix('/note_template_section_templates')->group(function () {
+	Route::get('', 'note_template_section_templates_Controller@index')->name('note_template_section_templates-index');
+	Route::get('view/{uid}', 'note_template_section_templates_Controller@view')->name('note_template_section_templates-view');
+});
+
+// --- admin: note_template_section_templates_SINGLE --- //
+Route::prefix('/note_template_section_templates/view/{uid}')->group(function () {
+	Route::get('ACTION_updateHeading', 'note_template_section_templates_SINGLE_Controller@ACTION_updateHeading')->name('note_template_section_templates_SINGLE-ACTION_updateHeading');
+	Route::get('SUB_dashboard', 'note_template_section_templates_SINGLE_Controller@SUB_dashboard')->name('note_template_section_templates_SINGLE-SUB_dashboard');
+});
+
+// --- admin: isms --- //
+Route::prefix('/isms')->group(function () {
+	Route::get('', 'isms_Controller@index')->name('isms-index');
 });