Browse Source

Merge branch 'master' of rav.triplestart.com:TigerPHP/stagfe

Josh Kamau 5 years ago
parent
commit
166f4d98cb

+ 13 - 0
.env.example

@@ -44,3 +44,16 @@ PUSHER_APP_CLUSTER=mt1
 
 
 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
 MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
 MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
+
+OPENTOK_KEY=46678902
+OPENTOK_SECRET=c64dd0c05f7a5955ee60c3c81daa3dfe97e73d3c
+
+STAG_TOKEN=hernya_vash_token
+SOCKET_SERVICE_URL=http://socket-io:3000
+MIX_SOCKET_SERVICE_URL=http://localhost:3000
+
+TWILIO_SID=AC3268825a3a12f00fdb798a37e55f649c
+TWILIO_TOKEN=1c1aa713ee722e1d6dc8a18e82e83308
+TWILIO_NUMBER=+12023359983
+
+MIX_APP_URL="http://app.lobby.localhost"

+ 4 - 0
.gitignore

@@ -1,6 +1,10 @@
 /node_modules
 /node_modules
 /public/hot
 /public/hot
 /public/storage
 /public/storage
+/public/js/chunks
+/public/js/app.js
+/public/css/app.css
+/public/mix-manifest.json
 /storage/*.key
 /storage/*.key
 /vendor
 /vendor
 .env
 .env

+ 0 - 4
.idea/stagfe.iml

@@ -102,10 +102,6 @@
     </content>
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="jquery-3.5.1.slim" level="application" />
-    <orderEntry type="library" name="jquery-3.5.1" level="application" />
-    <orderEntry type="library" name="bootstrap.bundle" level="application" />
-    <orderEntry type="library" name="opentok" level="application" />
     <orderEntry type="library" name="ionicons" level="application" />
     <orderEntry type="library" name="ionicons" level="application" />
     <orderEntry type="library" name="ionicons" level="application" />
     <orderEntry type="library" name="ionicons" level="application" />
   </component>
   </component>

+ 33 - 5
app/Console/Commands/GenerateTreeCommand.php

@@ -339,18 +339,41 @@ class GenController {
                     $input = ["'record'"];
                     $input = ["'record'"];
                     // if sub-index controller, load subRecords
                     // if sub-index controller, load subRecords
                     if($method->type === 'sub' && count($method->data)) {
                     if($method->type === 'sub' && count($method->data)) {
-                        $dbParts = explode("=", $method->data[0]);
+                        $parts = explode(",", $method->data[0]);
+
+                        $loadingLine = [];
+
+                        // first 'where'
+                        $dbParts = explode("=", $parts[0]);
                         $localField = $dbParts[0];
                         $localField = $dbParts[0];
                         $dbParts = explode(".", $dbParts[1]);
                         $dbParts = explode(".", $dbParts[1]);
                         $foreignTable = $dbParts[0];
                         $foreignTable = $dbParts[0];
                         $foreignField = $dbParts[1];
                         $foreignField = $dbParts[1];
-                        $code[] = "\t\t\$subRecords = DB::table('$foreignTable')->where('$foreignField', \$record->$localField)->get();";
+                        $loadingLine[] = "\t\t\$subRecords = DB::table('$foreignTable')";
+                        $loadingLine[] = "->where('$foreignField', \$record->$localField)";
+
+                        // other 'where's
+                        if(count($parts) > 1) {
+                            for ($i = 1; $i < count($parts); $i++) {
+                                $dbParts = explode("=", $parts[$i]);
+                                $field = $dbParts[0];
+                                $value = $dbParts[1];
+                                $loadingLine[] = "->where('$field', $value)";
+                            }
+                        }
+
+                        $loadingLine[] = "->get();";
+
+                        $code[] = implode("", $loadingLine);
+
+                        // $code[] = "\t\t\$subRecords = DB::table('$foreignTable')->where('$foreignField', \$record->$localField)->get();";
                         $input[] = "'subRecords'";
                         $input[] = "'subRecords'";
                     }
                     }
                     $code[] = "\t\treturn view('{$this->root}/{$this->name}/{$method->name}', " .
                     $code[] = "\t\treturn view('{$this->root}/{$this->name}/{$method->name}', " .
                         "compact(" . implode(", ", $input) . "));";
                         "compact(" . implode(", ", $input) . "));";
                 }
                 }
                 else {
                 else {
+                    $loadingLine = [];
                     $loadingLine[] = "\t\t\$records = DB::table('{$this->dbTable}')";
                     $loadingLine[] = "\t\t\$records = DB::table('{$this->dbTable}')";
                     if($this->condition) {
                     if($this->condition) {
                         $loadingLine[] = "->where('{$this->condition['field']}', {$this->condition['value']})";
                         $loadingLine[] = "->where('{$this->condition['field']}', {$this->condition['value']})";
@@ -700,7 +723,7 @@ class GenController {
                     break;
                     break;
             }
             }
         }
         }
-        if($type !== 'hidden') {
+        if($type !== 'hidden' && $type !== 'bool') {
             $code[] = "<div class='form-group mb-3'>";
             $code[] = "<div class='form-group mb-3'>";
             $code[] = "<label class='control-label'>{$this->camelToTitleCase($this->snakeToTitleCase($display))}</label>";
             $code[] = "<label class='control-label'>{$this->camelToTitleCase($this->snakeToTitleCase($display))}</label>";
         }
         }
@@ -729,9 +752,14 @@ class GenController {
                 $code[] = "<?php endforeach; ?>";
                 $code[] = "<?php endforeach; ?>";
                 $code[] = "</select>";
                 $code[] = "</select>";
                 break;
                 break;
+            case "bool":
+                $code[] = "<div class='form-group mb-3'>";
+                $code[] = "<label class='control-label'>{$this->camelToTitleCase($this->snakeToTitleCase($display))} ";
+                $code[] = "<input class='form-control' type='checkbox' name='$name'>";
+                $code[] = "</label>";
+                break;
             default:
             default:
-                $code[] = "<input class='form-control' type='$type' name='$name' " . $valueLine .
-                    ">";
+                $code[] = "<input class='form-control' type='$type' name='$name' " . $valueLine . ">";
         }
         }
         if($type !== 'hidden') {
         if($type !== 'hidden') {
             $code[] = "</div>";
             $code[] = "</div>";

+ 2 - 2
app/Http/Controllers/care_months_SINGLE_Controller.php

@@ -133,14 +133,14 @@ class care_months_SINGLE_Controller extends Controller
 	// GET /care_months/view/{uid}/SUB_cm_time_entries
 	// GET /care_months/view/{uid}/SUB_cm_time_entries
 	public function SUB_cm_time_entries(Request $request, $uid) {
 	public function SUB_cm_time_entries(Request $request, $uid) {
 		$record = DB::table('care_month')->where('uid', $uid)->first();
 		$record = DB::table('care_month')->where('uid', $uid)->first();
-		$subRecords = DB::table('care_month_entry')->where('care_month_id', $record->id)->get();
+		$subRecords = DB::table('care_month_entry')->where('care_month_id', $record->id)->where('cm_or_rm', 'CM')->get();
 		return view('pro/care_months_SINGLE/SUB_cm_time_entries', compact('record', 'subRecords'));
 		return view('pro/care_months_SINGLE/SUB_cm_time_entries', compact('record', 'subRecords'));
 	}
 	}
 
 
 	// GET /care_months/view/{uid}/SUB_rm_time_entries
 	// GET /care_months/view/{uid}/SUB_rm_time_entries
 	public function SUB_rm_time_entries(Request $request, $uid) {
 	public function SUB_rm_time_entries(Request $request, $uid) {
 		$record = DB::table('care_month')->where('uid', $uid)->first();
 		$record = DB::table('care_month')->where('uid', $uid)->first();
-		$subRecords = DB::table('care_month_entry')->where('care_month_id', $record->id)->get();
+		$subRecords = DB::table('care_month_entry')->where('care_month_id', $record->id)->where('cm_or_rm', 'RM')->get();
 		return view('pro/care_months_SINGLE/SUB_rm_time_entries', compact('record', 'subRecords'));
 		return view('pro/care_months_SINGLE/SUB_rm_time_entries', compact('record', 'subRecords'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/erx_Controller.php

@@ -12,7 +12,7 @@ class erx_Controller extends Controller
 
 
 	// GET /erx
 	// GET /erx
 	public function index(Request $request) {
 	public function index(Request $request) {
-		$records = DB::table('action_item')->get();
+		$records = DB::table('action_item')->where('action_item_category', 'RX')->get();
 		return view('pro/erx/index', compact('records'));
 		return view('pro/erx/index', compact('records'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/facilities_Controller.php

@@ -18,7 +18,7 @@ class facilities_Controller extends Controller
 
 
 	// GET /facilities/add_new
 	// GET /facilities/add_new
 	public function add_new(Request $request) {
 	public function add_new(Request $request) {
-		$records = DB::table('facility')->get();		$records = DB::table('facility')->get();
+		$records = DB::table('facility')->get();
 		return view('admin/facilities/add_new', compact('records'));
 		return view('admin/facilities/add_new', compact('records'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/my_clients_Controller.php

@@ -18,7 +18,7 @@ class my_clients_Controller extends Controller
 
 
 	// GET /my_clients/add_new
 	// GET /my_clients/add_new
 	public function add_new(Request $request) {
 	public function add_new(Request $request) {
-		$records = DB::table('client')->get();		$records = DB::table('client')->get();
+		$records = DB::table('client')->get();
 		return view('pro/my_clients/add_new', compact('records'));
 		return view('pro/my_clients/add_new', compact('records'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/my_clients_SINGLE_Controller.php

@@ -296,7 +296,7 @@ class my_clients_SINGLE_Controller extends Controller
 	// GET /my_clients/view/{uid}/SUB_erx
 	// GET /my_clients/view/{uid}/SUB_erx
 	public function SUB_erx(Request $request, $uid) {
 	public function SUB_erx(Request $request, $uid) {
 		$record = DB::table('client')->where('uid', $uid)->first();
 		$record = DB::table('client')->where('uid', $uid)->first();
-		$subRecords = DB::table('action_item')->where('client_id', $record->id)->get();
+		$subRecords = DB::table('action_item')->where('client_id', $record->id)->where('action_item_category', 'RX')->get();
 		return view('pro/my_clients_SINGLE/SUB_erx', compact('record', 'subRecords'));
 		return view('pro/my_clients_SINGLE/SUB_erx', compact('record', 'subRecords'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/my_teams_Controller.php

@@ -18,7 +18,7 @@ class my_teams_Controller extends Controller
 
 
 	// GET /my_teams/add_new
 	// GET /my_teams/add_new
 	public function add_new(Request $request) {
 	public function add_new(Request $request) {
-		$records = DB::table('team')->get();		$records = DB::table('team')->get();
+		$records = DB::table('team')->get();
 		return view('pro/my_teams/add_new', compact('records'));
 		return view('pro/my_teams/add_new', compact('records'));
 	}
 	}
 
 

+ 1 - 1
app/Http/Controllers/pros_Controller.php

@@ -18,7 +18,7 @@ class pros_Controller extends Controller
 
 
 	// GET /pros/add_new
 	// GET /pros/add_new
 	public function add_new(Request $request) {
 	public function add_new(Request $request) {
-		$records = DB::table('pro')->get();		$records = DB::table('pro')->get();
+		$records = DB::table('pro')->get();
 		return view('admin/pros/add_new', compact('records'));
 		return view('admin/pros/add_new', compact('records'));
 	}
 	}
 
 

+ 9 - 13
generatecv/tree.txt

@@ -202,8 +202,7 @@ PRO
                     contentText
                     contentText
                     contentDetail
                     contentDetail
             erx
             erx
-# :: and category = RX
-                id=action_item.client_id=>/action_items/view/UID
+                id=action_item.client_id,action_item_category='RX'=>/action_items/view/UID
                 add_new:action_item
                 add_new:action_item
                     clientUid:hidden=uid
                     clientUid:hidden=uid
                     prescriberProUid:record:pro:uid,name_display
                     prescriberProUid:record:pro:uid,name_display
@@ -235,8 +234,7 @@ PRO
                     modifier
                     modifier
                     numberOfUnits:number
                     numberOfUnits:number
             audit_log
             audit_log
-# :: where category = RX
-    erx|action_item|view
+    erx|action_item:action_item_category='RX'|view
     erx/view/{uid}
     erx/view/{uid}
         ACTIONS
         ACTIONS
             signAsPrescriber
             signAsPrescriber
@@ -308,28 +306,26 @@ PRO
             dashboard
             dashboard
 # :: need remove
 # :: need remove
             cm_time_entries
             cm_time_entries
-# :: where cm_or_rm = cm
-                id=care_month_entry.care_month_id
+                id=care_month_entry.care_month_id,cm_or_rm='CM'
                 add_new:care_month_entry:createForCm
                 add_new:care_month_entry:createForCm
                     careMonthUid:hidden=uid
                     careMonthUid:hidden=uid
                     proUid:record:pro:uid,name_display
                     proUid:record:pro:uid,name_display
                     effectiveDate:date
                     effectiveDate:date
                     timeInSeconds:number
                     timeInSeconds:number
-                    isTimeSpecific
+                    isTimeSpecific:bool
                     startingTime:time
                     startingTime:time
                     endingTime:time
                     endingTime:time
                     contentText
                     contentText
                     contentDetail
                     contentDetail
 # :: need remove
 # :: need remove
             rm_time_entries
             rm_time_entries
-# :: where cm_or_rm = rm
-                id=care_month_entry.care_month_id
+                id=care_month_entry.care_month_id,cm_or_rm='RM'
                 add_new:care_month_entry:createForRm
                 add_new:care_month_entry:createForRm
                     careMonthUid:hidden=uid
                     careMonthUid:hidden=uid
                     proUid:record:pro:uid,name_display
                     proUid:record:pro:uid,name_display
                     effectiveDate:date
                     effectiveDate:date
                     timeInSeconds:number
                     timeInSeconds:number
-                    isTimeSpecific
+                    isTimeSpecific:bool
                     startingTime:time
                     startingTime:time
                     endingTime:time
                     endingTime:time
                     contentText
                     contentText
@@ -344,7 +340,7 @@ PRO
             updateTiming
             updateTiming
                 effectiveDate
                 effectiveDate
                 timeInSeconds
                 timeInSeconds
-                isTimeSpecific
+                isTimeSpecific:bool
                 startingTime
                 startingTime
                 endingTime
                 endingTime
         SUB
         SUB
@@ -432,7 +428,7 @@ ADMIN
         nameLast
         nameLast
         nameSuffix
         nameSuffix
         nameCredential
         nameCredential
-        isHcp
+        isHcp:bool
         hcpNpi
         hcpNpi
         previousProfessionCategory
         previousProfessionCategory
         currentProfessionCategory
         currentProfessionCategory
@@ -458,7 +454,7 @@ ADMIN
                 nameSuffix
                 nameSuffix
                 nameCredential
                 nameCredential
             updateProfession
             updateProfession
-                isHcp
+                isHcp:bool
                 hcpNpi
                 hcpNpi
                 previousProfessionCategory
                 previousProfessionCategory
                 currentProfessionCategory
                 currentProfessionCategory

File diff suppressed because it is too large
+ 446 - 407
package-lock.json


+ 31 - 4
package.json

@@ -1,21 +1,48 @@
 {
 {
     "private": true,
     "private": true,
+    "sideEffects": true,
     "scripts": {
     "scripts": {
         "dev": "npm run development",
         "dev": "npm run development",
         "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
         "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
         "watch": "npm run development -- --watch",
         "watch": "npm run development -- --watch",
         "watch-poll": "npm run watch -- --watch-poll",
         "watch-poll": "npm run watch -- --watch-poll",
-        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
+        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
         "prod": "npm run production",
         "prod": "npm run production",
         "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
         "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
     },
     },
     "devDependencies": {
     "devDependencies": {
+        "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+        "@babel/preset-env": "^7.9.5",
         "axios": "^0.19",
         "axios": "^0.19",
+        "bootstrap": "^4.0.0",
         "cross-env": "^7.0",
         "cross-env": "^7.0",
-        "laravel-mix": "^5.0.1",
+        "css-loader": "^3.5.3",
+        "eslint": "^6.8.0",
+        "eslint-plugin-vue": "^7.0.0-alpha.1",
+        "glob-all": "^3.2.1",
+        "imagemin-svgo": "^8.0.0",
+        "jquery": "^3.2",
+        "laravel-mix": "^5.0.4",
+        "laravel-mix-bundle-analyzer": "^1.0.5",
+        "laravel-mix-purgecss": "^5.0.0-rc.2",
+        "laravel-mix-vue-svgicon": "^2.0.4",
         "lodash": "^4.17.13",
         "lodash": "^4.17.13",
+        "node-sass": "^4.14",
+        "popper.js": "^1.12",
+        "purgecss-webpack-plugin": "^1.6.0",
+        "purgecss-whitelister": "^2.4.0",
+        "raw-loader": "^4.0.1",
         "resolve-url-loader": "^3.1.0",
         "resolve-url-loader": "^3.1.0",
-        "sass": "^1.15.2",
-        "sass-loader": "^8.0.0"
+        "sass": "^1.26.3",
+        "sass-loader": "^8.0.2",
+        "vue": "^2.5.17",
+        "vue-template-compiler": "^2.6.10"
+    },
+    "dependencies": {
+        "@opentok/client": "^2.17.1",
+        "vue-grid-layout": "^2.3.7",
+        "vue-socket.io": "3.0.3",
+        "vuetify": "^2.2.23",
+        "vuex": "^3.2.0"
     }
     }
 }
 }

+ 49 - 1
resources/js/app.js

@@ -1 +1,49 @@
-require('./bootstrap');
+/* jQuery & Bootstrap Init */
+
+import jQuery from 'jquery'
+
+window.$ = window.jQuery = jQuery;
+
+/* Fix */
+
+import './fix.scss'
+
+let location = window.location;
+let pathname = location.pathname;
+
+window.axios = require('axios')
+window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
+
+window.OT = require("@opentok/client")
+
+import Vue from 'vue'
+window.Vue = Vue
+Vue.prototype.$eventBus = new Vue()
+
+import Vuetify from 'vuetify'
+Vue.use(Vuetify)
+
+import store from './components/vuex/index'
+
+const files = require.context('./', true, /\.vue$/i, 'lazy').keys()
+
+files.forEach(file => {
+    let component = file.split('/').pop().split('.')[0]
+    Vue.component(component, () => import(`${file}`))
+})
+
+import VueSocketIO from "vue-socket.io"
+import SocketIO from "socket.io-client"
+
+Vue.use(
+    new VueSocketIO({
+        debug: false,
+        connection: SocketIO(process.env.MIX_SOCKET_SERVICE_URL)
+    })
+)
+
+let app = new Vue({
+    el: '#app',
+    store,
+    vuetify: new Vuetify()
+})

