This commit is contained in:
sajjad
2023-09-23 02:41:07 -07:00
80 changed files with 1401 additions and 461 deletions
+22 -23
View File
@@ -18,26 +18,25 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
APP_NAME: Cssd-Doc
APP_ENV: production
APP_DEBUG: 'false'
APP_URL: https://cssd-doc.com
LOG_CHANNEL: stack
BROADCAST_DRIVER: log
CACHE_DRIVER: file
QUEUE_CONNECTION: sync
SESSION_DRIVER: file
SESSION_LIFETIME: '120'
REDIS_HOST: '127.0.0.1'
REDIS_PORT: '4379'
DB_CONNECTION: mysql
DB_HOST: '185.142.157.185'
DB_PORT: '3306'
DB_DATABASE: cssd
SMS_WEBSERVICE: http://ippanel.com/class/sms/wsdlservice/server.php?wsdl
SMS_FROM_NUMBER: '+983000505'
MIX_APP_ROOT_API: '/api/'
MIX_APP_CLIENT_ID: '2'
MIX_APP_CLIENT_SECRET: **
SMS_USERNAME: ***
SMS_PASSWORD: ****
APP_NAME=
APP_ENV=
APP_DEBUG=
APP_URL=
LOG_CHANNEL=
BROADCAST_DRIVER=
CACHE_DRIVER=
QUEUE_CONNECTION=
SESSION_DRIVER=
SESSION_LIFETIME=
REDIS_HOST=
REDIS_PORT=
DB_CONNECTION=
DB_HOST=
DB_PORT=
DB_DATABASE=
SMS_WEBSERVICE=
MIX_APP_ROOT_API=
MIX_APP_CLIENT_ID=
MIX_APP_CLIENT_SECRET=
SMS_USERNAME=
SMS_PASSWORD=
+43
View File
@@ -611,6 +611,49 @@ configMap:
}
location ~ \.php {
if ($request_method = 'OPTIONS' ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers'
'DNT,Authorization,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
add_header 'Access-Control-Max-Age' 10;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST' ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers'
'DNT,Authorization,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
if ($request_method = 'GET' ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers'
'DNT,Authorization,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
if ($request_method = 'PUT' ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers'
'DNT,Authorization,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
if ($request_method = 'DELETE' ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Headers'
'DNT,Authorization,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
fastcgi_pass localhost:9000;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include /etc/nginx/fastcgi_params;
+10 -10
View File
@@ -29,8 +29,8 @@
->when( $request->has( 'name' ) && $request->name != '' , function ( $query ) use ( $request ) {
$query->where( 'name' , 'LIKE' , '%' . $request->name . '%' );
} )
->when( $request->has( 'udi' ) && $request->udi != '' , function ( $query ) use ( $request ) {
$query->where( 'udi' , 'LIKE' , '%' . $request->udi . '%' );
->when( $request->has( 'uid' ) && $request->uid != '' , function ( $query ) use ( $request ) {
$query->where( 'uid' , 'LIKE' , '%' . $request->uid . '%' );
} )
->when( $request->has( 'size' ) && $request->size != '' , function ( $query ) use ( $request ) {
$query->where( 'size' , $request->size );
@@ -68,15 +68,15 @@
} ,
'user.medical_center' => function ( $query ) {
$query->select( 'id' , 'name' );
} ] );
} ] );
$FilesPath = [];
if ( count( $Item->files ) ) {
foreach ( $Item->files as $Key => $File ) {
$FilesPath[] = $File->path;
}
$Item[ 'filesPath' ] = $FilesPath;
$FilesPath = [];
if ( count( $Item->files ) ) {
foreach ( $Item->files as $Key => $File ) {
$FilesPath[] = $File->path;
}
$Item[ 'filesPath' ] = $FilesPath;
}
return \MessageResponse::data( $Item );
}
@@ -89,7 +89,7 @@
'unique_id' => $request->unique_id ,
'specific' => $request->specific ,
'note' => $request->note ,
'udi' => $request->udi ,
'uid' => $request->uid ,
'user_id' => auth( 'api' )->user()->id ,
];
$ItemObj = Item::create( $ItemData );
+3 -3
View File
@@ -28,8 +28,8 @@
->when( $request->has( 'name' ) && $request->name != '' , function ( $query ) use ( $request ) {
$query->where( 'name' , 'LIKE' , '%' . $request->name . '%' );
} )
->when( $request->has( 'udi' ) && $request->udi != '' , function ( $query ) use ( $request ) {
$query->where( 'udi' , 'LIKE' , '%' . $request->udi . '%' );
->when( $request->has( 'uid' ) && $request->uid != '' , function ( $query ) use ( $request ) {
$query->where( 'uid' , 'LIKE' , '%' . $request->uid . '%' );
} )
->when( $request->has( 'package_id' ) && $request->package_id != '' , function ( $query ) use ( $request ) {
$query->where( 'id' , $request->package_id );
@@ -73,7 +73,7 @@
'name' => $request->name ,
'unique_id' => $request->unique_id ,
'note' => $request->note ,
'udi' => $request->udi ,
'uid' => $request->uid ,
'user_id' => auth( 'api' )->user()->id ,
'verified' => 'NotVerified' ,
];
+13 -17
View File
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
<<<<<<< HEAD
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Http\Requests\StoreTestResultRequest;
@@ -15,26 +16,21 @@
use App\Media;
use Intervention\Image\ImageManagerStatic as Image;
use Intervention\Image\ImageManager;
=======
use App\Http\Requests\StoreTestResultRequest;
use App\Input;
use App\InputValue;
use App\Media;
use App\MedicalCenter;
use App\TestResult;
use App\TestType;
use Illuminate\Http\Request;
>>>>>>> b389ea53068b2084084b9704400a50529ba035eb
use Illuminate\Support\Facades\Storage;
class TestResultController extends Controller
{
// private function filterByInputs($inputArray){
// $searchArray = ['Patient ID' => 1111, 'Autoclave ID' => 2222];
//
// $TestResults = TestResult::query();
//
// foreach ($inputArray as $key => $value) {
// $TestResults .= $TestResults->whereHas('input_values', function($query) use($value, $key){
// $query->whereHas('input', function($query) use($key){
// $query->where('name', $key);
// })->where('value', $value);
// });
// }
// return $query;
// }
public function index( Request $request )
{
$user = auth( 'api' )->user();
@@ -56,7 +52,7 @@
}
$TestResult = TestResult::when( $request->has( 'verified' ) , function ( $query ) use ( $request ) {
return $query->where( 'verified' , $request->verified )->orWhere( 'verified' , "None" );
return $query->where( 'verified' , $request->verified )->orWhere('verified' , "None" );
} )
->when( ( $request->has( 'fromPicker' ) && $request->fromPicker ) || ( $request->has( 'upToPicker' ) && $request->upToPicker ) , function ( $query ) use ( $request ) {
$from = ( $request->fromPicker ) ? date( $request->fromPicker . ' 00:00:00' ) : date( '2010-01-01' . ' 00:00:00' );
@@ -445,7 +441,6 @@
return \MessageResponse::data( [ 'labels' => [ 'Number Of Accepted Test Results' , 'Number Of Rejected Test Results' ] , 'data' => [ $AcceptCount , $RejectCount ] ] );
}
//--------------------------------------------------------------------------Show
public function showTestResult( $id )
{
$TestResult = TestResult::with( 'input_values' , 'user.medical_center' , 'test_type' )->select( 'result' , 'verified' , 'device_id' , 'user_id' , 'id' , 'test_type_id' , 'created_at' )->findOrFail( $id );
@@ -501,4 +496,5 @@
$TestResult[ 'device_label' ] = $TestResult->test_type->device_label;
return \MessageResponse::data( $TestResult );
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\Cors::class,
// \App\Http\Middleware\Cors::class,
];
/**
+28 -26
View File
@@ -1,30 +1,32 @@
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
<?php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
/* @var $response Response */
$response = $next($request)
->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-credentials', true)
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
if (!$request->isMethod('OPTIONS')) {
return $response;
public function handle($request, Closure $next)
{
/* @var $response Response */
$response = $next($request)
->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-credentials', true)
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
if (!$request->isMethod('OPTIONS')) {
return $response;
}
$allow = $response->headers->get('Allow'); // true list of allowed methods
if (!$allow) {
return $response;
}
$headers = [
'Access-Control-Allow-Methods' => $allow,
'Access-Control-Max-Age' => 3600,
'Access-Control-Allow-Headers' => 'X-Requested-With, Origin, X-Csrftoken, Content-Type, Accept',
];
return $response->withHeaders($headers);
}
$allow = $response->headers->get('Allow'); // true list of allowed methods
if (!$allow) {
return $response;
}
$headers = [
'Access-Control-Allow-Methods' => $allow,
'Access-Control-Max-Age' => 3600,
'Access-Control-Allow-Headers' => 'X-Requested-With, Origin, X-Csrftoken, Content-Type, Accept',
];
return $response->withHeaders($headers);
}
}
+2 -2
View File
@@ -30,7 +30,7 @@ class StoreItemRequest extends FormRequest
'size' => 'required',
'specific' => 'required',
'note' => 'nullable',
'udi' => 'required|max:100|unique:items',
'uid' => 'required|max:100|unique:items',
];
break;
}
@@ -43,7 +43,7 @@ class StoreItemRequest extends FormRequest
'size' => 'required',
'specific' => 'required',
'note' => 'nullable',
'udi' => 'required|max:100|unique:items,udi,'.$Item->id,
'uid' => 'required|max:100|unique:items,uid,'.$Item->id,
];
break;
}
+2 -2
View File
@@ -29,7 +29,7 @@ class StorePackageRequest extends FormRequest
'unique_id' => 'nullable|max:250|unique:packages',
'note' => 'nullable',
'items' => 'required',
'udi' => 'required|max:100|unique:packages',
'uid' => 'required|max:100|unique:packages',
];
break;
}
@@ -41,7 +41,7 @@ class StorePackageRequest extends FormRequest
'unique_id' => 'nullable|max:250|unique:packages,unique_id,'.$Package->id,
'note' => 'nullable',
'items' => 'required',
'udi' => 'required|max:100|unique:packages',
'uid' => 'required|max:100|unique:packages',
];
break;
+1 -1
View File
@@ -6,7 +6,7 @@
class Item extends Model
{
public $fillable = [ 'name' , 'size' , 'unique_id' , 'specific' , 'note' , 'user_id' , 'udi' , 'status' ];
public $fillable = [ 'name' , 'size' , 'unique_id' , 'specific' , 'note' , 'user_id' , 'uid' , 'status' ];
public function packages()
{
+1 -1
View File
@@ -6,7 +6,7 @@
class Package extends Model
{
public $fillable = [ 'name' , 'unique_id' , 'user_id' , 'note' , 'verified' , 'udi' ];
public $fillable = [ 'name' , 'unique_id' , 'user_id' , 'note' , 'verified' , 'uid' ];
public function user()
{
+2 -1
View File
@@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Packages\Messaging\src\Facades\MessageResponse;
class MessageServiceProvider extends ServiceProvider
{
@@ -12,7 +13,7 @@ class MessageServiceProvider extends ServiceProvider
public function register()
{
$this->app->singleton('messages', function() {
return new \App\Appended\Classes\Common\Response\MessageResponse;
return new MessageResponse;
});
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePackagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('packages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id');
$table->text('note')->nullable();
$table->enum('verified', ['Verified', 'NotVerified']);
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('packages');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('items', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('size');
$table->string('unique_id');
$table->string('specific');
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('items');
}
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackPackage extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pack_package', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pack_package');
}
}
@@ -16,6 +16,9 @@ class CreateMedicalCentersTable extends Migration
Schema::create('medical_centers', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->text('address')->nullable();
$table->string('phone_number')->nullable();
$table->integer('city_id')->nullable();
$table->timestamps();
});
}
@@ -20,7 +20,9 @@ class CreateTestTypesTable extends Migration
$table->string('bar_code');
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->enum('device_label', ['AutoclaveID', 'WasherID', 'SterilizerID', 'WasherMachineID', 'SealMachineID', 'PatientID', 'Set/PackID', 'MDID', 'ORID', 'InstrumentID', 'ID', 'PersonalID']);
$table->timestamps();
$table->softDeletes();
});
}
@@ -15,15 +15,13 @@ class CreateTestResultsTable extends Migration
{
Schema::create('test_results', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('info');
$table->string('cycle_number');
$table->string('info')->nullable();
$table->string('cycle_number')->nullable();
$table->date('date')->nullable();
$table->string('result');
$table->text('description');
$table->smallInteger('verified');
$table->string('device_id');
$table->string('device_label');
$table->integer('autoclave_id');
$table->enum('result', ['Accept', 'Reject']);
$table->text('description')->nullable();
$table->enum('verified', ['Verified', 'NotVerified', 'None']);
$table->string('device_id')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->unsignedBigInteger('test_type_id');
@@ -15,14 +15,15 @@ class CreateInputsTable extends Migration
{
Schema::create('inputs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('type');
$table->string('name')->nullable();
$table->enum('type', ['Text', 'Form', 'Checkbox', 'Select', 'Time', 'Temperature', 'Radiobutton', 'Switch', 'Range', 'Date', 'Pressure']);
$table->unsignedBigInteger('test_type_id');
$table->foreign('test_type_id')->references('id')->on('test_types');
$table->unsignedBigInteger('parent_id')->nullable();
$table->foreign('parent_id')->references('id')->on('inputs');
$table->string('size');
$table->string('value');
$table->string('size')->nullable();
$table->string('value')->nullable();
$table->tinyInteger('require_scanner')->nullable();
$table->timestamps();
});
}
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableCyclePack extends Migration
class CreateOptionsTable extends Migration
{
/**
* Run the migrations.
@@ -13,12 +13,11 @@ class CreateTableCyclePack extends Migration
*/
public function up()
{
Schema::create('cycle_pack', function (Blueprint $table) {
Schema::create('options', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('cycle_id');
$table->foreign('cycle_id')->references('id')->on('cycles');
$table->string('title');
$table->unsignedBigInteger('input_id');
$table->foreign('input_id')->references('id')->on('inputs');
$table->timestamps();
});
}
@@ -30,6 +29,6 @@ class CreateTableCyclePack extends Migration
*/
public function down()
{
Schema::dropIfExists('cycle_pack');
Schema::dropIfExists('options');
}
}
@@ -15,13 +15,13 @@ class CreateInputValuesTable extends Migration
{
Schema::create('input_values', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('value');
$table->string('value')->nullable();
$table->unsignedBigInteger('option_id')->nullable();;
$table->foreign('option_id')->references('id')->on('options');
$table->unsignedBigInteger('input_id');
$table->foreign('input_id')->references('id')->on('inputs');
$table->unsignedBigInteger('test_result_id');
$table->foreign('test_result_id')->references('id')->on('test_results');
$table->unsignedBigInteger('option_id');
$table->foreign('option_id')->references('id')->on('options');
$table->timestamps();
});
}
@@ -16,11 +16,13 @@ class CreatePackagesTable extends Migration
Schema::create('packages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id');
$table->string('unique_id')->nullable();
$table->text('note')->nullable();
$table->enum('verified', ['Verified', 'NotVerified']);
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->string('bar_code')->nullable();
$table->string('qr_code')->nullable();
$table->timestamps();
});
}
@@ -17,7 +17,7 @@ class CreateItemsTable extends Migration
$table->bigIncrements('id');
$table->string('name');
$table->string('size');
$table->string('unique_id');
$table->string('unique_id')->nullable();
$table->string('specific');
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
@@ -19,7 +19,7 @@ class CreateItemPackageTable extends Migration
$table->foreign('item_id')->references('id')->on('items');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
$table->integer('count')->default(1);
});
}
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackes extends Migration
class CreateLabelsTable extends Migration
{
/**
* Run the migrations.
@@ -13,17 +13,19 @@ class CreateTablePackes extends Migration
*/
public function up()
{
Schema::create('packes', function (Blueprint $table) {
Schema::create('labels', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name')->nullable();
$table->date('sterile_date')->nullable();
$table->date('expire_date')->nullable();
$table->string('sterilizer_id');
$table->string('cycle_number');
$table->string('lot_number');
$table->string('department');
$table->string('department')->nullable();
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->unsignedBigInteger('package_id')->nullable();
$table->timestamps();
});
}
@@ -35,6 +37,6 @@ class CreateTablePackes extends Migration
*/
public function down()
{
Schema::dropIfExists('packes');
Schema::dropIfExists('labels');
}
}
@@ -15,7 +15,7 @@ class CreateCyclesTable extends Migration
{
Schema::create('cycles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id')->nullable();
$table->date('date');
$table->string('sterilizer_id');
$table->string('cycle_number');
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableCyclePack extends Migration
class CreateCycleLabelTable extends Migration
{
/**
* Run the migrations.
@@ -13,12 +13,13 @@ class CreateTableCyclePack extends Migration
*/
public function up()
{
Schema::create('cycle_pack', function (Blueprint $table) {
Schema::create('cycle_label', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('label_id');
$table->foreign('label_id')->references('id')->on('labels');
$table->unsignedBigInteger('cycle_id');
$table->foreign('cycle_id')->references('id')->on('cycles');
$table->integer('count')->default(1);
$table->timestamps();
});
}
@@ -30,6 +31,6 @@ class CreateTableCyclePack extends Migration
*/
public function down()
{
Schema::dropIfExists('cycle_pack');
Schema::dropIfExists('cycle_label');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->text('text');
$table->integer('sender_user_id')->nullable();
$table->integer('recipient_user_id')->nullable();
$table->enum('status', ['Read', 'UnRead']);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('messages');
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMediasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('medias', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('model_id')->nullable();
$table->string('model_type')->nullable();
$table->string('file_name')->nullable();
$table->string('batch_id')->nullable();
$table->string('path');
$table->integer('user_id');
$table->string('file_type')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('medias');
}
}
@@ -14,7 +14,7 @@ class UpdateItemsTable extends Migration
public function up()
{
Schema::table('items', function (Blueprint $table) {
$table->string('udi')->nullable();
$table->string('uid')->nullable();
$table->tinyInteger('status')->default(0);
});
}
@@ -27,7 +27,7 @@ class UpdateItemsTable extends Migration
public function down()
{
Schema::table('items', function (Blueprint $table) {
$table->dropColumn('udi');
$table->dropColumn('uid');
$table->dropColumn('status');
});
}
@@ -14,7 +14,7 @@ class UpdatePackagesTable extends Migration
public function up()
{
Schema::table('packages', function (Blueprint $table) {
$table->string('udi')->nullable();
$table->string('uid')->nullable();
});
}
@@ -26,7 +26,7 @@ class UpdatePackagesTable extends Migration
public function down()
{
Schema::table('packages', function (Blueprint $table) {
$table->dropColumn('udi');
$table->dropColumn('uid');
});
}
}
File diff suppressed because it is too large Load Diff
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemPackageTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('item_package', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('item_id');
$table->foreign('item_id')->references('id')->on('items');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('item_package');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCyclesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cycles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->date('date');
$table->string('sterilizer_id');
$table->text('note')->nullable();
$table->enum('verified',['Verified', 'NotVerified']);
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cycles');
}
}
@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackes extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('packes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('unique_id');
$table->date('sterile_date')->nullable();
$table->date('expire_date')->nullable();
$table->string('sterilizer_id');
$table->string('cycle_number');
$table->string('lot_number');
$table->string('department');
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('packes');
}
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePackPackage extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('pack_package', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('pack_id');
$table->foreign('pack_id')->references('id')->on('packes');
$table->unsignedBigInteger('package_id');
$table->foreign('package_id')->references('id')->on('packages');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pack_package');
}
}
+1 -1
View File
@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(UserTableSeeder::class);
// $this->call(UserTableSeeder::class);
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{CRkL:function(t,e,a){(t.exports=a("JPst")(!1)).push([t.i,"\n.WM-Border[data-v-762b1fbc] {\r\n border: 1px solid;\n}\n.WM-Border-Black[data-v-762b1fbc] {\r\n border-color: #2f353b !important;\n}\n.WM-Border-Gray[data-v-762b1fbc] {\r\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-762b1fbc] {\r\n background-color : #F5F5F5;\n}\n.WM-Relative[data-v-762b1fbc] {\r\n position: relative;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-762b1fbc] {\r\n top: -25px !important;\n}\r\n",""])},E5QS:function(t,e,a){"use strict";a.r(e);var s={data:function(){return{ArrayDiv:[],select:{state:"Florida",abbr:"FL"},items:[{state:"Florida",abbr:"FL"},{state:"Georgia",abbr:"GA"},{state:"Nebraska",abbr:"NE"},{state:"California",abbr:"CA"},{state:"New York",abbr:"NY"}]}},methods:{Duplicator:function(){for(var t=document.getElementsByClassName("Form"),e=[],a=0;a<t.length;a++)e.push(t[a]);this.ArrayDiv.push(e)},Remove:function(){document.getElementById("RemoveFormBuilder").parentNode.remove()}}},l=(a("HIfo"),a("KHd+")),r=Object(l.a)(s,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",{attrs:{fluid:""}},[a("material-card",{attrs:{color:"black",title:"Add a New Test"}},[a("v-layout",{staticClass:"ma-2",attrs:{wrap:""}},[a("v-flex",{attrs:{xs12:"",md3:"",sm3:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Test Name",color:"black"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md3:"",sm3:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Unique ID",color:"black"}})],1)],1),t._v(" "),a("v-layout",{staticClass:"pa-3 my-4 mx-3 WM-Border WM-Border-Black WM-Relative",attrs:{wrap:""}},[a("v-layout",{staticClass:"pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Relative WM-Color-LightGrey",attrs:{wrap:""}},[a("v-flex",{attrs:{xs12:"",md3:"",sm3:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Input Name",color:"black"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[a("v-select",{staticClass:"pa-2",attrs:{hint:t.select.state+", "+t.select.abbr,items:t.items,"item-text":"state","item-value":"abbr",label:"Type","return-object":"","single-line":"",color:"black"},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[a("v-select",{staticClass:"pa-2",attrs:{hint:t.select.state+", "+t.select.abbr,items:t.items,"item-text":"state","item-value":"abbr",label:"Size","return-object":"","single-line":"",color:"black"},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md5:"",sm5:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Value",color:"black"}})],1)],1),t._v(" "),t._l(t.ArrayDiv,function(e,s){return a("v-layout",{key:s,staticClass:"pa-3 my-4 mx-3 WM-Border WM-Border-Gray WM-Relative WM-Color-LightGrey Form",attrs:{wrap:""}},[a("v-flex",{attrs:{xs12:"",md3:"",sm3:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Input Name",color:"black"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[a("v-select",{staticClass:"pa-2",attrs:{hint:t.select.state+", "+t.select.abbr,items:t.items,"item-text":"state","item-value":"abbr",label:"Type","return-object":"","single-line":"",color:"black"},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[a("v-select",{staticClass:"pa-2",attrs:{hint:t.select.state+", "+t.select.abbr,items:t.items,"item-text":"state","item-value":"abbr",label:"Size","return-object":"","single-line":"",color:"black"},model:{value:t.select,callback:function(e){t.select=e},expression:"select"}})],1),t._v(" "),a("v-flex",{attrs:{xs12:"",md5:"",sm5:""}},[a("v-text-field",{staticClass:"pa-2",attrs:{label:"Value",color:"black"}})],1),t._v(" "),a("v-btn",{attrs:{absolute:"",small:"",right:"",top:"",color:"pink",id:"RemoveFormBuilder"},on:{click:function(e){return t.Remove()}}},[a("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-times")]),t._v("\n REMOVE")],1)],1)}),t._v(" "),a("v-btn",{attrs:{absolute:"",small:"",right:"",bottom:"",color:"cyan",id:"FormBuilder"},on:{click:t.Duplicator}},[a("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-plus")]),t._v("\n ADD")],1)],2),t._v(" "),a("div",{attrs:{id:"WM-FormBuilder"}}),t._v(" "),a("v-flex",{staticClass:"text-xs-center",attrs:{xs12:"",md12:"",sm12:""}},[a("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"}},[a("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-plus")]),t._v(" "),a("span",{staticClass:"white--text"},[t._v("Add")])],1)],1)],1)],1)},[],!1,null,"762b1fbc",null);e.default=r.exports},HIfo:function(t,e,a){"use strict";var s=a("p41e");a.n(s).a},p41e:function(t,e,a){var s=a("CRkL");"string"==typeof s&&(s=[[t.i,s,""]]);var l={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(s,l);s.locals&&(t.exports=s.locals)}}]);
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{IE83:function(t,n,i){var r=i("bSiq");"string"==typeof r&&(r=[[t.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(r,a);r.locals&&(t.exports=r.locals)},bSiq:function(t,n,i){(t.exports=i("JPst")(!1)).push([t.i,"\n.mapouter {\r\n text-align:right;\r\n height:100%;\r\n width:100%;\r\n position: absolute;\n}\n.gmap_canvas {\r\n overflow:hidden;\r\n background:none!important;\r\n height:100%;\r\n width:100%;\n}\r\n",""])},iKGg:function(t,n,i){"use strict";var r=i("IE83");i.n(r).a},iVES:function(t,n,i){"use strict";i.r(n);i("iKGg");var r=i("KHd+"),a=Object(r.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this.$createElement,n=this._self._c||t;return n("div",[n("div",{staticClass:"mapouter"},[n("div",{staticClass:"gmap_canvas"},[n("iframe",{attrs:{id:"gmap_canvas",width:"100%",height:"100%",src:"https://maps.google.com/maps?q=google&t=&z=13&ie=UTF8&iwloc=&output=embed",frameborder:"0",scrolling:"no",marginheight:"0",marginwidth:"0"}})])])])}],!1,null,null,null);n.default=a.exports}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{ks58:function(t,e,r){"use strict";r.r(e);var n=r("o0o1"),a=r.n(n),s=r("L2JU");r("Y8XJ"),r("85lN");function l(t,e,r,n,a,s,l){try{var o=t[s](l),c=o.value}catch(t){return void r(t)}o.done?e(c):Promise.resolve(c).then(n,a)}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c={data:function(){return{form:{cell_number:""},rules:{required:function(t){return!!t||"Required."},cellNumberCounter:function(t){return t&&11==t.length||"must 11 characters"}}}},methods:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){o(t,e,r[e])})}return t}({},Object(s.b)("auth",["forgotPassword"]),{handleSubmit:function(){var t,e=(t=a.a.mark(function t(){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.$refs.form.validate()&&this.forgotPassword({form:this.form});case 1:case"end":return t.stop()}},t,this)}),function(){var e=this,r=arguments;return new Promise(function(n,a){var s=t.apply(e,r);function o(t){l(s,n,a,o,c,"next",t)}function c(t){l(s,n,a,o,c,"throw",t)}o(void 0)})});return function(){return e.apply(this,arguments)}}()})},i=r("KHd+"),u=Object(i.a)(c,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-form",{ref:"form"},[r("v-container",{attrs:{"grid-list-xs":""}},[r("v-layout",{staticClass:"justify-center",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"WM-WidthScreen-SM WM-WidthScreen-XS",attrs:{xs12:"",md3:"",sm3:""}},[r("material-card",{attrs:{color:"black",title:"Login Page"}},[r("v-layout",{staticClass:"px-3",attrs:{row:"",wrap:""}},[r("v-flex",{attrs:{xs12:"",md12:"",sm12:""}},[r("v-text-field",{attrs:{name:"cellnumber",label:"Cell Number",color:"black",rules:[t.rules.required,t.rules.cellNumberCounter],mask:"#### ### ####"},model:{value:t.form.cell_number,callback:function(e){t.$set(t.form,"cell_number",e)},expression:"form.cell_number"}})],1)],1),t._v(" "),r("v-layout",{staticClass:"px-3",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"text-md-left text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[r("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:t.handleSubmit}},[r("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-sign-in-alt")]),t._v(" "),r("span",{staticClass:"white--text"},[t._v("Send")])],1)],1),t._v(" "),r("v-flex",{staticClass:"text-md-right text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[r("router-link",{staticClass:"black--text",attrs:{to:{name:"Login"}}},[r("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"},[r("v-icon",{staticClass:"black--text mr-2 caption"},[t._v("fas fa-sign-in-alt")]),t._v(" "),r("span",{staticClass:"black--text"},[t._v("Login")])],1)],1)],1)],1)],1)],1)],1)],1)],1)},[],!1,null,null,null);e.default=u.exports}}]);
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{"9Tbo":function(t,e,r){"use strict";r.r(e);var s=r("o0o1"),a=r.n(s),n=r("L2JU");function o(t,e,r,s,a,n,o){try{var l=t[n](o),i=l.value}catch(t){return void r(t)}l.done?e(i):Promise.resolve(i).then(s,a)}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},s=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),s.forEach(function(e){i(t,e,r[e])})}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c={data:function(){return{cell_number:"",password:"",show1:!1,rules:{required:function(t){return!!t||"Required."},passCounter:function(t){return t&&t.length>=8||"Min 8 characters"},cellNumberCounter:function(t){return t&&11==t.length||"must 11 characters"}}}},computed:l({},Object(n.c)("auth",["authenticating","authenticationError","authenticationErrorCode"])),methods:l({},Object(n.b)("auth",["login"]),{handleSubmit:function(){var t,e=(t=a.a.mark(function t(){var e;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.$refs.form.validate()){t.next=5;break}return t.next=3,this.login({cell_number:this.cell_number,password:this.password});case 3:(e=t.sent).status&&200===e.status||(this.password="");case 5:case"end":return t.stop()}},t,this)}),function(){var e=this,r=arguments;return new Promise(function(s,a){var n=t.apply(e,r);function l(t){o(n,s,a,l,i,"next",t)}function i(t){o(n,s,a,l,i,"throw",t)}l(void 0)})});return function(){return e.apply(this,arguments)}}()})},u=r("KHd+"),p=Object(u.a)(c,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-form",{ref:"form"},[r("v-container",{attrs:{"grid-list-xs":""}},[r("v-layout",{staticClass:"justify-center",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"WM-WidthScreen-SM WM-WidthScreen-XS",attrs:{xs12:"",md3:"",sm3:""}},[r("material-card",{attrs:{color:"black",title:"Login Page"}},[r("v-layout",{staticClass:"px-3",attrs:{row:"",wrap:""}},[r("v-flex",{attrs:{xs12:"",md12:"",sm12:""}},[r("v-text-field",{attrs:{name:"cellnumber",label:"Cell Number",color:"black",rules:[t.rules.required,t.rules.cellNumberCounter],mask:"#### ### ####"},model:{value:t.cell_number,callback:function(e){t.cell_number=e},expression:"cell_number"}})],1)],1),t._v(" "),r("v-layout",{staticClass:"px-3",attrs:{row:"",wrap:""}},[r("v-flex",{attrs:{xs12:"",md12:"",sm12:""}},[r("v-text-field",{staticClass:"pa-2",attrs:{name:"password",label:"Password",type:t.show1?"text":"password","append-icon":t.show1?"visibility":"visibility_off",rules:[t.rules.required,t.rules.passCounter],color:"black"},on:{"click:append":function(e){t.show1=!t.show1}},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1)],1),t._v(" "),r("v-layout",{staticClass:"px-3",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"text-md-left text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[r("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:t.handleSubmit}},[r("v-icon",{staticClass:"white--text mr-2 caption"},[t._v("fas fa-sign-in-alt")]),t._v(" "),r("span",{staticClass:"white--text"},[t._v("Login")])],1)],1)],1),t._v(" "),r("v-layout",{staticClass:"text-md-left text-sm-center text-xs-center",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"px-4 py-3",attrs:{xs12:"",md6:"",sm6:""}},[r("router-link",{attrs:{to:{name:"ForgotPassword"}}},[r("span",{staticClass:"black--text",staticStyle:{"border-bottom":"1px solid #000"}},[t._v("Forgot Password ?")])])],1)],1)],1)],1)],1)],1)],1)},[],!1,null,"73e21ace",null);e.default=p.exports}}]);
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{NLmH:function(e,t,r){"use strict";r.r(t);var s=r("o0o1"),a=r.n(s),n=r("Y8XJ");function l(e,t,r,s,a,n,l){try{var o=e[n](l),i=o.value}catch(e){return void r(e)}o.done?t(i):Promise.resolve(i).then(s,a)}var o={data:function(){var e=Object.freeze({cell_number:"",password:"",name:"",gender:"",medical_center_id:this.$route.params.medicalCenter?this.$route.params.medicalCenter:""});return{form:Object.assign({},e),show1:!1,items:["Male","FeMale"],isLogin:n.c.getInfo(),rules:{required:function(e){return!!e||"Required."},nameCounter:function(e){return e&&e.length>=5||"Min 5 characters"},passCounter:function(e){return e&&e.length>=8||"Min 8 characters"},cellNumberCounter:function(e){return e&&11==e.length||"must 11 characters"},countryCode:function(e){return e&&4==e.length||"must 4 characters for example (0098)"}}}},methods:{register:function(){var e,t=(e=a.a.mark(function e(){var t;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.$refs.form.validate()){e.next=5;break}return e.next=3,n.a.post("register",this.form);case 3:(t=e.sent)&&200==t.status&&this.$router.push({name:"OperatorList",params:{medicalCenter:this.form.medical_center_id}});case 5:case"end":return e.stop()}},e,this)}),function(){var t=this,r=arguments;return new Promise(function(s,a){var n=e.apply(t,r);function o(e){l(n,s,a,o,i,"next",e)}function i(e){l(n,s,a,o,i,"throw",e)}o(void 0)})});return function(){return t.apply(this,arguments)}}()}},i=r("KHd+"),c=Object(i.a)(o,function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-form",{ref:"form"},[r("v-container",{attrs:{"grid-list-xs":""}},[r("v-layout",{staticClass:"justify-center",attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"WM-WidthScreen-SM WM-WidthScreen-XS",attrs:{xs12:"",md3:"",sm6:""}},[r("material-card",{attrs:{color:"black",title:"Register Page"}},[r("v-layout",{attrs:{column:""}},[r("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[r("v-text-field",{staticClass:"pa-2",attrs:{name:"name",label:"Name",color:"black",rules:[e.rules.required,e.rules.nameCounter]},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),r("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[r("v-select",{staticClass:"pa-2",attrs:{items:e.items,label:"Gender",name:"gender","single-line":"",color:"black",rules:[e.rules.required]},model:{value:e.form.gender,callback:function(t){e.$set(e.form,"gender",t)},expression:"form.gender"}})],1),e._v(" "),r("v-flex",{attrs:{xs2:"",md2:"",sm2:""}},[r("v-text-field",{attrs:{name:"country_code",label:"Country Code",color:"black",rules:[e.rules.required,e.rules.countryCode],mask:"####"},model:{value:e.form.country_code,callback:function(t){e.$set(e.form,"country_code",t)},expression:"form.country_code"}})],1),e._v(" "),r("v-flex",{attrs:{xs10:"",md10:"",sm10:""}},[r("v-text-field",{attrs:{name:"cellnumber",label:"Cell Number",color:"black",rules:[e.rules.required,e.rules.cellNumberCounter],mask:"#### ### ####"},model:{value:e.form.cell_number,callback:function(t){e.$set(e.form,"cell_number",t)},expression:"form.cell_number"}})],1),e._v(" "),r("v-flex",{attrs:{xs12:"",md2:"",sm2:""}},[r("v-text-field",{staticClass:"pa-2",attrs:{name:"password",label:"Password",type:e.show1?"text":"password","append-icon":e.show1?"visibility":"visibility_off",color:"black",rules:[e.rules.required,e.rules.passCounter]},on:{"click:append":function(t){e.show1=!e.show1}},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1)],1),e._v(" "),r("v-layout",{attrs:{row:"",wrap:""}},[r("v-flex",{staticClass:"text-md-left text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[r("v-btn",{staticClass:"WM-CyanBlueGradient-BG",staticStyle:{padding:"10px 60px"},on:{click:e.register}},[r("v-icon",{staticClass:"white--text mr-2 caption"},[e._v("fas fa-plus")]),e._v(" "),r("span",{staticClass:"white--text"},[e._v("Register")])],1)],1),e._v(" "),e.isLogin?e._e():r("v-flex",{staticClass:"text-md-right text-sm-center text-xs-center",attrs:{xs12:"",md6:"",sm6:""}},[r("router-link",{attrs:{to:"/login"}},[r("v-btn",{staticClass:"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"},[r("v-icon",{staticClass:"black--text mr-2 caption"},[e._v("fas fa-sign-in-alt")]),e._v(" "),r("span",{staticClass:"black--text"},[e._v("Login")])],1)],1)],1)],1)],1)],1)],1)],1)],1)},[],!1,null,null,null);t.default=c.exports}}]);
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{GLrF:function(t,e,r){"use strict";r.r(e);var n=r("o0o1"),a=r.n(n),i=r("Y8XJ");function o(t,e,r,n,a,i,o){try{var l=t[i](o),s=l.value}catch(t){return void r(t)}l.done?e(s):Promise.resolve(s).then(n,a)}var l={data:function(){return{AdminCards:[{title:"Manage Users",text:"You can Manage the users information",icon:"/img/Static/Dashboard/manageusers.png",color:"WM-LightGreenGradient-BG",route:{name:"ManageUsers"},aligntext:"text-md-center",alignimg:"text-md-left",column:"xs12 md12 sm12",role:"Admin|Supervisor"},{title:"Manage Medical Center",text:"You can edit the medical center information",icon:"/img/Static/Dashboard/settings.png",color:"WM-MuskGradient-BG",route:{name:"ManageMedicalCenter"},aligntext:"text-md-left",alignimg:"text-md-right",column:"xs12 md7 sm7",role:"Admin"},{title:"List Test Type",text:"You can simply add your test type",icon:"/img/Static/Dashboard/result.png",color:"WM-GreyGradient-BG",route:{name:"ListTestType"},aligntext:"text-md-left",alignimg:"text-md-right",column:"xs12 md5 sm5",role:"Admin"}],SupervisorCards:[{title:"Manage Users",text:"You can Manage the users information",icon:"/img/Static/Dashboard/manageusers.png",color:"WM-LightGreenGradient-BG",route:{name:"ManageUsers"},aligntext:"text-md-center",alignimg:"text-md-left",column:"xs12 md12 sm12",role:"Admin|Supervisor"},{title:"Test to Verify",text:"You can simply verify your own medical center test result in this section of website",icon:"/img/Static/Dashboard/verify.png",color:"WM-PinkGradient-BG",route:{name:"NotVerifyTestResult"},aligntext:"text-md-center",alignimg:"text-md-left",column:"xs12 md12 sm12",role:"Admin|Supervisor"}],UsersCards:[{title:"My Info",text:"You can easily edit your registration information",icon:"/img/Static/Dashboard/info.png",color:"WM-OrangeGradient-BG",route:{name:"MyInfo"},aligntext:"text-md-left",alignimg:"text-md-right",column:"xs12 md6 sm6"},{title:"All Test Result",text:"You can see all user tests and own tests",icon:"/img/Static/Dashboard/alltest.png",color:"WM-GreenGradient-BG",route:{name:"AllResultTest"},aligntext:"text-md-left",alignimg:"text-md-right",column:"xs12 md6 sm6"},{title:"Add a Test Result",text:"You can add the test result",icon:"/img/Static/Dashboard/addtest.png",color:"WM-YellowGradient-BG",route:{name:"SubmitTestResult"},aligntext:"text-md-center",alignimg:"text-md-left",column:"xs12 md12 sm12"}]}},created:function(){var t,e=(t=a.a.mark(function t(){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=console,t.next=3,i.d.getInfo();case 3:t.t1=t.sent,t.t0.log.call(t.t0,t.t1);case 5:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function l(t){o(i,n,a,l,s,"next",t)}function s(t){o(i,n,a,l,s,"throw",t)}l(void 0)})});return function(){return e.apply(this,arguments)}}()},s=r("KHd+"),c=Object(s.a)(l,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-container",{attrs:{fluid:""}},[t.$hasRole("Admin")?r("material-card",{attrs:{color:"black",title:"Admin",text:""}},[r("v-layout",{attrs:{row:"",wrap:""}},[t._l(t.AdminCards,function(e,n){return[!e.role||t.$hasRole(e.role)?r("v-flex",{key:n,class:[e.column,"pa-2"]},[r("router-link",{attrs:{to:e.route}},[r("material-cards",{attrs:{title:e.title,icon:e.icon,color:e.color,text:e.text,aligntext:e.aligntext,alignimg:e.alignimg}})],1)],1):t._e()]})],2)],1):t._e(),t._v(" "),t.$hasRole("Supervisor|Admin")?r("material-card",{attrs:{color:"black",title:"Supervisor",text:""}},[r("v-layout",{attrs:{row:"",wrap:""}},[t._l(t.SupervisorCards,function(e,n){return[!e.role||t.$hasRole(e.role)?r("v-flex",{key:n,class:[e.column,"pa-2"]},[r("router-link",{attrs:{to:e.route}},[r("material-cards",{attrs:{title:e.title,icon:e.icon,color:e.color,text:e.text,aligntext:e.aligntext,alignimg:e.alignimg}})],1)],1):t._e()]})],2)],1):t._e(),t._v(" "),r("material-card",{attrs:{color:"black",title:"User",text:""}},[r("v-layout",{attrs:{row:"",wrap:""}},[t._l(t.UsersCards,function(e,n){return[!e.role||t.$hasRole(e.role)?r("v-flex",{key:n,class:[e.column,"pa-2"]},[r("router-link",{attrs:{to:e.route}},[r("material-cards",{attrs:{title:e.title,icon:e.icon,color:e.color,text:e.text,aligntext:e.aligntext,alignimg:e.alignimg}})],1)],1):t._e()]})],2)],1)],1)},[],!1,null,null,null);e.default=c.exports}}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,4 +1,4 @@
{
"/js/show/app.js": "/js/show/app.js?id=95217b30045b8f289fbf",
"/js/vue/app.js": "/js/vue/app.js?id=ac8ec32fafb8ce4c18c9"
"/js/show/app.js": "/js/show/app.js?id=6f8d21c1e85811fc4007",
"/js/vue/app.js": "/js/vue/app.js?id=ed90e7a139eac86ed447"
}
+2 -2
View File
@@ -3,7 +3,7 @@ import { TokenService } from '@/services'
const $hasRole = function(roles) {
if (TokenService.getToken()) {
roles = roles.split('|');
for (const role of roles) {
if(TokenService.getInfo().roles && Array.isArray(TokenService.getInfo().roles) && TokenService.getInfo().roles.includes(role)) {
return true;
@@ -14,4 +14,4 @@ const $hasRole = function(roles) {
export {
$hasRole
}
}
+59 -59
View File
@@ -1,77 +1,77 @@
<template>
<v-container fluid>
<v-container fluid>
<material-card class="" v-if="$hasRole('Admin')" color="black" title="Admin" text="">
<v-layout row wrap>
<template v-for="(AdminCard, Key ) in AdminCards">
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column, 'pa-2']" :key="Key">
<router-link :to="AdminCard.route">
<material-cards :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
:text="AdminCard.text" :aligntext="AdminCard.aligntext" :alignimg="AdminCard.alignimg" />
</router-link>
</v-flex>
</template>
<material-card class="" v-if="$hasRole('Admin')" color="black" title="Admin" text="">
<v-layout row wrap>
<template v-for="(AdminCard, Key ) in AdminCards">
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column, 'pa-2']" :key="Key">
<router-link :to="AdminCard.route">
<material-cards :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
:text="AdminCard.text" :aligntext="AdminCard.aligntext" :alignimg="AdminCard.alignimg" />
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
</v-layout>
</material-card>
<material-card v-if="$hasRole('Supervisor|Admin')" color="black" title="Supervisor" text="">
<v-layout row wrap>
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column, 'pa-2']"
:key="Key">
<router-link :to="SupervisorCard.route">
<material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon" :color="SupervisorCard.color"
:text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext" :alignimg="SupervisorCard.alignimg" />
</router-link>
</v-flex>
</template>
<material-card v-if="$hasRole('Supervisor|Admin')" color="black" title="Supervisor" text="">
<v-layout row wrap>
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column, 'pa-2']"
:key="Key">
<router-link :to="SupervisorCard.route">
<material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon" :color="SupervisorCard.color"
:text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext" :alignimg="SupervisorCard.alignimg" />
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
</v-layout>
</material-card>
<material-card color="black" title="User" text="">
<v-layout row wrap>
<template v-for="(UsersCard, Key ) in UsersCards">
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" :key="Key">
<router-link :to="UsersCard.route">
<material-cards :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
:text="UsersCard.text" :aligntext="UsersCard.aligntext" :alignimg="UsersCard.alignimg" />
</router-link>
</v-flex>
</template>
<material-card color="black" title="User" text="">
<v-layout row wrap>
<template v-for="(UsersCard, Key ) in UsersCards">
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" :key="Key">
<router-link :to="UsersCard.route">
<material-cards :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
:text="UsersCard.text" :aligntext="UsersCard.aligntext" :alignimg="UsersCard.alignimg" />
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
</v-layout>
</material-card>
</v-container>
</v-container>
</template>
<script>
import { UserService } from '@/services';
export default {
data() {
return {
AdminCards: [
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{ title: 'Manage Medical Center', text: 'You can edit the medical center information', icon: '/img/Static/Dashboard/settings.png', color: 'WM-MuskGradient-BG', route: { name: 'ManageMedicalCenter' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md7 sm7', role: 'Admin' },
{ title: 'List Test Type', text: 'You can simply add your test type', icon: '/img/Static/Dashboard/result.png', color: 'WM-GreyGradient-BG', route: { name: 'ListTestType' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md5 sm5', role: 'Admin' }
],
SupervisorCards: [
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{ title: 'Test to Verify', text: 'You can simply verify your own medical center test result in this section of website', icon: '/img/Static/Dashboard/verify.png', color: 'WM-PinkGradient-BG', route: { name: 'NotVerifyTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
],
UsersCards: [
{ title: 'My Info', text: 'You can easily edit your registration information', icon: '/img/Static/Dashboard/info.png', color: 'WM-OrangeGradient-BG', route: { name: 'MyInfo' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{ title: 'All Test Result', text: 'You can see all user tests and own tests', icon: '/img/Static/Dashboard/alltest.png', color: 'WM-GreenGradient-BG', route: { name: 'AllResultTest' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{ title: 'Add a Test Result', text: 'You can add the test result', icon: '/img/Static/Dashboard/addtest.png', color: 'WM-YellowGradient-BG', route: { name: 'SubmitTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
],
data() {
return {
AdminCards: [
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{ title: 'Manage Medical Center', text: 'You can edit the medical center information', icon: '/img/Static/Dashboard/settings.png', color: 'WM-MuskGradient-BG', route: { name: 'ManageMedicalCenter' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md7 sm7', role: 'Admin' },
{ title: 'List Test Type', text: 'You can simply add your test type', icon: '/img/Static/Dashboard/result.png', color: 'WM-GreyGradient-BG', route: { name: 'ListTestType' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md5 sm5', role: 'Admin' }
],
SupervisorCards: [
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
{ title: 'Test to Verify', text: 'You can simply verify your own medical center test result in this section of website', icon: '/img/Static/Dashboard/verify.png', color: 'WM-PinkGradient-BG', route: { name: 'NotVerifyTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
],
UsersCards: [
{ title: 'My Info', text: 'You can easily edit your registration information', icon: '/img/Static/Dashboard/info.png', color: 'WM-OrangeGradient-BG', route: { name: 'MyInfo' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{ title: 'All Test Result', text: 'You can see all user tests and own tests', icon: '/img/Static/Dashboard/alltest.png', color: 'WM-GreenGradient-BG', route: { name: 'AllResultTest' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
{ title: 'Add a Test Result', text: 'You can add the test result', icon: '/img/Static/Dashboard/addtest.png', color: 'WM-YellowGradient-BG', route: { name: 'SubmitTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
],
}
},
async created() {
console.log(await UserService.getInfo());
}
},
async created() {
console.log(await UserService.getInfo());
}
}
</script>
<style lang="scss"></style>
+1 -1
View File
@@ -32,7 +32,7 @@
<v-layout class="px-5 mb-3">
<v-flex xs12 md4 sm4 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi" :rules="[rules.required]"
<v-text-field name="UID" label="UID" color="black" v-model="formData.uid" :rules="[rules.required]"
class="py-3 pr-3"></v-text-field>
</v-flex>
<v-flex xs12 md8 sm8 class="WM-FlexCenter" v-if="galleryDataLoaded">
+4 -4
View File
@@ -53,7 +53,7 @@
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
item.user.medical_center.name : '' }}</td>
<td class="title font-weight-light">{{ item.udi }}</td>
<td class="title font-weight-light">{{ item.uid }}</td>
<td class="title font-weight-light">{{ item.size }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<v-tooltip bottom open-on-hover v-if="$hasRole('Supervisor|Admin')">
@@ -162,8 +162,8 @@ export default {
},
{
sortable: false,
text: "UDI",
value: "udi"
text: "UID",
value: "uid"
},
{
sortable: false,
@@ -213,7 +213,7 @@ export default {
this.loadMedicalCenters();
},
async generateBarcode(item, type = null) {
let code = item.udi ? item.udi : item.id;
let code = item.uid ? item.uid : item.id;
const result = await ApiService.post(urls.Barcode(code, type));
if (result && result.status == 200) {
this.changeCurrentModal({
+1 -1
View File
@@ -10,7 +10,7 @@
</v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
<v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi" :rules="[rules.required]"
<v-text-field name="UID" label="UID" color="black" v-model="formData.uid" :rules="[rules.required]"
class="py-3 pr-3"></v-text-field>
</v-flex>
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter">
+3 -3
View File
@@ -61,7 +61,7 @@
<td class="title font-weight-light">{{ (item.user && item.user.medical_center) ?
item.user.medical_center.name : '' }}</td>
<td class="title font-weight-light">{{ item.user ? item.user.name : '' }}</td>
<td class="title font-weight-light">{{ item.udi }}</td>
<td class="title font-weight-light">{{ item.uid }}</td>
<td class="title font-weight-light">{{ item.description }}</td>
<td class="text-xs-right FlexBtn Height-MD-60">
<v-tooltip bottom open-on-hover>
@@ -163,8 +163,8 @@ export default {
value: "User"
},
{
text: "UDI",
value: "udi"
text: "UID",
value: "uid"
},
{
sortable: true,