mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 13:11:07 +03:30
manam
This commit is contained in:
@@ -25,7 +25,7 @@ class ResetPasswordController extends Controller
|
|||||||
|
|
||||||
if (auth('api')->check()) {
|
if (auth('api')->check()) {
|
||||||
$user = auth('api')->user();
|
$user = auth('api')->user();
|
||||||
$user->password = Hash::make($request->password);
|
$user->password = \Hash::make($request->password);
|
||||||
$user->save();
|
$user->save();
|
||||||
return \MessageResponse::success('Success Change Password');
|
return \MessageResponse::success('Success Change Password');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ class MedicalCenterController extends Controller
|
|||||||
|
|
||||||
public function store(StoreMedicalCenterRequest $request)
|
public function store(StoreMedicalCenterRequest $request)
|
||||||
{
|
{
|
||||||
$MedicalCenter = MedicalCenter::create($request->all());
|
MedicalCenter::create($request->all());
|
||||||
return response()->json(trans('messages.success'));
|
return \MessageResponse::success(trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
@@ -32,22 +32,24 @@ class MedicalCenterController extends Controller
|
|||||||
// return response()->json(['MedicalCenter' => $MedicalCenter]);
|
// return response()->json(['MedicalCenter' => $MedicalCenter]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id)
|
public function edit(MedicalCenter $MedicalCenter)
|
||||||
{
|
{
|
||||||
$MedicalCenter = MedicalCenter::with('users')->findOrFail($id);
|
$MedicalCenter = $MedicalCenter->load('users');
|
||||||
return response()->json(['MedicalCenter' => $MedicalCenter]);
|
return \MessageResponse::data($MedicalCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(StoreMedicalCenterRequest $request, MedicalCenter $MedicalCenter)
|
public function update(StoreMedicalCenterRequest $request, MedicalCenter $MedicalCenter)
|
||||||
{
|
{
|
||||||
$MedicalCenter->update($request->all());
|
$MedicalCenter->update($request->all());
|
||||||
return response()->json(trans('messages.success'));
|
return \MessageResponse::success(trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy(MedicalCenter $MedicalCenter)
|
public function destroy(MedicalCenter $MedicalCenter)
|
||||||
{
|
{
|
||||||
if ($MedicalCenter->users->count() == 0) {
|
if ($MedicalCenter->users->count() == 0) {
|
||||||
$MedicalCenter->delete();
|
$MedicalCenter->delete();
|
||||||
|
return \MessageResponse::success(trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
return \MessageResponse::error(trans('messages.failed'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,20 @@ use App\Http\Requests\StoreTestResultRequest;
|
|||||||
use App\TestResult;
|
use App\TestResult;
|
||||||
use App\InputValue;
|
use App\InputValue;
|
||||||
use App\Input;
|
use App\Input;
|
||||||
|
use App\Gallery;
|
||||||
|
use App\Uploadable;
|
||||||
|
use Intervention\Image\ImageManagerStatic as Image;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class TestResultController extends Controller
|
class TestResultController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$TestResult = TestResult::with('test_type', 'user', 'user.medical_center')->paginate(10);
|
$TestResult = TestResult::with('test_type', 'user', 'user.medical_center')
|
||||||
|
->when($request->has('verified'), function ($query) use ($request)
|
||||||
|
{
|
||||||
|
return $query->where('verified', $request->verified);
|
||||||
|
})->paginate(10);
|
||||||
return \MessageResponse::data($TestResult);
|
return \MessageResponse::data($TestResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +46,6 @@ class TestResultController extends Controller
|
|||||||
|
|
||||||
public function store(StoreTestResultRequest $request)
|
public function store(StoreTestResultRequest $request)
|
||||||
{
|
{
|
||||||
// dd($request->all());
|
|
||||||
try {
|
try {
|
||||||
$return_value = \DB::transaction(function () use ($request) {
|
$return_value = \DB::transaction(function () use ($request) {
|
||||||
|
|
||||||
@@ -52,54 +59,58 @@ class TestResultController extends Controller
|
|||||||
$TestResultObj = TestResult::create($TestResult);
|
$TestResultObj = TestResult::create($TestResult);
|
||||||
$TestResultInfo = $request->all();
|
$TestResultInfo = $request->all();
|
||||||
|
|
||||||
$Inputs = Input::with('options','children','children.children')->where('test_type_id',$request->test_type_id)->get();
|
$Inputs = Input::with('options','children','children.children')->whereNull('parent_id')->where('test_type_id',$request->test_type_id)->get();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////--2
|
///////////////////////////////////////////////////////////////////////////Inputs
|
||||||
foreach ($Inputs as $Input) {
|
foreach ($Inputs as $Input) {
|
||||||
if ($Input['type'] != 'Form') {
|
if ($Input['type'] != 'Form') {
|
||||||
$Value = $TestResultInfo[$Input->name];
|
$Value = $TestResultInfo[$Input->name];
|
||||||
if ($Input['type'] == 'Checkbox') {
|
|
||||||
$Value = json_encode($Value);
|
if ($Input['type'] == 'Checkbox' || $Input['type'] == 'Select' ) {
|
||||||
|
|
||||||
|
foreach ($Value as $Option) {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $Input->id, 'option_id' => $Option]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $Input->id, 'value' => $Value]);
|
||||||
}
|
}
|
||||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id , 'input_id' => $Input->id , 'value' => $Value]);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($Input->children as $InputChild) {
|
foreach ($Input->children as $InputChild) {
|
||||||
$Value = $TestResultInfo[$InputChild->name];
|
$Value = $TestResultInfo[$InputChild->name];
|
||||||
if ($InputChild['type'] == 'Checkbox') {
|
|
||||||
$Value = json_encode($Value);
|
if ($InputChild['type'] == 'Checkbox' || $InputChild['type'] == 'Select') {
|
||||||
|
foreach ($Value as $Option) {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $InputChild->id, 'option_id' => $Option]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id , 'input_id' => $InputChild->id , 'value' => $Value]);
|
else {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id, 'input_id' => $InputChild->id, 'value' => $Value]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------
|
|
||||||
// $this->CreateChildFormValue2($Input,$TestResultObj,$TestResultInfo);
|
|
||||||
// foreach ($Input->children as $InputChild) {
|
|
||||||
//
|
|
||||||
// if ($InputChild['type'] != 'Form') {
|
|
||||||
// $Value = $TestResultInfo[$Input->name][$InputChild->name];
|
|
||||||
// $InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id , 'input_id' => $InputChild->id , 'value' => $Value]);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
//
|
|
||||||
// foreach ($InputChild->children as $InputChild2) {
|
|
||||||
//
|
|
||||||
// if ($InputChild2['type'] != 'Form') {
|
|
||||||
// $Value = $TestResultInfo[$Input->name][$InputChild->name][$InputChild2->name];
|
|
||||||
// $InputValueObj = InputValue::create(['test_result_id' => $TestResultObj->id , 'input_id' => $InputChild2->id , 'value' => $Value]);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//---------------------------------------------------------
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
///////////////////////////////////////////////////////////////////////////Inputs
|
||||||
|
///////////////////////////////////////////////////////////////////////////Image
|
||||||
|
if ($request->hasFile('img')) {
|
||||||
|
|
||||||
|
$Image = $request->file('img');
|
||||||
|
$InterventionImage = Image::make($Image);
|
||||||
|
$Mime = explode('/', $InterventionImage->mime());
|
||||||
|
|
||||||
|
$ImageName = time().'.'.$Mime[1];
|
||||||
|
$Path = 'uploads'.'/TestResults'.'/'.$TestResultObj->id .'/'.$ImageName;
|
||||||
|
|
||||||
|
Storage::disk('public')->makeDirectory('TestResults'.'/'.$TestResultObj->id);
|
||||||
|
$InterventionImage->save(public_path($Path));
|
||||||
|
|
||||||
|
$GalleryObj = Gallery::create(['user_id' => auth('api')->user()->id, 'path' => $Path]);
|
||||||
|
$Uploadable = Uploadable::create(['uploadable_id' => $TestResultObj->id, 'uploadable_type' => 'App\TestResult', 'gallery_id' => $GalleryObj->id, 'image_role' => 'TitleImage']);
|
||||||
|
}
|
||||||
|
///////////////////////////////////////////////////////////////////////////Image
|
||||||
|
|
||||||
});
|
});
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -111,19 +122,80 @@ class TestResultController extends Controller
|
|||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
//
|
$TestResult = TestResult::with('input_values', 'user')->select('result', 'verified', 'autoclave_id','user_id','id')->findOrFail($id);
|
||||||
|
$options = [];
|
||||||
|
foreach ($TestResult->input_values as $key => $value) {
|
||||||
|
$input = $value->input;
|
||||||
|
|
||||||
|
if ($input->parent_id != null && $input->parent['type'] == 'Form') {
|
||||||
|
//----------------------------------------------------------------------FormType
|
||||||
|
if ($input->type == 'Checkbox' || $input->type == 'Select') {
|
||||||
|
$input_options = InputValue::with('option')->where('test_result_id', $TestResult->id)->where('input_id', $input->id)->get();
|
||||||
|
$options = [];
|
||||||
|
foreach ($input_options as $input_option) {
|
||||||
|
$options[] = $input_option->option->title;
|
||||||
|
$input_values[$input->name] = $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
$children[$input->parent->name] = $input_values;
|
||||||
|
$TestResult['children'] = $children;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$input_values = [$input->name => $value->value];
|
||||||
|
$children[$input->parent->name] = $input_values;
|
||||||
|
$TestResult['children'] = $children;
|
||||||
|
}
|
||||||
|
//-----------------------------------------------------------------------FormType
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//-----------------------------------------------------------------------Anothertype
|
||||||
|
if ($input->type == 'Checkbox' || $input->type == 'Select') {
|
||||||
|
$input_options = InputValue::with('option')->where('test_result_id', $TestResult->id)->where('input_id', $input->id)->get();
|
||||||
|
$options = [];
|
||||||
|
foreach ($input_options as $input_option) {
|
||||||
|
$options[] = $input_option->option->title;
|
||||||
|
}
|
||||||
|
|
||||||
|
$values[$input->name] = $options;
|
||||||
|
$TestResult['options'] = $values;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$inputs[$input->name] = $value->value;
|
||||||
|
$TestResult['inputs'] = $inputs;
|
||||||
|
}
|
||||||
|
//-----------------------------------------------------------------------Anothertype
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($TestResult->TitleImage)) {
|
||||||
|
$TestResult['imagePath'] = $TestResult->TitleImage[0]->path;
|
||||||
|
}
|
||||||
|
return \MessageResponse::data($TestResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Todo:: pass Inputs
|
|
||||||
public function edit(TestResult $TestResult)
|
public function edit(TestResult $TestResult)
|
||||||
{
|
{
|
||||||
foreach ($TestResult->input_values as $key => $value) {
|
foreach ($TestResult->input_values as $key => $value) {
|
||||||
$input = $value->input;
|
$input = $value->input;
|
||||||
$TestResult[$input->name] = $value->value;
|
if ($input->type == 'Checkbox' || $input->type == 'Select') {
|
||||||
|
$input_options = InputValue::where('test_result_id', $TestResult->id)->where('input_id', $input->id)->get()->pluck('option_id')->toArray();
|
||||||
|
$TestResult[$input->name] = $input_options;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$TestResult[$input->name] = $value->value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return \MessageResponse::data($TestResult);
|
return \MessageResponse::data($TestResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function storage_path($path)
|
||||||
|
{
|
||||||
|
if (starts_with($path, 'uploads/')) {
|
||||||
|
$path = substr($path, 8);
|
||||||
|
}
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
public function update(StoreTestResultRequest $request, TestResult $TestResult)
|
public function update(StoreTestResultRequest $request, TestResult $TestResult)
|
||||||
{
|
{
|
||||||
$TestResultData = [
|
$TestResultData = [
|
||||||
@@ -136,43 +208,94 @@ class TestResultController extends Controller
|
|||||||
$TestResult->update($TestResultData);
|
$TestResult->update($TestResultData);
|
||||||
$TestResultInfo = $request->all();
|
$TestResultInfo = $request->all();
|
||||||
|
|
||||||
$Inputs = Input::with('options','children','children.children')->where('test_type_id',$request->test_type_id)->get();
|
$Inputs = Input::with('options', 'children', 'children.children')->whereNull('parent_id')->where('test_type_id',$request->test_type_id)->get();
|
||||||
|
|
||||||
foreach ($Inputs as $Input) {
|
foreach ($Inputs as $Input) {
|
||||||
if ($Input['type'] != 'Form') {
|
if ($Input['type'] != 'Form') {
|
||||||
$Value = $TestResultInfo[$Input->name];
|
$Value = $TestResultInfo[$Input->name];
|
||||||
if ($Input['type'] == 'Checkbox') {
|
|
||||||
$Value = json_encode($Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$InputValueObj = InputValue::where('test_result_id',$TestResult->id)->where('input_id', $Input['id'])->update(['value' => $Value]);
|
if ($Input['type'] == 'Checkbox' || $Input['type'] == 'Select' ) {
|
||||||
|
|
||||||
|
$InputOptions = InputValue::where('test_result_id', $TestResult->id)->where('input_id', $Input->id)->get()->each->delete();
|
||||||
|
|
||||||
|
foreach ($Value as $Option) {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResult->id, 'input_id' => $Input->id, 'option_id' => $Option]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$InputValueObj = InputValue::where('test_result_id', $TestResult->id)->where('input_id', $Input['id'])->update(['value' => $Value]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($Input->children as $InputChild) {
|
foreach ($Input->children as $InputChild) {
|
||||||
$Value = $TestResultInfo[$InputChild->name];
|
$Value = $TestResultInfo[$InputChild->name];
|
||||||
if ($InputChild['type'] == 'Checkbox') {
|
|
||||||
$Value = json_encode($Value);
|
if ($InputChild['type'] == 'Checkbox' || $InputChild['type'] == 'Select') {
|
||||||
|
$InputOptions = InputValue::where('test_result_id', $TestResult->id)->where('input_id', $InputChild->id)->get()->each->delete();
|
||||||
|
|
||||||
|
foreach ($Value as $Option) {
|
||||||
|
$InputValueObj = InputValue::create(['test_result_id' => $TestResult->id, 'input_id' => $InputChild->id, 'option_id' => $Option]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$InputValueObj = InputValue::where('test_result_id', $TestResult->id)->where('input_id', $InputChild['id'])->update(['value' => $Value]);
|
||||||
}
|
}
|
||||||
$InputValueObj = InputValue::where('test_result_id',$TestResult->id)->where('input_id', $Input['id'])->update(['value' => $Value]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return \MessageResponse::success(null,trans('messages.update'));
|
//////////////////////////////////////////////////////////////////Image
|
||||||
|
$image = '';
|
||||||
|
if (count($TestResult->TitleImage))
|
||||||
|
$image = $TestResult->TitleImage[0];
|
||||||
|
|
||||||
|
if ($request->hasFile('img')) {
|
||||||
|
|
||||||
|
$Image = $request->file('img');
|
||||||
|
$InterventionImage = Image::make($Image);
|
||||||
|
$Mime = explode('/', $InterventionImage->mime());
|
||||||
|
|
||||||
|
$ImageName = time().'.'.$Mime[1];
|
||||||
|
$Path = 'uploads'.'/TestResults'.'/'.$TestResult->id .'/'.$ImageName;
|
||||||
|
|
||||||
|
Storage::disk('public')->makeDirectory('TestResults'.'/'.$TestResult->id);
|
||||||
|
$InterventionImage->save(public_path($Path));
|
||||||
|
|
||||||
|
|
||||||
|
if ($image !== ''){
|
||||||
|
Storage::disk('public')->delete(static::storage_path($image->path));
|
||||||
|
Uploadable::where('gallery_id', $image->id)->where('uploadable_id', $TestResult->id)->where('uploadable_type', get_class($TestResult))->delete();
|
||||||
|
|
||||||
|
//--------------------------------------------------------
|
||||||
|
$GalleryObj = Gallery::where('id', $image->id)->update(['path' => $Path]);
|
||||||
|
$Uploadable = Uploadable::create(['uploadable_id' => $TestResult->id, 'uploadable_type' => get_class($TestResult), 'gallery_id' => $image->id, 'image_role' => 'TitleImage']);
|
||||||
|
//--------------------------------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//--------------------------------------------------------
|
||||||
|
$GalleryObj = Gallery::create(['user_id' => auth('api')->user()->id, 'path' => $Path]);
|
||||||
|
$Uploadable = Uploadable::create(['uploadable_id' => $TestResult->id, 'uploadable_type' => 'App\TestResult', 'gallery_id' => $GalleryObj->id, 'image_role' => 'TitleImage']);
|
||||||
|
//--------------------------------------------------------
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////Image
|
||||||
|
|
||||||
|
return \MessageResponse::success(null,trans('messages.update'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy(TestResult $TestResult)
|
public function destroy(TestResult $TestResult)
|
||||||
{
|
{
|
||||||
if (auth('api')->user()->can('delete', $TestResult)) {
|
if (!auth('api')->user()->can('delete', $TestResult)) {
|
||||||
return \MessageResponse::error(trans('messages.failed'));
|
return \MessageResponse::error(trans('messages.access_denied'));
|
||||||
}
|
}
|
||||||
$TestResult->delete();
|
$TestResult->delete();
|
||||||
return \MessageResponse::success(null, trans('messages.failed'));
|
return \MessageResponse::success(null, trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function verifyTestResult(TestResult $TestResult)
|
public function verifyTestResult(TestResult $TestResult)
|
||||||
{
|
{
|
||||||
if (auth('api')->user()->can('verifyTestResult', $TestResult)) {
|
if (!auth('api')->user()->can('verifyTestResult', $TestResult)) {
|
||||||
return \MessageResponse::error(trans('messages.failed'));
|
return \MessageResponse::error(trans('messages.access_denied'));
|
||||||
}
|
}
|
||||||
if ($TestResult->verified == 'Verified') {
|
if ($TestResult->verified == 'Verified') {
|
||||||
$TestResult->verified = 'NotVerified';
|
$TestResult->verified = 'NotVerified';
|
||||||
@@ -180,7 +303,7 @@ class TestResultController extends Controller
|
|||||||
$TestResult->verified = 'Verified';
|
$TestResult->verified = 'Verified';
|
||||||
}
|
}
|
||||||
$TestResult->save();
|
$TestResult->save();
|
||||||
return \MessageResponse::data($TestResult);
|
return \MessageResponse::success(trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ class TestTypeController extends Controller
|
|||||||
}
|
}
|
||||||
//---------------------------------------------Option
|
//---------------------------------------------Option
|
||||||
return $InputObj;
|
return $InputObj;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function CreateChildForm($Input,$TestType,$InputObj)
|
public function CreateChildForm($Input,$TestType,$InputObj)
|
||||||
@@ -329,6 +328,9 @@ class TestTypeController extends Controller
|
|||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
public function getInputs(Request $request)
|
public function getInputs(Request $request)
|
||||||
{
|
{
|
||||||
|
if (auth('api')->user()->can('getInputs')) {
|
||||||
|
return \MessageResponse::error(trans('messages.failed'));
|
||||||
|
}
|
||||||
if($request->test_result_id !== '') {
|
if($request->test_result_id !== '') {
|
||||||
$testTypeId = TestResult::find($request->test_result_id);
|
$testTypeId = TestResult::find($request->test_result_id);
|
||||||
}
|
}
|
||||||
@@ -364,10 +366,9 @@ class TestTypeController extends Controller
|
|||||||
|
|
||||||
public function destroy(TestType $TestType)
|
public function destroy(TestType $TestType)
|
||||||
{
|
{
|
||||||
// if (auth('api')->user()->can('delete', $TestType)) {
|
if (!auth('api')->user()->can('delete', $TestType)) {
|
||||||
// return \MessageResponse::error(trans('messages.failed'));
|
return \MessageResponse::error(trans('messages.access_denied'));
|
||||||
// }
|
}
|
||||||
// dd($TestType);
|
|
||||||
$TestType->delete();
|
$TestType->delete();
|
||||||
return \MessageResponse::success(trans('messages.success'));
|
return \MessageResponse::success(trans('messages.success'));
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class InputValue extends Model
|
class InputValue extends Model
|
||||||
{
|
{
|
||||||
public $fillable = ['value','test_result_id','input_id'];
|
public $fillable = ['value','test_result_id','input_id','option_id'];
|
||||||
public function input()
|
public function input()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Input');
|
return $this->belongsTo('App\Input');
|
||||||
@@ -15,4 +15,8 @@ class InputValue extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsTo('App\TestResult');
|
return $this->belongsTo('App\TestResult');
|
||||||
}
|
}
|
||||||
|
public function option()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\Option');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,4 +11,9 @@ class Option extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsTo('App\Input');
|
return $this->belongsTo('App\Input');
|
||||||
}
|
}
|
||||||
|
public function input_value()
|
||||||
|
{
|
||||||
|
return $this->hasOne('App\InputValue');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,9 @@ class TestResultPolicy
|
|||||||
// if($User->hasRole('Admin'))␍
|
// if($User->hasRole('Admin'))␍
|
||||||
return true;␍
|
return true;␍
|
||||||
}␍
|
}␍
|
||||||
|
public function verifyTestResult(User $User, TestResult $TestResult)␍
|
||||||
|
{␍
|
||||||
|
// if($User->hasRole('Supervisor'))␍
|
||||||
|
return true;␍
|
||||||
|
}␍
|
||||||
}␍
|
}␍
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class TestTypePolicy
|
|||||||
␍
|
␍
|
||||||
public function delete(User $User, TestType $TestType)␍
|
public function delete(User $User, TestType $TestType)␍
|
||||||
{␍
|
{␍
|
||||||
// if($User->hasRole('Admin'))␍
|
if($User->hasRole('Admin'))␍
|
||||||
return true;␍
|
return true;␍
|
||||||
}␍
|
}␍
|
||||||
␍
|
␍
|
||||||
@@ -26,4 +26,9 @@ class TestTypePolicy
|
|||||||
// if($User->hasRole('Admin'))␍
|
// if($User->hasRole('Admin'))␍
|
||||||
return true;␍
|
return true;␍
|
||||||
}␍
|
}␍
|
||||||
|
public function getInputs(User $User)␍
|
||||||
|
{␍
|
||||||
|
// if($User->hasRole('Admin'))␍
|
||||||
|
return true;␍
|
||||||
|
}␍
|
||||||
}␍
|
}␍
|
||||||
|
|||||||
@@ -19,4 +19,8 @@ class TestResult extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasMany('App\InputValue');
|
return $this->hasMany('App\InputValue');
|
||||||
}
|
}
|
||||||
|
public function TitleImage()
|
||||||
|
{
|
||||||
|
return $this->morphToMany('App\Gallery', 'uploadable')->wherePivot('image_role', 'TitleImage');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,15 @@
|
|||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
class TestType extends Model
|
class TestType extends Model
|
||||||
{
|
{
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
public $fillable = ['name','unique_code','user_id'];
|
public $fillable = ['name','unique_code','user_id'];
|
||||||
|
// protected $softDelete = true;
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\User');
|
return $this->belongsTo('App\User');
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class Uploadable extends Model
|
class Uploadable extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $fillable = ['uploadable_id', 'uploadable_type', 'gallery_id'];
|
protected $fillable = ['uploadable_id', 'uploadable_type', 'gallery_id', 'image_role'];
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
public function gallery()
|
public function gallery()
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ return [
|
|||||||
|
|
||||||
'public' => [
|
'public' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/public'),
|
'root' => public_path('uploads'),
|
||||||
'url' => env('APP_URL').'/storage',
|
'url' => env('APP_URL') . '/storage',
|
||||||
'visibility' => 'public',
|
'visibility' => 'public',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Image Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Intervention Image supports "GD Library" and "Imagick" to process images
|
||||||
|
| internally. You may choose one of them according to your PHP
|
||||||
|
| configuration. By default PHP's "GD Library" implementation is used.
|
||||||
|
|
|
||||||
|
| Supported: "gd", "imagick"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'gd'
|
||||||
|
|
||||||
|
];
|
||||||
Generated
+5
@@ -14903,6 +14903,11 @@
|
|||||||
"integrity": "sha512-S4f0wXEbQNHnP4IUtSSIRmzU/fjyPtTN5fC80JlHdTcF78VLT1/xsTqXgNtSW5712UJtrLPpF6b0LfOTJrCCBg==",
|
"integrity": "sha512-S4f0wXEbQNHnP4IUtSSIRmzU/fjyPtTN5fC80JlHdTcF78VLT1/xsTqXgNtSW5712UJtrLPpF6b0LfOTJrCCBg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vuetify-upload-component": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/vuetify-upload-component/-/vuetify-upload-component-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-7g4VjnacxPDAiaKWu+GikqmcLXqlFk6G+SirgajXQHnBgkOP0U0RLqPLU/sdtmcQCfj0l5RjiXTT5RZPDWRpNg=="
|
||||||
|
},
|
||||||
"vuex": {
|
"vuex": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
|
||||||
|
|||||||
@@ -60,5 +60,8 @@
|
|||||||
"vuetify": "^1.2.5",
|
"vuetify": "^1.2.5",
|
||||||
"vuex": "^3.0.1",
|
"vuex": "^3.0.1",
|
||||||
"vuex-router-sync": "^5.0.0"
|
"vuex-router-sync": "^5.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vuetify-upload-component": "^1.0.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+4
-1
@@ -94,7 +94,10 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
result = _context.sent;
|
result = _context.sent;
|
||||||
this.medicalCenter = result.data.MedicalCenter;
|
|
||||||
|
if (result && result.status == 200) {
|
||||||
|
this.medicalCenter = result.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
case "end":
|
case "end":
|
||||||
|
|||||||
Vendored
+188
-120
@@ -155,6 +155,29 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
@@ -172,8 +195,10 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
formData: {
|
formData: {
|
||||||
autoclave_id: "",
|
autoclave_id: "",
|
||||||
result: "",
|
result: "",
|
||||||
|
img: null,
|
||||||
test_type_id: ""
|
test_type_id: ""
|
||||||
}
|
},
|
||||||
|
image: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function created() {
|
created: function created() {
|
||||||
@@ -244,10 +269,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
if (result.data.data.inputs[key].type == 'Form') {
|
if (result.data.data.inputs[key].type == 'Form') {
|
||||||
for (keyForm in result.data.data.inputs[key].children) {
|
for (keyForm in result.data.data.inputs[key].children) {
|
||||||
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
|
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
|
||||||
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
|
if (result.data.data.inputs[key].children[keyForm].type == 'Checkbox' || result.data.data.inputs[key].children[keyForm].type == 'Select') {
|
||||||
|
this.formData[result.data.data.inputs[key].children[keyForm].name] = [];
|
||||||
|
} else {
|
||||||
|
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (result.data.data.inputs[key].type == 'Checkbox') {
|
} else if (result.data.data.inputs[key].type == 'Checkbox' || result.data.data.inputs[key].type == 'Select') {
|
||||||
this.formData[result.data.data.inputs[key].name] = [];
|
this.formData[result.data.data.inputs[key].name] = [];
|
||||||
} else {
|
} else {
|
||||||
this.formData[result.data.data.inputs[key].name] = '';
|
this.formData[result.data.data.inputs[key].name] = '';
|
||||||
@@ -288,8 +317,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
var _submitForm = _asyncToGenerator(
|
var _submitForm = _asyncToGenerator(
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3() {
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3() {
|
||||||
var _result2, _result3;
|
var result;
|
||||||
|
|
||||||
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (_context3.prev = _context3.next) {
|
switch (_context3.prev = _context3.next) {
|
||||||
@@ -303,7 +331,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].put(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].updateTestResult(this.$route.params.testResult), this.formData);
|
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].put(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].updateTestResult(this.$route.params.testResult), this.formData);
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
_result2 = _context3.sent;
|
result = _context3.sent;
|
||||||
_context3.next = 9;
|
_context3.next = 9;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -312,7 +340,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].post(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].storeTestResult, this.formData);
|
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].post(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].storeTestResult, this.formData);
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
_result3 = _context3.sent;
|
result = _context3.sent;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
@@ -334,7 +362,31 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
}
|
}
|
||||||
|
|
||||||
return submitForm;
|
return submitForm;
|
||||||
}()
|
}(),
|
||||||
|
onFileChange: function onFileChange(e) {
|
||||||
|
var files = e.target.files || e.dataTransfer.files;
|
||||||
|
if (!files.length) return;
|
||||||
|
this.createImage(files[0]);
|
||||||
|
},
|
||||||
|
createImage: function createImage(file) {
|
||||||
|
var image = new Image();
|
||||||
|
var reader = new FileReader();
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
reader.onload = function (e) {
|
||||||
|
vm.image = e.target.result;
|
||||||
|
};
|
||||||
|
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
},
|
||||||
|
removeImage: function removeImage(e) {
|
||||||
|
this.image = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
image: function image(img) {
|
||||||
|
this.formData.img = img;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -533,6 +585,26 @@ var render = function() {
|
|||||||
1
|
1
|
||||||
),
|
),
|
||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
|
_c("v-flex", { attrs: { xs12: "", sm4: "", md3: "" } }, [
|
||||||
|
!_vm.image
|
||||||
|
? _c("div", [
|
||||||
|
_c("input", {
|
||||||
|
attrs: { type: "file" },
|
||||||
|
on: { change: _vm.onFileChange }
|
||||||
|
})
|
||||||
|
])
|
||||||
|
: _c("div", [
|
||||||
|
_c("img", {
|
||||||
|
staticStyle: { width: "100%" },
|
||||||
|
attrs: { src: _vm.image }
|
||||||
|
}),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("button", { on: { click: _vm.removeImage } }, [
|
||||||
|
_vm._v("Remove image")
|
||||||
|
])
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
_vm._l(_vm.form, function(item, key) {
|
_vm._l(_vm.form, function(item, key) {
|
||||||
return _c(
|
return _c(
|
||||||
"v-flex",
|
"v-flex",
|
||||||
@@ -554,6 +626,7 @@ var render = function() {
|
|||||||
item.type == "Select"
|
item.type == "Select"
|
||||||
? _c("v-select", {
|
? _c("v-select", {
|
||||||
attrs: {
|
attrs: {
|
||||||
|
multiple: "",
|
||||||
items: item.options,
|
items: item.options,
|
||||||
label: item.name,
|
label: item.name,
|
||||||
color: "black",
|
color: "black",
|
||||||
@@ -603,122 +676,117 @@ var render = function() {
|
|||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
item.type == "Form"
|
item.type == "Form"
|
||||||
? [
|
? [
|
||||||
|
_c("v-layout", { attrs: { row: "", wrap: "" } }, [
|
||||||
|
_c("h3", [_vm._v(_vm._s(item.name))])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
_c(
|
_c(
|
||||||
"v-layout",
|
"v-layout",
|
||||||
{ attrs: { row: "", wrap: "" } },
|
{ attrs: { row: "", wrap: "" } },
|
||||||
[
|
_vm._l(item.children, function(
|
||||||
_c("h3", [_vm._v(_vm._s(item.name))]),
|
children,
|
||||||
_vm._v(" "),
|
keyChildren
|
||||||
_vm._l(item.children, function(
|
) {
|
||||||
children,
|
return _c(
|
||||||
keyChildren
|
"v-flex",
|
||||||
) {
|
{
|
||||||
return _c(
|
key: keyChildren,
|
||||||
"v-flex",
|
class: ["pa-2", children.size]
|
||||||
{
|
},
|
||||||
key: keyChildren,
|
[
|
||||||
class: ["pa-2", children.size]
|
children.type == "Text"
|
||||||
},
|
? _c("v-text-field", {
|
||||||
[
|
attrs: {
|
||||||
children.type == "Text"
|
label: children.name,
|
||||||
? _c("v-text-field", {
|
color: "black"
|
||||||
attrs: {
|
},
|
||||||
label: children.name,
|
model: {
|
||||||
color: "black"
|
value:
|
||||||
},
|
_vm.formData[children.name],
|
||||||
model: {
|
callback: function($$v) {
|
||||||
value:
|
_vm.$set(
|
||||||
_vm.formData[children.name],
|
_vm.formData,
|
||||||
callback: function($$v) {
|
children.name,
|
||||||
_vm.$set(
|
$$v
|
||||||
_vm.formData,
|
|
||||||
children.name,
|
|
||||||
$$v
|
|
||||||
)
|
|
||||||
},
|
|
||||||
expression:
|
|
||||||
"formData[children.name]"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
: _vm._e(),
|
|
||||||
_vm._v(" "),
|
|
||||||
children.type == "Select"
|
|
||||||
? _c("v-select", {
|
|
||||||
attrs: {
|
|
||||||
items: children.options,
|
|
||||||
label: children.name,
|
|
||||||
color: "black",
|
|
||||||
"item-text": "title",
|
|
||||||
"item-value": "id"
|
|
||||||
},
|
|
||||||
model: {
|
|
||||||
value:
|
|
||||||
_vm.formData[children.name],
|
|
||||||
callback: function($$v) {
|
|
||||||
_vm.$set(
|
|
||||||
_vm.formData,
|
|
||||||
children.name,
|
|
||||||
$$v
|
|
||||||
)
|
|
||||||
},
|
|
||||||
expression:
|
|
||||||
"formData[children.name]"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
: _vm._e(),
|
|
||||||
_vm._v(" "),
|
|
||||||
children.type == "Checkbox"
|
|
||||||
? _c(
|
|
||||||
"v-container",
|
|
||||||
{ attrs: { fluid: "" } },
|
|
||||||
[
|
|
||||||
_c("p", [
|
|
||||||
_vm._v(_vm._s(children.name))
|
|
||||||
]),
|
|
||||||
_vm._v(" "),
|
|
||||||
_vm._l(
|
|
||||||
children.options,
|
|
||||||
function(
|
|
||||||
optionValue,
|
|
||||||
keyOption
|
|
||||||
) {
|
|
||||||
return _c("v-checkbox", {
|
|
||||||
key: keyOption,
|
|
||||||
attrs: {
|
|
||||||
label:
|
|
||||||
optionValue.title,
|
|
||||||
value: optionValue.id
|
|
||||||
},
|
|
||||||
model: {
|
|
||||||
value:
|
|
||||||
_vm.formData[
|
|
||||||
children.name
|
|
||||||
],
|
|
||||||
callback: function(
|
|
||||||
$$v
|
|
||||||
) {
|
|
||||||
_vm.$set(
|
|
||||||
_vm.formData,
|
|
||||||
children.name,
|
|
||||||
$$v
|
|
||||||
)
|
|
||||||
},
|
|
||||||
expression:
|
|
||||||
"formData[children.name]"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
],
|
},
|
||||||
2
|
expression:
|
||||||
)
|
"formData[children.name]"
|
||||||
: _vm._e()
|
}
|
||||||
],
|
})
|
||||||
1
|
: _vm._e(),
|
||||||
)
|
_vm._v(" "),
|
||||||
})
|
children.type == "Select"
|
||||||
],
|
? _c("v-select", {
|
||||||
2
|
attrs: {
|
||||||
|
multiple: "",
|
||||||
|
items: children.options,
|
||||||
|
label: children.name,
|
||||||
|
color: "black",
|
||||||
|
"item-text": "title",
|
||||||
|
"item-value": "id"
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
value:
|
||||||
|
_vm.formData[children.name],
|
||||||
|
callback: function($$v) {
|
||||||
|
_vm.$set(
|
||||||
|
_vm.formData,
|
||||||
|
children.name,
|
||||||
|
$$v
|
||||||
|
)
|
||||||
|
},
|
||||||
|
expression:
|
||||||
|
"formData[children.name]"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
: _vm._e(),
|
||||||
|
_vm._v(" "),
|
||||||
|
children.type == "Checkbox"
|
||||||
|
? _c(
|
||||||
|
"v-container",
|
||||||
|
{ attrs: { fluid: "" } },
|
||||||
|
[
|
||||||
|
_c("p", [
|
||||||
|
_vm._v(_vm._s(children.name))
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_vm._l(children.options, function(
|
||||||
|
optionValue,
|
||||||
|
keyOption
|
||||||
|
) {
|
||||||
|
return _c("v-checkbox", {
|
||||||
|
key: keyOption,
|
||||||
|
attrs: {
|
||||||
|
label: optionValue.title,
|
||||||
|
value: optionValue.id
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
value:
|
||||||
|
_vm.formData[
|
||||||
|
children.name
|
||||||
|
],
|
||||||
|
callback: function($$v) {
|
||||||
|
_vm.$set(
|
||||||
|
_vm.formData,
|
||||||
|
children.name,
|
||||||
|
$$v
|
||||||
|
)
|
||||||
|
},
|
||||||
|
expression:
|
||||||
|
"formData[children.name]"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
],
|
||||||
|
2
|
||||||
|
)
|
||||||
|
: _vm._e()
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
}),
|
||||||
|
1
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
: _vm._e()
|
: _vm._e()
|
||||||
|
|||||||
Vendored
+135
-23
@@ -13,12 +13,17 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/services */ "./resources/js/vue/services/index.js");
|
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/services */ "./resources/js/vue/services/index.js");
|
||||||
/* harmony import */ var _config_urls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/config/urls */ "./resources/js/vue/config/urls.js");
|
/* harmony import */ var _config_urls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/config/urls */ "./resources/js/vue/config/urls.js");
|
||||||
|
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
||||||
|
|
||||||
|
|
||||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||||
|
|
||||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||||
|
|
||||||
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||||
|
|
||||||
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -106,9 +111,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
@@ -146,14 +149,19 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function created() {
|
created: function created() {
|
||||||
this.load();
|
if (this.$route.name == 'NotVerifyTestResult') {
|
||||||
|
this.load(1, 'NotVerified');
|
||||||
|
} else {
|
||||||
|
this.load();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_3__["mapMutations"])("modal", ["changeCurrentModal"]), {
|
||||||
load: function () {
|
load: function () {
|
||||||
var _load = _asyncToGenerator(
|
var _load = _asyncToGenerator(
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
|
||||||
var page,
|
var page,
|
||||||
|
verified,
|
||||||
result,
|
result,
|
||||||
_args = arguments;
|
_args = arguments;
|
||||||
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
||||||
@@ -161,10 +169,11 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
switch (_context.prev = _context.next) {
|
switch (_context.prev = _context.next) {
|
||||||
case 0:
|
case 0:
|
||||||
page = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1;
|
page = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1;
|
||||||
_context.next = 3;
|
verified = _args.length > 1 && _args[1] !== undefined ? _args[1] : null;
|
||||||
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].listTestResult(page));
|
_context.next = 4;
|
||||||
|
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].listTestResult(page, verified));
|
||||||
|
|
||||||
case 3:
|
case 4:
|
||||||
result = _context.sent;
|
result = _context.sent;
|
||||||
|
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
@@ -173,7 +182,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
this.lastPage = result.data.data.last_page;
|
this.lastPage = result.data.data.last_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 5:
|
case 6:
|
||||||
case "end":
|
case "end":
|
||||||
return _context.stop();
|
return _context.stop();
|
||||||
}
|
}
|
||||||
@@ -187,21 +196,59 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
|
|
||||||
return load;
|
return load;
|
||||||
}(),
|
}(),
|
||||||
remove: function () {
|
show: function () {
|
||||||
var _remove = _asyncToGenerator(
|
var _show = _asyncToGenerator(
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(testResultId) {
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(testResultId) {
|
||||||
var result, key;
|
var result;
|
||||||
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (_context2.prev = _context2.next) {
|
switch (_context2.prev = _context2.next) {
|
||||||
case 0:
|
case 0:
|
||||||
_context2.next = 2;
|
_context2.next = 2;
|
||||||
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].delete(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].removeTestResult(testResultId));
|
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].showTestResult(testResultId));
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
result = _context2.sent;
|
result = _context2.sent;
|
||||||
|
|
||||||
|
if (result && result.status == 200) {
|
||||||
|
this.changeCurrentModal({
|
||||||
|
modal: "modal-testresult-show",
|
||||||
|
properties: {
|
||||||
|
result: result
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
case "end":
|
||||||
|
return _context2.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, _callee2, this);
|
||||||
|
}));
|
||||||
|
|
||||||
|
function show(_x) {
|
||||||
|
return _show.apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
return show;
|
||||||
|
}(),
|
||||||
|
remove: function () {
|
||||||
|
var _remove = _asyncToGenerator(
|
||||||
|
/*#__PURE__*/
|
||||||
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(testResultId) {
|
||||||
|
var result, key;
|
||||||
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {
|
||||||
|
while (1) {
|
||||||
|
switch (_context3.prev = _context3.next) {
|
||||||
|
case 0:
|
||||||
|
_context3.next = 2;
|
||||||
|
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].delete(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].removeTestResult(testResultId));
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
result = _context3.sent;
|
||||||
|
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
for (key in this.items) {
|
for (key in this.items) {
|
||||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||||
@@ -212,19 +259,19 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
case "end":
|
case "end":
|
||||||
return _context2.stop();
|
return _context3.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, _callee2, this);
|
}, _callee3, this);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function remove(_x) {
|
function remove(_x2) {
|
||||||
return _remove.apply(this, arguments);
|
return _remove.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
return remove;
|
return remove;
|
||||||
}()
|
}()
|
||||||
},
|
}),
|
||||||
watch: {
|
watch: {
|
||||||
currentPage: function currentPage(page) {
|
currentPage: function currentPage(page) {
|
||||||
this.load(page);
|
this.load(page);
|
||||||
@@ -329,6 +376,45 @@ var render = function() {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
|
),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("v-spacer"),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c(
|
||||||
|
"v-flex",
|
||||||
|
{
|
||||||
|
staticClass: "text-xs-right",
|
||||||
|
attrs: { xs12: "", md2: "", sm2: "" }
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"router-link",
|
||||||
|
{ attrs: { to: { name: "SubmitTestResult" } } },
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"v-btn",
|
||||||
|
{
|
||||||
|
staticClass:
|
||||||
|
"WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"v-icon",
|
||||||
|
{ staticClass: "black--text mr-2 caption" },
|
||||||
|
[_vm._v("fas fa-plus")]
|
||||||
|
),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("span", { staticClass: "black--text" }, [
|
||||||
|
_vm._v("Add")
|
||||||
|
])
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
],
|
||||||
|
1
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
@@ -410,6 +496,32 @@ var render = function() {
|
|||||||
"td",
|
"td",
|
||||||
{ staticClass: "text-xs-right" },
|
{ staticClass: "text-xs-right" },
|
||||||
[
|
[
|
||||||
|
_c(
|
||||||
|
"v-btn",
|
||||||
|
{
|
||||||
|
staticClass: "mr-2",
|
||||||
|
attrs: { color: "cyan" },
|
||||||
|
on: {
|
||||||
|
click: function($event) {
|
||||||
|
return _vm.show(item.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"v-icon",
|
||||||
|
{
|
||||||
|
staticClass:
|
||||||
|
"white--text mr-1 caption"
|
||||||
|
},
|
||||||
|
[_vm._v("fas fa-pen")]
|
||||||
|
),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("span", [_vm._v("Show")])
|
||||||
|
],
|
||||||
|
1
|
||||||
|
),
|
||||||
|
_vm._v(" "),
|
||||||
_c(
|
_c(
|
||||||
"router-link",
|
"router-link",
|
||||||
{
|
{
|
||||||
@@ -425,7 +537,7 @@ var render = function() {
|
|||||||
"v-btn",
|
"v-btn",
|
||||||
{
|
{
|
||||||
staticClass: "mr-2",
|
staticClass: "mr-2",
|
||||||
attrs: { color: "cyan" }
|
attrs: { color: "orange" }
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
_c(
|
_c(
|
||||||
@@ -448,8 +560,8 @@ var render = function() {
|
|||||||
_c(
|
_c(
|
||||||
"v-btn",
|
"v-btn",
|
||||||
{
|
{
|
||||||
staticClass: "mr-2",
|
staticClass: "WM-ActionButton",
|
||||||
attrs: { color: "black" },
|
attrs: { color: "pink" },
|
||||||
on: {
|
on: {
|
||||||
click: function($event) {
|
click: function($event) {
|
||||||
return _vm.remove(item.id)
|
return _vm.remove(item.id)
|
||||||
@@ -461,12 +573,12 @@ var render = function() {
|
|||||||
"v-icon",
|
"v-icon",
|
||||||
{
|
{
|
||||||
staticClass:
|
staticClass:
|
||||||
"white--text mr-1 caption"
|
"white--text mr-2 caption"
|
||||||
},
|
},
|
||||||
[_vm._v("fas fa-folder")]
|
[_vm._v("fas fa-times")]
|
||||||
),
|
),
|
||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
_c("span", [_vm._v("Archive")])
|
_c("span", [_vm._v("Remove")])
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
|
|||||||
Vendored
+2
-2
@@ -123,10 +123,10 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
return !!value || "Required.";
|
return !!value || "Required.";
|
||||||
},
|
},
|
||||||
counter: function counter(value) {
|
counter: function counter(value) {
|
||||||
return value.length == 0 || value.length >= 5 || "Min 5 characters";
|
return !value || value.length == 0 || value.length >= 5 || "Min 5 characters";
|
||||||
},
|
},
|
||||||
email: function email(value) {
|
email: function email(value) {
|
||||||
if (value.length > 0) {
|
if (value && value.length > 0) {
|
||||||
var pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
var pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||||
return pattern.test(value) || "Invalid e-mail.";
|
return pattern.test(value) || "Invalid e-mail.";
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+11
-5
@@ -95,6 +95,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
@@ -225,7 +227,11 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
|
|
||||||
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
|
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
|
||||||
// Module
|
// Module
|
||||||
|
<<<<<<< HEAD
|
||||||
exports.push([module.i, "\n.WM-ActionButton[data-v-b1f1b72e] {\r\n padding: 8px 22px;\n}\r\n", ""]);
|
exports.push([module.i, "\n.WM-ActionButton[data-v-b1f1b72e] {\r\n padding: 8px 22px;\n}\r\n", ""]);
|
||||||
|
=======
|
||||||
|
exports.push([module.i, "\n.WM-ActionButton[data-v-b1f1b72e] {\n padding: 8px 22px;\n}\n", ""]);
|
||||||
|
>>>>>>> 116ef9e130916c23ffec776f35fb489cbc506d58
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -492,8 +498,8 @@ var render = function() {
|
|||||||
_c(
|
_c(
|
||||||
"v-btn",
|
"v-btn",
|
||||||
{
|
{
|
||||||
staticClass: "WM-ActionButton",
|
staticClass: "mr-2",
|
||||||
attrs: { color: "pink" },
|
attrs: { color: "black" },
|
||||||
on: {
|
on: {
|
||||||
click: function($event) {
|
click: function($event) {
|
||||||
return _vm.remove(item.id)
|
return _vm.remove(item.id)
|
||||||
@@ -504,12 +510,12 @@ var render = function() {
|
|||||||
_c(
|
_c(
|
||||||
"v-icon",
|
"v-icon",
|
||||||
{
|
{
|
||||||
staticClass: "white--text mr-2 caption"
|
staticClass: "white--text mr-1 caption"
|
||||||
},
|
},
|
||||||
[_vm._v("fas fa-times")]
|
[_vm._v("fas fa-folder")]
|
||||||
),
|
),
|
||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
_c("span", [_vm._v("Remove")])
|
_c("span", [_vm._v("Archive")])
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
|
|||||||
Vendored
+22
-4
@@ -66,6 +66,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -74,6 +76,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
cell_number: ""
|
cell_number: ""
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
required: function required(value) {
|
||||||
|
return !!value || "Required.";
|
||||||
|
},
|
||||||
|
cellNumberCounter: function cellNumberCounter(value) {
|
||||||
|
return value && value.length == 11 || "must 11 characters";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -87,9 +97,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
while (1) {
|
while (1) {
|
||||||
switch (_context.prev = _context.next) {
|
switch (_context.prev = _context.next) {
|
||||||
case 0:
|
case 0:
|
||||||
this.forgotPassword({
|
if (this.$refs.form.validate()) {
|
||||||
form: this.form
|
this.forgotPassword({
|
||||||
});
|
form: this.form
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
case "end":
|
case "end":
|
||||||
@@ -127,6 +139,7 @@ var render = function() {
|
|||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
return _c(
|
return _c(
|
||||||
"v-form",
|
"v-form",
|
||||||
|
{ ref: "form" },
|
||||||
[
|
[
|
||||||
_c(
|
_c(
|
||||||
"v-container",
|
"v-container",
|
||||||
@@ -159,7 +172,12 @@ var render = function() {
|
|||||||
attrs: {
|
attrs: {
|
||||||
name: "cellnumber",
|
name: "cellnumber",
|
||||||
label: "Cell Number",
|
label: "Cell Number",
|
||||||
color: "black"
|
color: "black",
|
||||||
|
rules: [
|
||||||
|
_vm.rules.required,
|
||||||
|
_vm.rules.cellNumberCounter
|
||||||
|
],
|
||||||
|
mask: "#### ### ####"
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
value: _vm.form.cell_number,
|
value: _vm.form.cell_number,
|
||||||
|
|||||||
Vendored
+76
-15
@@ -9,7 +9,15 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
|
||||||
|
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
||||||
|
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
||||||
|
|
||||||
|
|
||||||
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||||
|
|
||||||
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||||
|
|
||||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||||
|
|
||||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||||
@@ -68,27 +76,71 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
cell_number: "",
|
cell_number: "",
|
||||||
password: "",
|
password: "",
|
||||||
show1: false
|
show1: false,
|
||||||
|
rules: {
|
||||||
|
required: function required(value) {
|
||||||
|
return !!value || "Required.";
|
||||||
|
},
|
||||||
|
passCounter: function passCounter(value) {
|
||||||
|
return value && value.length >= 8 || "Min 8 characters";
|
||||||
|
},
|
||||||
|
cellNumberCounter: function cellNumberCounter(value) {
|
||||||
|
return value && value.length == 11 || "must 11 characters";
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__["mapGetters"])('auth', ['authenticating', 'authenticationError', 'authenticationErrorCode'])),
|
computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__["mapGetters"])('auth', ['authenticating', 'authenticationError', 'authenticationErrorCode'])),
|
||||||
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__["mapActions"])('auth', ['login']), {
|
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__["mapActions"])('auth', ['login']), {
|
||||||
handleSubmit: function handleSubmit() {
|
handleSubmit: function () {
|
||||||
// Perform a simple validation that cell_number and password have been typed in
|
var _handleSubmit = _asyncToGenerator(
|
||||||
if (this.cell_number != '' && this.password != '') {
|
/*#__PURE__*/
|
||||||
this.login({
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
|
||||||
cell_number: this.cell_number,
|
var response;
|
||||||
password: this.password
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
||||||
});
|
while (1) {
|
||||||
this.password = "";
|
switch (_context.prev = _context.next) {
|
||||||
|
case 0:
|
||||||
|
if (!this.$refs.form.validate()) {
|
||||||
|
_context.next = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_context.next = 3;
|
||||||
|
return this.login({
|
||||||
|
cell_number: this.cell_number,
|
||||||
|
password: this.password
|
||||||
|
});
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
response = _context.sent;
|
||||||
|
|
||||||
|
if (!response.status || response.status !== 200) {
|
||||||
|
this.password = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
case "end":
|
||||||
|
return _context.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, _callee, this);
|
||||||
|
}));
|
||||||
|
|
||||||
|
function handleSubmit() {
|
||||||
|
return _handleSubmit.apply(this, arguments);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
return handleSubmit;
|
||||||
|
}()
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -111,6 +163,7 @@ var render = function() {
|
|||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
return _c(
|
return _c(
|
||||||
"v-form",
|
"v-form",
|
||||||
|
{ ref: "form" },
|
||||||
[
|
[
|
||||||
_c(
|
_c(
|
||||||
"v-container",
|
"v-container",
|
||||||
@@ -143,8 +196,12 @@ var render = function() {
|
|||||||
attrs: {
|
attrs: {
|
||||||
name: "cellnumber",
|
name: "cellnumber",
|
||||||
label: "Cell Number",
|
label: "Cell Number",
|
||||||
id: "id1",
|
color: "black",
|
||||||
color: "black"
|
rules: [
|
||||||
|
_vm.rules.required,
|
||||||
|
_vm.rules.cellNumberCounter
|
||||||
|
],
|
||||||
|
mask: "#### ### ####"
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
value: _vm.cell_number,
|
value: _vm.cell_number,
|
||||||
@@ -178,6 +235,10 @@ var render = function() {
|
|||||||
"append-icon": _vm.show1
|
"append-icon": _vm.show1
|
||||||
? "visibility"
|
? "visibility"
|
||||||
: "visibility_off",
|
: "visibility_off",
|
||||||
|
rules: [
|
||||||
|
_vm.rules.required,
|
||||||
|
_vm.rules.passCounter
|
||||||
|
],
|
||||||
color: "black"
|
color: "black"
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
|
|||||||
Vendored
+3
-3
@@ -120,13 +120,13 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
return !!value || "Required.";
|
return !!value || "Required.";
|
||||||
},
|
},
|
||||||
nameCounter: function nameCounter(value) {
|
nameCounter: function nameCounter(value) {
|
||||||
return value.length >= 5 || "Min 5 characters";
|
return value && value.length >= 5 || "Min 5 characters";
|
||||||
},
|
},
|
||||||
passCounter: function passCounter(value) {
|
passCounter: function passCounter(value) {
|
||||||
return value.length >= 6 || "Min 6 characters";
|
return value && value.length >= 8 || "Min 8 characters";
|
||||||
},
|
},
|
||||||
cellNumberCounter: function cellNumberCounter(value) {
|
cellNumberCounter: function cellNumberCounter(value) {
|
||||||
return value.length == 11 || "must 11 characters";
|
return value && value.length == 11 || "must 11 characters";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Vendored
+1
-1
@@ -98,7 +98,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
icon: '/img/Static/Dashboard/notepad-colorful.png',
|
icon: '/img/Static/Dashboard/notepad-colorful.png',
|
||||||
color: 'WM-PinkGradient-BG',
|
color: 'WM-PinkGradient-BG',
|
||||||
route: {
|
route: {
|
||||||
name: 'SubmitTestResult'
|
name: 'NotVerifyTestResult'
|
||||||
},
|
},
|
||||||
aligntext: 'text-md-center',
|
aligntext: 'text-md-center',
|
||||||
alignimg: 'text-md-left',
|
alignimg: 'text-md-left',
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
"/vue/js/app.js": "/vue/js/app.js?id=b4534e69c5368a1cd1b1"
|
"/vue/js/app.js": "/vue/js/app.js?id=b4534e69c5368a1cd1b1"
|
||||||
|
=======
|
||||||
|
"/vue/js/app.js": "/vue/js/app.js?id=b1ffa939001e67dfabbc"
|
||||||
|
>>>>>>> 116ef9e130916c23ffec776f35fb489cbc506d58
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+367
-6
@@ -3366,7 +3366,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__["mapActions"])('auth', ['changePassword']), {
|
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__["mapActions"])('auth', ['changePassword']), {
|
||||||
|
<<<<<<< HEAD
|
||||||
submitVerifyCode: function submitVerifyCode() {
|
submitVerifyCode: function submitVerifyCode() {
|
||||||
|
=======
|
||||||
|
submitChangePassword: function submitChangePassword() {
|
||||||
|
>>>>>>> 116ef9e130916c23ffec776f35fb489cbc506d58
|
||||||
if (this.form.code != '') {
|
if (this.form.code != '') {
|
||||||
this.changePassword({
|
this.changePassword({
|
||||||
form: this.form
|
form: this.form
|
||||||
@@ -3445,6 +3449,97 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js&":
|
||||||
|
/*!************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js& ***!
|
||||||
|
\************************************************************************************************************************************************************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
||||||
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
||||||
|
|
||||||
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// import { ApiService } from "@/services";
|
||||||
|
// import { urls } from "@/config/urls";
|
||||||
|
|
||||||
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
|
data: function data() {
|
||||||
|
return {
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {// ...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||||
|
// async changeRole() {
|
||||||
|
// const result = await ApiService.post(
|
||||||
|
// urls.changeRoleUser(this.getModalProperties.user.id),
|
||||||
|
// this.data
|
||||||
|
// );
|
||||||
|
// if (result && result.status == 200) {
|
||||||
|
// this.setResultModal(result.data.data);
|
||||||
|
// this.closeModal();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
created: function created() {
|
||||||
|
this.data = this.getModalProperties.result.data.data;
|
||||||
|
},
|
||||||
|
computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_0__["mapGetters"])("modal", ["getModalProperties"]))
|
||||||
|
});
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/user/Role.vue?vue&type=script&lang=js&":
|
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/user/Role.vue?vue&type=script&lang=js&":
|
||||||
/*!******************************************************************************************************************************************************************************!*\
|
/*!******************************************************************************************************************************************************************************!*\
|
||||||
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/vue/components/modal/user/Role.vue?vue&type=script&lang=js& ***!
|
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/vue/components/modal/user/Role.vue?vue&type=script&lang=js& ***!
|
||||||
@@ -17299,6 +17394,183 @@ render._withStripped = true
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e&":
|
||||||
|
/*!****************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e& ***!
|
||||||
|
\****************************************************************************************************************************************************************************************************************************/
|
||||||
|
/*! exports provided: render, staticRenderFns */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
|
||||||
|
var render = function() {
|
||||||
|
var _vm = this
|
||||||
|
var _h = _vm.$createElement
|
||||||
|
var _c = _vm._self._c || _h
|
||||||
|
return _c(
|
||||||
|
"div",
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"v-container",
|
||||||
|
{ attrs: { fluid: "" } },
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"material-card",
|
||||||
|
{ attrs: { color: "black", title: "Show Test Resualt", text: "" } },
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"v-layout",
|
||||||
|
{
|
||||||
|
staticClass: "my-3",
|
||||||
|
attrs: { "align-center": "", wrap: "" }
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
|
||||||
|
_c("div", [
|
||||||
|
_vm._v("Auto Clave Id : " + _vm._s(_vm.data.autoclave_id))
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
|
||||||
|
_c("div", [_vm._v("Result : " + _vm._s(_vm.data.result))])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
|
||||||
|
_c("div", [_vm._v("verify : " + _vm._s(_vm.data.verified))])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
|
||||||
|
_c("div", [
|
||||||
|
_vm._v("Register User : " + _vm._s(_vm.data.user.name))
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_vm.data.inputs
|
||||||
|
? _vm._l(_vm.data.inputs, function(inputData, keyInputs) {
|
||||||
|
return _c(
|
||||||
|
"v-flex",
|
||||||
|
{
|
||||||
|
key: keyInputs,
|
||||||
|
attrs: { xs12: "", md12: "", sm12: "" }
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c("div", [
|
||||||
|
_vm._v(
|
||||||
|
_vm._s(keyInputs) + " : " + _vm._s(inputData)
|
||||||
|
)
|
||||||
|
])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
})
|
||||||
|
: _vm._e(),
|
||||||
|
_vm._v(" "),
|
||||||
|
_vm.data.options
|
||||||
|
? _vm._l(_vm.data.options, function(
|
||||||
|
optionData,
|
||||||
|
keyOptions
|
||||||
|
) {
|
||||||
|
return _c(
|
||||||
|
"v-flex",
|
||||||
|
{
|
||||||
|
key: keyOptions,
|
||||||
|
attrs: { xs12: "", md12: "", sm12: "" }
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c(
|
||||||
|
"div",
|
||||||
|
[
|
||||||
|
_vm._v(_vm._s(keyOptions) + " : "),
|
||||||
|
_vm._l(optionData, function(data, dataKey) {
|
||||||
|
return _c("span", { key: dataKey }, [
|
||||||
|
_vm._v(_vm._s(data) + ", ")
|
||||||
|
])
|
||||||
|
})
|
||||||
|
],
|
||||||
|
2
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
})
|
||||||
|
: _vm._e(),
|
||||||
|
_vm._v(" "),
|
||||||
|
_vm.data.children
|
||||||
|
? _vm._l(_vm.data.children, function(formData, keyForm) {
|
||||||
|
return _c(
|
||||||
|
"v-flex",
|
||||||
|
{
|
||||||
|
key: keyForm,
|
||||||
|
attrs: { xs12: "", md12: "", sm12: "" }
|
||||||
|
},
|
||||||
|
[
|
||||||
|
_c("h1", [_vm._v(_vm._s(keyForm))]),
|
||||||
|
_vm._v(" "),
|
||||||
|
_vm._l(formData, function(childData, keyChild) {
|
||||||
|
return _c("div", { key: keyChild }, [
|
||||||
|
_c(
|
||||||
|
"div",
|
||||||
|
[
|
||||||
|
_vm._v(
|
||||||
|
_vm._s(keyChild) +
|
||||||
|
" : \n "
|
||||||
|
),
|
||||||
|
Array.isArray(childData)
|
||||||
|
? _vm._l(childData, function(
|
||||||
|
data,
|
||||||
|
dataKey
|
||||||
|
) {
|
||||||
|
return _c("span", { key: dataKey }, [
|
||||||
|
_vm._v(_vm._s(data) + ", ")
|
||||||
|
])
|
||||||
|
})
|
||||||
|
: [
|
||||||
|
_c("span", [
|
||||||
|
_vm._v(_vm._s(childData))
|
||||||
|
])
|
||||||
|
]
|
||||||
|
],
|
||||||
|
2
|
||||||
|
)
|
||||||
|
])
|
||||||
|
})
|
||||||
|
],
|
||||||
|
2
|
||||||
|
)
|
||||||
|
})
|
||||||
|
: _vm._e()
|
||||||
|
],
|
||||||
|
2
|
||||||
|
),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c("v-divider"),
|
||||||
|
_vm._v(" "),
|
||||||
|
_c(
|
||||||
|
"v-layout",
|
||||||
|
{
|
||||||
|
staticClass: "my-3",
|
||||||
|
attrs: { "align-center": "", wrap: "" }
|
||||||
|
},
|
||||||
|
[_c("v-flex", { attrs: { md12: "" } })],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
],
|
||||||
|
1
|
||||||
|
)
|
||||||
|
}
|
||||||
|
var staticRenderFns = []
|
||||||
|
render._withStripped = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/user/Role.vue?vue&type=template&id=f7c30ab4&":
|
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/user/Role.vue?vue&type=template&id=f7c30ab4&":
|
||||||
@@ -60764,6 +61036,7 @@ var map = {
|
|||||||
"./modal/Base.vue": "./resources/js/vue/components/modal/Base.vue",
|
"./modal/Base.vue": "./resources/js/vue/components/modal/Base.vue",
|
||||||
"./modal/auth/ChangePassword.vue": "./resources/js/vue/components/modal/auth/ChangePassword.vue",
|
"./modal/auth/ChangePassword.vue": "./resources/js/vue/components/modal/auth/ChangePassword.vue",
|
||||||
"./modal/auth/VerifyCode.vue": "./resources/js/vue/components/modal/auth/VerifyCode.vue",
|
"./modal/auth/VerifyCode.vue": "./resources/js/vue/components/modal/auth/VerifyCode.vue",
|
||||||
|
"./modal/testresult/Show.vue": "./resources/js/vue/components/modal/testresult/Show.vue",
|
||||||
"./modal/user/Role.vue": "./resources/js/vue/components/modal/user/Role.vue"
|
"./modal/user/Role.vue": "./resources/js/vue/components/modal/user/Role.vue"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62050,6 +62323,75 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./resources/js/vue/components/modal/testresult/Show.vue":
|
||||||
|
/*!***************************************************************!*\
|
||||||
|
!*** ./resources/js/vue/components/modal/testresult/Show.vue ***!
|
||||||
|
\***************************************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Show.vue?vue&type=template&id=9160f06e& */ "./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e&");
|
||||||
|
/* harmony import */ var _Show_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Show.vue?vue&type=script&lang=js& */ "./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js&");
|
||||||
|
/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* normalize component */
|
||||||
|
|
||||||
|
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
|
||||||
|
_Show_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
|
||||||
|
_Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__["render"],
|
||||||
|
_Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
|
||||||
|
false,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
/* hot reload */
|
||||||
|
if (false) { var api; }
|
||||||
|
component.options.__file = "resources/js/vue/components/modal/testresult/Show.vue"
|
||||||
|
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js&":
|
||||||
|
/*!****************************************************************************************!*\
|
||||||
|
!*** ./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js& ***!
|
||||||
|
\****************************************************************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Show_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/babel-loader/lib??ref--4-0!../../../../../../node_modules/vue-loader/lib??vue-loader-options!./Show.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=script&lang=js&");
|
||||||
|
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Show_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e&":
|
||||||
|
/*!**********************************************************************************************!*\
|
||||||
|
!*** ./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e& ***!
|
||||||
|
\**********************************************************************************************/
|
||||||
|
/*! exports provided: render, staticRenderFns */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../node_modules/vue-loader/lib??vue-loader-options!./Show.vue?vue&type=template&id=9160f06e& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/vue/components/modal/testresult/Show.vue?vue&type=template&id=9160f06e&");
|
||||||
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__["render"]; });
|
||||||
|
|
||||||
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Show_vue_vue_type_template_id_9160f06e___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./resources/js/vue/components/modal/user/Role.vue":
|
/***/ "./resources/js/vue/components/modal/user/Role.vue":
|
||||||
@@ -62157,6 +62499,12 @@ var urls = {
|
|||||||
return "/TestTypes/".concat(id);
|
return "/TestTypes/".concat(id);
|
||||||
},
|
},
|
||||||
listTestResult: function listTestResult(page) {
|
listTestResult: function listTestResult(page) {
|
||||||
|
var verified = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||||
|
|
||||||
|
if (verified) {
|
||||||
|
return "/TestResults/?verified=".concat(verified, "&page=").concat(page);
|
||||||
|
}
|
||||||
|
|
||||||
return "/TestResults?page=" + page;
|
return "/TestResults?page=" + page;
|
||||||
},
|
},
|
||||||
editTestResult: function editTestResult(id) {
|
editTestResult: function editTestResult(id) {
|
||||||
@@ -62165,6 +62513,9 @@ var urls = {
|
|||||||
updateTestResult: function updateTestResult(id) {
|
updateTestResult: function updateTestResult(id) {
|
||||||
return "/TestResults/".concat(id);
|
return "/TestResults/".concat(id);
|
||||||
},
|
},
|
||||||
|
showTestResult: function showTestResult(id) {
|
||||||
|
return "/TestResults/".concat(id);
|
||||||
|
},
|
||||||
removeTestResult: function removeTestResult(id) {
|
removeTestResult: function removeTestResult(id) {
|
||||||
return "/TestResults/".concat(id);
|
return "/TestResults/".concat(id);
|
||||||
},
|
},
|
||||||
@@ -62796,6 +63147,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
path: '/test-result/:testResult/edit',
|
path: '/test-result/:testResult/edit',
|
||||||
name: 'EditTestResult',
|
name: 'EditTestResult',
|
||||||
view: 'TestResult/AddEdit'
|
view: 'TestResult/AddEdit'
|
||||||
|
}, {
|
||||||
|
path: '/test-result/NotVerified',
|
||||||
|
name: 'NotVerifyTestResult',
|
||||||
|
view: 'TestResult/List'
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -62927,6 +63282,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
/* harmony import */ var _global_api_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../global/api.service */ "./resources/js/vue/services/global/api.service.js");
|
/* harmony import */ var _global_api_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../global/api.service */ "./resources/js/vue/services/global/api.service.js");
|
||||||
/* harmony import */ var _storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./storage.service */ "./resources/js/vue/services/auth/storage.service.js");
|
/* harmony import */ var _storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./storage.service */ "./resources/js/vue/services/auth/storage.service.js");
|
||||||
/* harmony import */ var _config_urls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/config/urls */ "./resources/js/vue/config/urls.js");
|
/* harmony import */ var _config_urls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/config/urls */ "./resources/js/vue/config/urls.js");
|
||||||
|
/* harmony import */ var _global_toast_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../global/toast.service */ "./resources/js/vue/services/global/toast.service.js");
|
||||||
|
|
||||||
|
|
||||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||||
@@ -62959,6 +63315,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var AuthenticationError =
|
var AuthenticationError =
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
function (_Error) {
|
function (_Error) {
|
||||||
@@ -63020,14 +63377,15 @@ var UserService = {
|
|||||||
// but don't worry about this just yet - I'll come back to it later
|
// but don't worry about this just yet - I'll come back to it later
|
||||||
|
|
||||||
_global_api_service__WEBPACK_IMPORTED_MODULE_1__["ApiService"].mount401Interceptor();
|
_global_api_service__WEBPACK_IMPORTED_MODULE_1__["ApiService"].mount401Interceptor();
|
||||||
return _context.abrupt("return", response.data.access_token);
|
return _context.abrupt("return", response);
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
_context.prev = 12;
|
_context.prev = 12;
|
||||||
_context.t0 = _context["catch"](1);
|
_context.t0 = _context["catch"](1);
|
||||||
|
_global_toast_service__WEBPACK_IMPORTED_MODULE_4__["default"].error('Username Or Password Is Incorrect', 'Error');
|
||||||
throw new AuthenticationError(_context.t0.response.status, _context.t0.response.data.detail);
|
throw new AuthenticationError(_context.t0.response.status, _context.t0.response.data.detail);
|
||||||
|
|
||||||
case 15:
|
case 16:
|
||||||
case "end":
|
case "end":
|
||||||
return _context.stop();
|
return _context.stop();
|
||||||
}
|
}
|
||||||
@@ -63699,7 +64057,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
var _login = _asyncToGenerator(
|
var _login = _asyncToGenerator(
|
||||||
/*#__PURE__*/
|
/*#__PURE__*/
|
||||||
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(_ref, _ref2) {
|
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(_ref, _ref2) {
|
||||||
var commit, dispatch, cell_number, password, token;
|
var commit, dispatch, cell_number, password, response;
|
||||||
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (_context.prev = _context.next) {
|
switch (_context.prev = _context.next) {
|
||||||
@@ -63712,14 +64070,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
return _services__WEBPACK_IMPORTED_MODULE_1__["UserService"].login(cell_number, password);
|
return _services__WEBPACK_IMPORTED_MODULE_1__["UserService"].login(cell_number, password);
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
token = _context.sent;
|
response = _context.sent;
|
||||||
commit('loginSuccess', token); // Redirect the user to the page he first tried to visit or to the home view
|
commit('loginSuccess', response.data.access_token); // Redirect the user to the page he first tried to visit or to the home view
|
||||||
|
|
||||||
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push(_router__WEBPACK_IMPORTED_MODULE_2__["default"].history.current.query.redirect || '/');
|
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push(_router__WEBPACK_IMPORTED_MODULE_2__["default"].history.current.query.redirect || '/');
|
||||||
dispatch('info', {}, {
|
dispatch('info', {}, {
|
||||||
root: true
|
root: true
|
||||||
});
|
});
|
||||||
return _context.abrupt("return", true);
|
return _context.abrupt("return", response);
|
||||||
|
|
||||||
case 13:
|
case 13:
|
||||||
_context.prev = 13;
|
_context.prev = 13;
|
||||||
@@ -63854,6 +64212,9 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|||||||
commit('modal/closeModal', {}, {
|
commit('modal/closeModal', {}, {
|
||||||
root: true
|
root: true
|
||||||
});
|
});
|
||||||
|
_router__WEBPACK_IMPORTED_MODULE_2__["default"].push({
|
||||||
|
name: "Dashboard"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
...mapActions('auth', [
|
...mapActions('auth', [
|
||||||
'changePassword'
|
'changePassword'
|
||||||
]),
|
]),
|
||||||
submitVerifyCode() {
|
submitChangePassword() {
|
||||||
if (this.form.code != '') {
|
if (this.form.code != '') {
|
||||||
this.changePassword({form: this.form});
|
this.changePassword({form: this.form});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-container fluid>
|
||||||
|
<material-card class color="black" title="Show Test Resualt" text>
|
||||||
|
<v-layout align-center wrap class="my-3">
|
||||||
|
<v-flex xs12 md12 sm12>
|
||||||
|
<div>Auto Clave Id : {{ data.autoclave_id }}</div>
|
||||||
|
</v-flex>
|
||||||
|
<v-flex xs12 md12 sm12>
|
||||||
|
<div>Result : {{ data.result }}</div>
|
||||||
|
</v-flex>
|
||||||
|
<v-flex xs12 md12 sm12>
|
||||||
|
<div>verify : {{ data.verified }}</div>
|
||||||
|
</v-flex>
|
||||||
|
<v-flex xs12 md12 sm12>
|
||||||
|
<div>Register User : {{ data.user.name }}</div>
|
||||||
|
</v-flex>
|
||||||
|
<template v-if="data.inputs">
|
||||||
|
<v-flex xs12 md12 sm12 v-for="(inputData, keyInputs) in data.inputs" :key="keyInputs">
|
||||||
|
<div>{{keyInputs}} : {{inputData}}</div>
|
||||||
|
</v-flex>
|
||||||
|
</template>
|
||||||
|
<template v-if="data.options">
|
||||||
|
<v-flex xs12 md12 sm12 v-for="(optionData, keyOptions) in data.options" :key="keyOptions">
|
||||||
|
<div>{{keyOptions}} : <span v-for="(data, dataKey) in optionData" :key="dataKey">{{data}}, </span></div>
|
||||||
|
</v-flex>
|
||||||
|
</template>
|
||||||
|
<template v-if="data.children">
|
||||||
|
<v-flex xs12 md12 sm12 v-for="(formData, keyForm) in data.children" :key="keyForm">
|
||||||
|
<h1>{{keyForm}}</h1>
|
||||||
|
<div v-for="(childData, keyChild) in formData" :key="keyChild">
|
||||||
|
<div>{{keyChild}} :
|
||||||
|
<template v-if="Array.isArray(childData)"><span v-for="(data, dataKey) in childData" :key="dataKey">{{data}}, </span> </template>
|
||||||
|
<template v-else > <span>{{childData}}</span> </template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</v-flex>
|
||||||
|
</template>
|
||||||
|
</v-layout>
|
||||||
|
<v-divider></v-divider>
|
||||||
|
<v-layout align-center wrap class="my-3">
|
||||||
|
<v-flex md12>
|
||||||
|
</v-flex>
|
||||||
|
</v-layout>
|
||||||
|
</material-card>
|
||||||
|
</v-container>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters, mapMutations } from "vuex";
|
||||||
|
// import { ApiService } from "@/services";
|
||||||
|
// import { urls } from "@/config/urls";
|
||||||
|
export default {
|
||||||
|
data: () => ({
|
||||||
|
data: {},
|
||||||
|
}),
|
||||||
|
methods: {
|
||||||
|
// ...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||||
|
// async changeRole() {
|
||||||
|
// const result = await ApiService.post(
|
||||||
|
// urls.changeRoleUser(this.getModalProperties.user.id),
|
||||||
|
// this.data
|
||||||
|
// );
|
||||||
|
// if (result && result.status == 200) {
|
||||||
|
// this.setResultModal(result.data.data);
|
||||||
|
// this.closeModal();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.data = this.getModalProperties.result.data.data;
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters("modal", ["getModalProperties"]),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Vendored
+7
-1
@@ -23,7 +23,10 @@ const urls = {
|
|||||||
updateTestType : function(id) {
|
updateTestType : function(id) {
|
||||||
return `/TestTypes/${id}`;
|
return `/TestTypes/${id}`;
|
||||||
},
|
},
|
||||||
listTestResult : function(page) {
|
listTestResult : function(page, verified = null) {
|
||||||
|
if (verified) {
|
||||||
|
return `/TestResults/?verified=${verified}&page=${page}`;
|
||||||
|
}
|
||||||
return "/TestResults?page=" + page;
|
return "/TestResults?page=" + page;
|
||||||
},
|
},
|
||||||
editTestResult : function(id) {
|
editTestResult : function(id) {
|
||||||
@@ -32,6 +35,9 @@ const urls = {
|
|||||||
updateTestResult : function(id) {
|
updateTestResult : function(id) {
|
||||||
return `/TestResults/${id}`;
|
return `/TestResults/${id}`;
|
||||||
},
|
},
|
||||||
|
showTestResult : function(id) {
|
||||||
|
return `/TestResults/${id}`;
|
||||||
|
},
|
||||||
removeTestResult : function(id) {
|
removeTestResult : function(id) {
|
||||||
return `/TestResults/${id}`;
|
return `/TestResults/${id}`;
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+5
@@ -101,4 +101,9 @@ export default [
|
|||||||
name: 'EditTestResult',
|
name: 'EditTestResult',
|
||||||
view: 'TestResult/AddEdit'
|
view: 'TestResult/AddEdit'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/test-result/NotVerified',
|
||||||
|
name: 'NotVerifyTestResult',
|
||||||
|
view: 'TestResult/List'
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,7 @@
|
|||||||
import { ApiService } from "../global/api.service";
|
import { ApiService } from "../global/api.service";
|
||||||
import { TokenService } from "./storage.service";
|
import { TokenService } from "./storage.service";
|
||||||
import { urls } from "@/config/urls";
|
import { urls } from "@/config/urls";
|
||||||
|
import toast from "../global/toast.service";
|
||||||
|
|
||||||
class AuthenticationError extends Error {
|
class AuthenticationError extends Error {
|
||||||
constructor(errorCode, message) {
|
constructor(errorCode, message) {
|
||||||
@@ -42,8 +43,9 @@ const UserService = {
|
|||||||
// NOTE: We haven't covered this yet in our ApiService
|
// NOTE: We haven't covered this yet in our ApiService
|
||||||
// but don't worry about this just yet - I'll come back to it later
|
// but don't worry about this just yet - I'll come back to it later
|
||||||
ApiService.mount401Interceptor();
|
ApiService.mount401Interceptor();
|
||||||
return response.data.access_token;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
toast.error('Username Or Password Is Incorrect', 'Error');
|
||||||
throw new AuthenticationError(
|
throw new AuthenticationError(
|
||||||
error.response.status,
|
error.response.status,
|
||||||
error.response.data.detail
|
error.response.data.detail
|
||||||
|
|||||||
+4
-3
@@ -6,14 +6,14 @@ export default {
|
|||||||
async login({ commit, dispatch }, {cell_number, password}) {
|
async login({ commit, dispatch }, {cell_number, password}) {
|
||||||
commit('loginRequest');
|
commit('loginRequest');
|
||||||
try {
|
try {
|
||||||
const token = await UserService.login(cell_number, password);
|
const response = await UserService.login(cell_number, password);
|
||||||
commit('loginSuccess', token);
|
commit('loginSuccess', response.data.access_token);
|
||||||
// Redirect the user to the page he first tried to visit or to the home view
|
// Redirect the user to the page he first tried to visit or to the home view
|
||||||
router.push(router.history.current.query.redirect || '/');
|
router.push(router.history.current.query.redirect || '/');
|
||||||
|
|
||||||
dispatch('info', {}, {root : true});
|
dispatch('info', {}, {root : true});
|
||||||
|
|
||||||
return true
|
return response;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof AuthenticationError) {
|
if (e instanceof AuthenticationError) {
|
||||||
commit('loginError', {errorCode: e.errorCode, errorMessage: e.message})
|
commit('loginError', {errorCode: e.errorCode, errorMessage: e.message})
|
||||||
@@ -47,6 +47,7 @@ export default {
|
|||||||
var response = await ApiService.post(urls.changePassword, form);
|
var response = await ApiService.post(urls.changePassword, form);
|
||||||
if(response && response.status == 200 ) {
|
if(response && response.status == 200 ) {
|
||||||
commit('modal/closeModal', {}, {root: true});
|
commit('modal/closeModal', {}, {root: true});
|
||||||
|
router.push({ name: `Dashboard` });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-form>
|
<v-form ref="form">
|
||||||
<v-container grid-list-xs>
|
<v-container grid-list-xs>
|
||||||
<v-layout row wrap class="justify-center">
|
<v-layout row wrap class="justify-center">
|
||||||
<v-flex xs12 md3 sm3 class="WM-WidthScreen-SM WM-WidthScreen-XS">
|
<v-flex xs12 md3 sm3 class="WM-WidthScreen-SM WM-WidthScreen-XS">
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
name="cellnumber"
|
name="cellnumber"
|
||||||
label="Cell Number"
|
label="Cell Number"
|
||||||
color="black"
|
color="black"
|
||||||
|
:rules="[rules.required, rules.cellNumberCounter]"
|
||||||
|
mask="#### ### ####"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -49,6 +51,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
form :{
|
form :{
|
||||||
cell_number: ""
|
cell_number: ""
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
required: value => !!value || "Required.",
|
||||||
|
cellNumberCounter: value => (value && value.length == 11) || "must 11 characters"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -56,7 +62,9 @@ export default {
|
|||||||
...mapActions("auth", ["forgotPassword"]),
|
...mapActions("auth", ["forgotPassword"]),
|
||||||
// ...mapMutations("modal", ["changeCurrentModal"]),
|
// ...mapMutations("modal", ["changeCurrentModal"]),
|
||||||
async handleSubmit() {
|
async handleSubmit() {
|
||||||
this.forgotPassword({form : this.form});
|
if (this.$refs.form.validate()) {
|
||||||
|
this.forgotPassword({form : this.form});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-form >
|
<v-form ref="form" >
|
||||||
<v-container grid-list-xs>
|
<v-container grid-list-xs>
|
||||||
<v-layout row wrap class="justify-center">
|
<v-layout row wrap class="justify-center">
|
||||||
<v-flex xs12 md3 sm3 class="WM-WidthScreen-SM WM-WidthScreen-XS">
|
<v-flex xs12 md3 sm3 class="WM-WidthScreen-SM WM-WidthScreen-XS">
|
||||||
@@ -12,8 +12,9 @@
|
|||||||
v-model="cell_number"
|
v-model="cell_number"
|
||||||
name="cellnumber"
|
name="cellnumber"
|
||||||
label="Cell Number"
|
label="Cell Number"
|
||||||
id="id1"
|
|
||||||
color="black"
|
color="black"
|
||||||
|
:rules="[rules.required, rules.cellNumberCounter]"
|
||||||
|
mask="#### ### ####"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
:type="show1 ? 'text' : 'password'"
|
:type="show1 ? 'text' : 'password'"
|
||||||
:append-icon="show1 ? 'visibility' : 'visibility_off'"
|
:append-icon="show1 ? 'visibility' : 'visibility_off'"
|
||||||
@click:append="show1 = !show1"
|
@click:append="show1 = !show1"
|
||||||
|
:rules="[rules.required, rules.passCounter]"
|
||||||
color="black"
|
color="black"
|
||||||
class="pa-2"
|
class="pa-2"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
@@ -60,6 +62,11 @@ export default {
|
|||||||
cell_number: "",
|
cell_number: "",
|
||||||
password: "",
|
password: "",
|
||||||
show1: false,
|
show1: false,
|
||||||
|
rules: {
|
||||||
|
required: value => !!value || "Required.",
|
||||||
|
passCounter: value => (value && value.length >= 8) || "Min 8 characters",
|
||||||
|
cellNumberCounter: value => (value && value.length == 11) || "must 11 characters"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -73,13 +80,15 @@ export default {
|
|||||||
...mapActions('auth', [
|
...mapActions('auth', [
|
||||||
'login'
|
'login'
|
||||||
]),
|
]),
|
||||||
handleSubmit() {
|
async handleSubmit() {
|
||||||
// Perform a simple validation that cell_number and password have been typed in
|
// Perform a simple validation that cell_number and password have been typed in
|
||||||
if (this.cell_number != '' && this.password != '') {
|
if (this.$refs.form.validate()) {
|
||||||
|
const response = await this.login({cell_number: this.cell_number, password: this.password});
|
||||||
|
|
||||||
this.login({cell_number: this.cell_number, password: this.password});
|
if (!response.status || response.status !== 200) {
|
||||||
this.password = "";
|
this.password = "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ export default {
|
|||||||
isLogin: TokenService.getInfo(),
|
isLogin: TokenService.getInfo(),
|
||||||
rules: {
|
rules: {
|
||||||
required: value => !!value || "Required.",
|
required: value => !!value || "Required.",
|
||||||
nameCounter: value => value.length >= 5 || "Min 5 characters",
|
nameCounter: value => (value && value.length >= 5) || "Min 5 characters",
|
||||||
passCounter: value => value.length >= 6 || "Min 6 characters",
|
passCounter: value => (value && value.length >= 8) || "Min 8 characters",
|
||||||
cellNumberCounter: value => value.length == 11 || "must 11 characters"
|
cellNumberCounter: value => (value && value.length == 11) || "must 11 characters"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
{title:'Manage Users', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
{title:'Manage Users', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
||||||
{title:'Manage Medical Center', text:'Managing users very fast by ...',icon:'/img/Static/Dashboard/Macbook.png',color:'WM-MuskGradient-BG',route:{name: 'ManageMedicalCenter'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md7 sm7'},
|
{title:'Manage Medical Center', text:'Managing users very fast by ...',icon:'/img/Static/Dashboard/Macbook.png',color:'WM-MuskGradient-BG',route:{name: 'ManageMedicalCenter'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md7 sm7'},
|
||||||
{title:'List Test Type', text:'You can simply add your own test type',icon:'/img/Static/Dashboard/Book-and-Pen.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5'},
|
{title:'List Test Type', text:'You can simply add your own test type',icon:'/img/Static/Dashboard/Book-and-Pen.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5'},
|
||||||
{title:'Test to Verify', text:'You can simply add your own test type in this section of website',icon:'/img/Static/Dashboard/notepad-colorful.png',color:'WM-PinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
{title:'Test to Verify', text:'You can simply add your own test type in this section of website',icon:'/img/Static/Dashboard/notepad-colorful.png',color:'WM-PinkGradient-BG',route:{name: 'NotVerifyTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
||||||
{title:'Add a Test Result', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
{title:'Add a Test Result', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async load(id) {
|
async load(id) {
|
||||||
const result = await ApiService.get(urls.editMedicalCenter(id));
|
const result = await ApiService.get(urls.editMedicalCenter(id));
|
||||||
this.medicalCenter = result.data.MedicalCenter;
|
if (result && result.status == 200) {
|
||||||
|
this.medicalCenter = result.data.data;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async AddMedicalCenter() {
|
async AddMedicalCenter() {
|
||||||
if (this.$refs.form.validate()) {
|
if (this.$refs.form.validate()) {
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<v-container grid-list-xs>
|
<v-container grid-list-xs>
|
||||||
<material-card color="black" title="Submit Test Result">
|
<material-card color="black" title="Submit Test Result">
|
||||||
<v-layout align-center justify-center wrap class="px-5 my-3" v-if="!$route.params.testResult">
|
<v-layout
|
||||||
|
align-center
|
||||||
|
justify-center
|
||||||
|
wrap
|
||||||
|
class="px-5 my-3"
|
||||||
|
v-if="!$route.params.testResult"
|
||||||
|
>
|
||||||
<v-flex xs12 sm4 md4>
|
<v-flex xs12 sm4 md4>
|
||||||
<v-autocomplete
|
<v-autocomplete
|
||||||
:search-input.sync="searchInput"
|
:search-input.sync="searchInput"
|
||||||
@@ -55,6 +61,15 @@
|
|||||||
class="pa-2"
|
class="pa-2"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
<v-flex xs12 sm4 md3>
|
||||||
|
<div v-if="!image">
|
||||||
|
<input type="file" @change="onFileChange">
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<img :src="image" style="width:100%;"/>
|
||||||
|
<button @click="removeImage">Remove image</button>
|
||||||
|
</div>
|
||||||
|
</v-flex>
|
||||||
<v-flex :class="['pa-2', item.size]" v-for="(item, key) in form" :key="key">
|
<v-flex :class="['pa-2', item.size]" v-for="(item, key) in form" :key="key">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-if="item.type == 'Text'"
|
v-if="item.type == 'Text'"
|
||||||
@@ -63,6 +78,7 @@
|
|||||||
color="black"
|
color="black"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-select
|
<v-select
|
||||||
|
multiple
|
||||||
v-if="item.type == 'Select'"
|
v-if="item.type == 'Select'"
|
||||||
:items="item.options"
|
:items="item.options"
|
||||||
v-model="formData[item.name]"
|
v-model="formData[item.name]"
|
||||||
@@ -71,7 +87,7 @@
|
|||||||
item-text="title"
|
item-text="title"
|
||||||
item-value="id"
|
item-value="id"
|
||||||
></v-select>
|
></v-select>
|
||||||
<v-container fluid v-if="item.type == 'Checkbox'" >
|
<v-container fluid v-if="item.type == 'Checkbox'">
|
||||||
<p>{{ item.name }}</p>
|
<p>{{ item.name }}</p>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-for="(optionValue, keyOption) in item.options"
|
v-for="(optionValue, keyOption) in item.options"
|
||||||
@@ -84,7 +100,13 @@
|
|||||||
<template v-if="item.type == 'Form'">
|
<template v-if="item.type == 'Form'">
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<h3>{{ item.name }}</h3>
|
<h3>{{ item.name }}</h3>
|
||||||
<v-flex :class="['pa-2', children.size]" v-for="(children, keyChildren) in item.children" :key="keyChildren">
|
</v-layout>
|
||||||
|
<v-layout row wrap>
|
||||||
|
<v-flex
|
||||||
|
:class="['pa-2', children.size]"
|
||||||
|
v-for="(children, keyChildren) in item.children"
|
||||||
|
:key="keyChildren"
|
||||||
|
>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-if="children.type == 'Text'"
|
v-if="children.type == 'Text'"
|
||||||
v-model="formData[children.name]"
|
v-model="formData[children.name]"
|
||||||
@@ -92,6 +114,7 @@
|
|||||||
color="black"
|
color="black"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-select
|
<v-select
|
||||||
|
multiple
|
||||||
v-if="children.type == 'Select'"
|
v-if="children.type == 'Select'"
|
||||||
:items="children.options"
|
:items="children.options"
|
||||||
v-model="formData[children.name]"
|
v-model="formData[children.name]"
|
||||||
@@ -151,8 +174,10 @@ export default {
|
|||||||
formData : {
|
formData : {
|
||||||
autoclave_id: "",
|
autoclave_id: "",
|
||||||
result: "",
|
result: "",
|
||||||
|
img: null,
|
||||||
test_type_id: "",
|
test_type_id: "",
|
||||||
}
|
},
|
||||||
|
image: null,
|
||||||
}),
|
}),
|
||||||
created() {
|
created() {
|
||||||
if (this.$route.params.testResult) {
|
if (this.$route.params.testResult) {
|
||||||
@@ -177,10 +202,14 @@ export default {
|
|||||||
if(result.data.data.inputs[key].type == 'Form') {
|
if(result.data.data.inputs[key].type == 'Form') {
|
||||||
for (const keyForm in result.data.data.inputs[key].children) {
|
for (const keyForm in result.data.data.inputs[key].children) {
|
||||||
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
|
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
|
||||||
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
|
if (result.data.data.inputs[key].children[keyForm].type == 'Checkbox' || result.data.data.inputs[key].children[keyForm].type == 'Select' ) {
|
||||||
|
this.formData[result.data.data.inputs[key].children[keyForm].name] = [];
|
||||||
|
} else {
|
||||||
|
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(result.data.data.inputs[key].type == 'Checkbox') {
|
} else if(result.data.data.inputs[key].type == 'Checkbox' || result.data.data.inputs[key].type == 'Select') {
|
||||||
this.formData[result.data.data.inputs[key].name] = [];
|
this.formData[result.data.data.inputs[key].name] = [];
|
||||||
} else {
|
} else {
|
||||||
this.formData[result.data.data.inputs[key].name] = '';
|
this.formData[result.data.data.inputs[key].name] = '';
|
||||||
@@ -196,16 +225,42 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async submitForm() {
|
async submitForm() {
|
||||||
|
let result;
|
||||||
if (this.$route.params.testResult) {
|
if (this.$route.params.testResult) {
|
||||||
const result = await ApiService.put(urls.updateTestResult(this.$route.params.testResult), this.formData);
|
result = await ApiService.put(urls.updateTestResult(this.$route.params.testResult), this.formData);
|
||||||
} else {
|
} else {
|
||||||
const result = await ApiService.post(urls.storeTestResult, this.formData);
|
result = await ApiService.post(urls.storeTestResult, this.formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
this.$router.push({name: 'Dashboard'})
|
this.$router.push({name: 'Dashboard'})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onFileChange(e) {
|
||||||
|
var files = e.target.files || e.dataTransfer.files;
|
||||||
|
if (!files.length)
|
||||||
|
return;
|
||||||
|
this.createImage(files[0]);
|
||||||
|
},
|
||||||
|
createImage(file) {
|
||||||
|
var image = new Image();
|
||||||
|
var reader = new FileReader();
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
reader.onload = (e) => {
|
||||||
|
vm.image = e.target.result;
|
||||||
|
};
|
||||||
|
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
},
|
||||||
|
removeImage: function (e) {
|
||||||
|
this.image = null;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
image(img) {
|
||||||
|
this.formData.img = img;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -1,163 +1,182 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="">
|
<div class>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<material-card class=""
|
<material-card class color="black" title="All Test Resualt" text>
|
||||||
color="black"
|
<v-layout align-center wrap class="my-3">
|
||||||
title="All Test Resualt"
|
<v-flex xs12 md2 sm2>
|
||||||
text=""
|
<v-text-field class="pa-2" label="Name" color="black"></v-text-field>
|
||||||
>
|
</v-flex>
|
||||||
<v-layout align-center wrap class="my-3">
|
<v-flex xs12 md2 sm2>
|
||||||
<v-flex xs12 md2 sm2>
|
<v-text-field class="pa-2" label="Date" color="black"></v-text-field>
|
||||||
<v-text-field
|
</v-flex>
|
||||||
class="pa-2"
|
<v-flex xs12 md2 sm2>
|
||||||
label="Name"
|
<v-text-field class="pa-2" label="Hospital" color="black"></v-text-field>
|
||||||
color="black"
|
</v-flex>
|
||||||
>
|
<v-flex class xs12 md2 sm2>
|
||||||
</v-text-field>
|
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||||
</v-flex>
|
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
||||||
<v-flex xs12 md2 sm2>
|
<span class="white--text">Filter</span>
|
||||||
<v-text-field
|
</v-btn>
|
||||||
class="pa-2"
|
</v-flex>
|
||||||
label="Date"
|
<v-spacer></v-spacer>
|
||||||
color="black"
|
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||||
>
|
<router-link :to="{name: 'SubmitTestResult'}">
|
||||||
</v-text-field>
|
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||||
</v-flex>
|
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
|
||||||
<v-flex xs12 md2 sm2>
|
<span class="black--text">Add</span>
|
||||||
<v-text-field
|
</v-btn>
|
||||||
class="pa-2"
|
</router-link>
|
||||||
label="Hospital"
|
</v-flex>
|
||||||
color="black"
|
</v-layout>
|
||||||
>
|
<v-divider></v-divider>
|
||||||
</v-text-field>
|
<v-layout align-center wrap class="my-3">
|
||||||
</v-flex>
|
<v-flex md12>
|
||||||
<v-flex class="" xs12 md2 sm2>
|
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
<template slot="headerCell" slot-scope="{ header }">
|
||||||
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
<span
|
||||||
<span class="white--text">Filter</span>
|
class="subheading font-weight-light text-white text--darken-3"
|
||||||
</v-btn>
|
v-text="header.text"
|
||||||
</v-flex>
|
/>
|
||||||
</v-layout>
|
</template>
|
||||||
<v-divider></v-divider>
|
<template slot="items" slot-scope="{ item }">
|
||||||
<v-layout align-center wrap class="my-3">
|
<td class="headline font-weight-light">{{ item.autoclave_id }}</td>
|
||||||
<v-flex md12>
|
<td
|
||||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
class="title font-weight-light"
|
||||||
<template slot="headerCell" slot-scope="{ header }">
|
>{{ item.user.medical_center.name }}</td>
|
||||||
<span
|
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||||
class="subheading font-weight-light text-white text--darken-3"
|
<td class="title font-weight-light">{{ item.result }}</td>
|
||||||
v-text="header.text"
|
<td class="title font-weight-light">{{ item.created_at }}</td>
|
||||||
/>
|
<td class="text-xs-right">
|
||||||
</template>
|
<v-btn color="cyan" class="mr-2" @click="show(item.id)">
|
||||||
<template slot="items" slot-scope="{ item }">
|
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||||
<td class="headline font-weight-light">{{ item.autoclave_id }}</td>
|
<span>Show</span>
|
||||||
<td class="title font-weight-light">{{ item.user.medical_center.name }}</td>
|
</v-btn>
|
||||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
<router-link
|
||||||
<td class="title font-weight-light">{{ item.result }}</td>
|
:to="{name: 'EditTestResult', params: {testResult: item.id}}"
|
||||||
<td class="title font-weight-light">{{ item.created_at }}</td>
|
>
|
||||||
<td class="text-xs-right">
|
<v-btn color="orange" class="mr-2">
|
||||||
<router-link :to="{name: 'EditTestResult', params: {testResult: item.id}}">
|
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||||
<v-btn color="cyan" class="mr-2">
|
<span>Edit</span>
|
||||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
</v-btn>
|
||||||
<span>Edit</span>
|
</router-link>
|
||||||
</v-btn>
|
<v-btn color="pink" class="WM-ActionButton" @click="remove(item.id)" >
|
||||||
</router-link>
|
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||||
<v-btn color="black" class="mr-2" @click="remove(item.id)" >
|
<span>Remove</span>
|
||||||
<v-icon class="white--text mr-1 caption">fas fa-folder</v-icon>
|
</v-btn>
|
||||||
<span>Archive</span>
|
</td>
|
||||||
</v-btn>
|
</template>
|
||||||
</td>
|
</v-data-table>
|
||||||
</template>
|
</v-flex>
|
||||||
</v-data-table>
|
</v-layout>
|
||||||
</v-flex>
|
<v-divider></v-divider>
|
||||||
</v-layout>
|
<div class="text-xs-center" v-if="lastPage > 1">
|
||||||
<v-divider></v-divider>
|
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
|
||||||
<div class="text-xs-center" v-if="lastPage > 1">
|
</div>
|
||||||
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
|
<v-layout row wrap align-center justify-center class="mt-3">
|
||||||
</div>
|
<router-link to="/dashboard">
|
||||||
<v-layout row wrap align-center justify-center class="mt-3">
|
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||||
<router-link to="/dashboard">
|
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||||
<v-btn
|
<span class="black--text">Back</span>
|
||||||
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
</v-btn>
|
||||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
</router-link>
|
||||||
<span class="black--text">Back</span>
|
</v-layout>
|
||||||
</v-btn>
|
</material-card>
|
||||||
</router-link>
|
</v-container>
|
||||||
</v-layout>
|
</div>
|
||||||
</material-card>
|
|
||||||
</v-container>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ApiService } from "@/services";
|
import { ApiService } from "@/services";
|
||||||
import { urls } from "@/config/urls";
|
import { urls } from "@/config/urls";
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "AutoClaveId",
|
text: "AutoClaveId",
|
||||||
value: "name"
|
value: "name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Hospital",
|
text: "Hospital",
|
||||||
value: "Hospital"
|
value: "Hospital"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "User",
|
text: "User",
|
||||||
value: "Users"
|
value: "Users"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Result",
|
text: "Result",
|
||||||
value: "result"
|
value: "result"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Date",
|
text: "Date",
|
||||||
value: "date"
|
value: "date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Action",
|
text: "Action",
|
||||||
value: "action",
|
value: "action",
|
||||||
align: "right"
|
align: "right"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
items:[],
|
items: [],
|
||||||
currentPage:1,
|
currentPage: 1,
|
||||||
lastPage:1,
|
lastPage: 1
|
||||||
}),
|
}),
|
||||||
created() {
|
created() {
|
||||||
this.load();
|
if(this.$route.name == 'NotVerifyTestResult') {
|
||||||
},
|
this.load(1, 'NotVerified');
|
||||||
methods: {
|
} else {
|
||||||
async load(page = 1) {
|
this.load();
|
||||||
const result = await ApiService.get(urls.listTestResult(page));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.items = result.data.data.data;
|
|
||||||
this.currentPage = result.data.data.current_page;
|
|
||||||
this.lastPage = result.data.data.last_page;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async remove(testResultId) {
|
|
||||||
const result = await ApiService.delete(urls.removeTestResult(testResultId));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
for (const key in this.items) {
|
|
||||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
|
||||||
this.items.splice(key, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
methods: {
|
||||||
watch: {
|
...mapMutations("modal", ["changeCurrentModal"]),
|
||||||
currentPage(page) {
|
async load(page = 1, verified = null) {
|
||||||
this.load(page);
|
const result = await ApiService.get(urls.listTestResult(page, verified));
|
||||||
|
if (result && result.status == 200) {
|
||||||
|
this.items = result.data.data.data;
|
||||||
|
this.currentPage = result.data.data.current_page;
|
||||||
|
this.lastPage = result.data.data.last_page;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async show(testResultId) {
|
||||||
|
const result = await ApiService.get(
|
||||||
|
urls.showTestResult(testResultId)
|
||||||
|
);
|
||||||
|
if (result && result.status == 200) {
|
||||||
|
this.changeCurrentModal({
|
||||||
|
modal: "modal-testresult-show",
|
||||||
|
properties: { result }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async remove(testResultId) {
|
||||||
|
const result = await ApiService.delete(
|
||||||
|
urls.removeTestResult(testResultId)
|
||||||
|
);
|
||||||
|
if (result && result.status == 200) {
|
||||||
|
for (const key in this.items) {
|
||||||
|
if (
|
||||||
|
this.items.hasOwnProperty(key) &&
|
||||||
|
this.items[key].id == testResultId
|
||||||
|
) {
|
||||||
|
this.items.splice(key, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
currentPage(page) {
|
||||||
|
this.load(page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
@@ -1,149 +1,154 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<material-card class color="black" title="Medical Centers List" text>
|
<material-card class color="black" title="Medical Centers List" text>
|
||||||
<v-layout wrap class="px-5 mb-3">
|
<v-layout wrap class="px-5 mb-3">
|
||||||
<v-flex xs12 md3 sm3>
|
<v-flex xs12 md3 sm3>
|
||||||
<v-text-field label="Name" color="black"></v-text-field>
|
<v-text-field label="Name" color="black"></v-text-field>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 md2 sm2 class="text-xs-right">
|
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||||
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
||||||
<span class="white--text">Filter</span>
|
<span class="white--text">Filter</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-flex xs12 md2 sm2 class="text-xs-right">
|
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||||
<router-link :to="{name: 'AddTestType'}">
|
<router-link :to="{name: 'AddTestType'}">
|
||||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||||
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
|
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
|
||||||
<span class="black--text">Add</span>
|
<span class="black--text">Add</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<v-layout class="px-4 my-3">
|
<v-layout class="px-4 my-3">
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<v-layout align-center justify-center wrap class="px-5 mt-3">
|
<v-layout align-center justify-center wrap class="px-5 mt-3">
|
||||||
<v-flex md12>
|
<v-flex md12>
|
||||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||||
<template slot="headerCell" slot-scope="{ header }">
|
<template slot="headerCell" slot-scope="{ header }">
|
||||||
<span
|
<span
|
||||||
class="subheading font-weight-light text-white text--darken-3"
|
class="subheading font-weight-light text-white text--darken-3"
|
||||||
v-text="header.text"
|
v-text="header.text"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template slot="items" slot-scope="{ item }">
|
<template slot="items" slot-scope="{ item }">
|
||||||
<td class="headline font-weight-light">{{ item.name }}</td>
|
<td class="headline font-weight-light">{{ item.name }}</td>
|
||||||
<td class="title font-weight-light">{{ item.unique_code }}</td>
|
<td class="title font-weight-light">{{ item.unique_code }}</td>
|
||||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||||
<td class="title font-weight-light">{{ item.created_at }}</td>
|
<td class="title font-weight-light">{{ item.created_at }}</td>
|
||||||
<td class="text-xs-right">
|
<td class="text-xs-right">
|
||||||
<router-link :to="{name : 'EditTestType', params : {testType : item.id}}">
|
<router-link
|
||||||
<v-btn color="cyan" class="mr-2 WM-ActionButton">
|
:to="{name : 'EditTestType', params : {testType : item.id}}"
|
||||||
<v-icon class="white--text mr-2 caption">fas fa-pen</v-icon>
|
>
|
||||||
<span>Edit</span>
|
<v-btn color="cyan" class="mr-2 WM-ActionButton">
|
||||||
</v-btn>
|
<v-icon class="white--text mr-2 caption">fas fa-pen</v-icon>
|
||||||
|
<span>Edit</span>
|
||||||
|
</v-btn>
|
||||||
|
</router-link>
|
||||||
|
<v-btn color="orange darken-1">
|
||||||
|
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||||
|
<span>Generate Barcode</span>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn color="black" class="mr-2" @click="remove(item.id)">
|
||||||
|
<v-icon class="white--text mr-1 caption">fas fa-folder</v-icon>
|
||||||
|
<span>Archive</span>
|
||||||
|
</v-btn>
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
</v-data-table>
|
||||||
|
</v-flex>
|
||||||
|
</v-layout>
|
||||||
|
<v-divider></v-divider>
|
||||||
|
<div class="text-xs-center" v-if="lastPage > 1">
|
||||||
|
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
|
||||||
|
</div>
|
||||||
|
<v-layout row wrap align-center justify-center class="mt-3">
|
||||||
|
<router-link to="/dashboard">
|
||||||
|
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||||
|
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||||
|
<span class="black--text">Back</span>
|
||||||
|
</v-btn>
|
||||||
</router-link>
|
</router-link>
|
||||||
<v-btn color="orange darken-1">
|
</v-layout>
|
||||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
</material-card>
|
||||||
<span>Generate Barcode</span>
|
</v-container>
|
||||||
</v-btn>
|
|
||||||
<v-btn color="pink" @click="remove(item.id)" class="WM-ActionButton">
|
|
||||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
|
||||||
<span>Remove</span>
|
|
||||||
</v-btn>
|
|
||||||
</td>
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-flex>
|
|
||||||
</v-layout>
|
|
||||||
<v-divider></v-divider>
|
|
||||||
<div class="text-xs-center" v-if="lastPage > 1">
|
|
||||||
<v-pagination v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
|
|
||||||
</div>
|
|
||||||
<v-layout row wrap align-center justify-center class="mt-3">
|
|
||||||
<router-link to="/dashboard">
|
|
||||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
|
||||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
|
||||||
<span class="black--text">Back</span>
|
|
||||||
</v-btn>
|
|
||||||
</router-link>
|
|
||||||
</v-layout>
|
|
||||||
</material-card>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ApiService } from "@/services";
|
import { ApiService } from "@/services";
|
||||||
import { urls } from "@/config/urls";
|
import { urls } from "@/config/urls";
|
||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "TestType Name",
|
text: "TestType Name",
|
||||||
value: "name"
|
value: "name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "TestType UniqueId",
|
text: "TestType UniqueId",
|
||||||
value: "uniqueId"
|
value: "uniqueId"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Register TestType",
|
text: "Register TestType",
|
||||||
value: "users"
|
value: "users"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Date",
|
text: "Date",
|
||||||
value: "date"
|
value: "date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
text: "Action",
|
text: "Action",
|
||||||
value: "action",
|
value: "action",
|
||||||
align: "right"
|
align: "right"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
items: [],
|
items: [],
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
lastPage: 1
|
lastPage: 1
|
||||||
}),
|
}),
|
||||||
created() {
|
created() {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getData(page = 1) {
|
|
||||||
const result = await ApiService.get(urls.listTestType(page));
|
|
||||||
if (result && result.status == 200) {
|
|
||||||
this.items = result.data.data.data;
|
|
||||||
this.currentPage = result.data.data.current_page;
|
|
||||||
this.lastPage = result.data.data.last_page;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async remove(id) {
|
methods: {
|
||||||
const result = await ApiService.delete(urls.deleteTestType(id));
|
async getData(page = 1) {
|
||||||
if (result.status == 200) {
|
const result = await ApiService.get(urls.listTestType(page));
|
||||||
for (const key in this.items) {
|
if (result && result.status == 200) {
|
||||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
this.items = result.data.data.data;
|
||||||
this.items.splice(key, 1);
|
this.currentPage = result.data.data.current_page;
|
||||||
}
|
this.lastPage = result.data.data.last_page;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async remove(id) {
|
||||||
|
const result = await ApiService.delete(urls.deleteTestType(id));
|
||||||
|
if (result.status == 200) {
|
||||||
|
for (const key in this.items) {
|
||||||
|
if (
|
||||||
|
this.items.hasOwnProperty(key) &&
|
||||||
|
this.items[key].id == id
|
||||||
|
) {
|
||||||
|
this.items.splice(key, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
currentPage(page) {
|
||||||
|
this.getData(page);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
currentPage(page) {
|
|
||||||
this.getData(page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.WM-ActionButton {
|
.WM-ActionButton {
|
||||||
padding: 8px 22px;
|
padding: 8px 22px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ export default {
|
|||||||
rules: {
|
rules: {
|
||||||
required: value => !!value || "Required.",
|
required: value => !!value || "Required.",
|
||||||
counter: value =>
|
counter: value =>
|
||||||
value.length == 0 || value.length >= 5 || "Min 5 characters",
|
!value || value.length == 0 || value.length >= 5 || "Min 5 characters",
|
||||||
email: value => {
|
email: value => {
|
||||||
if (value.length > 0) {
|
if (value && value.length > 0) {
|
||||||
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||||
return pattern.test(value) || "Invalid e-mail.";
|
return pattern.test(value) || "Invalid e-mail.";
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-14
@@ -16,22 +16,24 @@ Route::group(['namespace' => 'Api'],function () {
|
|||||||
Route::post('/login', 'Auth\LoginController@login')->name('login');
|
Route::post('/login', 'Auth\LoginController@login')->name('login');
|
||||||
Route::post('/logout', 'Auth\LoginController@logout')->name('logout')->middleware('auth:api');
|
Route::post('/logout', 'Auth\LoginController@logout')->name('logout')->middleware('auth:api');
|
||||||
Route::post('/register', 'Auth\RegisterController@register')->name('register');
|
Route::post('/register', 'Auth\RegisterController@register')->name('register');
|
||||||
Route::post('/password/phone', 'Auth\ForgotPasswordController@sendDisposablePassword');
|
Route::post('/password/phone', 'Auth\ForgotPasswordController@sendDisposablePassword')->name('password.email');
|
||||||
Route::post('/password/verifyCode', 'Auth\ForgotPasswordController@checkDisposablePassword');
|
Route::post('/password/verifyCode', 'Auth\ForgotPasswordController@checkDisposablePassword');
|
||||||
Route::post('/password/reset', 'Auth\ResetPasswordController@reset')->name('password.reset')->middleware('auth:api');
|
Route::post('/password/reset', 'Auth\ResetPasswordController@reset')->name('password.reset');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('TestTypes/ListNames', 'TestTypeController@listNames');
|
Route::middleware('auth:api')->group(function () {
|
||||||
Route::resource('TestTypes', 'TestTypeController');
|
Route::post('/TestResults/Verify/{TestResult}', 'TestResultController@verifyTestResult');
|
||||||
Route::resource('TestResults', 'TestResultController');
|
Route::get('TestTypes/ListNames', 'TestTypeController@listNames');
|
||||||
Route::resource('MedicalCenters', 'MedicalCenterController');
|
Route::resource('TestTypes', 'TestTypeController');
|
||||||
Route::post('/GetInputs', 'TestTypeController@getInputs');
|
Route::resource('TestResults', 'TestResultController');
|
||||||
|
Route::resource('MedicalCenters', 'MedicalCenterController');
|
||||||
|
Route::post('/GetInputs', 'TestTypeController@getInputs');
|
||||||
|
|
||||||
Route::get('/GetInfo', 'UserController@getInfo')->middleware('auth:api');
|
Route::get('/GetInfo', 'UserController@getInfo');
|
||||||
Route::get('Users/MedicalCenter/{MedicalCenter}', 'UserController@getByMedicalCenter')->middleware('auth:api');
|
Route::get('Users/MedicalCenter/{MedicalCenter}', 'UserController@getByMedicalCenter');
|
||||||
Route::post('Users/ChangeStatus/{User}', 'UserController@changeStatus')->middleware('auth:api');
|
Route::post('Users/ChangeStatus/{User}', 'UserController@changeStatus');
|
||||||
Route::post('Users/ChangeRole/{User}', 'UserController@changeRole')->middleware('auth:api');
|
Route::post('Users/ChangeRole/{User}', 'UserController@changeRole');
|
||||||
Route::post('UpdateInfo', 'UserController@updateInfo')->middleware('auth:api');
|
Route::post('UpdateInfo', 'UserController@updateInfo');
|
||||||
Route::resource('Users', 'UserController');
|
Route::resource('Users', 'UserController');
|
||||||
Route::post('/TestResults/Verify/{TestResult}', 'TestResultController@verifyTestResult');
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user