+ 139 - 0
resources/js/components/vuex/index.js

@@ -0,0 +1,139 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+export default () => new Vuex.Store({
+    modules: {
+        //
+    },
+    state: {
+        user: {
+            id: null,
+            UID: null,
+            name: 'Guest',
+            type: 'guest',
+            pin: null,
+            avatarFile: null,
+            is_active_and_visible: true,
+            isAdmin: false
+        },
+        session: {
+            screenSharingAvailable: false,
+            sessionConnected: false,
+            screenSharingActive: false
+        },
+        active_menu_item: {
+            name: 'Lobbies',
+            class: 'mdi mdi-view-dashboard',
+            template: 'lobby-list'
+        },
+        meeting: {
+            id: "",
+            name: "",
+            passwordRequired: false,
+            lobby: null,
+            active_members: 0,
+            scheduledDate: null,
+            startedAt: null
+        },
+        lobbies: [],
+        chat_user_notification: false
+    },
+    mutations: {
+        setUsername: (state, data) => {
+            state.user.name = data
+        },
+        setUsertype: (state, data) => {
+            state.user.type = data
+        },
+        setInitialUser(state, data) {
+            state.user = data
+        },
+        setUser(state, data) {
+            state.user = data
+        },
+        setUserAvatarFile(state, data) {
+            state.user.avatarFile = data
+        },
+        setUserActivityState: (state, data) => {
+            state.user.is_active_and_visible = data
+        },
+        setScreenShareState: (state, data) => {
+            state.session.screenSharingActive = data
+        },
+        setMenuItem: (state, data) => {
+            state.active_menu_item = data
+        },
+        setLobbies(state, data) {
+            state.lobbies = data
+        },
+        addNewLobby(state, data) {
+            state.lobbies.push(data)
+        },
+        setSingleLobby(state, data) {
+            let lobby = state.lobbies.findIndex((cur) => cur.id == data.id)
+
+            if (lobby !== -1) {
+                state.lobbies[lobby].meetings = data.meetings.map(m => {
+                    m.active_members = []
+                    m.associates_online = []
+                    return m
+                });
+            }
+        },
+        setLobbyActivity(state, data) {
+            let lobby = state.lobbies.filter((cur) => cur.id == data.lobbyID)
+            if (lobby.length) {
+                let meeting = lobby[0].meetings.filter((cur) => cur.id == data.meetingID)
+                if (meeting.length) {
+                    meeting[0].active_members = data.active_members
+                    meeting[0].associates_online = data.associates_online
+
+                    if (state.meeting.id && state.meeting.id == meeting[0].id) {
+                        state.meeting.active_members = data.active_members
+                    }
+                }
+            }
+
+        },
+        setNewMeetingInLobby(state, data) {
+            let lobby = state.lobbies.filter((cur) => cur.id == parseInt(data.lobby.id))
+
+            if (lobby.length) {
+                data.finalDate = new Date(data.scheduled_date ? data.scheduled_date : data.created_at)
+                lobby[0].meetings.push(data)
+                lobby[0].meetings.sort((a, b) => {
+                    return a.finalDate - b.finalDate
+                })
+            }
+        },
+        setMeeting(state, data) {
+            state.meeting = data
+        },
+        setScreesharingAvailability(state, data) {
+            state.session.screenSharingAvailable = data
+        },
+        setSessionConnectivityState(state, data) {
+            state.session.sessionConnected = data
+        },
+        setChatUserNotification(state, data) {
+            state.chat_user_notification = data
+        }
+    },
+    actions: {
+        leaveMeeting(store) {
+            let meeting = {
+                id: '',
+                name: '',
+                passwordRequired: false,
+                lobby: null,
+                active_members: 0,
+                scheduledDate: null,
+                startedAt: null
+            }
+
+            store.commit('setMeeting', meeting)
+        }
+    }
+})

