hospital portal
0
Modules/HospitalPortal/Config/.gitkeep
Normal file
5
Modules/HospitalPortal/Config/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'HospitalPortal'
|
||||
];
|
||||
0
Modules/HospitalPortal/Console/.gitkeep
Normal file
0
Modules/HospitalPortal/Database/Migrations/.gitkeep
Normal file
0
Modules/HospitalPortal/Database/Seeders/.gitkeep
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HospitalPortal\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HospitalPortalDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
// $this->call("OthersTableSeeder");
|
||||
}
|
||||
}
|
||||
0
Modules/HospitalPortal/Database/factories/.gitkeep
Normal file
0
Modules/HospitalPortal/Entities/.gitkeep
Normal file
0
Modules/HospitalPortal/Http/Controllers/.gitkeep
Normal file
128
Modules/HospitalPortal/Http/Controllers/Api/AuthController.php
Executable file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HospitalPortal\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Crypt;
|
||||
use Error;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Modules\Internal\Emails\SendVerifyEmail;
|
||||
use Modules\Internal\Events\ForgetPassword;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
public function login(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'email' => 'required|email',
|
||||
'password' => 'required'
|
||||
]);
|
||||
|
||||
$user = User::query()
|
||||
->where('email', $request->email)
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
return response(['message' => 'User Tidak Ditemukan'], 404);
|
||||
}
|
||||
|
||||
if (!Hash::check($request->password, $user->password)) {
|
||||
return response(['message' => 'Password Salah'], 403);
|
||||
}
|
||||
|
||||
return response([
|
||||
'message' => 'Selamat Datang',
|
||||
'user' => $user,
|
||||
'token' => $user->createToken('app')->plainTextToken
|
||||
]);
|
||||
}
|
||||
|
||||
public function logout(Request $request)
|
||||
{
|
||||
$token = $request->bearerToken();
|
||||
Auth::user()->tokens()->where('id', $token)->delete();
|
||||
|
||||
return response(['message' => 'Berhasil Logout.']);
|
||||
}
|
||||
|
||||
public function resetPassword(Request $request)
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
$request->validate([
|
||||
'old_password' => 'required',
|
||||
'new_password' => 'required',
|
||||
'confirm_new_password' => 'required'
|
||||
]);
|
||||
|
||||
if (!Hash::check($request['old_password'], $user->password)) {
|
||||
return response(['message' => 'Password Salah'], 403);
|
||||
}
|
||||
|
||||
if ($request["new_password"] != $request["confirm_new_password"]) {
|
||||
return response([
|
||||
'message' => "Password Tidak Sama"
|
||||
]);
|
||||
}
|
||||
|
||||
$user->update([
|
||||
'password' => Hash::make($request->confirm_new_password),
|
||||
]);
|
||||
return response()->json($user);
|
||||
}
|
||||
|
||||
public function verifyEmail(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'email' => 'required|email',
|
||||
]);
|
||||
|
||||
$user = User::query()
|
||||
->where('email', $request->email)
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
return response(['message' => 'User Tidak Ditemukan'], 404);
|
||||
}
|
||||
|
||||
Event(new ForgetPassword($user));
|
||||
|
||||
// Mail::to($user->email)->send(new SendVerifyEmail($user));
|
||||
|
||||
return response()->json($user);
|
||||
}
|
||||
|
||||
public function forgetPassword(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'new_password' => 'required',
|
||||
'confirm_new_password' => 'required'
|
||||
]);
|
||||
|
||||
$token = Crypt::decryptString($request->token);
|
||||
$email = explode('|', $token)[0];
|
||||
|
||||
$user = User::query()
|
||||
->where('email', $email)
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
return response(['message' => 'User Tidak Ditemukan'], 404);
|
||||
}
|
||||
|
||||
if ($request["new_password"] != $request["confirm_new_password"]) {
|
||||
return response([
|
||||
'message' => "Password Tidak Sama"
|
||||
], 404);
|
||||
}
|
||||
|
||||
$user->update([
|
||||
'password' => Hash::make($request->confirm_new_password),
|
||||
]);
|
||||
return response()->json($user);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HospitalPortal\Http\Controllers;
|
||||
|
||||
use Illuminate\Contracts\Support\Renderable;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller;
|
||||
|
||||
class HospitalPortalController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* @return Renderable
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('hospitalportal::index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
* @return Renderable
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('hospitalportal::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* @param Request $request
|
||||
* @return Renderable
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('hospitalportal::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('hospitalportal::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* @param Request $request
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
0
Modules/HospitalPortal/Http/Middleware/.gitkeep
Normal file
0
Modules/HospitalPortal/Http/Requests/.gitkeep
Normal file
0
Modules/HospitalPortal/Providers/.gitkeep
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HospitalPortal\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
|
||||
class HospitalPortalServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* @var string $moduleName
|
||||
*/
|
||||
protected $moduleName = 'HospitalPortal';
|
||||
|
||||
/**
|
||||
* @var string $moduleNameLower
|
||||
*/
|
||||
protected $moduleNameLower = 'hospitalportal';
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->register(RouteServiceProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
module_path($this->moduleName, 'Config/config.php') => config_path($this->moduleNameLower . '.php'),
|
||||
], 'config');
|
||||
$this->mergeConfigFrom(
|
||||
module_path($this->moduleName, 'Config/config.php'), $this->moduleNameLower
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerViews()
|
||||
{
|
||||
$viewPath = resource_path('views/modules/' . $this->moduleNameLower);
|
||||
|
||||
$sourcePath = module_path($this->moduleName, 'Resources/views');
|
||||
|
||||
$this->publishes([
|
||||
$sourcePath => $viewPath
|
||||
], ['views', $this->moduleNameLower . '-module-views']);
|
||||
|
||||
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerTranslations()
|
||||
{
|
||||
$langPath = resource_path('lang/modules/' . $this->moduleNameLower);
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
|
||||
} else {
|
||||
$this->loadTranslationsFrom(module_path($this->moduleName, 'Resources/lang'), $this->moduleNameLower);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getPublishableViewPaths(): array
|
||||
{
|
||||
$paths = [];
|
||||
foreach (\Config::get('view.paths') as $path) {
|
||||
if (is_dir($path . '/modules/' . $this->moduleNameLower)) {
|
||||
$paths[] = $path . '/modules/' . $this->moduleNameLower;
|
||||
}
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
}
|
||||
69
Modules/HospitalPortal/Providers/RouteServiceProvider.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HospitalPortal\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The module namespace to assume when generating URLs to actions.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $moduleNamespace = 'Modules\HospitalPortal\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->moduleNamespace)
|
||||
->group(module_path('HospitalPortal', '/Routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->moduleNamespace)
|
||||
->group(module_path('HospitalPortal', '/Routes/api.php'));
|
||||
}
|
||||
}
|
||||
0
Modules/HospitalPortal/Resources/assets/.gitkeep
Normal file
0
Modules/HospitalPortal/Resources/assets/js/app.js
Normal file
0
Modules/HospitalPortal/Resources/lang/.gitkeep
Normal file
0
Modules/HospitalPortal/Resources/views/.gitkeep
Normal file
9
Modules/HospitalPortal/Resources/views/index.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
@extends('hospitalportal::layouts.master')
|
||||
|
||||
@section('content')
|
||||
<h1>Hello World</h1>
|
||||
|
||||
<p>
|
||||
This view is loaded from module: {!! config('hospitalportal.name') !!}
|
||||
</p>
|
||||
@endsection
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Module HospitalPortal</title>
|
||||
|
||||
{{-- Laravel Mix - CSS File --}}
|
||||
{{-- <link rel="stylesheet" href="{{ mix('css/hospitalportal.css') }}"> --}}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Laravel Mix - JS File --}}
|
||||
{{-- <script src="{{ mix('js/hospitalportal.js') }}"></script> --}}
|
||||
</body>
|
||||
</html>
|
||||
0
Modules/HospitalPortal/Routes/.gitkeep
Normal file
32
Modules/HospitalPortal/Routes/api.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\HospitalPortal\Http\Controllers\Api\AuthController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::prefix('hospitalportal')->group(function () {
|
||||
|
||||
Route::post('login', [AuthController::class, 'login'])->name('login');
|
||||
Route::post('forget-password', [AuthController::class, 'forgetPassword'])->name('forget-password');
|
||||
Route::post('verify-email', [AuthController::class, 'verifyEmail'])->name('verify-email');
|
||||
|
||||
|
||||
Route::middleware('auth:sanctum')->group(function () {
|
||||
|
||||
Route::post('logout', [AuthController::class, 'logout'])->name('logout');
|
||||
Route::get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
Route::put('reset-password', [AuthController::class, 'resetPassword'])->name('resetPassword');
|
||||
});
|
||||
});
|
||||
16
Modules/HospitalPortal/Routes/web.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::prefix('hospitalportal')->group(function() {
|
||||
Route::get('/', 'HospitalPortalController@index');
|
||||
});
|
||||
0
Modules/HospitalPortal/Tests/Feature/.gitkeep
Normal file
0
Modules/HospitalPortal/Tests/Unit/.gitkeep
Normal file
23
Modules/HospitalPortal/composer.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "nwidart/hospitalportal",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Widart",
|
||||
"email": "n.widart@gmail.com"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [],
|
||||
"aliases": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\HospitalPortal\\": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Modules/HospitalPortal/module.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "HospitalPortal",
|
||||
"alias": "hospitalportal",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"priority": 0,
|
||||
"providers": [
|
||||
"Modules\\HospitalPortal\\Providers\\HospitalPortalServiceProvider"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": []
|
||||
}
|
||||
21
Modules/HospitalPortal/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "mix",
|
||||
"watch": "mix watch",
|
||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||
"hot": "mix watch --hot",
|
||||
"prod": "npm run production",
|
||||
"production": "mix --production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.21.4",
|
||||
"dotenv": "^10.0.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"laravel-mix": "^6.0.31",
|
||||
"laravel-mix-merge-manifest": "^2.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"postcss": "^8.3.7"
|
||||
}
|
||||
}
|
||||
14
Modules/HospitalPortal/webpack.mix.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const dotenvExpand = require('dotenv-expand');
|
||||
dotenvExpand(require('dotenv').config({ path: '../../.env'/*, debug: true*/}));
|
||||
|
||||
const mix = require('laravel-mix');
|
||||
require('laravel-mix-merge-manifest');
|
||||
|
||||
mix.setPublicPath('../../public').mergeManifest();
|
||||
|
||||
mix.js(__dirname + '/Resources/assets/js/app.js', 'js/hospitalportal.js')
|
||||
.sass( __dirname + '/Resources/assets/sass/app.scss', 'css/hospitalportal.css');
|
||||
|
||||
if (mix.inProduction()) {
|
||||
mix.version();
|
||||
}
|
||||
4
frontend/hospital-portal/.env.development
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
REACT_APP_HOST_API_URL="http://localhost:8000"
|
||||
|
||||
VITE_API_URL="http://localhost:8000/api/hospitalportal"
|
||||
8
frontend/hospital-portal/.eslintignore
Executable file
@@ -0,0 +1,8 @@
|
||||
// .eslintignore
|
||||
build/*
|
||||
public/*
|
||||
src/react-app-env.d.ts
|
||||
src/reportWebVitals.ts
|
||||
src/service-worker.ts
|
||||
src/serviceWorkerRegistration.ts
|
||||
src/setupTests.ts
|
||||
54
frontend/hospital-portal/.eslintrc
Executable file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"plugins": [
|
||||
"prettier",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"extends": [
|
||||
"airbnb-typescript",
|
||||
"react-app",
|
||||
"prettier"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"**/tsconfig.json"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"typescript": {
|
||||
"alwaysTryTypes": true,
|
||||
"exceptAfterSingleLine": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"react/jsx-key": 2,
|
||||
"arrow-body-style": 1,
|
||||
"import/no-duplicates": 1,
|
||||
"react/self-closing-comp": 1,
|
||||
"@typescript-eslint/no-shadow": 0,
|
||||
"import/no-useless-path-segments": 1,
|
||||
"import/no-extraneous-dependencies": 0,
|
||||
"@typescript-eslint/naming-convention": 0,
|
||||
"import/extensions": "never",
|
||||
"object-curly-spacing": [
|
||||
1,
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
1,
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "none"
|
||||
}
|
||||
],
|
||||
"prefer-destructuring": [
|
||||
1,
|
||||
{
|
||||
"object": true,
|
||||
"array": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
26
frontend/hospital-portal/.gitignore
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
/.env
|
||||
/.env.local
|
||||
/.env.development.local
|
||||
/.env.test.local
|
||||
/.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.eslintcache
|
||||
12
frontend/hospital-portal/.htaccess
Executable file
@@ -0,0 +1,12 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule (.*) /index.html [QSA,L]
|
||||
</IfModule>
|
||||
|
||||
<IfModule pagespeed_module>
|
||||
ModPagespeed off
|
||||
</IfModule>
|
||||
22
frontend/hospital-portal/.pnpm-debug.log
Executable file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"0 debug pnpm:scope": {
|
||||
"selected": 1
|
||||
},
|
||||
"1 error pnpm": {
|
||||
"code": "ELIFECYCLE",
|
||||
"errno": "ENOENT",
|
||||
"syscall": "spawn",
|
||||
"file": "sh",
|
||||
"pkgid": "@minimal/material-kit-react@3.2.0",
|
||||
"stage": "start",
|
||||
"script": "vite",
|
||||
"pkgname": "@minimal/material-kit-react",
|
||||
"err": {
|
||||
"name": "pnpm",
|
||||
"message": "@minimal/material-kit-react@3.2.0 start: `vite`\nspawn ENOENT",
|
||||
"code": "ELIFECYCLE",
|
||||
"stack": "pnpm: @minimal/material-kit-react@3.2.0 start: `vite`\nspawn ENOENT\n at ChildProcess.<anonymous> (/home/dell/.nvm/versions/node/v16.13.0/pnpm-global/5/node_modules/.pnpm/pnpm@7.0.0/node_modules/pnpm/dist/pnpm.cjs:93294:22)\n at ChildProcess.emit (node:events:390:28)\n at maybeClose (node:internal/child_process:1064:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)"
|
||||
}
|
||||
},
|
||||
"2 warn pnpm:global": " Local package.json exists, but node_modules missing, did you mean to install?"
|
||||
}
|
||||
6
frontend/hospital-portal/.prettierrc
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2
|
||||
}
|
||||
36
frontend/hospital-portal/index.html
Executable file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<!-- Favicon -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
||||
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
|
||||
<!-- Using Google Font -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Using Local Font -->
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/index.css" />
|
||||
|
||||
<title>Dashboard</title>
|
||||
<meta name="description"
|
||||
content="The starting point for your next project with Minimal UI Kit, built on the newest version of Material-UI ©, ready to be customized to your style" />
|
||||
<meta name="keywords" content="react,material,kit,application,dashboard,admin,template" />
|
||||
<meta name="author" content="Minimal UI Kit" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
15880
frontend/hospital-portal/package-lock.json
generated
Executable file
115
frontend/hospital-portal/package.json
Executable file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"name": "@minimal/material-kit-react",
|
||||
"author": "minimals.cc",
|
||||
"version": "3.2.0",
|
||||
"description": "Simple React Scripts & Typescript",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint --ext .ts,.tsx ./src",
|
||||
"lint:fix": "eslint --fix --ext .ts,.tsx ./src",
|
||||
"start": "vite --port=3000",
|
||||
"build": "vite build --mode production && cp .htaccess build/.htaccess && rm -f -r ../../public/dashboard && cp -r build ../../public/dashboard",
|
||||
"build-staging": "vite build --mode staging && cp .htaccess build/.htaccess && rm -f -r ../../public/dashboard-staging && cp -r build ../../public/dashboard-staging",
|
||||
"serve": "vite preview",
|
||||
"clear-all": "rm -rf build node_modules",
|
||||
"re-start": "rm -rf build node_modules && yarn install && yarn start",
|
||||
"re-build": "rm -rf build node_modules && yarn install && yarn build"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app"
|
||||
]
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"@babel/preset-react"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@date-io/date-fns": "^2.16.0",
|
||||
"@emotion/cache": "^11.10.5",
|
||||
"@emotion/react": "^11.10.5",
|
||||
"@emotion/styled": "^11.10.5",
|
||||
"@hookform/resolvers": "^2.9.10",
|
||||
"@iconify/react": "^3.2.2",
|
||||
"@mui/icons-material": "^5.11.0",
|
||||
"@mui/lab": "5.0.0-alpha.80",
|
||||
"@mui/material": "^5.11.7",
|
||||
"@mui/system": "^5.11.7",
|
||||
"@mui/x-data-grid": "^5.17.21",
|
||||
"@mui/x-date-pickers": "5.0.0-beta.2",
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"apexcharts": "^3.36.3",
|
||||
"axios": "^0.27.2",
|
||||
"change-case": "^4.1.2",
|
||||
"csstype": "^3.1.1",
|
||||
"date-fns": "^2.29.3",
|
||||
"framer-motion": "^6.5.1",
|
||||
"highlight.js": "^11.7.0",
|
||||
"history": "^5.3.0",
|
||||
"jsx-runtime": "^1.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"notistack": "3.0.0-alpha.11",
|
||||
"nprogress": "^0.2.0",
|
||||
"numeral": "^2.0.6",
|
||||
"react": "^17.0.2",
|
||||
"react-apexcharts": "^1.4.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-helmet-async": "^1.3.0",
|
||||
"react-hook-form": "^7.43.0",
|
||||
"react-intersection-observer": "^8.34.0",
|
||||
"react-lazy-load-image-component": "^1.5.6",
|
||||
"react-quill": "2.0.0-beta.4",
|
||||
"react-router": "^6.8.0",
|
||||
"react-router-dom": "^6.8.0",
|
||||
"simplebar": "^5.3.9",
|
||||
"simplebar-react": "^2.4.3",
|
||||
"stylis": "^4.1.3",
|
||||
"stylis-plugin-rtl": "^2.1.1",
|
||||
"vite": "^3.2.5",
|
||||
"vite-plugin-svgr": "^2.4.0",
|
||||
"yup": "^0.32.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.12",
|
||||
"@babel/eslint-parser": "^7.19.1",
|
||||
"@babel/plugin-syntax-flow": "^7.18.6",
|
||||
"@babel/plugin-transform-react-jsx": "^7.20.13",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/react": "^17.0.53",
|
||||
"@types/react-dom": "^17.0.18",
|
||||
"@types/react-lazy-load-image-component": "^1.5.2",
|
||||
"@types/stylis": "^4.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
||||
"@typescript-eslint/parser": "^5.50.0",
|
||||
"eslint": "^8.33.0",
|
||||
"eslint-config-airbnb": "19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^16.2.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-config-react-app": "7.0.0",
|
||||
"eslint-import-resolver-typescript": "^2.7.1",
|
||||
"eslint-plugin-flowtype": "^8.0.3",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "6.5.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "4.3.0",
|
||||
"prettier": "^2.8.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite-plugin-pwa": "^0.12.8"
|
||||
}
|
||||
}
|
||||
6167
frontend/hospital-portal/pnpm-lock.yaml
generated
Executable file
1
frontend/hospital-portal/public/_redirects
Executable file
@@ -0,0 +1 @@
|
||||
/* /index.html 200
|
||||
BIN
frontend/hospital-portal/public/favicon/android-chrome-192x192.png
Executable file
|
After Width: | Height: | Size: 14 KiB |
BIN
frontend/hospital-portal/public/favicon/android-chrome-512x512.png
Executable file
|
After Width: | Height: | Size: 43 KiB |
BIN
frontend/hospital-portal/public/favicon/apple-touch-icon.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/hospital-portal/public/favicon/favicon-16x16.png
Executable file
|
After Width: | Height: | Size: 573 B |
BIN
frontend/hospital-portal/public/favicon/favicon-32x32.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
frontend/hospital-portal/public/favicon/favicon.ico
Executable file
|
After Width: | Height: | Size: 15 KiB |
BIN
frontend/hospital-portal/public/fonts/CircularStd-Bold.otf
Executable file
BIN
frontend/hospital-portal/public/fonts/CircularStd-Book.otf
Executable file
BIN
frontend/hospital-portal/public/fonts/CircularStd-Medium.otf
Executable file
BIN
frontend/hospital-portal/public/fonts/Roboto-Bold.ttf
Executable file
BIN
frontend/hospital-portal/public/fonts/Roboto-Regular.ttf
Executable file
18
frontend/hospital-portal/public/fonts/index.css
Executable file
@@ -0,0 +1,18 @@
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
src: local('CircularStd'), url('CircularStd-Book.otf') format('opentype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
src: local('CircularStd'), url('CircularStd-Medium.otf') format('opentype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'CircularStd';
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
src: local('CircularStd'), url('CircularStd-Bold.otf') format('opentype');
|
||||
}
|
||||
1
frontend/hospital-portal/public/icons/ic_analytics.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m20.247634 1c1.0125221 0 1.8333334.82081129 1.8333334 1.83333333s-.8208113 1.83333334-1.8333334 1.83333334c-.3158442 0-.6130339-.07986936-.8724738-.22051281l-3.0249251 3.47961717c.1346337.25513483.2108509.5458717.2108509.85441003 0 1.01252204-.8208113 1.83333334-1.8333334 1.83333334-.9820883 0-1.7838173-.7722101-1.8311257-1.74256896l-2.2033918-.75849737c-.336256.40778098-.84535009.66773299-1.41515923.66773299-.32712483 0-.63423886-.08567643-.90012689-.2358141l-2.87560465 2.41277624c.05416355.1730906.08335496.3572185.08335496.5481644 0 1.012522-.8208113 1.8333333-1.83333334 1.8333333s-1.83333333-.8208113-1.83333333-1.8333333c0-1.0125221.82081129-1.83333335 1.83333333-1.83333335.33090488 0 .64133381.08766791.90932763.24104456l2.86960725-2.40787374c-.05621505-.1760311-.0865583-.3636207-.0865583-.55829735 0-1.01252204.8208113-1.83333333 1.83333334-1.83333333.97577423 0 1.77350093.76231258 1.83011983 1.7238777l2.2160025.76325559c.336304-.39976002.8402621-.65379996 1.4035544-.65379996.2130474 0 .4176071.03634016.6078186.10315996l3.1693503-3.64581344c-.0588143-.17965899-.0906208-.37154554-.0906208-.57086091 0-1.01252204.8208113-1.83333333 1.8333333-1.83333333z" opacity=".48"/><path d="m21.1666667 9.60855714c.506261 0 .9166666.41040566.9166666.91666666v10.7540685c0 .2761423-.2238576.5-.5.5h-2.6666666c-.2761424 0-.5-.2238577-.5-.5v-10.7540685c0-.506261.4104056-.91666666.9166666-.91666666zm-5.5 6.42549146c.506261 0 .9166666.4104057.9166666.9166667v4.328577c0 .2761423-.2238576.5-.5.5h-2.6666666c-.2761424 0-.5-.2238577-.5-.5v-4.328577c0-.506261.4104056-.9166667.9166666-.9166667zm-5.5-1.8405511c.506261 0 .9166666.4104057.9166666.9166667v6.1691281c0 .2761423-.2238576.5-.5.5h-2.66666663c-.27614238 0-.5-.2238577-.5-.5v-6.1691281c0-.506261.41040564-.9166667.91666666-.9166667zm-5.50000003 4.7135227c.50626102 0 .91666666.4104057.91666666.9166667v1.4556054c0 .2761423-.22385762.5-.5.5h-2.66666666c-.27614238 0-.5-.2238577-.5-.5v-1.4556054c0-.506261.41040564-.9166667.91666666-.9166667z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
5
frontend/hospital-portal/public/icons/ic_banking.svg
Executable file
@@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M21.5367 20.5812H2.45436C1.92714 20.5812 1.5 21.0083 1.5 21.536C1.5 22.0628 1.92714 22.4899 2.45436 22.4899H21.5362C22.0635 22.4899 22.4906 22.0628 22.4906 21.536C22.4902 21.0083 22.063 20.5812 21.5367 20.5812Z" fill="#637381"/>
|
||||
<path d="M3.64772 18.1001C3.1205 18.1001 2.69336 18.5273 2.69336 19.0545C2.69336 19.5817 3.1205 20.0093 3.64772 20.0093H20.3446C20.8718 20.0093 21.2989 19.5817 21.2989 19.0545C21.2989 18.5273 20.8718 18.1001 20.3446 18.1001H20.1064V9.51266H20.3446C20.6086 9.51266 20.8213 9.29909 20.8213 9.03592C20.8213 8.77276 20.6077 8.55919 20.3446 8.55919H3.64772C3.38411 8.55919 3.17099 8.77276 3.17099 9.03592C3.17099 9.29909 3.38456 9.51266 3.64772 9.51266H3.88631V18.0997H3.64772V18.1001ZM18.1977 9.51266V18.0997H15.3355V9.51266H18.1977ZM13.4268 9.51266V18.0997H10.5646V9.51266H13.4268ZM5.79414 9.51266H8.65633V18.0997H5.79414V9.51266Z" fill="#637381"/>
|
||||
<path opacity="0.48" d="M2.45438 7.70134H21.5363C21.5394 7.70134 21.543 7.70134 21.5456 7.70134C22.0733 7.70134 22.5 7.2742 22.5 6.74698C22.5 6.32788 22.2301 5.97268 21.8553 5.844L12.3876 1.58377C12.1387 1.47208 11.8541 1.47208 11.6048 1.58377L2.06298 5.87706C1.65238 6.06204 1.42674 6.50794 1.52146 6.94759C1.61574 7.38724 2.00445 7.70134 2.45438 7.70134Z" fill="#637381"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
frontend/hospital-portal/public/icons/ic_blog.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m14.984127 0c2.7619047 0 5.015873 2.25396825 5.015873 5.01587302v9.96825398c0 2.7619047-2.2539683 5.015873-5.015873 5.015873h-9.984127c-2.74603175 0-5-2.2539683-5-5v-9.98412698c0-2.76190477 2.25396825-5.01587302 5-5.01587302zm-4.5079365 3.80952381h-2.76190479c-2.17460317 0-3.9047619 1.73015873-3.9047619 3.88888889v4.6031746c0 2.1587302 1.73015873 3.8888889 3.9047619 3.8888889h4.53968259c2.1746031 0 3.9523809-1.7460318 3.9682539-3.9047619v-3.15873017l-.031746-.15873016-.1111111-.22222222-.1746032-.14285715c-.2380952-.17460317-1.3968254.01587302-1.7142857-.26984127-.2222222-.2063492-.2539683-.57142857-.3174603-1.06349206-.1111111-.96825397-.2063492-1.01587302-.3492064-1.33333333-.5396825-1.15873016-2.031746-2.12698413-3.047619-2.12698413zm1.7460317 7.61904759c.4126984 0 .7460318.3809524.7460318.7936508s-.3333334.7936508-.7460318.7936508h-4.46031744c-.42857143 0-.76190476-.3809524-.76190476-.7936508s.34920635-.7936508.76190476-.7936508zm-2.26984125-4.44444442c.42857145 0 .76190475.30158731.76190475.71428572s-.3492063.71428571-.76190475.71428571h-2.19047619c-.41269841 0-.76190476-.3015873-.76190476-.71428571s.34920635-.71428572.76190476-.71428572z" transform="translate(2 2)"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
frontend/hospital-portal/public/icons/ic_booking.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g fill="#637381"><path d="m16.8125 2.83333h-1.1459v-.91667c0-.50599-.4097-.91666-.9166-.91666s-.9167.41067-.9167.91666v.91667h-7.33331v-.91667c0-.50599-.40975-.91666-.91667-.91666-.50691 0-.91666.41067-.91666.91666v.91667h-1.14583c-1.39058 0-2.52083 1.13025-2.52083 2.52083v10.31244c0 1.5162 1.23383 2.75 2.74999 2.75h4.58333c.50691 0 .91666-.4106.91666-.9166s-.40975-.9167-.91666-.9167h-4.58333c-.50599 0-.91666-.4116-.91666-.9167v-7.33328h14.66667c0 .506.4097.91666.9166.91666s.9167-.41066.9167-.91666v-2.97916c0-1.39058-1.1302-2.52083-2.5208-2.52083z"/><path d="m17.0413 11.0834c-3.2853 0-5.9583 2.673-5.9583 5.9583s2.673 5.9583 5.9583 5.9583 5.9583-2.673 5.9583-5.9583-2.673-5.9583-5.9583-5.9583zm2.7555 4.9545-2.9791 3.4375c-.1669.1925-.4061.3062-.66.3163-.011 0-.022 0-.033 0-.243 0-.4758-.0963-.6481-.2686l-1.6042-1.6042c-.3584-.3584-.3584-.9377 0-1.2961.3584-.3585.9378-.3585 1.2962 0l.9084.9084 2.3338-2.6932c.3318-.3831.9112-.4226 1.2934-.0926.3823.331.4235.9103.0926 1.2925z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
frontend/hospital-portal/public/icons/ic_calendar.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1.5 1.5)"><path d="m18.9 3.15h-16.8c-1.15931815.00115758-2.09884242.94068185-2.1 2.1v12.95c.00115758 1.1593181.94068185 2.0988424 2.1 2.1h16.8c1.1593181-.0011576 2.0988424-.9406819 2.1-2.1v-12.95c-.0011576-1.15931815-.9406819-2.09884242-2.1-2.1zm0 16.45h-16.8c-.77319865 0-1.4-.6268014-1.4-1.4v-10.5h19.6v10.5c0 .7731986-.6268014 1.4-1.4 1.4zm-2.45-17.15v-1.75c0-.38659932-.3134007-.7-.7-.7s-.7.31340068-.7.7v1.75zm-10.5 0v-1.75c0-.38659932-.31340068-.7-.7-.7s-.7.31340068-.7.7v1.75z"/><path d="m5.99840724 14.441644c.55228475 0 1 .4477153 1 1v1.6c0 .5522848-.44771525 1-1 1h-2.2c-.55228475 0-1-.4477152-1-1v-1.6c0-.5522847.44771525-1 1-1zm5.60159276 0c.5522847 0 1 .4477153 1 1v1.6c0 .5522848-.4477153 1-1 1h-2.2c-.55228475 0-1-.4477152-1-1v-1.6c0-.5522847.44771525-1 1-1zm-5.60159276-5.0001284c.55228475 0 1 .44771525 1 1v1.6c0 .5522848-.44771525 1-1 1h-2.2c-.55228475 0-1-.4477152-1-1v-1.6c0-.55228475.44771525-1 1-1zm5.60159276 0c.5522847 0 1 .44771525 1 1v1.6c0 .5522848-.4477153 1-1 1h-2.2c-.55228475 0-1-.4477152-1-1v-1.6c0-.55228475.44771525-1 1-1zm5.6015928 0c.5522847 0 1 .44771525 1 1v1.6c0 .5522848-.4477153 1-1 1h-2.2c-.5522848 0-1-.4477152-1-1v-1.6c0-.55228475.4477152-1 1-1z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
frontend/hospital-portal/public/icons/ic_cart.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(2 2)"><path d="m9.58985382 1.32162476c1.66180188 0 3.06430158 1.12239456 3.49720258 2.64777104h-6.99440518c.432901-1.52537648 1.83540001-2.64777104 3.4972026-2.64777104zm4.62891648-1.32162476c.9093636 0 1.6555835.7429914 1.6555835 1.65235392 0 .90937489-.7462199 1.6529999-1.6555835 1.6529999-.909364 0-1.6529999-.74362501-1.6529999-1.6529999 0-.90936252.7436359-1.65235392 1.6529999-1.65235392z" opacity=".48"/><path d="m7.60483293 15.8737079c.90936397 0 1.6529999.7436373 1.6529999 1.6529999 0 .9093749-.74362997 1.6549376-1.6529999 1.6549376s-1.65235399-.7455627-1.65235399-1.6549376c0-.9093626.74299001-1.6529999 1.65235399-1.6529999zm6.61393737 0c.9093636 0 1.6555835.7436373 1.6555835 1.6529999 0 .9093749-.7462136 1.6549376-1.6555835 1.6549376-.90937 0-1.6529999-.7455627-1.6529999-1.6549376 0-.9093626.7436349-1.6529999 1.6529999-1.6529999zm-10.58074958-13.22722875c.47021948.00126272.87961059.33725114.97151692.79840103l.23706567 1.18597394h13.34220869c.6357812 0 1.1062464.60903974.9644116 1.2234396l-1.9850212 8.59895818c-.1036535.4490251-.5105252.7589977-.9644112.7589977h-10.58333325c-.47083827 0-.88484536-.3341221-.97216282-.8009847l-1.82805386-9.78234852h-1.82869973c-.30322176 0-.57131938-.12557224-.74220274-.31781022-.17088343-.19224988-.2493388-.43483146-.2493388-.67373135 0-.2388999.07845541-.48148147.2493388-.67373136.17088336-.19223764.43898098-.3171643.74220274-.3171643z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
frontend/hospital-portal/public/icons/ic_chat.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(.5 2.5)"><path d="m8.3418125.28845833c-4.72554167 0-8.3418125 3.20658334-8.3418125 6.70210417 0 3.4955208 3.12225 5.5209583 3.12225 5.5209583l-.5074375 1.923375c-.06708333.2534792.20460417.462875.4326875.3335l2.28083333-1.2923125c1.00864584.3210417 3.14908334.4235834 3.35752084.4331667-.1495-.5184583-.22329167-1.02925-.22329167-1.5060208 0-2.69770837 2.348875-6.49750003 7.5703542-6.49750003.1188333 0 .2376666.002875.3565.00766666-.6947917-3.32541666-4.1476667-5.6249375-8.0476042-5.6249375z"/><path d="m23 11.9810833c0-3.06187497-3.5923125-5.3038958-6.9675625-5.3038958-4.7734583 0-6.79889583 3.4476042-6.79889583 5.7260417 0 2.2832291 2.02495833 5.7260416 6.79889583 5.7260416 1.0560833 0 1.9851875-.1514166 2.7930625-.41975l1.7954375 1.1394584c.1418333.0900833.3210417-.0368959.2831875-.2007709l-.4072917-1.768125c1.69625-1.181625 2.5031667-3.0441458 2.5031667-4.899z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1007 B |
1
frontend/hospital-portal/public/icons/ic_dashboard.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(2 4)"><path d="m18.38 4.57-1.23 1.85c1.2049 2.40314304 1.1222508 5.2507848-.22 7.58h-13.86c-1.76350331-3.059309-1.31261601-6.91298595 1.10947843-9.48257235s6.24242627-3.24722187 9.40052157-1.66742765l1.85-1.23c-3.8761922-2.48556317-8.94860517-2.00294347-12.28650726 1.16901179-3.3379021 3.17195526-4.07833512 8.21319061-1.79349274 12.21098821.35510459.6150891 1.00977788.9957131 1.72 1.0000158h13.85c.7173695.0028322 1.3813181-.3787474 1.74-1.0000158 1.8786438-3.25433 1.7743473-7.28712667-.27-10.44z"/><path d="m8.59 11.41c.37513651.3755541.8841815.5865733 1.415.5865733s1.0398635-.2110192 1.415-.5865733l5.66-8.49-8.49 5.66c-.37555409.37513651-.58657331.8841815-.58657331 1.415s.21101922 1.0398635.58657331 1.415z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 849 B |
1
frontend/hospital-portal/public/icons/ic_ecommerce.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m7.94101676 5.6427832v2.74464258c0 .33989649.27513281.6150293.6150293.6150293.30862393 0 .56440212-.22738249.60835663-.52409402l.00667266-.09093528v-2.74464258h5.65814645v2.74464258c0 .33989649.275543.6150293.6150293.6150293.3089968 0 .5644699-.22738249.6083659-.52409402l.0066634-.09093528v-2.74464258h1.8524297c.7157099 0 1.3265895.52397061 1.44811 1.21681899l.0176654.14071617.9376992 11.81697074c.0730078.9483222-.2554043 1.8905332-.900334 2.5867324-.5953575.6426454-1.4202201 1.03272-2.2901578 1.0889289l-.2183168.0070496h-9.81241403c-.94918359 0-1.8635039-.3997793-2.50847461-1.0959375-.59531971-.6426454-.92094397-1.4949103-.91044964-2.3668484l.00966449-.2182844.93810937-11.82025197c.0545636-.71224914.62412163-1.28073532 1.3241451-1.34901387l.14163029-.00688066zm4.09817114 3.97089698c-.2266736-.00327725-.4135824.17768425-.4169046.40501402v.7555922c-1.4912918.1060463-2.50536524 1.0273421-2.50536524 2.253508 0 1.5045398 1.27919924 1.9221212 2.50536524 2.253508v2.6511967c-.6469005-.0868303-1.2566612-.3552579-1.7564176-.7754643-.09411064-.0748948-.21077995-.1166488-.33140728-.1192943-.30554685.0212051-.54083371.2770409-.5369249.5832645-.00060704.1338754.05174957.2624598.14586021.3579034.68467596.6164053 1.56487397.9710069 2.48549307 1.0008254l.0006563.7430004c.0106025.2266735.2034791.4016467.4301527.3903879.2233717 0 .4043127-.180941.4043127-.4043128v-.7423236c1.8094305-.1192943 2.538506-1.2195419 2.538506-2.3860709 0-1.5642177-1.3122785-2.041436-2.5384649-2.3728433v-2.3330375c.4990796.0841848.9696739.2889765 1.3719974.5965126.0802063.0550021.1743169.0848411.2717499.0861536.3121708 0 .5666941-.251201.5699959-.5633719.0006562-.1338754-.0517004-.2624598-.145811-.3579035-.5812753-.4977671-1.3103508-.7913784-2.0745563-.8351217v-.7821089c0-.22337175-.180941-.40431274-.4043128-.40431274-.0046347-.00070128-.00929-.00070128-.0139248-.00070128zm.4248617 5.91949992c.7489681.2120925 1.3322121.4970904 1.3255881 1.1930252 0 .503735-.3446554 1.1002476-1.3255881 1.2195419zm-.8351218-3.7050349v2.1673339c-.7224514-.2120925-1.2858233-.430809-1.2858233-1.0472142 0-.6164053.510359-1.0604828 1.2858233-1.1201197zm.3712413-10.3281452c2.2382637 0 4.0591523 1.82125781 4.0591523 4.05952148v.08322071h-1.2300175v-.08322071c0-1.56011132-1.2689825-2.8295039-2.8290938-2.8295039s-2.82909373 1.26939258-2.82909373 2.8295039v.08322071h-1.23005859v-.08322071c0-2.23826367 1.82084765-4.05952148 4.05911132-4.05952148z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
8
frontend/hospital-portal/public/icons/ic_kanban.svg
Executable file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>ic_kanban</title>
|
||||
<g id="ic_kanban" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M20,3 C21.1045695,3 22,3.8954305 22,5 L22,15 C22,16.1045695 21.1045695,17 20,17 L4,17 C2.8954305,17 2,16.1045695 2,15 L2,5 C2,3.8954305 2.8954305,3 4,3 L20,3 Z M11.5,6 L6.5,6 C5.67157288,6 5,6.67157288 5,7.5 L5,7.5 L5,9.5 C5,10.3284271 5.67157288,11 6.5,11 L6.5,11 L11.5,11 C12.3284271,11 13,10.3284271 13,9.5 L13,9.5 L13,7.5 C13,6.67157288 12.3284271,6 11.5,6 L11.5,6 Z" id="Combined-Shape" fill="#000000"></path>
|
||||
<path d="M8,21 L16,21 M12,17 L12,21" id="Combined-Shape" stroke="#000000" stroke-width="2" opacity="0.48" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 915 B |
1
frontend/hospital-portal/public/icons/ic_mail.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1.5 4)"><path d="m11.0988387 10.3846452c-.1981935.1238709-.4211613.1734193-.6193548.1734193-.1981936 0-.4211613-.0495484-.61935487-.1734193l-9.86012903-6.02012907v8.00206447c0 1.7094194 1.38735484 3.0967742 3.09677419 3.0967742h14.79019351c1.7094194 0 3.0967742-1.3873548 3.0967742-3.0967742v-8.00206447z"/><path d="m17.8869677.00425806h-14.79019351c-1.46167742 0-2.70038709 1.04051613-2.99767742 2.42787097l10.40516133 6.34219355 10.3803871-6.34219355c-.2972904-1.38735484-1.536-2.42787097-2.9976775-2.42787097z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 646 B |
1
frontend/hospital-portal/public/icons/ic_user.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(5 3)"><path d="m7 8c2.209139 0 4-1.790861 4-4s-1.790861-4-4-4-4 1.790861-4 4 1.790861 4 4 4z" opacity=".48"/><path d="m13 18.0000001c.5522847 0 1-.4477154 1-1 0-3.8659933-3.1340068-7-7-7-3.86599321 0-7 3.1340067-7 7 0 .5522846.44771525 1 1 1z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 362 B |
BIN
frontend/hospital-portal/public/image/overlay.png
Normal file
|
After Width: | Height: | Size: 473 KiB |
BIN
frontend/hospital-portal/public/logo/logo-linksehat.png
Executable file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
frontend/hospital-portal/public/logo/logo_full.jpg
Executable file
|
After Width: | Height: | Size: 21 KiB |
1
frontend/hospital-portal/public/logo/logo_full.svg
Executable file
|
After Width: | Height: | Size: 4.9 KiB |
1
frontend/hospital-portal/public/logo/logo_single.svg
Executable file
@@ -0,0 +1 @@
|
||||
<svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" x1="100%" x2="50%" y1="5.663%" y2="50%"><stop offset="0" stop-color="#007b55"/><stop offset="1" stop-color="#00ab55"/></linearGradient><linearGradient id="b" x1="50%" x2="50%" y1="0%" y2="100%"><stop offset="0" stop-color="#5be584"/><stop offset="1" stop-color="#00ab55"/></linearGradient><g fill="none" fill-rule="evenodd" transform="translate(14 128)"><path d="m92.8065878 83.1065019c44.2888442 22.8889511 46.3079382 23.9345951 46.4006692 23.9799821.012248.008728.642121.333419 44.792743 23.152545-26.071507 48.53952-42.693165 77.265922-49.868472 86.179207-10.758587 13.369926-22.495227 23.492946-36.929824 29.333888-30.3458978 14.261953-68.070062 14.928791-97.201704-2.704011z" fill="url(#a)"/><g fill="url(#b)"><path d="m430.310491 101.726093c-46.270793-80.9559274-94.100378-157.2284394-149.043472-45.3437359-7.516227 14.3833977-12.994566 42.3366008-25.267019 42.3366008v-.1420279c-12.272453 0-17.749057-27.9532032-25.265283-42.3366009-54.94483-111.8847034-102.774415-35.6121915-149.0452076 45.3437359-3.4821132 6.105448-6.8270943 11.9321-9.6895094 16.99601 106.037811-67.1266136 97.11034 135.666494 184 137.277897v.142028c86.891396-1.611403 77.962189-204.4045106 184-137.27965-2.860679-5.062157-6.20566-10.888809-9.689509-16.994257"/><path d="m436 256c26.5088 0 48-21.4912 48-48s-21.4912-48-48-48-48 21.4912-48 48 21.4912 48 48 48"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
20
frontend/hospital-portal/public/manifest.json
Executable file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "React Material Minimal UI",
|
||||
"short_name": "Minimal-UI",
|
||||
"display": "standalone",
|
||||
"start_url": "/",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "favicon/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
frontend/hospital-portal/public/robots.txt
Executable file
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
66
frontend/hospital-portal/src/@types/auth.ts
Executable file
@@ -0,0 +1,66 @@
|
||||
import { UserCredential } from 'firebase/auth';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type ActionMap<M extends { [index: string]: any }> = {
|
||||
[Key in keyof M]: M[Key] extends undefined
|
||||
? {
|
||||
type: Key;
|
||||
}
|
||||
: {
|
||||
type: Key;
|
||||
payload: M[Key];
|
||||
};
|
||||
};
|
||||
|
||||
export type AuthUser = null | Record<string, any>;
|
||||
|
||||
export type AuthState = {
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
user: AuthUser;
|
||||
};
|
||||
|
||||
export type JWTContextType = {
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
user: AuthUser;
|
||||
method: 'jwt';
|
||||
login: (email: string, password: string) => Promise<void>;
|
||||
register: (email: string, password: string, firstName: string, lastName: string) => Promise<void>;
|
||||
logout: () => Promise<void>;
|
||||
};
|
||||
|
||||
export type FirebaseContextType = {
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
user: AuthUser;
|
||||
method: 'firebase';
|
||||
login: (email: string, password: string) => Promise<UserCredential>;
|
||||
register: (email: string, password: string, firstName: string, lastName: string) => Promise<void>;
|
||||
logout: () => Promise<void>;
|
||||
};
|
||||
|
||||
export type AWSCognitoContextType = {
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
user: AuthUser;
|
||||
method: 'cognito';
|
||||
login: (email: string, password: string) => Promise<unknown>;
|
||||
register: (
|
||||
email: string,
|
||||
password: string,
|
||||
firstName: string,
|
||||
lastName: string
|
||||
) => Promise<unknown>;
|
||||
logout: VoidFunction;
|
||||
};
|
||||
|
||||
export type Auth0ContextType = {
|
||||
isAuthenticated: boolean;
|
||||
isInitialized: boolean;
|
||||
user: AuthUser;
|
||||
method: 'auth0';
|
||||
login: () => Promise<void>;
|
||||
logout: VoidFunction;
|
||||
};
|
||||
55
frontend/hospital-portal/src/@types/blog.ts
Executable file
@@ -0,0 +1,55 @@
|
||||
export type NewPostFormValues = {
|
||||
title: string;
|
||||
description: string;
|
||||
content: string;
|
||||
cover: File | any;
|
||||
tags: string[];
|
||||
publish: boolean;
|
||||
comments: boolean;
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
metaKeywords: string[];
|
||||
};
|
||||
|
||||
export type PostComment = {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
message: string;
|
||||
postedAt: Date;
|
||||
users: {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
}[];
|
||||
replyComment: {
|
||||
id: string;
|
||||
userId: string;
|
||||
message: string;
|
||||
postedAt: Date;
|
||||
tagUser?: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type Post = {
|
||||
id: string;
|
||||
cover: string;
|
||||
title: string;
|
||||
description: string;
|
||||
createdAt: Date | string | number;
|
||||
view: number;
|
||||
comment: number;
|
||||
share: number;
|
||||
favorite: number;
|
||||
author: {
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
};
|
||||
tags: string[];
|
||||
body: string;
|
||||
favoritePerson: {
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
}[];
|
||||
comments: PostComment[];
|
||||
};
|
||||
14
frontend/hospital-portal/src/@types/calendar.ts
Executable file
@@ -0,0 +1,14 @@
|
||||
import { EventInput } from '@fullcalendar/common';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'listWeek';
|
||||
|
||||
export type CalendarState = {
|
||||
isLoading: boolean;
|
||||
error: Error | string | null;
|
||||
events: EventInput[];
|
||||
isOpenModal: boolean;
|
||||
selectedEventId: null | string;
|
||||
selectedRange: null | { start: Date; end: Date };
|
||||
};
|
||||
65
frontend/hospital-portal/src/@types/chat.ts
Executable file
@@ -0,0 +1,65 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type Contact = {
|
||||
id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
avatar: string;
|
||||
address: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
lastActivity: Date | string | number;
|
||||
status: string;
|
||||
position: string;
|
||||
};
|
||||
|
||||
export type Participant = {
|
||||
id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
avatar: string;
|
||||
address?: string;
|
||||
phone?: string;
|
||||
email?: string;
|
||||
lastActivity?: Date | string | number;
|
||||
status?: 'online' | 'offline' | 'away' | 'busy';
|
||||
position?: string;
|
||||
};
|
||||
|
||||
export type TextMessage = {
|
||||
id: string;
|
||||
body: string;
|
||||
contentType: 'text';
|
||||
attachments: string[];
|
||||
createdAt: Date;
|
||||
senderId: string;
|
||||
};
|
||||
|
||||
export type ImageMessage = {
|
||||
id: string;
|
||||
body: string;
|
||||
contentType: 'image';
|
||||
attachments: string[];
|
||||
createdAt: Date;
|
||||
senderId: string;
|
||||
};
|
||||
|
||||
export type Message = TextMessage | ImageMessage;
|
||||
|
||||
export type Conversation = {
|
||||
id: string;
|
||||
participants: Participant[];
|
||||
type: string;
|
||||
unreadCount: number;
|
||||
messages: Message[];
|
||||
};
|
||||
|
||||
export type SendMessage = {
|
||||
conversationId: string;
|
||||
messageId: string;
|
||||
message: string;
|
||||
contentType: 'text';
|
||||
attachments: string[];
|
||||
createdAt: Date | string | number;
|
||||
senderId: string;
|
||||
};
|
||||
183
frontend/hospital-portal/src/@types/corporates.ts
Executable file
@@ -0,0 +1,183 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type Corporate = {
|
||||
id: number;
|
||||
code: string;
|
||||
name?: string;
|
||||
welcome_message?: string;
|
||||
help_text?: string;
|
||||
logo?: any;
|
||||
logo_url?: string;
|
||||
active: boolean | number;
|
||||
divisions?: Division[];
|
||||
employees?: Employee[];
|
||||
current_policy?: Policy;
|
||||
};
|
||||
|
||||
export type Division = {
|
||||
id: number;
|
||||
corporate_id: number;
|
||||
code: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export type Employee = {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type Policy = {
|
||||
id: number;
|
||||
corporate_id: number;
|
||||
code: string;
|
||||
total_premi: number;
|
||||
minimal_deposit_percentage: number;
|
||||
minimal_deposit_net: number;
|
||||
minimal_alert_percentage: number;
|
||||
minimal_alert_net: number;
|
||||
minimal_stop_service_percentage: number;
|
||||
minimal_stop_service_net: number;
|
||||
start: string | Date;
|
||||
end: string | Date;
|
||||
}
|
||||
|
||||
export type CorporatePlan = {
|
||||
id: number;
|
||||
corporate_id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
active: boolean | number;
|
||||
}
|
||||
|
||||
export type Plan = {
|
||||
id: number;
|
||||
corporate_plan: CorporatePlan | null;
|
||||
service_code: string;
|
||||
corporate_plan_id: string;
|
||||
code: string;
|
||||
type: string;
|
||||
start: string;
|
||||
end: string;
|
||||
require_referral: string;
|
||||
referral_source: string;
|
||||
referral_duration: string;
|
||||
family_plan: string;
|
||||
family_plan_share_rules: string;
|
||||
limit_rules: string;
|
||||
layer: string;
|
||||
layer_conditions: string;
|
||||
budget_type: string;
|
||||
budget_code: string;
|
||||
budget_conditions: string;
|
||||
surgery_limit: string;
|
||||
non_surgery_limit: string;
|
||||
max_claim_limit: string;
|
||||
max_claim_count: string;
|
||||
area_limit: string;
|
||||
limit_shared_plans: string;
|
||||
limit_shared_plan_type: string;
|
||||
cashless_percentage: string;
|
||||
reimbursement_percentage: string;
|
||||
digital_percentage: string;
|
||||
co_share_m_percentage: string;
|
||||
co_share_s_percentage: string;
|
||||
co_share_c_percentage: string;
|
||||
cashless_deductible: string;
|
||||
reimbursement_deductible: string;
|
||||
digital_deductible: string;
|
||||
co_share_m_deductible: string;
|
||||
co_share_s_deductible: string;
|
||||
co_share_c_deductible: string;
|
||||
co_share_deductible_condition: string;
|
||||
msc: string;
|
||||
genders: string;
|
||||
min_age: string;
|
||||
max_age: string;
|
||||
rule_of_excess: string;
|
||||
max_excess_covered: string;
|
||||
prorate_type: string;
|
||||
prorate_lookup: string;
|
||||
currency: string;
|
||||
max_surgery_reinstatement_days: string;
|
||||
max_surgery_periode_days: string;
|
||||
}
|
||||
|
||||
export type CorporateBenefit = {
|
||||
id: number;
|
||||
corporate_id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
active: boolean | number;
|
||||
}
|
||||
|
||||
export type Benefit = {
|
||||
service_code : string;
|
||||
plan_code : string;
|
||||
benefit_code : string;
|
||||
code : string;
|
||||
description : string;
|
||||
budget : string;
|
||||
budget_conditions : string;
|
||||
budget_code : string;
|
||||
primary_benefit_code : string;
|
||||
benefit_mode : string;
|
||||
room_class_coverage : string;
|
||||
max_bed_coverage : string;
|
||||
tolerance_parameter : string;
|
||||
max_room_class : string;
|
||||
limit_amount : string;
|
||||
area_limit : string;
|
||||
shared_benefit : string;
|
||||
shared_benefit_type : string;
|
||||
msc : string;
|
||||
genders : string;
|
||||
min_age : string;
|
||||
max_age : string;
|
||||
max_frequency_period : string;
|
||||
daily_frequency : string;
|
||||
weekly_frequency : string;
|
||||
monthly_frequency : string;
|
||||
yearly_frequency : string;
|
||||
custom_frequency_days : string;
|
||||
custom_duration_value : string;
|
||||
allowed_transaction_types : string;
|
||||
high_plan_factor : string;
|
||||
pre_post_treatment : string;
|
||||
pre_treatment_days : string;
|
||||
post_treatment_days : string;
|
||||
layer_type_1 : string;
|
||||
layer_value_1 : string;
|
||||
layer_type_2 : string;
|
||||
layer_value_2 : string;
|
||||
cashless_percentage : string;
|
||||
reimbursement_percentage : string;
|
||||
digital_percentage : string;
|
||||
co_share_m_percentage : string;
|
||||
co_share_s_percentage : string;
|
||||
co_share_c_percentage : string;
|
||||
cashless_deductible : string;
|
||||
reimbursement_deductible : string;
|
||||
digital_deductible : string;
|
||||
co_share_m_deductible : string;
|
||||
co_share_s_deductible : string;
|
||||
co_share_c_deductible : string;
|
||||
prorate_type : string;
|
||||
prorate_lookup : string;
|
||||
max_days_for_disability : string;
|
||||
max_period_for_disability : string;
|
||||
currency : string;
|
||||
show_benefit_item : string;
|
||||
show_benefit_value : string;
|
||||
}
|
||||
|
||||
export type CorporateService = {
|
||||
id?: string | number;
|
||||
corporate_id?: string | number;
|
||||
description?: string;
|
||||
name?: string;
|
||||
service_code: string;
|
||||
status: string;
|
||||
configurations: any;
|
||||
}
|
||||
11
frontend/hospital-portal/src/@types/diagnosis.ts
Executable file
@@ -0,0 +1,11 @@
|
||||
export type Icd = {
|
||||
id: number;
|
||||
type: string;
|
||||
rev: string;
|
||||
version?: string;
|
||||
code: string;
|
||||
name: string;
|
||||
description?: any;
|
||||
childs?: Icd[];
|
||||
status: string;
|
||||
};
|
||||
51
frontend/hospital-portal/src/@types/doctor.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
export type Organizations = {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
address: string;
|
||||
type: string;
|
||||
lat: string;
|
||||
lng: string;
|
||||
phone: string;
|
||||
timezone: string;
|
||||
active: boolean | number;
|
||||
};
|
||||
|
||||
export type PractitionerRole = {
|
||||
meta: string;
|
||||
practitioner_id: number;
|
||||
organization_id: number;
|
||||
identifier_id: number;
|
||||
speciality_id: number;
|
||||
period_start: string;
|
||||
period_end: string;
|
||||
active: boolean | number;
|
||||
};
|
||||
|
||||
export type Specialities = {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type Practitioner = {
|
||||
id: number;
|
||||
name: string;
|
||||
name_prefix: string;
|
||||
name_suffix: string;
|
||||
address: string;
|
||||
birth_date: string;
|
||||
birth_place: string;
|
||||
phone: string;
|
||||
email: string;
|
||||
gender: string;
|
||||
description: string;
|
||||
avatar_url: string;
|
||||
doctor_id: string;
|
||||
education: string;
|
||||
experience: string;
|
||||
award: string;
|
||||
active: boolean | number;
|
||||
organizations?: Organizations[];
|
||||
specialities?: Specialities[];
|
||||
};
|
||||
36
frontend/hospital-portal/src/@types/invoice.ts
Executable file
@@ -0,0 +1,36 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type InvoiceAddress = {
|
||||
id: string;
|
||||
name: string;
|
||||
address: string;
|
||||
company: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
};
|
||||
|
||||
export type InvoiceItem = {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
quantity: number;
|
||||
price: number;
|
||||
total: number;
|
||||
service: string;
|
||||
};
|
||||
|
||||
export type Invoice = {
|
||||
id: string;
|
||||
sent: number;
|
||||
status: string;
|
||||
totalPrice: number;
|
||||
invoiceNumber: string;
|
||||
subTotalPrice: number;
|
||||
taxes: number | string;
|
||||
discount: number | string;
|
||||
invoiceFrom: InvoiceAddress;
|
||||
invoiceTo: InvoiceAddress;
|
||||
createDate: Date | number;
|
||||
dueDate: Date | number;
|
||||
items: InvoiceItem[];
|
||||
};
|
||||
37
frontend/hospital-portal/src/@types/kanban.ts
Executable file
@@ -0,0 +1,37 @@
|
||||
export type CardComment = {
|
||||
id: string;
|
||||
avatar: string;
|
||||
name: string;
|
||||
createdAt: Date | string | number;
|
||||
messageType: 'image' | 'text';
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type Assignee = {
|
||||
id: string;
|
||||
avatar: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type KanbanCard = {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
assignee: Assignee[];
|
||||
due: [number | null, number | null];
|
||||
attachments: string[];
|
||||
comments: CardComment[];
|
||||
completed: boolean;
|
||||
};
|
||||
|
||||
export type KanbanColumn = {
|
||||
id: string;
|
||||
name: string;
|
||||
cardIds: string[];
|
||||
};
|
||||
|
||||
export type KanbanBoard = {
|
||||
cards: KanbanCard[];
|
||||
columns: KanbanColumn[];
|
||||
columnOrder: string[];
|
||||
};
|
||||
45
frontend/hospital-portal/src/@types/mail.ts
Executable file
@@ -0,0 +1,45 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type MailLabelId =
|
||||
| 'all'
|
||||
| 'inbox'
|
||||
| 'sent'
|
||||
| 'drafts'
|
||||
| 'trash'
|
||||
| 'spam'
|
||||
| 'important'
|
||||
| 'starred'
|
||||
| 'id_social'
|
||||
| 'id_promotions'
|
||||
| 'id_forums';
|
||||
|
||||
export type MailLabel = {
|
||||
id: MailLabelId;
|
||||
type: string;
|
||||
name: string;
|
||||
unreadCount: number;
|
||||
color?: string;
|
||||
};
|
||||
|
||||
export type Mail = {
|
||||
id: string;
|
||||
labelIds: string[];
|
||||
folder: string | undefined;
|
||||
isImportant: boolean;
|
||||
isStarred: boolean;
|
||||
isUnread: boolean;
|
||||
subject: string;
|
||||
message: string;
|
||||
createdAt: Date | string | number;
|
||||
files: string[];
|
||||
from: {
|
||||
name: string;
|
||||
email: string;
|
||||
avatar: null | string;
|
||||
};
|
||||
to: {
|
||||
name: string;
|
||||
email: string;
|
||||
avatar: null | string;
|
||||
}[];
|
||||
};
|
||||
21
frontend/hospital-portal/src/@types/member.ts
Executable file
@@ -0,0 +1,21 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type Member = {
|
||||
id: string,
|
||||
member_id: string,
|
||||
record_type: string,
|
||||
payor_id: string,
|
||||
user_id: string,
|
||||
name_prefix: string,
|
||||
name: string,
|
||||
name_suffix: string,
|
||||
birth_date: string,
|
||||
gender: string,
|
||||
language: string,
|
||||
race: string,
|
||||
marital_status: string,
|
||||
principal_id: string,
|
||||
relation_with_principal: string,
|
||||
bpjs_class: string,
|
||||
active: string,
|
||||
};
|
||||
51
frontend/hospital-portal/src/@types/organization.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
export type Organizations = {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
address: string;
|
||||
type: string;
|
||||
lat: string;
|
||||
lng: string;
|
||||
phone: string;
|
||||
timezone: string;
|
||||
active: boolean | number;
|
||||
province_id: number;
|
||||
city_id: number;
|
||||
district_id: number;
|
||||
village_id: number;
|
||||
postal_code: string;
|
||||
description: string;
|
||||
technology: string;
|
||||
support_services: string;
|
||||
merchant_code: string;
|
||||
merchant_key: string;
|
||||
image_url: string;
|
||||
region_groups: string;
|
||||
};
|
||||
|
||||
export type Provinces = {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
};
|
||||
|
||||
export type Cities = {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
province_id: number;
|
||||
};
|
||||
|
||||
export type Districts = {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
city_id: number;
|
||||
};
|
||||
|
||||
export type Villages = {
|
||||
id: number;
|
||||
name: string;
|
||||
code: string;
|
||||
district_id: number;
|
||||
};
|
||||
29
frontend/hospital-portal/src/@types/paginated-data.ts
Executable file
@@ -0,0 +1,29 @@
|
||||
export type LaravelPaginatedData = {
|
||||
current_page: number;
|
||||
data: any[];
|
||||
path: string;
|
||||
first_page_url: string;
|
||||
last_page: number;
|
||||
last_page_url: string;
|
||||
next_page_url?: string;
|
||||
prev_page_url?: string;
|
||||
per_page: number;
|
||||
from?: number;
|
||||
to?: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export const LaravelPaginatedDataDefault = {
|
||||
current_page: 1,
|
||||
data: [],
|
||||
path: "",
|
||||
first_page_url: "",
|
||||
last_page: 1,
|
||||
last_page_url: "",
|
||||
next_page_url: "",
|
||||
prev_page_url: "",
|
||||
per_page: 10,
|
||||
from: 0,
|
||||
to: 0,
|
||||
total: 0
|
||||
}
|
||||
126
frontend/hospital-portal/src/@types/product.ts
Executable file
@@ -0,0 +1,126 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type PaymentType = 'paypal' | 'credit_card' | 'cash';
|
||||
|
||||
export type ProductStatus = 'sale' | 'new' | '';
|
||||
|
||||
export type ProductInventoryType = 'in_stock' | 'out_of_stock' | 'low_stock';
|
||||
|
||||
export type ProductCategory = 'Accessories' | 'Apparel' | 'Shoes' | string;
|
||||
|
||||
export type ProductGender = 'Men' | 'Women' | 'Kids' | string;
|
||||
|
||||
export type OnCreateBilling = (address: BillingAddress) => void;
|
||||
|
||||
export type ProductRating = {
|
||||
name: string;
|
||||
starCount: number;
|
||||
reviewCount: number;
|
||||
};
|
||||
|
||||
export type ProductReview = {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
comment: string;
|
||||
rating: number;
|
||||
isPurchased: boolean;
|
||||
helpful: number;
|
||||
postedAt: Date | string | number;
|
||||
};
|
||||
|
||||
export type Product = {
|
||||
id: string;
|
||||
cover: string;
|
||||
images: string[];
|
||||
name: string;
|
||||
price: number;
|
||||
code: string;
|
||||
sku: string;
|
||||
tags: string[];
|
||||
priceSale: number | null;
|
||||
totalRating: number;
|
||||
totalReview: number;
|
||||
ratings: ProductRating[];
|
||||
reviews: ProductReview[];
|
||||
colors: string[];
|
||||
status: ProductStatus;
|
||||
inventoryType: ProductInventoryType;
|
||||
sizes: string[];
|
||||
available: number;
|
||||
description: string;
|
||||
sold: number;
|
||||
createdAt: Date | string | number;
|
||||
category: ProductCategory;
|
||||
gender: ProductGender;
|
||||
};
|
||||
|
||||
export type CartItem = {
|
||||
id: string;
|
||||
name: string;
|
||||
cover: string;
|
||||
available: number;
|
||||
price: number;
|
||||
color: string;
|
||||
size: string;
|
||||
quantity: number;
|
||||
subtotal: number;
|
||||
};
|
||||
|
||||
export type BillingAddress = {
|
||||
receiver: string;
|
||||
phone: string;
|
||||
fullAddress: string;
|
||||
addressType: string;
|
||||
isDefault: boolean;
|
||||
};
|
||||
|
||||
export type ProductState = {
|
||||
isLoading: boolean;
|
||||
error: Error | string | null;
|
||||
products: Product[];
|
||||
product: Product | null;
|
||||
sortBy: string | null;
|
||||
filters: {
|
||||
gender: string[];
|
||||
category: string;
|
||||
colors: string[];
|
||||
priceRange: string;
|
||||
rating: string;
|
||||
};
|
||||
checkout: {
|
||||
activeStep: number;
|
||||
cart: CartItem[];
|
||||
subtotal: number;
|
||||
total: number;
|
||||
discount: number;
|
||||
shipping: number;
|
||||
billing: BillingAddress | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type ProductFilter = {
|
||||
gender: string[];
|
||||
category: string;
|
||||
colors: string[];
|
||||
priceRange: string;
|
||||
rating: string;
|
||||
};
|
||||
|
||||
export type DeliveryOption = {
|
||||
value: number;
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
|
||||
export type PaymentOption = {
|
||||
value: PaymentType;
|
||||
title: string;
|
||||
description: string;
|
||||
icons: string[];
|
||||
};
|
||||
|
||||
export type CardOption = {
|
||||
value: string;
|
||||
label: string;
|
||||
};
|
||||
128
frontend/hospital-portal/src/@types/user.ts
Executable file
@@ -0,0 +1,128 @@
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export type UserInvoice = {
|
||||
id: string;
|
||||
createdAt: Date | string | number;
|
||||
price: number;
|
||||
};
|
||||
|
||||
export type CreditCard = {
|
||||
id: string;
|
||||
cardNumber: string;
|
||||
cardType: string;
|
||||
};
|
||||
|
||||
export type Follower = {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
name: string;
|
||||
country: string;
|
||||
isFollowed: boolean;
|
||||
};
|
||||
|
||||
export type Gallery = {
|
||||
id: string;
|
||||
title: string;
|
||||
postAt: Date | string | number;
|
||||
imageUrl: string;
|
||||
};
|
||||
|
||||
export type UserAddressBook = {
|
||||
id: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
country: string;
|
||||
state: string;
|
||||
city: string;
|
||||
street: string;
|
||||
zipCode: string;
|
||||
};
|
||||
|
||||
export type Profile = {
|
||||
id: string;
|
||||
cover: string;
|
||||
position: string;
|
||||
follower: number;
|
||||
following: number;
|
||||
quote: string;
|
||||
country: string;
|
||||
email: string;
|
||||
company: string;
|
||||
school: string;
|
||||
role: string;
|
||||
facebookLink: string;
|
||||
instagramLink: string;
|
||||
linkedinLink: string;
|
||||
twitterLink: string;
|
||||
};
|
||||
|
||||
export type UserManager = {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
name: string;
|
||||
email: string;
|
||||
phoneNumber: string;
|
||||
address: string;
|
||||
country: string;
|
||||
state: string;
|
||||
city: string;
|
||||
zipCode: string;
|
||||
company: string;
|
||||
isVerified: boolean;
|
||||
status: string;
|
||||
role: string;
|
||||
};
|
||||
|
||||
export type UserData = {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
cover: string;
|
||||
name: string;
|
||||
follower: number;
|
||||
following: number;
|
||||
totalPost: number;
|
||||
position: string;
|
||||
};
|
||||
|
||||
export type NotificationSettings = {
|
||||
activityComments: boolean;
|
||||
activityAnswers: boolean;
|
||||
activityFollows: boolean;
|
||||
applicationNews: boolean;
|
||||
applicationProduct: boolean;
|
||||
applicationBlog: boolean;
|
||||
};
|
||||
|
||||
export type Friend = {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
name: string;
|
||||
role: string;
|
||||
};
|
||||
|
||||
export type UserPost = {
|
||||
id: string;
|
||||
author: {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
name: string;
|
||||
};
|
||||
isLiked: boolean;
|
||||
createdAt: Date | string | number;
|
||||
media: string;
|
||||
message: string;
|
||||
personLikes: {
|
||||
name: string;
|
||||
avatarUrl: string;
|
||||
}[];
|
||||
comments: {
|
||||
id: string;
|
||||
author: {
|
||||
id: string;
|
||||
avatarUrl: string;
|
||||
name: string;
|
||||
};
|
||||
createdAt: Date | string | number;
|
||||
message: string;
|
||||
}[];
|
||||
};
|
||||
33
frontend/hospital-portal/src/App.tsx
Executable file
@@ -0,0 +1,33 @@
|
||||
// routes
|
||||
import Router from './routes';
|
||||
// theme
|
||||
import ThemeProvider from './theme';
|
||||
// components
|
||||
import Settings from './components/settings';
|
||||
import RtlLayout from './components/RtlLayout';
|
||||
import ScrollToTop from './components/ScrollToTop';
|
||||
import { ProgressBarStyle } from './components/ProgressBar';
|
||||
import ThemeColorPresets from './components/ThemeColorPresets';
|
||||
import MotionLazyContainer from './components/animate/MotionLazyContainer';
|
||||
import { SnackbarProvider } from 'notistack';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<SnackbarProvider>
|
||||
<ThemeColorPresets>
|
||||
<RtlLayout>
|
||||
<MotionLazyContainer>
|
||||
<ProgressBarStyle />
|
||||
{/* <Settings /> */}
|
||||
<ScrollToTop />
|
||||
<Router />
|
||||
</MotionLazyContainer>
|
||||
</RtlLayout>
|
||||
</ThemeColorPresets>
|
||||
</SnackbarProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
50
frontend/hospital-portal/src/_mock/_analytics.tsx
Executable file
@@ -0,0 +1,50 @@
|
||||
// components
|
||||
import Iconify from '../components/Iconify';
|
||||
//
|
||||
import _mock from './_mock';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _analyticPost = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: _mock.text.title(index),
|
||||
description: _mock.text.description(index),
|
||||
image: _mock.image.cover(index),
|
||||
postedAt: _mock.time(index),
|
||||
}));
|
||||
|
||||
export const _analyticOrderTimeline = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: [
|
||||
'1983, orders, $4220',
|
||||
'12 Invoices have been paid',
|
||||
'Order #37745 from September',
|
||||
'New order placed #XF-2356',
|
||||
'New order placed #XF-2346',
|
||||
][index],
|
||||
type: `order${index + 1}`,
|
||||
time: _mock.time(index),
|
||||
}));
|
||||
|
||||
export const _analyticTraffic = [
|
||||
{
|
||||
name: 'FaceBook',
|
||||
value: 323234,
|
||||
icon: <Iconify icon={'eva:facebook-fill'} color="#1877F2" width={32} height={32} />,
|
||||
},
|
||||
{
|
||||
name: 'Google',
|
||||
value: 341212,
|
||||
icon: <Iconify icon={'eva:google-fill'} color="#DF3E30" width={32} height={32} />,
|
||||
},
|
||||
{
|
||||
name: 'Linkedin',
|
||||
value: 411213,
|
||||
icon: <Iconify icon={'eva:linkedin-fill'} color="#006097" width={32} height={32} />,
|
||||
},
|
||||
{
|
||||
name: 'Twitter',
|
||||
value: 443232,
|
||||
icon: <Iconify icon={'eva:twitter-fill'} color="#1C9CEA" width={32} height={32} />,
|
||||
},
|
||||
];
|
||||
52
frontend/hospital-portal/src/_mock/_app.ts
Executable file
@@ -0,0 +1,52 @@
|
||||
import { noCase } from 'change-case';
|
||||
// _mock
|
||||
import _mock from './_mock';
|
||||
import { randomNumberRange, randomInArray } from './funcs';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _appRelated = ['Chrome', 'Drive', 'Dropbox', 'Evernote', 'Github'].map(
|
||||
(appName, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: appName,
|
||||
system: (index === 2 && 'Windows') || (index === 4 && 'Windows') || 'Mac',
|
||||
price: index === 0 || index === 2 || index === 4 ? 0 : _mock.number.price(index),
|
||||
rating: _mock.number.rating(index),
|
||||
review: randomNumberRange(999, 99999),
|
||||
shortcut: `https://minimal-assets-api.vercel.app/assets/icons/ic_${noCase(appName)}.svg`,
|
||||
})
|
||||
);
|
||||
|
||||
export const _appInstalled = ['de', 'en', 'fr', 'kr', 'us'].map((country, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: ['Germany', 'England', 'France', 'Korean', 'USA'][index],
|
||||
android: randomNumberRange(999, 99999),
|
||||
windows: randomNumberRange(999, 99999),
|
||||
apple: randomNumberRange(999, 99999),
|
||||
flag: `https://minimal-assets-api.vercel.app/assets/icons/ic_flag_${country}.svg`,
|
||||
}));
|
||||
|
||||
export const _appAuthors = [...Array(3)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
favourite: randomNumberRange(9999, 19999),
|
||||
}));
|
||||
|
||||
export const _appInvoices = [...Array(5)].map((_, index) => ({
|
||||
id: `${Date.now() + index}`,
|
||||
price: _mock.number.price(index),
|
||||
category: randomInArray(['Android', 'Mac', 'Windows']),
|
||||
status: randomInArray(['paid', 'out_of_date', 'in_progress']),
|
||||
}));
|
||||
|
||||
export const _appFeatured = [...Array(3)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: [
|
||||
'Harry Potter and the Deathly Hallows - Part 2',
|
||||
'Disney Zombies 2',
|
||||
'Lightroom mobile - Koloro',
|
||||
][index],
|
||||
description: _mock.text.title(index),
|
||||
image: _mock.image.feed(index),
|
||||
}));
|
||||
102
frontend/hospital-portal/src/_mock/_banking.ts
Executable file
@@ -0,0 +1,102 @@
|
||||
import _mock from './_mock';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _bankingContacts = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
email: _mock.email(index),
|
||||
avatar: _mock.image.avatar(index + 4),
|
||||
}));
|
||||
|
||||
export const _bankingQuickTransfer = [...Array(12)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
email: _mock.email(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
}));
|
||||
|
||||
export const _bankingCreditCard = [
|
||||
{
|
||||
id: _mock.id(2),
|
||||
balance: 23432.03,
|
||||
cardType: 'mastercard',
|
||||
cardHolder: _mock.name.fullName(2),
|
||||
cardNumber: '**** **** **** 3640',
|
||||
cardValid: '11/22',
|
||||
},
|
||||
{
|
||||
id: _mock.id(3),
|
||||
balance: 18000.23,
|
||||
cardType: 'visa',
|
||||
cardHolder: _mock.name.fullName(3),
|
||||
cardNumber: '**** **** **** 8864',
|
||||
cardValid: '11/25',
|
||||
},
|
||||
{
|
||||
id: _mock.id(4),
|
||||
balance: 2000.89,
|
||||
cardType: 'mastercard',
|
||||
cardHolder: _mock.name.fullName(4),
|
||||
cardNumber: '**** **** **** 7755',
|
||||
cardValid: '11/22',
|
||||
},
|
||||
];
|
||||
|
||||
export const _bankingRecentTransitions = [
|
||||
{
|
||||
id: _mock.id(2),
|
||||
name: _mock.name.fullName(2),
|
||||
avatar: _mock.image.avatar(8),
|
||||
type: 'Income',
|
||||
message: 'Receive money from',
|
||||
category: 'Annette Black',
|
||||
date: 1627556358365,
|
||||
status: 'in_progress',
|
||||
amount: 811.45,
|
||||
},
|
||||
{
|
||||
id: _mock.id(3),
|
||||
name: _mock.name.fullName(3),
|
||||
avatar: _mock.image.avatar(9),
|
||||
type: 'Expenses',
|
||||
message: 'Payment for',
|
||||
category: 'Courtney Henry',
|
||||
date: 1627556329038,
|
||||
status: 'completed',
|
||||
amount: 436.03,
|
||||
},
|
||||
{
|
||||
id: _mock.id(4),
|
||||
name: _mock.name.fullName(4),
|
||||
avatar: _mock.image.avatar(12),
|
||||
type: 'Receive',
|
||||
message: 'Payment for',
|
||||
category: 'Theresa Webb',
|
||||
date: 1627556339677,
|
||||
status: 'failed',
|
||||
amount: 82.26,
|
||||
},
|
||||
{
|
||||
id: _mock.id(5),
|
||||
name: null,
|
||||
avatar: null,
|
||||
type: 'Expenses',
|
||||
message: 'Payment for',
|
||||
category: 'Beauty & Health',
|
||||
date: 1627547330510,
|
||||
status: 'completed',
|
||||
amount: 480.73,
|
||||
},
|
||||
{
|
||||
id: _mock.id(6),
|
||||
name: null,
|
||||
avatar: null,
|
||||
type: 'Expenses',
|
||||
message: 'Payment for',
|
||||
category: 'Books',
|
||||
date: 1627556347676,
|
||||
status: 'in_progress',
|
||||
amount: 11.45,
|
||||
},
|
||||
];
|
||||
42
frontend/hospital-portal/src/_mock/_booking.ts
Executable file
@@ -0,0 +1,42 @@
|
||||
import _mock from './_mock';
|
||||
import { randomInArray } from './funcs';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _bookings = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
checkIn: _mock.time(index),
|
||||
checkOut: _mock.time(index),
|
||||
phoneNumber: _mock.phoneNumber(index),
|
||||
status: randomInArray(['pending', 'un_paid', 'paid']),
|
||||
roomType: randomInArray(['double', 'king', 'single']),
|
||||
}));
|
||||
|
||||
export const _bookingsOverview = [...Array(3)].map((_, index) => ({
|
||||
status: ['Pending', 'Cancel', 'Done'][index],
|
||||
quantity: _mock.number.percent(index) * 1000,
|
||||
value: _mock.number.percent(index),
|
||||
}));
|
||||
|
||||
export const _bookingReview = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
description: _mock.text.description(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
rating: _mock.number.rating(index),
|
||||
postedAt: _mock.time(index),
|
||||
tags: ['Great Sevice', 'Recommended', 'Best Price'],
|
||||
}));
|
||||
|
||||
export const _bookingNew = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
bookdAt: _mock.time(index),
|
||||
roomNumber: 'A-21',
|
||||
roomType: randomInArray(['double', 'king', 'single']),
|
||||
person: '3-5',
|
||||
cover: `https://minimal-assets-api.vercel.app/assets/images/rooms/room-${index + 1}.jpg`,
|
||||
}));
|
||||
258
frontend/hospital-portal/src/_mock/_countries.ts
Executable file
@@ -0,0 +1,258 @@
|
||||
export const countries = [
|
||||
{ code: 'AD', label: 'Andorra', phone: '376' },
|
||||
{ code: 'AE', label: 'United Arab Emirates', phone: '971' },
|
||||
{ code: 'AF', label: 'Afghanistan', phone: '93' },
|
||||
{ code: 'AG', label: 'Antigua and Barbuda', phone: '1-268' },
|
||||
{ code: 'AI', label: 'Anguilla', phone: '1-264' },
|
||||
{ code: 'AL', label: 'Albania', phone: '355' },
|
||||
{ code: 'AM', label: 'Armenia', phone: '374' },
|
||||
{ code: 'AO', label: 'Angola', phone: '244' },
|
||||
{ code: 'AQ', label: 'Antarctica', phone: '672' },
|
||||
{ code: 'AR', label: 'Argentina', phone: '54' },
|
||||
{ code: 'AS', label: 'American Samoa', phone: '1-684' },
|
||||
{ code: 'AT', label: 'Austria', phone: '43' },
|
||||
{ code: 'AU', label: 'Australia', phone: '61' },
|
||||
{ code: 'AW', label: 'Aruba', phone: '297' },
|
||||
{ code: 'AX', label: 'Alland Islands', phone: '358' },
|
||||
{ code: 'AZ', label: 'Azerbaijan', phone: '994' },
|
||||
{ code: 'BA', label: 'Bosnia and Herzegovina', phone: '387' },
|
||||
{ code: 'BB', label: 'Barbados', phone: '1-246' },
|
||||
{ code: 'BD', label: 'Bangladesh', phone: '880' },
|
||||
{ code: 'BE', label: 'Belgium', phone: '32' },
|
||||
{ code: 'BF', label: 'Burkina Faso', phone: '226' },
|
||||
{ code: 'BG', label: 'Bulgaria', phone: '359' },
|
||||
{ code: 'BH', label: 'Bahrain', phone: '973' },
|
||||
{ code: 'BI', label: 'Burundi', phone: '257' },
|
||||
{ code: 'BJ', label: 'Benin', phone: '229' },
|
||||
{ code: 'BL', label: 'Saint Barthelemy', phone: '590' },
|
||||
{ code: 'BM', label: 'Bermuda', phone: '1-441' },
|
||||
{ code: 'BN', label: 'Brunei Darussalam', phone: '673' },
|
||||
{ code: 'BO', label: 'Bolivia', phone: '591' },
|
||||
{ code: 'BR', label: 'Brazil', phone: '55' },
|
||||
{ code: 'BS', label: 'Bahamas', phone: '1-242' },
|
||||
{ code: 'BT', label: 'Bhutan', phone: '975' },
|
||||
{ code: 'BV', label: 'Bouvet Island', phone: '47' },
|
||||
{ code: 'BW', label: 'Botswana', phone: '267' },
|
||||
{ code: 'BY', label: 'Belarus', phone: '375' },
|
||||
{ code: 'BZ', label: 'Belize', phone: '501' },
|
||||
{ code: 'CA', label: 'Canada', phone: '1' },
|
||||
{ code: 'CC', label: 'Cocos (Keeling) Islands', phone: '61' },
|
||||
{ code: 'CD', label: 'Congo, Democratic Republic of the', phone: '243' },
|
||||
{ code: 'CF', label: 'Central African Republic', phone: '236' },
|
||||
{ code: 'CG', label: 'Congo, Republic of the', phone: '242' },
|
||||
{ code: 'CH', label: 'Switzerland', phone: '41' },
|
||||
{ code: 'CI', label: "Cote d'Ivoire", phone: '225' },
|
||||
{ code: 'CK', label: 'Cook Islands', phone: '682' },
|
||||
{ code: 'CL', label: 'Chile', phone: '56' },
|
||||
{ code: 'CM', label: 'Cameroon', phone: '237' },
|
||||
{ code: 'CN', label: 'China', phone: '86' },
|
||||
{ code: 'CO', label: 'Colombia', phone: '57' },
|
||||
{ code: 'CR', label: 'Costa Rica', phone: '506' },
|
||||
{ code: 'CU', label: 'Cuba', phone: '53' },
|
||||
{ code: 'CV', label: 'Cape Verde', phone: '238' },
|
||||
{ code: 'CW', label: 'Curacao', phone: '599' },
|
||||
{ code: 'CX', label: 'Christmas Island', phone: '61' },
|
||||
{ code: 'CY', label: 'Cyprus', phone: '357' },
|
||||
{ code: 'CZ', label: 'Czech Republic', phone: '420' },
|
||||
{ code: 'DE', label: 'Germany', phone: '49' },
|
||||
{ code: 'DJ', label: 'Djibouti', phone: '253' },
|
||||
{ code: 'DK', label: 'Denmark', phone: '45' },
|
||||
{ code: 'DM', label: 'Dominica', phone: '1-767' },
|
||||
{ code: 'DO', label: 'Dominican Republic', phone: '1-809' },
|
||||
{ code: 'DZ', label: 'Algeria', phone: '213' },
|
||||
{ code: 'EC', label: 'Ecuador', phone: '593' },
|
||||
{ code: 'EE', label: 'Estonia', phone: '372' },
|
||||
{ code: 'EG', label: 'Egypt', phone: '20' },
|
||||
{ code: 'EH', label: 'Western Sahara', phone: '212' },
|
||||
{ code: 'ER', label: 'Eritrea', phone: '291' },
|
||||
{ code: 'ES', label: 'Spain', phone: '34' },
|
||||
{ code: 'ET', label: 'Ethiopia', phone: '251' },
|
||||
{ code: 'FI', label: 'Finland', phone: '358' },
|
||||
{ code: 'FJ', label: 'Fiji', phone: '679' },
|
||||
{ code: 'FK', label: 'Falkland Islands (Malvinas)', phone: '500' },
|
||||
{ code: 'FM', label: 'Micronesia, Federated States of', phone: '691' },
|
||||
{ code: 'FO', label: 'Faroe Islands', phone: '298' },
|
||||
{ code: 'FR', label: 'France', phone: '33' },
|
||||
{ code: 'GA', label: 'Gabon', phone: '241' },
|
||||
{ code: 'GB', label: 'United Kingdom', phone: '44' },
|
||||
{ code: 'GD', label: 'Grenada', phone: '1-473' },
|
||||
{ code: 'GE', label: 'Georgia', phone: '995' },
|
||||
{ code: 'GF', label: 'French Guiana', phone: '594' },
|
||||
{ code: 'GG', label: 'Guernsey', phone: '44' },
|
||||
{ code: 'GH', label: 'Ghana', phone: '233' },
|
||||
{ code: 'GI', label: 'Gibraltar', phone: '350' },
|
||||
{ code: 'GL', label: 'Greenland', phone: '299' },
|
||||
{ code: 'GM', label: 'Gambia', phone: '220' },
|
||||
{ code: 'GN', label: 'Guinea', phone: '224' },
|
||||
{ code: 'GP', label: 'Guadeloupe', phone: '590' },
|
||||
{ code: 'GQ', label: 'Equatorial Guinea', phone: '240' },
|
||||
{ code: 'GR', label: 'Greece', phone: '30' },
|
||||
{
|
||||
code: 'GS',
|
||||
label: 'South Georgia and the South Sandwich Islands',
|
||||
phone: '500',
|
||||
},
|
||||
{ code: 'GT', label: 'Guatemala', phone: '502' },
|
||||
{ code: 'GU', label: 'Guam', phone: '1-671' },
|
||||
{ code: 'GW', label: 'Guinea-Bissau', phone: '245' },
|
||||
{ code: 'GY', label: 'Guyana', phone: '592' },
|
||||
{ code: 'HK', label: 'Hong Kong', phone: '852' },
|
||||
{ code: 'HM', label: 'Heard Island and McDonald Islands', phone: '672' },
|
||||
{ code: 'HN', label: 'Honduras', phone: '504' },
|
||||
{ code: 'HR', label: 'Croatia', phone: '385' },
|
||||
{ code: 'HT', label: 'Haiti', phone: '509' },
|
||||
{ code: 'HU', label: 'Hungary', phone: '36' },
|
||||
{ code: 'ID', label: 'Indonesia', phone: '62' },
|
||||
{ code: 'IE', label: 'Ireland', phone: '353' },
|
||||
{ code: 'IL', label: 'Israel', phone: '972' },
|
||||
{ code: 'IM', label: 'Isle of Man', phone: '44' },
|
||||
{ code: 'IN', label: 'India', phone: '91' },
|
||||
{ code: 'IO', label: 'British Indian Ocean Territory', phone: '246' },
|
||||
{ code: 'IQ', label: 'Iraq', phone: '964' },
|
||||
{ code: 'IR', label: 'Iran, Islamic Republic of', phone: '98' },
|
||||
{ code: 'IS', label: 'Iceland', phone: '354' },
|
||||
{ code: 'IT', label: 'Italy', phone: '39' },
|
||||
{ code: 'JE', label: 'Jersey', phone: '44' },
|
||||
{ code: 'JM', label: 'Jamaica', phone: '1-876' },
|
||||
{ code: 'JO', label: 'Jordan', phone: '962' },
|
||||
{ code: 'JP', label: 'Japan', phone: '81' },
|
||||
{ code: 'KE', label: 'Kenya', phone: '254' },
|
||||
{ code: 'KG', label: 'Kyrgyzstan', phone: '996' },
|
||||
{ code: 'KH', label: 'Cambodia', phone: '855' },
|
||||
{ code: 'KI', label: 'Kiribati', phone: '686' },
|
||||
{ code: 'KM', label: 'Comoros', phone: '269' },
|
||||
{ code: 'KN', label: 'Saint Kitts and Nevis', phone: '1-869' },
|
||||
{ code: 'KP', label: "Korea, Democratic People's Republic of", phone: '850' },
|
||||
{ code: 'KR', label: 'Korea, Republic of', phone: '82' },
|
||||
{ code: 'KW', label: 'Kuwait', phone: '965' },
|
||||
{ code: 'KY', label: 'Cayman Islands', phone: '1-345' },
|
||||
{ code: 'KZ', label: 'Kazakhstan', phone: '7' },
|
||||
{ code: 'LA', label: "Lao People's Democratic Republic", phone: '856' },
|
||||
{ code: 'LB', label: 'Lebanon', phone: '961' },
|
||||
{ code: 'LC', label: 'Saint Lucia', phone: '1-758' },
|
||||
{ code: 'LI', label: 'Liechtenstein', phone: '423' },
|
||||
{ code: 'LK', label: 'Sri Lanka', phone: '94' },
|
||||
{ code: 'LR', label: 'Liberia', phone: '231' },
|
||||
{ code: 'LS', label: 'Lesotho', phone: '266' },
|
||||
{ code: 'LT', label: 'Lithuania', phone: '370' },
|
||||
{ code: 'LU', label: 'Luxembourg', phone: '352' },
|
||||
{ code: 'LV', label: 'Latvia', phone: '371' },
|
||||
{ code: 'LY', label: 'Libya', phone: '218' },
|
||||
{ code: 'MA', label: 'Morocco', phone: '212' },
|
||||
{ code: 'MC', label: 'Monaco', phone: '377' },
|
||||
{ code: 'MD', label: 'Moldova, Republic of', phone: '373' },
|
||||
{ code: 'ME', label: 'Montenegro', phone: '382' },
|
||||
{ code: 'MF', label: 'Saint Martin (French part)', phone: '590' },
|
||||
{ code: 'MG', label: 'Madagascar', phone: '261' },
|
||||
{ code: 'MH', label: 'Marshall Islands', phone: '692' },
|
||||
{
|
||||
code: 'MK',
|
||||
label: 'Macedonia, the Former Yugoslav Republic of',
|
||||
phone: '389',
|
||||
},
|
||||
{ code: 'ML', label: 'Mali', phone: '223' },
|
||||
{ code: 'MM', label: 'Myanmar', phone: '95' },
|
||||
{ code: 'MN', label: 'Mongolia', phone: '976' },
|
||||
{ code: 'MO', label: 'Macao', phone: '853' },
|
||||
{ code: 'MP', label: 'Northern Mariana Islands', phone: '1-670' },
|
||||
{ code: 'MQ', label: 'Martinique', phone: '596' },
|
||||
{ code: 'MR', label: 'Mauritania', phone: '222' },
|
||||
{ code: 'MS', label: 'Montserrat', phone: '1-664' },
|
||||
{ code: 'MT', label: 'Malta', phone: '356' },
|
||||
{ code: 'MU', label: 'Mauritius', phone: '230' },
|
||||
{ code: 'MV', label: 'Maldives', phone: '960' },
|
||||
{ code: 'MW', label: 'Malawi', phone: '265' },
|
||||
{ code: 'MX', label: 'Mexico', phone: '52' },
|
||||
{ code: 'MY', label: 'Malaysia', phone: '60' },
|
||||
{ code: 'MZ', label: 'Mozambique', phone: '258' },
|
||||
{ code: 'NA', label: 'Namibia', phone: '264' },
|
||||
{ code: 'NC', label: 'New Caledonia', phone: '687' },
|
||||
{ code: 'NE', label: 'Niger', phone: '227' },
|
||||
{ code: 'NF', label: 'Norfolk Island', phone: '672' },
|
||||
{ code: 'NG', label: 'Nigeria', phone: '234' },
|
||||
{ code: 'NI', label: 'Nicaragua', phone: '505' },
|
||||
{ code: 'NL', label: 'Netherlands', phone: '31' },
|
||||
{ code: 'NO', label: 'Norway', phone: '47' },
|
||||
{ code: 'NP', label: 'Nepal', phone: '977' },
|
||||
{ code: 'NR', label: 'Nauru', phone: '674' },
|
||||
{ code: 'NU', label: 'Niue', phone: '683' },
|
||||
{ code: 'NZ', label: 'New Zealand', phone: '64' },
|
||||
{ code: 'OM', label: 'Oman', phone: '968' },
|
||||
{ code: 'PA', label: 'Panama', phone: '507' },
|
||||
{ code: 'PE', label: 'Peru', phone: '51' },
|
||||
{ code: 'PF', label: 'French Polynesia', phone: '689' },
|
||||
{ code: 'PG', label: 'Papua New Guinea', phone: '675' },
|
||||
{ code: 'PH', label: 'Philippines', phone: '63' },
|
||||
{ code: 'PK', label: 'Pakistan', phone: '92' },
|
||||
{ code: 'PL', label: 'Poland', phone: '48' },
|
||||
{ code: 'PM', label: 'Saint Pierre and Miquelon', phone: '508' },
|
||||
{ code: 'PN', label: 'Pitcairn', phone: '870' },
|
||||
{ code: 'PR', label: 'Puerto Rico', phone: '1' },
|
||||
{ code: 'PS', label: 'Palestine, State of', phone: '970' },
|
||||
{ code: 'PT', label: 'Portugal', phone: '351' },
|
||||
{ code: 'PW', label: 'Palau', phone: '680' },
|
||||
{ code: 'PY', label: 'Paraguay', phone: '595' },
|
||||
{ code: 'QA', label: 'Qatar', phone: '974' },
|
||||
{ code: 'RE', label: 'Reunion', phone: '262' },
|
||||
{ code: 'RO', label: 'Romania', phone: '40' },
|
||||
{ code: 'RS', label: 'Serbia', phone: '381' },
|
||||
{ code: 'RU', label: 'Russian Federation', phone: '7' },
|
||||
{ code: 'RW', label: 'Rwanda', phone: '250' },
|
||||
{ code: 'SA', label: 'Saudi Arabia', phone: '966' },
|
||||
{ code: 'SB', label: 'Solomon Islands', phone: '677' },
|
||||
{ code: 'SC', label: 'Seychelles', phone: '248' },
|
||||
{ code: 'SD', label: 'Sudan', phone: '249' },
|
||||
{ code: 'SE', label: 'Sweden', phone: '46' },
|
||||
{ code: 'SG', label: 'Singapore', phone: '65' },
|
||||
{ code: 'SH', label: 'Saint Helena', phone: '290' },
|
||||
{ code: 'SI', label: 'Slovenia', phone: '386' },
|
||||
{ code: 'SJ', label: 'Svalbard and Jan Mayen', phone: '47' },
|
||||
{ code: 'SK', label: 'Slovakia', phone: '421' },
|
||||
{ code: 'SL', label: 'Sierra Leone', phone: '232' },
|
||||
{ code: 'SM', label: 'San Marino', phone: '378' },
|
||||
{ code: 'SN', label: 'Senegal', phone: '221' },
|
||||
{ code: 'SO', label: 'Somalia', phone: '252' },
|
||||
{ code: 'SR', label: 'Suriname', phone: '597' },
|
||||
{ code: 'SS', label: 'South Sudan', phone: '211' },
|
||||
{ code: 'ST', label: 'Sao Tome and Principe', phone: '239' },
|
||||
{ code: 'SV', label: 'El Salvador', phone: '503' },
|
||||
{ code: 'SX', label: 'Sint Maarten (Dutch part)', phone: '1-721' },
|
||||
{ code: 'SY', label: 'Syrian Arab Republic', phone: '963' },
|
||||
{ code: 'SZ', label: 'Swaziland', phone: '268' },
|
||||
{ code: 'TC', label: 'Turks and Caicos Islands', phone: '1-649' },
|
||||
{ code: 'TD', label: 'Chad', phone: '235' },
|
||||
{ code: 'TF', label: 'French Southern Territories', phone: '262' },
|
||||
{ code: 'TG', label: 'Togo', phone: '228' },
|
||||
{ code: 'TH', label: 'Thailand', phone: '66' },
|
||||
{ code: 'TJ', label: 'Tajikistan', phone: '992' },
|
||||
{ code: 'TK', label: 'Tokelau', phone: '690' },
|
||||
{ code: 'TL', label: 'Timor-Leste', phone: '670' },
|
||||
{ code: 'TM', label: 'Turkmenistan', phone: '993' },
|
||||
{ code: 'TN', label: 'Tunisia', phone: '216' },
|
||||
{ code: 'TO', label: 'Tonga', phone: '676' },
|
||||
{ code: 'TR', label: 'Turkey', phone: '90' },
|
||||
{ code: 'TT', label: 'Trinidad and Tobago', phone: '1-868' },
|
||||
{ code: 'TV', label: 'Tuvalu', phone: '688' },
|
||||
{ code: 'TW', label: 'Taiwan, Province of China', phone: '886' },
|
||||
{ code: 'TZ', label: 'United Republic of Tanzania', phone: '255' },
|
||||
{ code: 'UA', label: 'Ukraine', phone: '380' },
|
||||
{ code: 'UG', label: 'Uganda', phone: '256' },
|
||||
{ code: 'US', label: 'United States', phone: '1' },
|
||||
{ code: 'UY', label: 'Uruguay', phone: '598' },
|
||||
{ code: 'UZ', label: 'Uzbekistan', phone: '998' },
|
||||
{ code: 'VA', label: 'Holy See (Vatican City State)', phone: '379' },
|
||||
{ code: 'VC', label: 'Saint Vincent and the Grenadines', phone: '1-784' },
|
||||
{ code: 'VE', label: 'Venezuela', phone: '58' },
|
||||
{ code: 'VG', label: 'British Virgin Islands', phone: '1-284' },
|
||||
{ code: 'VI', label: 'US Virgin Islands', phone: '1-340' },
|
||||
{ code: 'VN', label: 'Vietnam', phone: '84' },
|
||||
{ code: 'VU', label: 'Vanuatu', phone: '678' },
|
||||
{ code: 'WF', label: 'Wallis and Futuna', phone: '681' },
|
||||
{ code: 'WS', label: 'Samoa', phone: '685' },
|
||||
{ code: 'XK', label: 'Kosovo', phone: '383' },
|
||||
{ code: 'YE', label: 'Yemen', phone: '967' },
|
||||
{ code: 'YT', label: 'Mayotte', phone: '262' },
|
||||
{ code: 'ZA', label: 'South Africa', phone: '27' },
|
||||
{ code: 'ZM', label: 'Zambia', phone: '260' },
|
||||
{ code: 'ZW', label: 'Zimbabwe', phone: '263' },
|
||||
];
|
||||
56
frontend/hospital-portal/src/_mock/_ecommerce.ts
Executable file
@@ -0,0 +1,56 @@
|
||||
import _mock from './_mock';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const COUNTRY = ['de', 'en', 'fr', 'kr', 'us'];
|
||||
|
||||
const CATEGORY = ['CAP', 'Branded Shoes', 'Headphone', 'Cell Phone', 'Earings'];
|
||||
|
||||
const PRODUCT_NAME = [
|
||||
'Small Granite Computer',
|
||||
'Small Rubber Mouse',
|
||||
'Awesome Rubber Hat',
|
||||
'Sleek Cotton Sausages',
|
||||
'Rustic Wooden Chicken',
|
||||
];
|
||||
|
||||
export const _ecommerceSalesOverview = [...Array(3)].map((_, index) => ({
|
||||
label: ['Total Profit', 'Total Income', 'Total Expenses'][index],
|
||||
amount: _mock.number.price(index) * 100,
|
||||
value: _mock.number.percent(index),
|
||||
}));
|
||||
|
||||
export const _ecommerceBestSalesman = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
email: _mock.email(index),
|
||||
avatar: _mock.image.avatar(index + 8),
|
||||
category: CATEGORY[index],
|
||||
flag: `https://minimal-assets-api.vercel.app/assets/icons/ic_flag_${COUNTRY[index]}.svg`,
|
||||
total: _mock.number.price(index),
|
||||
rank: `Top ${index + 1}`,
|
||||
}));
|
||||
|
||||
export const _ecommerceLatestProducts = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: PRODUCT_NAME[index],
|
||||
image: _mock.image.product(index),
|
||||
price: _mock.number.price(index),
|
||||
priceSale: index === 0 || index === 3 ? 0 : _mock.number.price(index),
|
||||
colors: (index === 0 && ['#2EC4B6', '#E71D36', '#FF9F1C', '#011627']) ||
|
||||
(index === 1 && ['#92140C', '#FFCF99']) ||
|
||||
(index === 2 && ['#0CECDD', '#FFF338', '#FF67E7', '#C400FF', '#52006A', '#046582']) ||
|
||||
(index === 3 && ['#845EC2', '#E4007C', '#2A1A5E']) || ['#090088'],
|
||||
}));
|
||||
|
||||
export const _ecommerceNewProducts = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: [
|
||||
'Nike Air Max 97',
|
||||
'Nike Zoom Gravity',
|
||||
'Nike DBreak-Type',
|
||||
'Kyrie Flytrap 3 EP Basketball Shoe',
|
||||
'Nike Air Max Fusion Men',
|
||||
][index],
|
||||
image: _mock.image.product(index),
|
||||
}));
|
||||
55
frontend/hospital-portal/src/_mock/_mock.ts
Executable file
@@ -0,0 +1,55 @@
|
||||
import { sub } from 'date-fns';
|
||||
//
|
||||
import { role } from './role';
|
||||
import { email } from './email';
|
||||
import { boolean } from './boolean';
|
||||
import { company } from './company';
|
||||
import { phoneNumber } from './phoneNumber';
|
||||
import { fullAddress, country } from './address';
|
||||
import { firstName, lastName, fullName } from './name';
|
||||
import { title, sentence, description } from './text';
|
||||
import { price, rating, age, percent } from './number';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const _mock = {
|
||||
id: (index: number) => `e99f09a7-dd88-49d5-b1c8-1daf80c2d7b${index + 1}`,
|
||||
email: (index: number) => email[index],
|
||||
phoneNumber: (index: number) => phoneNumber[index],
|
||||
time: (index: number) => sub(new Date(), { days: index, hours: index }),
|
||||
boolean: (index: number) => boolean[index],
|
||||
role: (index: number) => role[index],
|
||||
company: (index: number) => company[index],
|
||||
address: {
|
||||
fullAddress: (index: number) => fullAddress[index],
|
||||
country: (index: number) => country[index],
|
||||
},
|
||||
name: {
|
||||
firstName: (index: number) => firstName[index],
|
||||
lastName: (index: number) => lastName[index],
|
||||
fullName: (index: number) => fullName[index],
|
||||
},
|
||||
text: {
|
||||
title: (index: number) => title[index],
|
||||
sentence: (index: number) => sentence[index],
|
||||
description: (index: number) => description[index],
|
||||
},
|
||||
number: {
|
||||
percent: (index: number) => percent[index],
|
||||
rating: (index: number) => rating[index],
|
||||
age: (index: number) => age[index],
|
||||
price: (index: number) => price[index],
|
||||
},
|
||||
image: {
|
||||
cover: (index: number) =>
|
||||
`https://minimal-assets-api.vercel.app/assets/images/covers/cover_${index + 1}.jpg`,
|
||||
feed: (index: number) =>
|
||||
`https://minimal-assets-api.vercel.app/assets/images/feeds/feed_${index + 1}.jpg`,
|
||||
product: (index: number) =>
|
||||
`https://minimal-assets-api.vercel.app/assets/images/products/product_${index + 1}.jpg`,
|
||||
avatar: (index: number) =>
|
||||
`https://minimal-assets-api.vercel.app/assets/images/avatars/avatar_${index + 1}.jpg`,
|
||||
},
|
||||
};
|
||||
|
||||
export default _mock;
|
||||
163
frontend/hospital-portal/src/_mock/_others.ts
Executable file
@@ -0,0 +1,163 @@
|
||||
import _mock from './_mock';
|
||||
import { randomInArray } from './funcs';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _carouselsExample = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: _mock.text.title(index),
|
||||
image: _mock.image.feed(index),
|
||||
description: _mock.text.description(index),
|
||||
}));
|
||||
|
||||
export const _carouselsMembers = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
role: _mock.role(index),
|
||||
avatar: `https://minimal-assets-api.vercel.app/assets/images/members/member-${index + 1}.jpg`,
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _invoice = {
|
||||
id: `${Date.now()}`,
|
||||
taxes: 5,
|
||||
discount: 10,
|
||||
status: 'paid',
|
||||
invoiceFrom: {
|
||||
name: _mock.name.fullName(1),
|
||||
address: _mock.address.fullAddress(1),
|
||||
company: _mock.company(1),
|
||||
email: _mock.email(1),
|
||||
phone: _mock.phoneNumber(1),
|
||||
},
|
||||
invoiceTo: {
|
||||
name: _mock.name.fullName(2),
|
||||
address: _mock.address.fullAddress(2),
|
||||
company: _mock.company(2),
|
||||
email: _mock.email(2),
|
||||
phone: _mock.phoneNumber(2),
|
||||
},
|
||||
items: [...Array(3)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: _mock.text.title(index),
|
||||
description: _mock.text.description(index),
|
||||
qty: 5,
|
||||
price: _mock.number.price(index),
|
||||
})),
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _faqs = [...Array(8)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
value: `panel${index + 1}`,
|
||||
heading: `Questions ${index + 1}`,
|
||||
detail: _mock.text.description(index),
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _addressBooks = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
receiver: _mock.name.fullName(index),
|
||||
fullAddress: _mock.address.fullAddress(index),
|
||||
phone: _mock.phoneNumber(index),
|
||||
addressType: index === 0 ? 'Home' : 'Office',
|
||||
isDefault: index === 0,
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _skills = [...Array(3)].map((_, index) => ({
|
||||
label: ['Development', 'Design', 'Marketing'][index],
|
||||
value: _mock.number.percent(index),
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _accordions = [...Array(4)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
value: `panel${index + 1}`,
|
||||
heading: `Accordion ${index + 1}`,
|
||||
subHeading: _mock.text.title(index),
|
||||
detail: _mock.text.description(index),
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _dataGrid = [...Array(36)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
email: _mock.email(index),
|
||||
lastLogin: _mock.time(index),
|
||||
performance: _mock.number.percent(index),
|
||||
rating: _mock.number.rating(index),
|
||||
status: randomInArray(['online', 'away', 'busy']),
|
||||
isAdmin: _mock.boolean(index),
|
||||
lastName: _mock.name.lastName(index),
|
||||
firstName: _mock.name.firstName(index),
|
||||
age: _mock.number.age(index),
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _megaMenuProducts = [...Array(10)].map((_, index) => ({
|
||||
name: _mock.text.title(index),
|
||||
image: _mock.image.feed(index),
|
||||
path: '#',
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _contacts = [...Array(20)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
name: _mock.name.fullName(index),
|
||||
username: _mock.name.fullName(index),
|
||||
avatar: _mock.image.avatar(index),
|
||||
address: _mock.address.fullAddress(index),
|
||||
phone: _mock.phoneNumber(index),
|
||||
email: _mock.email(index),
|
||||
lastActivity: _mock.time(index),
|
||||
status: randomInArray(['online', 'offline', 'away', 'busy']),
|
||||
position: _mock.role(index),
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _notifications = [...Array(5)].map((_, index) => ({
|
||||
id: _mock.id(index),
|
||||
title: [
|
||||
'Your order is placed',
|
||||
'Sylvan King',
|
||||
'You have new message',
|
||||
'You have new mail',
|
||||
'Delivery processing',
|
||||
][index],
|
||||
description: [
|
||||
'waiting for shipping',
|
||||
'answered to your comment on the Minimal',
|
||||
'5 unread messages',
|
||||
'sent from Guido Padberg',
|
||||
'Your order is being shipped',
|
||||
][index],
|
||||
avatar: [null, _mock.image.avatar(2), null, null, null][index],
|
||||
type: ['order_placed', 'friend_interactive', 'chat_message', 'mail', 'order_shipped'][index],
|
||||
createdAt: _mock.time(index),
|
||||
isUnRead: [true, true, false, false, false][index],
|
||||
}));
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
export const _mapContact = [
|
||||
{
|
||||
latlng: [33, 65],
|
||||
address: _mock.address.fullAddress(1),
|
||||
phoneNumber: _mock.phoneNumber(1),
|
||||
},
|
||||
{
|
||||
latlng: [-12.5, 18.5],
|
||||
address: _mock.address.fullAddress(2),
|
||||
phoneNumber: _mock.phoneNumber(2),
|
||||
},
|
||||
];
|
||||
67
frontend/hospital-portal/src/_mock/_plans.tsx
Executable file
@@ -0,0 +1,67 @@
|
||||
import { PlanFreeIcon, PlanStarterIcon, PlanPremiumIcon } from '../assets';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
const LICENSES = ['Standard', 'Standard Plus', 'Extended'];
|
||||
|
||||
export const _homePlans = [...Array(3)].map((_, index) => ({
|
||||
license: LICENSES[index],
|
||||
commons: ['One end products', '12 months updates', '6 months of support'],
|
||||
options: [
|
||||
'JavaScript version',
|
||||
'TypeScript version',
|
||||
'Design Resources',
|
||||
'Commercial applications',
|
||||
],
|
||||
icons: [
|
||||
'https://minimal-assets-api.vercel.app/assets/images/home/ic_sketch.svg',
|
||||
'https://minimal-assets-api.vercel.app/assets/images/home/ic_figma.svg',
|
||||
'https://minimal-assets-api.vercel.app/assets/images/home/ic_js.svg',
|
||||
'https://minimal-assets-api.vercel.app/assets/images/home/ic_ts.svg',
|
||||
],
|
||||
}));
|
||||
|
||||
export const _pricingPlans = [
|
||||
{
|
||||
subscription: 'basic',
|
||||
icon: <PlanFreeIcon />,
|
||||
price: 0,
|
||||
caption: 'forever',
|
||||
lists: [
|
||||
{ text: '3 prototypes', isAvailable: true },
|
||||
{ text: '3 boards', isAvailable: true },
|
||||
{ text: 'Up to 5 team members', isAvailable: false },
|
||||
{ text: 'Advanced security', isAvailable: false },
|
||||
{ text: 'Permissions & workflows', isAvailable: false },
|
||||
],
|
||||
labelAction: 'current plan',
|
||||
},
|
||||
{
|
||||
subscription: 'starter',
|
||||
icon: <PlanStarterIcon />,
|
||||
price: 4.99,
|
||||
caption: 'saving $24 a year',
|
||||
lists: [
|
||||
{ text: '3 prototypes', isAvailable: true },
|
||||
{ text: '3 boards', isAvailable: true },
|
||||
{ text: 'Up to 5 team members', isAvailable: true },
|
||||
{ text: 'Advanced security', isAvailable: false },
|
||||
{ text: 'Permissions & workflows', isAvailable: false },
|
||||
],
|
||||
labelAction: 'choose starter',
|
||||
},
|
||||
{
|
||||
subscription: 'premium',
|
||||
icon: <PlanPremiumIcon />,
|
||||
price: 9.99,
|
||||
caption: 'saving $124 a year',
|
||||
lists: [
|
||||
{ text: '3 prototypes', isAvailable: true },
|
||||
{ text: '3 boards', isAvailable: true },
|
||||
{ text: 'Up to 5 team members', isAvailable: true },
|
||||
{ text: 'Advanced security', isAvailable: true },
|
||||
{ text: 'Permissions & workflows', isAvailable: true },
|
||||
],
|
||||
labelAction: 'choose premium',
|
||||
},
|
||||
];
|
||||