wip
This commit is contained in:
parent
0ef547bb7f
commit
7a5d331b6c
@ -5,7 +5,7 @@
|
|||||||
use App\Domain\ACL\Permission;
|
use App\Domain\ACL\Permission;
|
||||||
use App\Domain\Report\ReportStatus;
|
use App\Domain\Report\ReportStatus;
|
||||||
use App\Http\Controllers\HashidControllerBase;
|
use App\Http\Controllers\HashidControllerBase;
|
||||||
use App\Http\Requests\CreateReportRequest;
|
use App\Http\Requests\StoreReportRequest;
|
||||||
use App\Models\Study;
|
use App\Models\Study;
|
||||||
use App\Models\StudyReport;
|
use App\Models\StudyReport;
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ public function popup()
|
|||||||
return view('staff.reports.popup', compact('study', 'reports'));
|
return view('staff.reports.popup', compact('study', 'reports'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save(CreateReportRequest $request)
|
public function save(StoreReportRequest $request)
|
||||||
{
|
{
|
||||||
abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove]), 403);
|
abort_unless(me()->may([Permission::ReportEdit, Permission::ReportDictate, Permission::ReportApprove]), 403);
|
||||||
$this->decodeKeys();
|
$this->decodeKeys();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
class CreateReportRequest extends FormRequest
|
class StoreReportRequest extends FormRequest
|
||||||
{
|
{
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
33
resources/css/editor.css
Normal file
33
resources/css/editor.css
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,400;1,700&display=swap');
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
body {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container {
|
||||||
|
font-family: 'Inter';
|
||||||
|
width: fit-content;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-container {
|
||||||
|
min-height: 600px;
|
||||||
|
min-width: 300px;
|
||||||
|
/*height: 800px;*/
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ck-content {
|
||||||
|
font-family: 'Inter';
|
||||||
|
line-height: 1.6;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-container_classic-editor .editor-container__editor {
|
||||||
|
min-width: 600px;
|
||||||
|
min-height: 600px;
|
||||||
|
}
|
69
resources/js/editor.js
Normal file
69
resources/js/editor.js
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
const {
|
||||||
|
ClassicEditor,
|
||||||
|
Bold,
|
||||||
|
Essentials,
|
||||||
|
Italic,
|
||||||
|
List,
|
||||||
|
ListProperties,
|
||||||
|
Paragraph,
|
||||||
|
PasteFromOffice,
|
||||||
|
RemoveFormat,
|
||||||
|
Table,
|
||||||
|
TableCellProperties,
|
||||||
|
TableColumnResize,
|
||||||
|
TableProperties,
|
||||||
|
TableToolbar,
|
||||||
|
Underline
|
||||||
|
} = window.CKEDITOR;
|
||||||
|
//const {PasteFromOfficeEnhanced} = window.CKEDITOR_PREMIUM_FEATURES;
|
||||||
|
|
||||||
|
const LICENSE_KEY = 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3NjcxMzkxOTksImp0aSI6ImQ4ODJkYTBmLWNmYWUtNGU4Mi05ZjYxLTYyYzY4ZmZiZWUzMCIsInVzYWdlRW5kcG9pbnQiOiJodHRwczovL3Byb3h5LWV2ZW50LmNrZWRpdG9yLmNvbSIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsiY2xvdWQiLCJkcnVwYWwiXSwiZmVhdHVyZXMiOlsiRFJVUCJdLCJ2YyI6IjI0OGE5ZjdhIn0.m-nfFNt3CYv4_P81vYJn8nTGJeIXXi2hWIFr7EnWNVNkyW_wmIt3Oh_1lOiQE43kN9LXpM0-jEyomb1sSqkwzw';
|
||||||
|
//const LICENSE_KEY = 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3MzY4MTI3OTksImp0aSI6IjRkNDQyODQ2LWIwNDUtNDU1Ny1hZTY0LTM3ZDE0OTdkYWIxNSIsInVzYWdlRW5kcG9pbnQiOiJodHRwczovL3Byb3h5LWV2ZW50LmNrZWRpdG9yLmNvbSIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsiY2xvdWQiLCJkcnVwYWwiLCJzaCJdLCJ3aGl0ZUxhYmVsIjp0cnVlLCJsaWNlbnNlVHlwZSI6InRyaWFsIiwiZmVhdHVyZXMiOlsiKiJdLCJ2YyI6ImIwYmRlYmVjIn0.fhO6LXEF3lP_QpHQY2c9hPnensaY2_0AbfgJ0p4wUlQFmIyn-9dwe5rbMh9SdZYgoqOY5J4-zN0-JfO2vFm3vg';
|
||||||
|
|
||||||
|
const editorConfig = {
|
||||||
|
toolbar: {
|
||||||
|
items: ['bold', 'italic', 'underline', 'removeFormat', '|', 'insertTable', '|', 'bulletedList', 'numberedList'],
|
||||||
|
shouldNotGroupWhenFull: false
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
Bold,
|
||||||
|
Essentials,
|
||||||
|
Italic,
|
||||||
|
List,
|
||||||
|
ListProperties,
|
||||||
|
Paragraph,
|
||||||
|
PasteFromOffice,
|
||||||
|
//PasteFromOfficeEnhanced,
|
||||||
|
RemoveFormat,
|
||||||
|
Table,
|
||||||
|
TableCellProperties,
|
||||||
|
TableColumnResize,
|
||||||
|
TableProperties,
|
||||||
|
TableToolbar,
|
||||||
|
Underline
|
||||||
|
],
|
||||||
|
initialData: '',
|
||||||
|
licenseKey: LICENSE_KEY,
|
||||||
|
list: {
|
||||||
|
properties: {
|
||||||
|
styles: true,
|
||||||
|
startIndex: true,
|
||||||
|
reversed: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
menuBar: {
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
|
placeholder: 'Type or paste your content here!',
|
||||||
|
table: {
|
||||||
|
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties']
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ClassicEditor.create(document.querySelector('#editor'), editorConfig);
|
||||||
|
|
||||||
|
console.log("CKE");
|
||||||
|
|
||||||
|
});
|
@ -4,17 +4,31 @@
|
|||||||
<header class="py-4">
|
<header class="py-4">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="p-2 p-lg-2 bg-light rounded-3">
|
<div class="p-2 p-lg-2 bg-light rounded-3">
|
||||||
<div class="m-2 m-lg-3">
|
<div class="text-center">
|
||||||
|
<h6 class="text-muted">
|
||||||
|
{{ $report->study->modality }} Report
|
||||||
|
</h6>
|
||||||
|
<h3>
|
||||||
|
{{ $report->study->study_description }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section class="pt-4" name="patient">
|
||||||
|
<div class="container">
|
||||||
|
<div class="mx-2">
|
||||||
<table class="table table-bordered border-gray">
|
<table class="table table-bordered border-gray">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-muted">Patient Name</td>
|
<td class="text-muted">Patient Name</td>
|
||||||
<td class="fw-semibold">{{ $report->study->patient_name }}</td>
|
<td class="fw-semibold">{{ $report->study->patient_name }}</td>
|
||||||
<td class="text-muted">Patient ID</td>
|
<td class="text-muted">ID</td>
|
||||||
<td class="fw-semibold">{{ $report->study->patient_id }}</td>
|
<td class="fw-semibold">{{ $report->study->patient_id }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-muted">Age/Gender</td>
|
<td class="text-muted">Age / Gender</td>
|
||||||
<td class="fw-semibold">{{ $report->study->sexAge() }}</td>
|
<td class="fw-semibold">{{ $report->study->sexAge() }}</td>
|
||||||
<td class="text-muted">Accession No</td>
|
<td class="text-muted">Accession No</td>
|
||||||
<td class="fw-semibold">{{ $report->study->accession_number }}</td>
|
<td class="fw-semibold">{{ $report->study->accession_number }}</td>
|
||||||
@ -27,20 +41,9 @@
|
|||||||
<td class="fw-semibold">{{ $report->created_at->format('d-M-Y') }}</td>
|
<td class="fw-semibold">{{ $report->created_at->format('d-M-Y') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<h6 class="text-muted">
|
|
||||||
{{ $report->study->modality }} Report
|
|
||||||
</h6>
|
|
||||||
<h3>
|
|
||||||
{{ $report->study->study_description }}
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="pt-4" name="report">
|
<section class="pt-4" name="report">
|
||||||
<div class="container px-lg-3">
|
<div class="container px-lg-3">
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-light bg-light">
|
<nav class="navbar navbar-light bg-light">
|
||||||
<div class="container px-lg-3">
|
<div class="container px-lg-2">
|
||||||
<a class="navbar-brand fw-semibold" href="#">{{ config('app.name') }}</a>
|
<span class="navbar-brand fw-semibold">{{ config('app.name') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ function GetFilesArray(query) {
|
|||||||
/**
|
/**
|
||||||
* Js Files
|
* Js Files
|
||||||
*/
|
*/
|
||||||
// Ppp JS Files
|
// App JS Files
|
||||||
const appJsFiles = GetFilesArray('resources/js/*.js');
|
const appJsFiles = GetFilesArray('resources/js/*.js');
|
||||||
const appCssFiles = GetFilesArray('resources/css/*.css');
|
const appCssFiles = GetFilesArray('resources/css/*.css');
|
||||||
|
|
||||||
@ -69,8 +69,6 @@ export default defineConfig({
|
|||||||
'resources/css/app.css',
|
'resources/css/app.css',
|
||||||
'resources/assets/css/demo.css',
|
'resources/assets/css/demo.css',
|
||||||
//'resources/js/app.js',
|
//'resources/js/app.js',
|
||||||
...appJsFiles,
|
|
||||||
...appCssFiles,
|
|
||||||
...pageJsFiles,
|
...pageJsFiles,
|
||||||
...vendorJsFiles,
|
...vendorJsFiles,
|
||||||
...LibsJsFiles,
|
...LibsJsFiles,
|
||||||
@ -85,6 +83,14 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
viteStaticCopy({
|
viteStaticCopy({
|
||||||
targets: [
|
targets: [
|
||||||
|
{
|
||||||
|
src: [...appJsFiles],
|
||||||
|
dest: '../js'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: [...appCssFiles],
|
||||||
|
dest: '../css'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
src: [...ImageFiles],
|
src: [...ImageFiles],
|
||||||
dest: '../imgs'
|
dest: '../imgs'
|
||||||
|
Loading…
Reference in New Issue
Block a user