+ 0 - 0
resources/js/fix.scss


+ 3 - 0
resources/sass/app.scss

@@ -1 +1,4 @@
 //
 //
+body {
+    
+}

+ 3 - 2
resources/views/admin/pros/add_new.blade.php

@@ -60,8 +60,9 @@
 <input class='form-control' type='text' name='nameCredential' value='{{ old('nameCredential') ? old('nameCredential') : '' }}' >
 <input class='form-control' type='text' name='nameCredential' value='{{ old('nameCredential') ? old('nameCredential') : '' }}' >
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
-<label class='control-label'>Is Hcp</label>
-<input class='form-control' type='text' name='isHcp' value='{{ old('isHcp') ? old('isHcp') : '' }}' >
+<label class='control-label'>Is Hcp 
+<input class='form-control' type='checkbox' name='isHcp'>
+</label>
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
 <label class='control-label'>Hcp Npi</label>
 <label class='control-label'>Hcp Npi</label>

+ 3 - 2
resources/views/admin/pros_SINGLE/ACTION_updateProfession.blade.php

@@ -19,8 +19,9 @@
         <input type="hidden" name="_success" value="{{route('pros-view', ['uid' => $record->uid])}}">
         <input type="hidden" name="_success" value="{{route('pros-view', ['uid' => $record->uid])}}">
         <input type="hidden" name="_return" value="{{route('pros_SINGLE-ACTION_updateProfession', ['uid' => $record->uid])}}">
         <input type="hidden" name="_return" value="{{route('pros_SINGLE-ACTION_updateProfession', ['uid' => $record->uid])}}">
         <div class='form-group mb-3'>
         <div class='form-group mb-3'>
