update bugs fix medicine, user record update-delete, user login
This commit is contained in:
@@ -12,19 +12,25 @@ use Illuminate\Support\Facades\Hash;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Modules\Internal\Emails\SendVerifyEmail;
|
use Modules\Internal\Emails\SendVerifyEmail;
|
||||||
use Modules\Internal\Events\ForgetPassword;
|
use Modules\Internal\Events\ForgetPassword;
|
||||||
|
use App\Helpers\Helper;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
public function login(Request $request)
|
public function login(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'email' => 'required|email',
|
'email' => 'required',
|
||||||
'password' => 'required'
|
'password' => 'required'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user = User::query()
|
$user = User::query()
|
||||||
->where('email', $request->email)
|
->where(function ($query) use ($request) {
|
||||||
->first();
|
$query->where('email', $request->email)
|
||||||
|
->orWhere('username', $request->email);
|
||||||
|
})
|
||||||
|
->first();
|
||||||
|
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
return response(['message' => 'User Tidak Ditemukan'], 404);
|
return response(['message' => 'User Tidak Ditemukan'], 404);
|
||||||
@@ -91,7 +97,7 @@ class AuthController extends Controller
|
|||||||
|
|
||||||
Event(new ForgetPassword($user));
|
Event(new ForgetPassword($user));
|
||||||
|
|
||||||
// Mail::to($user->email)->send(new SendVerifyEmail($user));
|
Mail::to($user->email)->send(new SendVerifyEmail($user));
|
||||||
|
|
||||||
return response()->json($user);
|
return response()->json($user);
|
||||||
}
|
}
|
||||||
@@ -125,4 +131,36 @@ class AuthController extends Controller
|
|||||||
]);
|
]);
|
||||||
return response()->json($user);
|
return response()->json($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function register(Request $request)
|
||||||
|
{
|
||||||
|
$validator = Validator::make($request->all(), [
|
||||||
|
'email' => 'required|email|unique:users,email',
|
||||||
|
'username' => 'required|unique:users,username',
|
||||||
|
'password' => [
|
||||||
|
'required',
|
||||||
|
'min:5',
|
||||||
|
// 'regex:/.*[0-9].*/',
|
||||||
|
// 'regex:/.*[a-z].*/',
|
||||||
|
// 'regex:/.*[A-Z].*/',
|
||||||
|
]
|
||||||
|
], [
|
||||||
|
// 'password.regex' => "Password harus minimal 8 karakter, kombinasi huruf besar kecil dan angka"
|
||||||
|
])->validate();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$user = User::create([
|
||||||
|
'email' => $request->email,
|
||||||
|
'username' => $request->username,
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json($user);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return response()->json([
|
||||||
|
'message' => 'Terjadi masalah ketika mendaftar'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ class DailyMonitoringController extends Controller
|
|||||||
'lab_date' => $request->lab_date,
|
'lab_date' => $request->lab_date,
|
||||||
'provider' => $request->provider,
|
'provider' => $request->provider,
|
||||||
'examination' => $request->examination,
|
'examination' => $request->examination,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
@@ -387,7 +388,11 @@ class DailyMonitoringController extends Controller
|
|||||||
// get claim request
|
// get claim request
|
||||||
$request_log = DB::table('request_logs')
|
$request_log = DB::table('request_logs')
|
||||||
->where('code', $request_code)
|
->where('code', $request_code)
|
||||||
->update(['discharge_date' => now()]);
|
->update([
|
||||||
|
'discharge_date' => now(),
|
||||||
|
'updated_by' => auth()->user()->id,
|
||||||
|
'updated_at' => now()
|
||||||
|
]);
|
||||||
if ($request_log) {
|
if ($request_log) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'error' => false,
|
'error' => false,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Routing\Controller;
|
use Illuminate\Routing\Controller;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
|
||||||
class RequestLogBenefitController extends Controller
|
class RequestLogBenefitController extends Controller
|
||||||
@@ -72,6 +73,7 @@ class RequestLogBenefitController extends Controller
|
|||||||
'amount_not_approved' => $value['amount_not_approved'],
|
'amount_not_approved' => $value['amount_not_approved'],
|
||||||
'excess_paid' => $value['excess_paid'],
|
'excess_paid' => $value['excess_paid'],
|
||||||
'keterangan' => $value['keterangan'],
|
'keterangan' => $value['keterangan'],
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
|
||||||
];
|
];
|
||||||
// Insert Data
|
// Insert Data
|
||||||
@@ -117,6 +119,8 @@ class RequestLogBenefitController extends Controller
|
|||||||
$requestLogBenefit->amount_not_approved = $request->amount_not_approved;
|
$requestLogBenefit->amount_not_approved = $request->amount_not_approved;
|
||||||
$requestLogBenefit->excess_paid = $request->excess_paid;
|
$requestLogBenefit->excess_paid = $request->excess_paid;
|
||||||
$requestLogBenefit->keterangan = $request->keterangan;
|
$requestLogBenefit->keterangan = $request->keterangan;
|
||||||
|
$requestLogBenefit->updated_by = auth()->user()->id;
|
||||||
|
$requestLogBenefit->updated_at = Carbon::now();
|
||||||
|
|
||||||
$requestLogBenefit->save();
|
$requestLogBenefit->save();
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Storage;
|
|||||||
use App\Services\RequestLogService;
|
use App\Services\RequestLogService;
|
||||||
use App\Exceptions\ImportRowException;
|
use App\Exceptions\ImportRowException;
|
||||||
use App\Events\RequestLoged;
|
use App\Events\RequestLoged;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
|
use Box\Spout\Reader\Common\Creator\ReaderEntityFactory;
|
||||||
@@ -198,6 +199,8 @@ class RequestLogController extends Controller
|
|||||||
{
|
{
|
||||||
$requestLog = RequestLog::findOrFail($id);
|
$requestLog = RequestLog::findOrFail($id);
|
||||||
$requestLog->status = $request->status;
|
$requestLog->status = $request->status;
|
||||||
|
$requestLog->approved_by = auth()->user()->id;
|
||||||
|
$requestLog->approved_at = Carbon::now();
|
||||||
$requestLog->save();
|
$requestLog->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -312,6 +315,8 @@ class RequestLogController extends Controller
|
|||||||
// Update Request LOG untuk lanjut ke Final LOG
|
// Update Request LOG untuk lanjut ke Final LOG
|
||||||
$requestLog->final_log = 1;
|
$requestLog->final_log = 1;
|
||||||
$requestLog->status_final_log = $status;
|
$requestLog->status_final_log = $status;
|
||||||
|
$requestLog->approved_final_log_by = auth()->user()->id;
|
||||||
|
$requestLog->approved_final_log_at = Carbon::now();
|
||||||
$requestLog->save();
|
$requestLog->save();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Internal\Http\Controllers\Api;
|
||||||
|
|
||||||
|
use App\Helpers\Helper;
|
||||||
|
use Illuminate\Contracts\Support\Renderable;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Routing\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class UserManagemet extends Controller
|
||||||
|
{
|
||||||
|
public function index(Request $request){
|
||||||
|
$user = User::all();
|
||||||
|
return Helper::responseJson(data: $user);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@ use Modules\Internal\Http\Controllers\Api\LaboratoriumResultController;
|
|||||||
use Modules\Internal\Http\Controllers\Api\CorporateManageController;
|
use Modules\Internal\Http\Controllers\Api\CorporateManageController;
|
||||||
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| API Routes
|
| API Routes
|
||||||
@@ -60,6 +61,7 @@ use Modules\Internal\Http\Controllers\ClaimEncounterController;
|
|||||||
Route::prefix('internal')->group(function () {
|
Route::prefix('internal')->group(function () {
|
||||||
|
|
||||||
Route::post('login', [AuthController::class, 'login'])->name('login');
|
Route::post('login', [AuthController::class, 'login'])->name('login');
|
||||||
|
Route::post('register', [AuthController::class, 'register'])->name('register');
|
||||||
Route::post('forget-password', [AuthController::class, 'forgetPassword'])->name('forget-password');
|
Route::post('forget-password', [AuthController::class, 'forgetPassword'])->name('forget-password');
|
||||||
Route::post('verify-email', [AuthController::class, 'verifyEmail'])->name('verify-email');
|
Route::post('verify-email', [AuthController::class, 'verifyEmail'])->name('verify-email');
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ class RequestDailyMonitoring extends Model
|
|||||||
'lab_date',
|
'lab_date',
|
||||||
'provider',
|
'provider',
|
||||||
'examination',
|
'examination',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $appends = ['medical_plan', 'non_medikamentosa_plan', 'document', 'discharge_date'];
|
protected $appends = ['medical_plan', 'non_medikamentosa_plan', 'document', 'discharge_date'];
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ class RequestLog extends Model
|
|||||||
'source',
|
'source',
|
||||||
'claim_id',
|
'claim_id',
|
||||||
'organization_id',
|
'organization_id',
|
||||||
'code'
|
'code',
|
||||||
|
'approved_by',
|
||||||
|
'approved_at',
|
||||||
|
'approved_final_log_by',
|
||||||
|
'approved_final_log_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ class RequestLogBenefit extends Model
|
|||||||
'amount_not_approved',
|
'amount_not_approved',
|
||||||
'excess_paid',
|
'excess_paid',
|
||||||
'keterangan',
|
'keterangan',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function benefit(){
|
public function benefit(){
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ class RequestLogMedicine extends Model
|
|||||||
'request_log_id',
|
'request_log_id',
|
||||||
'medicine',
|
'medicine',
|
||||||
'price',
|
'price',
|
||||||
|
'created_by',
|
||||||
|
'updated_by',
|
||||||
|
'deleted_by',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class User extends Authenticatable
|
|||||||
'person_id',
|
'person_id',
|
||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
|
'username',
|
||||||
'password',
|
'password',
|
||||||
'phone',
|
'phone',
|
||||||
'otp',
|
'otp',
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->foreignId('role_id')->after('person_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('role_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('fiture_has_permissions', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('fitur_name');
|
||||||
|
$table->timestamps();
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable()->index();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable()->index();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable()->index();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('fiture_has_permissions');
|
||||||
|
}
|
||||||
|
};
|
||||||
100
database/migrations/2024_01_02_160639_add_recode_action.php
Normal file
100
database/migrations/2024_01_02_160639_add_recode_action.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_benefits', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medical_plan', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medicines', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('created_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('updated_by')->nullable();
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
|
|
||||||
|
$table->foreign('created_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('updated_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
$table->foreign('deleted_by')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('request_log_benefits', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_daily_monitorings', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medical_plan', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('request_log_medicines', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['created_by']);
|
||||||
|
$table->dropForeign(['updated_by']);
|
||||||
|
$table->dropForeign(['deleted_by']);
|
||||||
|
|
||||||
|
$table->dropColumn(['created_by', 'updated_by', 'deleted_by']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->string('username')->after('email')->default(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('username');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->integer('approved_by')->nullable()->after('created_by');
|
||||||
|
$table->dateTime('approved_at')->nullable()->after('approved_by');
|
||||||
|
$table->integer('approved_final_log_by')->nullable()->after('approved_at');
|
||||||
|
$table->dateTime('approved_final_log_at')->nullable()->after('approved_final_log_by');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('request_logs', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['approved_by', 'invoice_date', 'approved_final_log_by', 'approved_final_log_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -81,11 +81,13 @@ type AuthProviderProps = {
|
|||||||
function AuthProvider({ children }: AuthProviderProps) {
|
function AuthProvider({ children }: AuthProviderProps) {
|
||||||
const [state, dispatch] = useReducer(JWTReducer, initialState);
|
const [state, dispatch] = useReducer(JWTReducer, initialState);
|
||||||
let location = useLocation();
|
let location = useLocation();
|
||||||
|
const accessToken = getSession();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const initialize = async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const accessToken = getSession();
|
// const accessToken = getSession();
|
||||||
|
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
setSession(accessToken);
|
setSession(accessToken);
|
||||||
|
|
||||||
@@ -117,10 +119,9 @@ function AuthProvider({ children }: AuthProviderProps) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
})();
|
||||||
|
}, [accessToken]);
|
||||||
|
|
||||||
initialize();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const login = async (email: string, password: string) => axios
|
const login = async (email: string, password: string) => axios
|
||||||
.post('/login', { email, password })
|
.post('/login', { email, password })
|
||||||
|
|||||||
@@ -30,8 +30,9 @@ const MENU_OPTIONS = [
|
|||||||
export default function AccountPopover() {
|
export default function AccountPopover() {
|
||||||
const [open, setOpen] = useState<HTMLElement | null>(null);
|
const [open, setOpen] = useState<HTMLElement | null>(null);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { logout } = useAuth();
|
const { logout, user } = useAuth();
|
||||||
|
|
||||||
|
console.log(user?.email)
|
||||||
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
||||||
setOpen(event.currentTarget);
|
setOpen(event.currentTarget);
|
||||||
};
|
};
|
||||||
@@ -65,7 +66,7 @@ export default function AccountPopover() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||||
alt="Rayan Moran"
|
alt="Rayan Moran"
|
||||||
/>
|
/>
|
||||||
</IconButtonAnimate>
|
</IconButtonAnimate>
|
||||||
@@ -86,10 +87,10 @@ export default function AccountPopover() {
|
|||||||
>
|
>
|
||||||
<Box sx={{ my: 1.5, px: 2.5 }}>
|
<Box sx={{ my: 1.5, px: 2.5 }}>
|
||||||
<Typography variant="subtitle2" noWrap>
|
<Typography variant="subtitle2" noWrap>
|
||||||
Rayan Moran
|
{user?.full_name ? user?.full_name : ''}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
|
<Typography variant="body2" sx={{ color: 'text.secondary' }} noWrap>
|
||||||
rayan.moran@gmail.com
|
{user?.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ export default function DashboardHeader({
|
|||||||
<Box sx={{ flexGrow: 1 }} />
|
<Box sx={{ flexGrow: 1 }} />
|
||||||
|
|
||||||
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
<Stack direction="row" alignItems="center" spacing={{ xs: 0.5, sm: 1.5 }}>
|
||||||
<LanguagePopover />
|
{/* <LanguagePopover />
|
||||||
<NotificationsPopover />
|
<NotificationsPopover />
|
||||||
<ContactsPopover />
|
<ContactsPopover /> */}
|
||||||
<AccountPopover />
|
<AccountPopover />
|
||||||
</Stack>
|
</Stack>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ const navConfig = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'USER MANAGEMENT',
|
title: 'USER MANAGEMENT',
|
||||||
path: '/users',
|
children: [
|
||||||
|
{ title: 'User Access', path: '/master/diagnosis' },
|
||||||
|
{ title: 'User Role', path: '/master/diagnosis' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'LINKING TOOLS',
|
title: 'LINKING TOOLS',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// @mui
|
// @mui
|
||||||
import { styled } from '@mui/material/styles';
|
import { styled } from '@mui/material/styles';
|
||||||
import { Box, Link, Typography, Avatar } from '@mui/material';
|
import { Box, Link, Typography, Avatar } from '@mui/material';
|
||||||
|
import useAuth from '../../../hooks/useAuth';
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -22,6 +23,8 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function NavbarAccount({ isCollapse }: Props) {
|
export default function NavbarAccount({ isCollapse }: Props) {
|
||||||
|
|
||||||
|
const { logout, user } = useAuth();
|
||||||
return (
|
return (
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<RootStyle
|
<RootStyle
|
||||||
@@ -32,7 +35,7 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
src="https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_5.jpg"
|
src="https://linksehat.com/assets/img/users/dummy.jpg"
|
||||||
alt="Rayan Moran"
|
alt="Rayan Moran"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -50,10 +53,10 @@ export default function NavbarAccount({ isCollapse }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="subtitle2" noWrap>
|
<Typography variant="subtitle2" noWrap>
|
||||||
Rayan Moran
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" noWrap sx={{ color: 'text.secondary' }}>
|
<Typography variant="body2" noWrap sx={{ color: 'text.secondary' }}>
|
||||||
user
|
Hi {user?.full_name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</RootStyle>
|
</RootStyle>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { fNumber } from "@/utils/formatNumber";
|
|||||||
import palette from "@/theme/palette";
|
import palette from "@/theme/palette";
|
||||||
import DialogBenefit from "../FinalLog/Components/DialogBenefit";
|
import DialogBenefit from "../FinalLog/Components/DialogBenefit";
|
||||||
import DialogEditBenefit from "../FinalLog/Components/DialogEditBenefit";
|
import DialogEditBenefit from "../FinalLog/Components/DialogEditBenefit";
|
||||||
import DialogDelete from "../FinalLog/Components/DialogDelete";
|
import DialogDeleteBenefit from "../FinalLog/Components/DialogDeleteBenefit";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ export default function CardBenefit({requestLog} : CardDetail ) {
|
|||||||
|
|
||||||
</DialogEditBenefit>
|
</DialogEditBenefit>
|
||||||
{/* Dialog Delete */}
|
{/* Dialog Delete */}
|
||||||
<DialogDelete
|
<DialogDeleteBenefit
|
||||||
id={idBenefitData}
|
id={idBenefitData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteBenefit}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteBenefit}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default function CardFile({requestLog} : CardDetail ) {
|
|||||||
<Card sx={{padding:2}} >
|
<Card sx={{padding:2}} >
|
||||||
<Stack direction="row" alignItems="center" sx={{marginBottom: 4}}>
|
<Stack direction="row" alignItems="center" sx={{marginBottom: 4}}>
|
||||||
<Stack direction="column" spacing={2} sx={{marginBottom: 2}}>
|
<Stack direction="column" spacing={2} sx={{marginBottom: 2}}>
|
||||||
<Typography variant='subtitle1' sx={{color: '#19BBBB'}} gutterBottom>Files History</Typography>
|
<Typography variant='subtitle1' sx={{color: '#19BBBB'}} gutterBottom>Files </Typography>
|
||||||
{requestLog?.files?.map((documentType, index) => (
|
{requestLog?.files?.map((documentType, index) => (
|
||||||
<Stack direction="column" spacing={2} key={index}>
|
<Stack direction="column" spacing={2} key={index}>
|
||||||
<Stack direction="row" spacing={1} sx={{color: '#19BBBB'}}>
|
<Stack direction="row" spacing={1} sx={{color: '#19BBBB'}}>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type DialogDeleteType = {
|
|||||||
id: number|undefined;
|
id: number|undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DialogDelete({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
export default function DialogDeleteBenefit({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
axios
|
axios
|
||||||
.delete(`customer-service/request/benefit_data/${id}`)
|
.delete(`customer-service/request/benefit_data/${id}`)
|
||||||
@@ -67,54 +67,3 @@ export default function DialogDelete({id, setOpenDialog, openDialog,onSubmit} :
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DialogDeleteMedicine({id, setOpenDialog, openDialog,onSubmit} : DialogDeleteType ) {
|
|
||||||
const handleSubmit = () => {
|
|
||||||
axios
|
|
||||||
.delete(`customer-service/request/medicine-data/${id}`)
|
|
||||||
.then((response) => {
|
|
||||||
enqueueSnackbar('Benefit Data has Deleted', { variant: 'success' });
|
|
||||||
setOpenDialog(false);
|
|
||||||
window.location.reload()
|
|
||||||
})
|
|
||||||
.catch(({ response }) => {
|
|
||||||
enqueueSnackbar(response.data.message ?? 'Something went wrong!', { variant: 'error' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const style1 = {
|
|
||||||
color: '#919EAB',
|
|
||||||
width: '30%'
|
|
||||||
}
|
|
||||||
const style2 = {
|
|
||||||
width: '70%'
|
|
||||||
}
|
|
||||||
const marginBottom1 = {
|
|
||||||
marginBottom: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCloseDialog = () => {
|
|
||||||
setOpenDialog(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
const getContent = () => (
|
|
||||||
<Stack spacing={1} marginTop={2}>
|
|
||||||
<Typography variant="subtitle2">Are you sure to delete this detail medicine ?</Typography>
|
|
||||||
<DialogActions>
|
|
||||||
<Button variant="outlined" sx={{color: '#212B36', borderColor: '#919EAB52'}} onClick={handleCloseDialog}>Cancel</Button>
|
|
||||||
<Button color="error" variant="contained" onClick={handleSubmit}>Delete</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Stack>
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
|
||||||
<MuiDialog
|
|
||||||
title={{name: "Delete Medicine"}}
|
|
||||||
openDialog={openDialog}
|
|
||||||
setOpenDialog={setOpenDialog}
|
|
||||||
content={getContent()}
|
|
||||||
maxWidth="xs"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -22,7 +22,7 @@ export default function DialogDeleteMedicine({id, setOpenDialog, openDialog,onSu
|
|||||||
axios
|
axios
|
||||||
.delete(`customer-service/request/medicine-data/${id}`)
|
.delete(`customer-service/request/medicine-data/${id}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
enqueueSnackbar('Benefit Data has Deleted', { variant: 'success' });
|
enqueueSnackbar('Medicine Data has Deleted', { variant: 'success' });
|
||||||
setOpenDialog(false);
|
setOpenDialog(false);
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ import CardBenefit from '../Components/CardBenefit';
|
|||||||
import DialogHospitalCare from './Components/DialogHospitalCare';
|
import DialogHospitalCare from './Components/DialogHospitalCare';
|
||||||
import DialogBenefit from './Components/DialogBenefit';
|
import DialogBenefit from './Components/DialogBenefit';
|
||||||
import DialogMedicine from './Components/DialogMedicine';
|
import DialogMedicine from './Components/DialogMedicine';
|
||||||
import DialogDelete from './Components/DialogDelete';
|
import DialogDeleteBenfit from './Components/DialogDeleteBenefit';
|
||||||
import DialogEditBenefit from './Components/DialogEditBenefit';
|
import DialogEditBenefit from './Components/DialogEditBenefit';
|
||||||
import { DialogDeleteMedicine } from './Components/DialogDelete';
|
import DialogDeleteMedicine from './Components/DialogDeleteMedicine'
|
||||||
|
|
||||||
import MoreMenu from '@/components/MoreMenu';
|
import MoreMenu from '@/components/MoreMenu';
|
||||||
import { MenuItem } from '@mui/material';
|
import { MenuItem } from '@mui/material';
|
||||||
@@ -103,6 +103,9 @@ export default function Detail() {
|
|||||||
const [idBenefitData, setIdBenefitData] = useState<number>();
|
const [idBenefitData, setIdBenefitData] = useState<number>();
|
||||||
const [openDialogDeleteBenefit, setDialogDeleteBenefit] = useState(false)
|
const [openDialogDeleteBenefit, setDialogDeleteBenefit] = useState(false)
|
||||||
|
|
||||||
|
const [idMedicineData, setIdMedicineData] = useState<number>();
|
||||||
|
const [openDialogDeleteMedicine, setDialogDeleteMedicine] = useState(false)
|
||||||
|
|
||||||
const [approve, setApprove] = useState('')
|
const [approve, setApprove] = useState('')
|
||||||
|
|
||||||
// Handle Edit Detail Benefit
|
// Handle Edit Detail Benefit
|
||||||
@@ -327,7 +330,7 @@ export default function Detail() {
|
|||||||
|
|
||||||
</DialogEditBenefit>
|
</DialogEditBenefit>
|
||||||
{/* Dialog Delete */}
|
{/* Dialog Delete */}
|
||||||
<DialogDelete
|
<DialogDeleteBenfit
|
||||||
id={idBenefitData}
|
id={idBenefitData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteBenefit}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteBenefit}
|
||||||
@@ -357,8 +360,8 @@ export default function Detail() {
|
|||||||
<Typography variant='subtitle1'>{item.medicine}</Typography>
|
<Typography variant='subtitle1'>{item.medicine}</Typography>
|
||||||
<Typography variant="subtitle1">Rp. {fNumber(item.price)}
|
<Typography variant="subtitle1">Rp. {fNumber(item.price)}
|
||||||
<IconButton size='large' color='error' onClick={() => {
|
<IconButton size='large' color='error' onClick={() => {
|
||||||
setIdBenefitData(item.id)
|
setIdMedicineData(item.id)
|
||||||
setDialogDeleteBenefit(true)
|
setDialogDeleteMedicine(true)
|
||||||
}}>
|
}}>
|
||||||
<Delete color='error'/>
|
<Delete color='error'/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -372,9 +375,9 @@ export default function Detail() {
|
|||||||
setOpenDialog={setDialogMedicine}
|
setOpenDialog={setDialogMedicine}
|
||||||
/>
|
/>
|
||||||
<DialogDeleteMedicine
|
<DialogDeleteMedicine
|
||||||
id={idBenefitData}
|
id={idMedicineData}
|
||||||
openDialog={openDialogDeleteBenefit}
|
openDialog={openDialogDeleteMedicine}
|
||||||
setOpenDialog={setDialogDeleteBenefit}
|
setOpenDialog={setDialogDeleteMedicine}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -34,19 +34,19 @@ export default function LoginForm() {
|
|||||||
const [showPassword, setShowPassword] = useState(false);
|
const [showPassword, setShowPassword] = useState(false);
|
||||||
|
|
||||||
const LoginSchema = Yup.object().shape({
|
const LoginSchema = Yup.object().shape({
|
||||||
email: Yup.string().email('Email must be a valid email address').required('Email is required'),
|
email: Yup.string().required('Email is required'),
|
||||||
password: Yup.string().required('Password is required'),
|
password: Yup.string().required('Password is required'),
|
||||||
});
|
});
|
||||||
|
|
||||||
const defaultValues = {
|
const defaultValues = {
|
||||||
email: 'admin@linksehat.dev',
|
email: '',
|
||||||
password: 'password',
|
password: '',
|
||||||
remember: true,
|
remember: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const methods = useForm<FormValuesProps>({
|
const methods = useForm<FormValuesProps>({
|
||||||
resolver: yupResolver(LoginSchema),
|
resolver: yupResolver(LoginSchema),
|
||||||
defaultValues,
|
// defaultValues,
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -75,10 +75,10 @@ export default function LoginForm() {
|
|||||||
return (
|
return (
|
||||||
<FormProvider methods={methods} onSubmit={handleSubmit(onSubmit)}>
|
<FormProvider methods={methods} onSubmit={handleSubmit(onSubmit)}>
|
||||||
<Stack spacing={3}>
|
<Stack spacing={3}>
|
||||||
<Alert severity="info">Email : admin@linksehat.dev & Password : password</Alert>
|
<Alert severity="info">Masukan Email atau Username dan Password</Alert>
|
||||||
{!!errors.afterSubmit && <Alert severity="error">{errors.afterSubmit.message}</Alert>}
|
{!!errors.afterSubmit && <Alert severity="error">{errors.afterSubmit.message}</Alert>}
|
||||||
|
|
||||||
<RHFTextField name="email" label="Email address" />
|
<RHFTextField name="email" label="Email Or Username" />
|
||||||
|
|
||||||
<RHFTextField
|
<RHFTextField
|
||||||
name="password"
|
name="password"
|
||||||
|
|||||||
BIN
public/images/ecard-background.png
Normal file
BIN
public/images/ecard-background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
129
resources/views/pdf/ecard-lms.blade.php
Normal file
129
resources/views/pdf/ecard-lms.blade.php
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
|
||||||
|
{{-- <link rel="stylesheet" href="{{ asset('css/app.css') }}"> --}}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* @font-face {
|
||||||
|
font-family: Public Sans;
|
||||||
|
src: url('{{asset('fonts/PublicSans-Medium.ttf')}}');
|
||||||
|
src: url('{{asset('fonts/PublicSans-Medium.ttf')}}') format('truetype');
|
||||||
|
} */
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Public Sans';
|
||||||
|
color: #404040;
|
||||||
|
font-size: 20px;
|
||||||
|
margin: 0; /* Reset default margin */
|
||||||
|
padding: 0; /* Reset default padding */
|
||||||
|
background-image: url("{{public_path('images/ecard-background.png')}}");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover; /* Adjust as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-sm {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #FFFFFF
|
||||||
|
}
|
||||||
|
.text-md {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #159C9C
|
||||||
|
}
|
||||||
|
.text-lg {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #117D7D;
|
||||||
|
|
||||||
|
}
|
||||||
|
.text-gray {
|
||||||
|
color: #919EAB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 10% 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
margin-left: 75%; /* Adjust the margin as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
background-color: #117D7D;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 8px; /* Sesuaikan dengan kebutuhan Anda */
|
||||||
|
font-size: 18px;
|
||||||
|
gap: 4px;
|
||||||
|
display: inline-flex; /* Untuk memastikan ikon dan teks berada dalam satu baris */
|
||||||
|
align-items: center; /* Untuk memastikan ikon dan teks berada dalam satu baris */
|
||||||
|
}
|
||||||
|
|
||||||
|
.label svg {
|
||||||
|
margin-right: 4px; /* Jarak antara ikon dan teks */
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-sm {
|
||||||
|
font-size: 18px; /* Sesuaikan dengan kebutuhan Anda */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<br><br><br><br>
|
||||||
|
@if($member->currentCorporate->files && count($member->currentCorporate->files) > 0)
|
||||||
|
<div>
|
||||||
|
{{ asset($member->currentCorporate->files[0]->path)}}
|
||||||
|
<img src="{{ public_path('images/logo-default.png') }}" height="30px">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="text-container" style="margin-left:2%">
|
||||||
|
<span class="text-md"> Member Name</span>
|
||||||
|
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Member ID </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->member_id }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Policy Holder </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->currentCorporate->name }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Policy Number </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->currentPolicy->code }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Date of Birth </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->birthDateeCard }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Gender </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->gender }}</b></p>
|
||||||
|
|
||||||
|
<span class="text-md"> Start Date </span>
|
||||||
|
<p class="text-lg"><b>{{ $member->startDate }}</b></p>
|
||||||
|
|
||||||
|
<div class="image-container" style="margin-left:70%">
|
||||||
|
<img src="{{ public_path('images/logo-default.png')}}" height="30px">
|
||||||
|
</div>
|
||||||
|
<span class="label">
|
||||||
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M6.00082 0.166992C9.22257 0.166992 11.8342 2.77858 11.8342 6.00033C11.8342 9.22208 9.22257 11.8337 6.00082 11.8337C4.96994 11.8353 3.9572 11.5625 3.06666 11.0432L0.169822 11.8337L0.958489 8.93566C0.438793 8.04484 0.165766 7.03166 0.167489 6.00033C0.167489 2.77858 2.77907 0.166992 6.00082 0.166992ZM4.01282 3.25866L3.89615 3.26333C3.82063 3.26793 3.74681 3.28777 3.67916 3.32166C3.61588 3.35749 3.55811 3.40229 3.50766 3.45466C3.43766 3.52058 3.39799 3.57774 3.35541 3.63316C3.13964 3.91369 3.02347 4.25809 3.02524 4.61199C3.02641 4.89783 3.10107 5.17608 3.21774 5.43624C3.45632 5.96241 3.84891 6.51949 4.36691 7.03574C4.49174 7.15999 4.61424 7.28483 4.74607 7.40091C5.38972 7.9676 6.15672 8.37627 6.98607 8.59441L7.31741 8.64516C7.42532 8.65099 7.53324 8.64283 7.64174 8.63758C7.81163 8.62881 7.97751 8.5828 8.12766 8.50283C8.20405 8.46348 8.2786 8.42065 8.35107 8.37449C8.35107 8.37449 8.37615 8.35816 8.42399 8.32199C8.50274 8.26366 8.55116 8.22224 8.61649 8.15399C8.66491 8.10383 8.7069 8.04491 8.73899 7.97783C8.78449 7.88274 8.82999 7.70132 8.84865 7.55024C8.86265 7.43474 8.85857 7.37174 8.85682 7.33266C8.85449 7.27024 8.80257 7.20549 8.74599 7.17808L8.40649 7.02583C8.40649 7.02583 7.89899 6.80474 7.58865 6.66358C7.55618 6.6494 7.52138 6.64129 7.48599 6.63966C7.44608 6.63556 7.40575 6.64005 7.36772 6.65283C7.32969 6.66561 7.29483 6.68638 7.26549 6.71374C7.26257 6.71257 7.22349 6.74583 6.80174 7.25683C6.77753 7.28935 6.74419 7.31394 6.70596 7.32744C6.66773 7.34095 6.62634 7.34276 6.58707 7.33266C6.54907 7.32247 6.51184 7.3096 6.47565 7.29416C6.40332 7.26383 6.37824 7.25216 6.32865 7.23116C5.99386 7.08506 5.68389 6.88766 5.4099 6.64608C5.3364 6.58191 5.26816 6.51191 5.19815 6.44424C4.96866 6.22446 4.76866 5.97583 4.60315 5.70458L4.56874 5.64916C4.54402 5.61192 4.52403 5.57175 4.50924 5.52958C4.48707 5.44383 4.54482 5.37499 4.54482 5.37499C4.54482 5.37499 4.68657 5.21983 4.75249 5.13583C4.81666 5.05416 4.8709 4.97483 4.9059 4.91824C4.97474 4.80741 4.99632 4.69366 4.96016 4.60558C4.79682 4.20658 4.62766 3.80933 4.45382 3.41499C4.4194 3.33683 4.31732 3.28083 4.22457 3.26974C4.19307 3.26624 4.16157 3.26274 4.13007 3.26041C4.05173 3.25652 3.97323 3.2573 3.89499 3.26274L4.01224 3.25808L4.01282 3.25866Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
<span class="text-sm">
|
||||||
|
08114123962
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="text-md" style="margin-left:34%"><b> Valid until: {{ $member->endDate }}</b></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 0; /* Reset default margin */
|
margin: 0; /* Reset default margin */
|
||||||
padding: 0; /* Reset default padding */
|
padding: 0; /* Reset default padding */
|
||||||
background-image: url("{{ public_path('images/background-vale.png') }}");
|
background-image: url("{{public_path('images/background-vale.png')}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover; /* Adjust as needed */
|
background-size: cover; /* Adjust as needed */
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="text-container">
|
<div class="text-container">
|
||||||
<span class="text-md"> Member Name </span>
|
<span class="text-md"> Member Name</span>
|
||||||
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
<p class="text-lg"><b>{{ $member->fullName }}</b></p>
|
||||||
|
|
||||||
<span class="text-md"> Member ID </span>
|
<span class="text-md"> Member ID </span>
|
||||||
|
|||||||
Reference in New Issue
Block a user