diff --git a/app/Http/Controllers/Assessment/AssessmentController.php b/app/Http/Controllers/Assessment/AssessmentController.php index dcbc7a2..733eaf0 100644 --- a/app/Http/Controllers/Assessment/AssessmentController.php +++ b/app/Http/Controllers/Assessment/AssessmentController.php @@ -47,7 +47,7 @@ public function storeEmployee(User $user, assessment $assessment, jcp $jcp) //competency score $maxScore = count($data['questions']) * 5; - $mean = (array_sum($data['questions']) / $maxScore) * 100; + $mean = round((array_sum($data['questions']) / $maxScore) * 100); //Update enroll status // $user->assessments()->updateExistingPivot($assessment->id, ['status' => 1]); diff --git a/resources/js/app.js b/resources/js/app.js index e59d6a0..dc1ed2f 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1 +1,2 @@ import './bootstrap'; +import './dash-chart.js'; diff --git a/resources/js/dash-chart.js b/resources/js/dash-chart.js new file mode 100644 index 0000000..ddb1da0 --- /dev/null +++ b/resources/js/dash-chart.js @@ -0,0 +1,51 @@ +import Chart from 'chart.js/auto'; + +const data = { + labels: [ + 'Advanced Digital', + 'Basic Digital', + 'Knowledge', + 'Behavioral', + 'Soft Skills' + + ], + datasets: [{ + label: 'JCP', + data: [90, 60, 80, 85, 80], + fill: true, + backgroundColor: 'rgba(159, 43, 104, 0.2)', + borderColor: 'rgb(159, 43, 104)', + pointBackgroundColor: 'rgb(159, 43, 104)', + pointBorderColor: '#fff', + pointHoverBackgroundColor: '#fff', + pointHoverBorderColor: 'rgb(159, 43, 104)' + }, + { + label: 'ECP', + data: [10,18,65,75,60], + fill: true, + backgroundColor: 'rgba(255, 87, 51, 0.2)', + borderColor: 'rgb(255, 87, 51 )', + pointBackgroundColor: 'rgb(255, 87, 51 )', + pointBorderColor: '#fff', + pointHoverBackgroundColor: '#fff', + pointHoverBorderColor: 'rgb(255, 87, 51 )' + } +] +}; + +const config = { + type: 'radar', + data: data, + options: { + elements: { + line: { + borderWidth: 3 + } + } + }, +}; +new Chart( + document.getElementById('SkillGapChart'), + config +); diff --git a/resources/views/directories/assessments/index.blade.php b/resources/views/directories/assessments/index.blade.php index 45487f0..2a9fda4 100644 --- a/resources/views/directories/assessments/index.blade.php +++ b/resources/views/directories/assessments/index.blade.php @@ -2,7 +2,7 @@

- {{ __('Assesments') }} + {{ __('Assesments Directory') }}

diff --git a/resources/views/directories/qualifications/index.blade.php b/resources/views/directories/qualifications/index.blade.php index 8be7593..f5294a3 100644 --- a/resources/views/directories/qualifications/index.blade.php +++ b/resources/views/directories/qualifications/index.blade.php @@ -3,7 +3,6 @@

- {{ __('Assesments') }} {{ __('Qualifications Directory') }} diff --git a/resources/views/livewire/dashboard/dash-info.blade.php b/resources/views/livewire/dashboard/dash-info.blade.php index 340fcab..fe11a26 100644 --- a/resources/views/livewire/dashboard/dash-info.blade.php +++ b/resources/views/livewire/dashboard/dash-info.blade.php @@ -2,19 +2,13 @@
-
-
-

Assessments Due

-
-
-
-
-
+ +
-

Skill Points

+

My Skill Gap

-
- +
+
@@ -127,13 +121,7 @@
-
-

- -

-
+

@@ -142,13 +130,14 @@

-
-

- -

-
+
+

+ +

+
+
diff --git a/resources/views/livewire/system/assessments/assessments-table.blade.php b/resources/views/livewire/system/assessments/assessments-table.blade.php index b589407..d0ba297 100644 --- a/resources/views/livewire/system/assessments/assessments-table.blade.php +++ b/resources/views/livewire/system/assessments/assessments-table.blade.php @@ -15,7 +15,7 @@ @forelse ($assessments as $assessment) - {{ $assessment->assessment_name }} + {{ $assessment->assessment_title }} {{ $assessment->created_at }} {{ $assessment->updated_at }} diff --git a/storage/framework/views/25b474a0f26957d618e971858ee16bc2.php b/storage/framework/views/25b474a0f26957d618e971858ee16bc2.php index 475e86f..2a7ff45 100644 --- a/storage/framework/views/25b474a0f26957d618e971858ee16bc2.php +++ b/storage/framework/views/25b474a0f26957d618e971858ee16bc2.php @@ -12,22 +12,14 @@ slot('header', null, []); ?>

- - - - - - -

endSlot(); ?>
- -
renderComponent(); ?> diff --git a/storage/framework/views/61fb610abd610eb2cd8a0b9a70bab458.php b/storage/framework/views/61fb610abd610eb2cd8a0b9a70bab458.php index f1b3475..bda9925 100644 --- a/storage/framework/views/61fb610abd610eb2cd8a0b9a70bab458.php +++ b/storage/framework/views/61fb610abd610eb2cd8a0b9a70bab458.php @@ -116,8 +116,7 @@
- -
+