-<label class='control-label'>Is Hcp</label>
-<input class='form-control' type='text' name='isHcp' value='{{ old('isHcp') ? old('isHcp') : '' }}' >
+<label class='control-label'>Is Hcp 
+<input class='form-control' type='checkbox' name='isHcp'>
+</label>
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
 <label class='control-label'>Hcp Npi</label>
 <label class='control-label'>Hcp Npi</label>

+ 3 - 2
resources/views/pro/care_month_entries_SINGLE/ACTION_updateTiming.blade.php

@@ -27,8 +27,9 @@
 <input class='form-control' type='text' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 <input class='form-control' type='text' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
-<label class='control-label'>Is Time Specific</label>
-<input class='form-control' type='text' name='isTimeSpecific' value='{{ old('isTimeSpecific') ? old('isTimeSpecific') : '' }}' >
+<label class='control-label'>Is Time Specific 
+<input class='form-control' type='checkbox' name='isTimeSpecific'>
+</label>
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
 <label class='control-label'>Starting Time</label>
 <label class='control-label'>Starting Time</label>

+ 3 - 2
resources/views/pro/care_months_SINGLE/ACTION_cm_time_entriesAddNew.blade.php

@@ -38,8 +38,9 @@
 <input class='form-control' type='number' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 <input class='form-control' type='number' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
