467 lines
9.6 KiB
PHP
467 lines
9.6 KiB
PHP
<!-- feedback controller function -->
|
|
|
|
|
|
|
|
|
|
<!-- use Illuminate\Http\Request;
|
|
use App\Models\Feedback;
|
|
use App\Models\user; -->
|
|
|
|
|
|
|
|
<!-- // public function feedback(Request $request)
|
|
// {
|
|
|
|
// $request->validate([
|
|
// 'feedback_type' => 'required',
|
|
// 'subject' => 'required|string|max:255',
|
|
// 'feedback_text' => 'required|string',
|
|
// ]);
|
|
|
|
|
|
// Feedback::create([
|
|
// 'student_id' => auth()->id(),
|
|
// 'feedback_type' => $request->feedback_type,
|
|
// 'subject' => $request->subject,
|
|
// 'feedback_text' => $request->feedback_text,
|
|
// 'status' => 'Pending',
|
|
// ]);
|
|
|
|
// return redirect()->back()->with('success', 'Feedback submitted successfully!');
|
|
// }
|
|
|
|
|
|
// public function feedback(Request $request)
|
|
// {
|
|
// $request->validate([
|
|
// 'feedback_type' => 'required',
|
|
// 'subject' => 'required|string|max:255',
|
|
// 'feedback_text' => 'required|string',
|
|
// ]);
|
|
|
|
|
|
// $studentLogId = session('student_portal_log_id');
|
|
|
|
|
|
// if (!$studentLogId) {
|
|
// return redirect('/students')->with('error', 'Please login first to submit feedback!');
|
|
// }
|
|
|
|
// Feedback::create([
|
|
// 'student_id' => $studentLogId,
|
|
// 'feedback_type' => $request->feedback_type,
|
|
// 'subject' => $request->subject,
|
|
// 'feedback_text' => $request->feedback_text,
|
|
// 'status' => 'Pending',
|
|
// ]);
|
|
|
|
// return redirect('/Feedback&Complain')->back()->with('success', 'Feedback submitted successfully!');}
|
|
// -->
|
|
|
|
|
|
########### ########### ########### ########### ########### ########### ########### ###########
|
|
|
|
|
|
<!-- js table data view -->
|
|
|
|
|
|
<!-- JavaScript to handle Submissions -->
|
|
<!-- <script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const tableBody = document.getElementById('historyTableBody');
|
|
|
|
|
|
function getFormattedDate() {
|
|
const options = { day: '2-digit', month: 'long', year: 'numeric' };
|
|
return new Date().toLocaleDateString('en-GB', options);
|
|
}
|
|
|
|
|
|
document.getElementById('feedbackForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
|
|
const subject = document.getElementById('feedbackSubject').value;
|
|
const date = getFormattedDate();
|
|
|
|
|
|
const newRow = document.createElement('tr');
|
|
newRow.innerHTML = `
|
|
<td>Feedback</td>
|
|
<td>${subject}</td>
|
|
<td>${date}</td>
|
|
<td><span class="badge-status pending"> Pending </span></td>
|
|
`;
|
|
|
|
|
|
tableBody.insertBefore(newRow, tableBody.firstChild);
|
|
|
|
|
|
this.reset();
|
|
alert('Feedback submitted successfully!');
|
|
});
|
|
|
|
// 2. Complaint Form Submission
|
|
document.getElementById('complaintForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
|
|
const title = document.getElementById('complaintTitle').value;
|
|
const date = getFormattedDate();
|
|
|
|
const newRow = document.createElement('tr');
|
|
newRow.innerHTML = `
|
|
<td>Complaint</td>
|
|
<td>${title}</td>
|
|
<td>${date}</td>
|
|
<td><span class="badge-status pending"> Pending </span></td>
|
|
`;
|
|
|
|
tableBody.insertBefore(newRow, tableBody.firstChild);
|
|
|
|
this.reset();
|
|
alert('Complaint submitted successfully!');
|
|
});
|
|
});
|
|
</script> -->
|
|
|
|
|
|
|
|
########### ########### ########### ########### ########### ########### ########### ###########
|
|
|
|
<!-- student view profile blade -->
|
|
|
|
|
|
|
|
<!-- @extends('layouts.studentportalnav')
|
|
|
|
@section('title', 'Student Profile')
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
|
|
body{
|
|
background:#f6f7fb;
|
|
}
|
|
|
|
|
|
/* Header */
|
|
|
|
.profile-header{
|
|
|
|
background:linear-gradient(135deg,#5E244E,#4a1c3e);
|
|
color:#fff;
|
|
border-radius:20px;
|
|
padding:40px;
|
|
margin-bottom:35px;
|
|
box-shadow:0 15px 35px rgba(0,0,0,.15);
|
|
|
|
}
|
|
|
|
|
|
.profile-header h2{
|
|
|
|
font-weight:700;
|
|
|
|
}
|
|
|
|
|
|
.profile-header p{
|
|
|
|
color:#ddd;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Profile Card */
|
|
|
|
.profile-card{
|
|
|
|
background:#fff;
|
|
border-radius:20px;
|
|
padding:30px;
|
|
box-shadow:0 10px 30px rgba(0,0,0,.08);
|
|
height:100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Student Image */
|
|
|
|
.profile-image{
|
|
|
|
width:150px;
|
|
height:150px;
|
|
border-radius:50%;
|
|
object-fit:cover;
|
|
border:6px solid #d4af37;
|
|
|
|
}
|
|
|
|
|
|
.student-name{
|
|
|
|
color:#5E244E;
|
|
font-weight:700;
|
|
margin-top:15px;
|
|
|
|
}
|
|
|
|
|
|
.student-id{
|
|
|
|
background:#5E244E;
|
|
color:#fff;
|
|
padding:8px 20px;
|
|
border-radius:50px;
|
|
display:inline-block;
|
|
font-size:14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Information */
|
|
|
|
.info-title{
|
|
|
|
color:#5E244E;
|
|
font-weight:700;
|
|
border-bottom:2px solid #d4af37;
|
|
padding-bottom:10px;
|
|
margin-bottom:20px;
|
|
|
|
}
|
|
|
|
|
|
.info-row{
|
|
|
|
display:flex;
|
|
justify-content:space-between;
|
|
padding:12px 0;
|
|
border-bottom:1px solid #eee;
|
|
|
|
}
|
|
|
|
|
|
.label{
|
|
|
|
color:#777;
|
|
|
|
}
|
|
|
|
|
|
.value{
|
|
|
|
font-weight:600;
|
|
color:#333;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Course */
|
|
|
|
.course-box{
|
|
|
|
background:#5E244E;
|
|
color:#fff;
|
|
padding:25px;
|
|
border-radius:20px;
|
|
|
|
}
|
|
|
|
|
|
.course-box h4{
|
|
|
|
color:#d4af37;
|
|
font-weight:700;
|
|
|
|
}
|
|
|
|
|
|
.course-item{
|
|
|
|
margin-top:12px;
|
|
|
|
}
|
|
|
|
|
|
.course-item i{
|
|
|
|
color:#d4af37;
|
|
width:25px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Button */
|
|
|
|
.edit-btn{
|
|
|
|
background:#d4af37;
|
|
color:white;
|
|
border:none;
|
|
border-radius:50px;
|
|
padding:12px 30px;
|
|
font-weight:600;
|
|
|
|
}
|
|
|
|
|
|
.edit-btn:hover{
|
|
|
|
background:#c49d20;
|
|
color:#fff;
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="container py-4">
|
|
|
|
|
|
Header -->
|
|
|
|
<!-- <div class="profile-header">
|
|
<h2> <i class="fas fa-user-graduate"></i>Student Profile </h2>
|
|
<p>Manage your personal information and academic details. </p>
|
|
</div>
|
|
|
|
|
|
<div class="col-lg-4">
|
|
<div class="profile-card text-center">
|
|
|
|
<img src="{{ !empty($student->image) ? asset($student->image) : 'https://i.pravatar.cc/300' }}"
|
|
class="profile-image" alt="Profile Image">
|
|
|
|
<h3 class="student-name">{{ $student->full_name }}</h3>
|
|
|
|
<span class="student-id">
|
|
Student ID : {{ $student->student_id }}
|
|
</span>
|
|
<hr>
|
|
|
|
<button class="edit-btn mt-3">
|
|
<i class="fas fa-edit"></i> Edit Profile
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
Details -->
|
|
<!-- <div class="col-lg-8">
|
|
<div class="profile-card">
|
|
<h4 class="info-title">
|
|
<i class="fas fa-user"></i>
|
|
Personal Information
|
|
</h4>
|
|
|
|
<div class="info-row">
|
|
<span class="label">Full Name</span>
|
|
<span class="value">{{ $student->full_name }}</span>
|
|
</div>
|
|
|
|
<div class="info-row">
|
|
<span class="label">NIC / Passport</span>
|
|
<span class="value">{{ $student->nic_passport }}</span>
|
|
</div>
|
|
|
|
<div class="info-row">
|
|
<span class="label">Date of Birth</span>
|
|
<span class="value">
|
|
{{ date('d F Y', strtotime($student->date_of_birth)) }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="info-row">
|
|
<span class="label">Gender</span>
|
|
<span class="value">{{ $student->gender }}</span>
|
|
</div>
|
|
|
|
<div class="info-row">
|
|
<span class="label">Email</span>
|
|
<span class="value">{{ $student->email }}</span>
|
|
</div>
|
|
|
|
<div class="info-row">
|
|
<span class="label">Phone</span>
|
|
<span class="value">{{ $student->phone }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-4 mt-1"> -->
|
|
<!-- Education -->
|
|
<!-- <div class="col-lg-6">
|
|
<div class="profile-card">
|
|
<h4 class="info-title">
|
|
<i class="fas fa-graduation-cap"></i>
|
|
Educational Background
|
|
</h4>
|
|
<div class="info-row">
|
|
<span class="label">Qualification</span>
|
|
<span class="value">{{ $student->qualification }}</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span class="label">Institute</span>
|
|
<span class="value">{{ $student->institute }}</span>
|
|
</div>
|
|
<div class="info-row">
|
|
<span class="label">Year Completed</span>
|
|
<span class="value">{{ $student->year_completed }}</span>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
<!-- Course Details -->
|
|
<!-- <div class="col-lg-6">
|
|
<div class="course-box">
|
|
<h4><i class="fas fa-car"></i>Course Details</h4>
|
|
|
|
<div class="course-item">
|
|
<i class="fas fa-book"></i> {{ $student->course_name }}
|
|
</div>
|
|
<div class="course-item">
|
|
<i class="fas fa-calendar"></i> Duration : {{ $student->duration }}
|
|
</div>
|
|
<div class="course-item">
|
|
<i class="fas fa-layer-group"></i> Current Semester : {{ $student->current_semester }}
|
|
</div>
|
|
<div class="course-item">
|
|
<i class="fas fa-user-tie"></i> Trainer : {{ $student->trainer_name }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@endsection -->
|
|
|
|
########### ########### ########### ########### ########### ########### ########### ###########
|
|
|
|
<!-- // Home Page
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
});
|
|
|
|
|
|
// Route::get('/StudentProfile', [studentsController::class, 'showProfile'])->name('StudentProfile');
|
|
|
|
Route::post('/studentlogout', [studentportalnavController::class, 'logout']);
|
|
|
|
// Route::post('/feedback', [FeedbackController ::class, 'feedback'])->name('feedback.store'); -->
|
|
<!--
|
|
Route::post('/feedback/store', [FeedbackController::class, 'feedback']) ->middleware('auth') ->name('feedback.store');
|
|
|
|
|
|
Route::post('/contact-submit', [ContactMsgController::class, 'store'])->name('contact.store'); -->
|
|
|
|
|
|
|