Эх сурвалжийг харах

updated tree to support stag app

Josh 4 жил өмнө
parent
commit
a893bc142e

+ 22 - 0
app/Http/Controllers/pros_SINGLE_Controller.php

@@ -568,6 +568,18 @@ class pros_SINGLE_Controller extends Controller
 		return response()->view('admin/pros_SINGLE/SUB_sessions', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
 	}
 
+	// GET /pros/view/{uid}/SUB_app_access
+	public function SUB_app_access(Request $request, $uid) {
+		$record = DB::table('pro')->where('uid', $uid)->first();
+		if(!$record) {
+			$record = DB::table('pro')->where('id', $uid)->first();
+			if($record) return redirect('/pros/view/' . $record->uid . '/SUB_app_access');
+		}
+		$subRecords = DB::table('stag_app_pro_access')->where('pro_id', $record->id)->get();
+		$result_stag_apps = DB::select("select id, name from stag_app");
+		return response()->view('admin/pros_SINGLE/SUB_app_access', compact('record', 'subRecords', 'result_stag_apps'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+
 	// GET /pros/view/{uid}/SUB_audit_log
 	public function SUB_audit_log(Request $request, $uid) {
 		$record = DB::table('pro')->where('uid', $uid)->first();
@@ -627,4 +639,14 @@ class pros_SINGLE_Controller extends Controller
 		}
 		return response()->view('admin/pros_SINGLE/ACTION_add_new_debit_pro_transaction', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
 	}
+
+	// GET /pros/view/{uid}/ACTION_add_new_stag_app_pro_access
+	public function ACTION_add_new_stag_app_pro_access(Request $request, $uid) {
+		$record = DB::table('pro')->where('uid', $uid)->first();
+		if(!$record) {
+			$record = DB::table('pro')->where('id', $uid)->first();
+			if($record) return redirect('/pros/view/' . $record->uid . '/ACTION_add_new_stag_app_pro_access');
+		}
+		return response()->view('admin/pros_SINGLE/ACTION_add_new_stag_app_pro_access', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
 }

+ 30 - 0
app/Http/Controllers/stag_apps_Controller.php

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

+ 53 - 0
app/Http/Controllers/stag_apps_SINGLE_Controller.php

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

+ 26 - 0
generatecv/tree.txt

@@ -1123,6 +1123,15 @@ ADMIN
                     intendedResultingBalance:number
                     customMemo
             sessions
+            app_access
+                id=stag_app_pro_access.pro_id
+                !inc:stag_app
+                !qry:stag_apps:select id, name from stag_app
+                !col:stag_app:StagApp:~stag_apps:name:id,=,$$stag_app_id:all
+                add_new:stag_app_pro_access:create
+                    proUid:hidden=uid
+                    stagAppUid:record:stag_app:uid,name
+                    memo:text
             audit_log
     pro_rates|pro_rate|view|icon:funnel-dollar
         !inc:@created_at,is_active,pro,responsibility,code,amount
@@ -1298,3 +1307,20 @@ ADMIN
         valueIrregular:number
         rssi:number
         deviceId:number
+    stag_apps|stag_app|add|view|icon:tablet-alt
+    stag_apps/add_new:create
+        name*
+        url*:url
+        description
+    stag_apps/view/{uid}
+        ACTIONS
+            deactivate
+                memo
+            reactivate
+                memo
+            update
+                name=name
+                url=url
+                description=description
+        SUB
+            dashboard

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

@@ -12,4 +12,5 @@
 <a href='/pros/view/<?= $record->uid ?>/SUB_bills' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_bills' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Bills</a>
 <a href='/pros/view/<?= $record->uid ?>/SUB_transactions' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_transactions' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Transactions</a>
 <a href='/pros/view/<?= $record->uid ?>/SUB_sessions' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_sessions' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Sessions</a>
+<a href='/pros/view/<?= $record->uid ?>/SUB_app_access' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_app_access' ? 'bg-secondary text-white font-weight-bold' : '' }}'>App Access</a>
 <a href='/pros/view/<?= $record->uid ?>/SUB_audit_log' class='d-block px-3 py-2 border-bottom stag-sublink {{ request()->route()->getActionMethod() === 'SUB_audit_log' ? 'bg-secondary text-white font-weight-bold' : '' }}'>Audit Log</a>

+ 52 - 0
resources/views/admin/pros_SINGLE/ACTION_add_new_stag_app_pro_access.blade.php

@@ -0,0 +1,52 @@
+@extends('admin.pros.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>Add New Stag App Pro Access</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/stagAppProAccess/create">
+        <input type="hidden" name="_success" value="{{route('pros_SINGLE-SUB_app_access', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('pros_SINGLE-ACTION_add_new_stag_app_pro_access', ['uid' => $record->uid])}}">
+        <input class='form-control' type='hidden' name='proUid' value='{{ old('proUid') ? old('proUid') : $record->uid }}' >
+<div class='form-group mb-3'>
+<label class='control-label'>Stag App </label>
+<select class='form-control' name='stagAppUid' value='{{ old('stagAppUid') ? old('stagAppUid') : '' }}' >
+<option value=''>-- Select --</option>
+<?php $dbOptions = \Illuminate\Support\Facades\DB::table('stag_app')->get(); ?>
+<?php foreach($dbOptions as $o): ?>
+<option <?= $o->uid === (old('stagAppUid') ? old('stagAppUid') : '') ? 'selected' : '' ?> value='<?= $o->uid ?>'><?= $o->name ?> (<?= $o->uid ?>)</option>
+<?php endforeach; ?>
+</select>
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Memo </label>
+<input class='form-control' type='text' name='memo' value='{{ old('memo') ? old('memo') : '' }}' >
+</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('pros_SINGLE-SUB_app_access', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 34 - 0
resources/views/admin/pros_SINGLE/SUB_app_access.blade.php

@@ -0,0 +1,34 @@
+@extends('admin.pros.view')
+@section('content-inner')
+
+    <div class="pb-3">
+
+        <h5 class='my-3 d-flex stag-heading stag-heading-sub'>
+            <div>App Access</div>
+            <div class="ml-auto">
+                <a class="btn btn-primary btn-sm ml-2" up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href="{{route('pros_SINGLE-ACTION_add_new_stag_app_pro_access', ['uid' => $record->uid])}}?optimised=1"><i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>
+            </div>
+        </h5>
+
+        <div class="table-responsive p-0 bg-white border stag-table stag-table-sub">
+            <table class="table table-hover text-nowrap">
+                <thead>
+                <tr>
+                    <th>&nbsp;</th>
+<th>StagApp</th>
+                </tr>
+                </thead>
+                <tbody>
+                @foreach($subRecords as $subRecord)
+                    <tr>
+                        <td><a href=""><i class="fas fa-share-square"></i></a></td>
+<td><?= value_from_rs($result_stag_apps, 'name', [['id', '=', $subRecord->stag_app_id], ], 'all'); ?></td>
+                    </tr>
+                @endforeach
+                </tbody>
+            </table>
+        </div>
+
+    </div>
+
+@endsection

+ 3 - 0
resources/views/admin/stag_apps/actions.blade.php

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

+ 48 - 0
resources/views/admin/stag_apps/add_new.blade.php

@@ -0,0 +1,48 @@
+@extends('layouts.pro-logged-in')
+@section('content')
+
+    <div class="form-contents"><div class="failed-form-contents">
+
+    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
+        <div>Stag Apps: Add New</div>
+        <div class="ml-auto">
+            <a class="text-secondary" href="{{route('stag_apps-index')}}" 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="_api" value="/api/stagApp/create">
+        <input type="hidden" name="_success" value="{{route('stag_apps-index')}}">
+        <input type="hidden" name="_return" value="{{route('stag_apps-add_new')}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Name *</label>
+<input class='form-control' type='text' name='name' value='{{ old('name') ? old('name') : '' }}' required>
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Url *</label>
+<input class='form-control' type='url' name='url' value='{{ old('url') ? old('url') : '' }}' required>
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Description </label>
+<input class='form-control' type='text' name='description' value='{{ old('description') ? old('description') : '' }}' >
+</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('stag_apps-index')}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 56 - 0
resources/views/admin/stag_apps/index.blade.php

@@ -0,0 +1,56 @@
+@extends('layouts.pro-logged-in')
+@section('content')
+
+    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
+        <div>Stag Apps: List</div>
+        <div class="ml-auto">
+            <a class='btn btn-primary btn-sm ml-2' up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href='/stag_apps/add_new?optimised=1'><i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>
+        </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>Name</th>
+<th>Url</th>
+<th>Description</th>
+<th>Position Index</th>
+<th>Created At</th>
+<th>Created By Session Id</th>
+<th>Type</th>
+<th>Is Active</th>
+<th>Deactivated At</th>
+<th>Deactivated By Session Id</th>
+<th>Deactivation Memo</th>
+<th>Reactivated At</th>
+<th>Reactivated By Session Id</th>
+<th>Reactivation Memo</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach($records as $record)
+                <tr>
+<td><a href="/stag_apps/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
+<td><?= $record->name ?></td>
+<td><?= $record->url ?></td>
+<td><?= $record->description ?></td>
+<td><?= $record->position_index ?></td>
+<td><?= friendly_date_time($record->created_at) ?></td>
+<td><?= $record->created_by_session_id ?></td>
+<td><?= $record->type ?></td>
+<td><?= $record->is_active ?></td>
+<td><?= friendly_date_time($record->deactivated_at) ?></td>
+<td><?= $record->deactivated_by_session_id ?></td>
+<td><?= $record->deactivation_memo ?></td>
+<td><?= friendly_date_time($record->reactivated_at) ?></td>
+<td><?= $record->reactivated_by_session_id ?></td>
+<td><?= $record->reactivation_memo ?></td>
+                </tr>
+            @endforeach
+            </tbody>
+        </table>
+    </div>
+
+@endsection

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

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

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

@@ -0,0 +1 @@
+<a href='/stag_apps/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/stag_apps/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/stag_apps/info')</div>
+        <div class="d-flex align-items-stretch">
+            <div class="inner-side-nav">
+                <div class="border-right h-100">
+                    @include('admin/stag_apps/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/stag_apps_SINGLE/ACTION_deactivate.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.stag_apps.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>Deactivate</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/stagApp/deactivate">
+        <input type="hidden" name="_success" value="{{route('stag_apps-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('stag_apps_SINGLE-ACTION_deactivate', ['uid' => $record->uid])}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Memo </label>
+<input class='form-control' type='text' name='memo' value='{{ old('memo') ? old('memo') : '' }}' >
+</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('stag_apps-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/stag_apps_SINGLE/ACTION_reactivate.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.stag_apps.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>Reactivate</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/stagApp/reactivate">
+        <input type="hidden" name="_success" value="{{route('stag_apps-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('stag_apps_SINGLE-ACTION_reactivate', ['uid' => $record->uid])}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Memo </label>
+<input class='form-control' type='text' name='memo' value='{{ old('memo') ? old('memo') : '' }}' >
+</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('stag_apps-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 49 - 0
resources/views/admin/stag_apps_SINGLE/ACTION_update.blade.php

@@ -0,0 +1,49 @@
+@extends('admin.stag_apps.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</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/stagApp/update">
+        <input type="hidden" name="_success" value="{{route('stag_apps-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('stag_apps_SINGLE-ACTION_update', ['uid' => $record->uid])}}">
+        <div class='form-group mb-3'>
+<label class='control-label'>Name </label>
+<input class='form-control' type='text' name='name' value='{{ old('name') ? old('name') : $record->name }}' >
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Url </label>
+<input class='form-control' type='text' name='url' value='{{ old('url') ? old('url') : $record->url }}' >
+</div>
+<div class='form-group mb-3'>
+<label class='control-label'>Description </label>
+<input class='form-control' type='text' name='description' value='{{ old('description') ? old('description') : $record->description }}' >
+</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('stag_apps-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/stag_apps_SINGLE/SUB_dashboard.blade.php

@@ -0,0 +1,41 @@
+@extends('admin.stag_apps.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/stag_apps/actions')
+        </div>
+    </div>
+</div>
+
+
+@endsection

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

@@ -179,3 +179,10 @@
 		<p>Bdt Measurements</p>
 	</a>
 </li>
+
+<li class='nav-item'>
+	<a href='/stag_apps' class='nav-link {{ (isset(request()->route()->getController()->selfName) && strpos(request()->route()->getController()->selfName, 'stag_apps') === 0 ? 'active' : '') }} '>
+		<i class='nav-icon fa fa-tablet-alt'></i>
+		<p>Stag Apps</p>
+	</a>
+</li>

+ 17 - 0
routes/generated.php

@@ -393,12 +393,14 @@ Route::prefix('/pros/view/{uid}')->group(function () {
 	Route::get('SUB_bills', 'pros_SINGLE_Controller@SUB_bills')->name('pros_SINGLE-SUB_bills');
 	Route::get('SUB_transactions', 'pros_SINGLE_Controller@SUB_transactions')->name('pros_SINGLE-SUB_transactions');
 	Route::get('SUB_sessions', 'pros_SINGLE_Controller@SUB_sessions')->name('pros_SINGLE-SUB_sessions');
+	Route::get('SUB_app_access', 'pros_SINGLE_Controller@SUB_app_access')->name('pros_SINGLE-SUB_app_access');
 	Route::get('SUB_audit_log', 'pros_SINGLE_Controller@SUB_audit_log')->name('pros_SINGLE-SUB_audit_log');
 	Route::get('ACTION_add_new_pro_rate', 'pros_SINGLE_Controller@ACTION_add_new_pro_rate')->name('pros_SINGLE-ACTION_add_new_pro_rate');
 	Route::get('ACTION_add_new_note_template_pro', 'pros_SINGLE_Controller@ACTION_add_new_note_template_pro')->name('pros_SINGLE-ACTION_add_new_note_template_pro');
 	Route::get('ACTION_add_new_client_pro_access', 'pros_SINGLE_Controller@ACTION_add_new_client_pro_access')->name('pros_SINGLE-ACTION_add_new_client_pro_access');
 	Route::get('ACTION_add_new_credit_pro_transaction', 'pros_SINGLE_Controller@ACTION_add_new_credit_pro_transaction')->name('pros_SINGLE-ACTION_add_new_credit_pro_transaction');
 	Route::get('ACTION_add_new_debit_pro_transaction', 'pros_SINGLE_Controller@ACTION_add_new_debit_pro_transaction')->name('pros_SINGLE-ACTION_add_new_debit_pro_transaction');
+	Route::get('ACTION_add_new_stag_app_pro_access', 'pros_SINGLE_Controller@ACTION_add_new_stag_app_pro_access')->name('pros_SINGLE-ACTION_add_new_stag_app_pro_access');
 });
 
 // --- admin: pro_rates --- //
@@ -536,3 +538,18 @@ Route::prefix('/bdt_measurements')->group(function () {
 	Route::get('', 'bdt_measurements_Controller@index')->name('bdt_measurements-index');
 	Route::get('add_new', 'bdt_measurements_Controller@add_new')->name('bdt_measurements-add_new');
 });
+
+// --- admin: stag_apps_SINGLE --- //
+Route::prefix('/stag_apps/view/{uid}')->group(function () {
+	Route::get('ACTION_deactivate', 'stag_apps_SINGLE_Controller@ACTION_deactivate')->name('stag_apps_SINGLE-ACTION_deactivate');
+	Route::get('ACTION_reactivate', 'stag_apps_SINGLE_Controller@ACTION_reactivate')->name('stag_apps_SINGLE-ACTION_reactivate');
+	Route::get('ACTION_update', 'stag_apps_SINGLE_Controller@ACTION_update')->name('stag_apps_SINGLE-ACTION_update');
+	Route::get('SUB_dashboard', 'stag_apps_SINGLE_Controller@SUB_dashboard')->name('stag_apps_SINGLE-SUB_dashboard');
+});
+
+// --- admin: stag_apps --- //
+Route::prefix('/stag_apps')->group(function () {
+	Route::get('', 'stag_apps_Controller@index')->name('stag_apps-index');
+	Route::get('add_new', 'stag_apps_Controller@add_new')->name('stag_apps-add_new');
+	Route::get('view/{uid}', 'stag_apps_Controller@view')->name('stag_apps-view');
+});