-<label class='control-label'>Is Time Specific</label>
-<input class='form-control' type='text' name='isTimeSpecific' value='{{ old('isTimeSpecific') ? old('isTimeSpecific') : '' }}' >
+<label class='control-label'>Is Time Specific 
+<input class='form-control' type='checkbox' name='isTimeSpecific'>
+</label>
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
 <label class='control-label'>Starting Time</label>
 <label class='control-label'>Starting Time</label>

+ 3 - 2
resources/views/pro/care_months_SINGLE/ACTION_rm_time_entriesAddNew.blade.php

@@ -38,8 +38,9 @@
 <input class='form-control' type='number' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 <input class='form-control' type='number' name='timeInSeconds' value='{{ old('timeInSeconds') ? old('timeInSeconds') : '' }}' >
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
-<label class='control-label'>Is Time Specific</label>
-<input class='form-control' type='text' name='isTimeSpecific' value='{{ old('isTimeSpecific') ? old('isTimeSpecific') : '' }}' >
+<label class='control-label'>Is Time Specific 
+<input class='form-control' type='checkbox' name='isTimeSpecific'>
+</label>
 </div>
 </div>
 <div class='form-group mb-3'>
 <div class='form-group mb-3'>
 <label class='control-label'>Starting Time</label>
 <label class='control-label'>Starting Time</label>

+ 135 - 0
sdc-spec-6-1-2020.txt

@@ -0,0 +1,135 @@
+
+SETUP THIS USE CASE:
+	
+		/api/dev/createSystemAdmin
+		
+		/api/pro/create
+		
+			Dr. Smith
+			Dr. Brown
+			
+		/api/lobby/create
+		
+			Dr. Smith & Dr. Brown's Office
+			
+			smith-brown-inc
+			
+		/api/lobbyPro/create
+		
+			// create two records, one for each doctor for the above lobby
+		
+=================================================================
+
+STRANGER EXPERIENCE PART 1:
+
+	stranger goes to:
+	
+		speedrelay.com/smith-brown-inc
+		
+		// IMMEDIATELY CALLS: /api/session/createStrangerSession -> gets a sessionKey as stranger.
+		
+			Welcome to Dr. Smith & Dr. Brown's Office!
+			
+			Please check in, stranger.
+			
+			<input type="hidden" name="lobbyUid" value="..."/>
+			[name]
+			[dob]
+			[SUBMIT] -> /api/meeting/createAsStrangerPerformer
+			
+				{
+					success: true,
+					data: <meetingParticipantUid>
+				}
+				
+----------------------------------------------------------------------------------------
+
+STRANGER EXPERIENCE PART 2:
+
+	/meeting-participant/{meetingParticipantUid}
+
+		// in laravel, you can get meetingUid...
+		
+		$meetingParticipant->meeting()->uid
+
+	This stranger sees...
+	
+		Hello, {John}! You are now in a meeting in Dr. Smith & Dr. Brown's Office.
+		
+		Please make sure your webcame is working. Then, someone should be with you shortly.
+
+----------------------------------------------------------------------------------------
+
+PRO:
+
+	At the same time, Dr. Smith & Dr. Brown both got notified by socket that someone has joined.
+	
+	Dr. Smith decides to jump in. Clicks "JOIN" on the meeting.
+	
+		/api/meeting/joinMeetingAsPro
+		
+			meetingUid && his sessionKey -> session on DB...
+
+	As soon as there is one meeting_participant.pro where there is a matching lobby_pro, the meeting is off of the QUEUE in the lobby (meeting is no longer waiting).
+	
+	Dr. Brown sees immediately that this meeting has (2) participants, including 1 pro.
+		So... he decides to ignore it and wait for someone else to join the queue.
+	
+----------------------------------------------------------------------------------------
+
+FOR NOW::: SIDEBAR
+
+	Part 1: Queue:
+		
+			... (SELECT * FROM meeting WHERE meeting_participants DOES NOT CONTAIN ANY pro)
+	
+	Part 2: My Meetings
+	
+		... (SELECT * FROM meeting_participant WHERE pro_id = me.pro_id)
+	
+	Part 3: My Current Meeting
+	
+		[Video Feed with a LEAVE button] 
+		
+			-or- 
+			
+		<i>Not currently in any meeting.</i>
+
+=======================================================================================
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 70 - 2
webpack.mix.js

@@ -1,4 +1,65 @@
-const mix = require('laravel-mix');
+const mix = require('laravel-mix')
+const webpack = require('webpack')
+const glob = require('glob-all')
+const PurgecssPlugin = require('purgecss-webpack-plugin')
+const whitelister = require('purgecss-whitelister')
+require('laravel-mix-bundle-analyzer')
+require('laravel-mix-purgecss')
+require('laravel-mix-vue-svgicon')
+
+mix.disableNotifications()
+class Extractor {
+    static extract(content) {
+        return content.match(/[A-Za-z0-9-_:\/]+/g) || []
+    }
+}
+
+mix.webpackConfig({
+    optimization: {
+        providedExports: true,
+        usedExports: true,
+        sideEffects: true
+    },
+    output: {
+        filename: '[name].js',
+        chunkFilename: 'js/chunks/[name].js?id=[chunkhash]'
+    },
+    plugins: [
+        new PurgecssPlugin({
+            paths: glob.sync([
+                path.join(__dirname, 'resources/views/**/*.blade.php'),
+                path.join(__dirname, 'resources/js/**/*.vue'),
+            ]),
+            extractors: [
+                {
+                    extractor: Extractor,
+                    extensions: ['html', 'js', 'php', 'vue'],
+                },
+            ],
+            whitelist: whitelister([
+                './node_modules/vuetify/dist/vuetify.min.css',
+                './node_modules/toastr/build/toastr.css'
+            ]),
+            whitelistPatterns: [
+                /.*q-*/,
+                /.*relative-position*/,
+                /.*expand-*/,
+                /.*vue-grid*/
+            ]
+        })
+    ]
+})
+
+mix.babelConfig({
+    presets: [
+        [
+            '@babel/preset-env',
+            {
+                modules: false
+            }
+        ]
+    ]
+})
 
 
 /*
 /*
  |--------------------------------------------------------------------------
  |--------------------------------------------------------------------------
@@ -12,4 +73,11 @@ const mix = require('laravel-mix');
  */
  */
 
 
 mix.js('resources/js/app.js', 'public/js')
 mix.js('resources/js/app.js', 'public/js')
-    .sass('resources/sass/app.scss', 'public/css');
+    .sass('resources/sass/app.scss', 'public/css')
+    .options({
+        processCssUrls: false
+    })
+    .svgicon('public/img')
+    .version()
+
+//mix.bundleAnalyzer()

Some files were not shown because too many files changed in this diff