feat(profile,publications): integrate working Google Scholar import flow and unified faculty profile system
This commit is contained in:
@@ -1,29 +1,105 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __('Profile') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
@extends('layouts.app')
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
||||
<div class="max-w-xl">
|
||||
@include('profile.partials.update-profile-information-form')
|
||||
</div>
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<h4 class="mb-4">Edit Faculty Profile</h4>
|
||||
|
||||
<form action="{{ route('faculty.profile.update') }}" method="POST" enctype="multipart/form-data" class="card shadow-sm p-4">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Full Name</label>
|
||||
<input type="text" name="name" class="form-control" value="{{ old('name', $profile->name) }}" required>
|
||||
</div>
|
||||
|
||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
||||
<div class="max-w-xl">
|
||||
@include('profile.partials.update-password-form')
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Email</label>
|
||||
<input type="email" name="email" class="form-control" value="{{ old('email', $profile->email) }}" required>
|
||||
</div>
|
||||
|
||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
||||
<div class="max-w-xl">
|
||||
@include('profile.partials.delete-user-form')
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Phone Number</label>
|
||||
<input type="text" name="phone_number" class="form-control" value="{{ old('phone_number', $profile->phone_number) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Employee ID</label>
|
||||
<input type="text" name="employee_id" class="form-control" value="{{ old('employee_id', $profile->employee_id) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Department</label>
|
||||
<input type="text" name="department_name" class="form-control" value="{{ old('department_name', $profile->department_name) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Programme</label>
|
||||
<input type="text" name="programme_name" class="form-control" value="{{ old('programme_name', $profile->programme_name) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label fw-semibold">Salutation</label>
|
||||
<input type="text" name="salutation" class="form-control" value="{{ old('salutation', $profile->salutation) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label fw-semibold">Designation</label>
|
||||
<input type="text" name="designation" class="form-control" value="{{ old('designation', $profile->designation) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 mb-3">
|
||||
<label class="form-label fw-semibold">Date of Joining</label>
|
||||
<input type="date" name="date_of_joining" class="form-control" value="{{ old('date_of_joining', $profile->date_of_joining?->format('Y-m-d')) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Google Scholar ID</label>
|
||||
<input type="text" class="form-control" id="google_scholar_id" name="google_scholar_id"
|
||||
value="{{ old('google_scholar_id', $profile->google_scholar_id) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Vidhwan ID</label>
|
||||
<input type="text" class="form-control" id="vidhwan_id" name="vidhwan_id"
|
||||
value="{{ old('vidhwan_id', $profile->vidhwan_id) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">LinkedIn Profile</label>
|
||||
<input type="text" class="form-control" id="linkedin_id" name="linkedin_id"
|
||||
value="{{ old('linkedin_id', $profile->linkedin_id) }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mb-3">
|
||||
<label class="form-label fw-semibold">Qualification</label>
|
||||
<textarea name="qualification" class="form-control" rows="2">{{ is_array($profile->qualification) ? implode(', ', $profile->qualification) : $profile->qualification }}</textarea>
|
||||
<small class="text-muted">Separate multiple qualifications with commas (e.g., B.Tech, M.Tech, Ph.D)</small>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mb-3">
|
||||
<label class="form-label fw-semibold">Address</label>
|
||||
<textarea name="address" class="form-control" rows="2">{{ old('address', $profile->address) }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-semibold">Profile Photo</label>
|
||||
<input type="file" name="profile_photo" class="form-control">
|
||||
|
||||
@if ($profile->profile_photo_path)
|
||||
<div class="mt-2">
|
||||
<img src="{{ Storage::url($profile->profile_photo_path) }}" alt="Profile Photo" width="100" class="rounded shadow-sm">
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
<div class="text-end mt-3">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-save me-1"></i> Save Changes
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
89
resources/views/profile/index.blade.php
Normal file
89
resources/views/profile/index.blade.php
Normal file
@@ -0,0 +1,89 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
{{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="mb-4">Faculty Profile</h4>
|
||||
|
||||
<div class="card shadow-sm p-4">
|
||||
<div class="row align-items-center mb-3">
|
||||
<div class="col-md-2 text-center">
|
||||
@if($profile->profile_photo_path)
|
||||
<img src="{{ Storage::url($profile->profile_photo_path) }}"
|
||||
alt="Profile Photo"
|
||||
class="rounded-circle shadow-sm"
|
||||
width="120" height="120">
|
||||
@else
|
||||
<img src="{{ asset('assets/frontend/images/default-avatar.png') }}"
|
||||
alt="Default Photo"
|
||||
class="rounded-circle shadow-sm"
|
||||
width="120" height="120">
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<h5 class="fw-bold mb-1">{{ $profile->salutation }} {{ $profile->name }}</h5>
|
||||
<p class="mb-0"><strong>{{ $profile->designation }}</strong></p>
|
||||
<p class="text-muted mb-0">{{ $profile->department_name }} — {{ $profile->programme_name }}</p>
|
||||
|
||||
{{-- Compact links row --}}
|
||||
<div class="mt-2 text-md-start text-center">
|
||||
@if($profile->google_scholar_id)
|
||||
<a href="{{ $profile->google_scholar_id }}" target="_blank" rel="noopener noreferrer"
|
||||
class="btn btn-outline-primary btn-sm me-2">
|
||||
<i class="fa fa-graduation-cap me-1"></i> Scholar
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($profile->vidhwan_id)
|
||||
<a href="https://vidwan.inflibnet.ac.in/profile/{{ $profile->vidhwan_id }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="btn btn-outline-secondary btn-sm me-2">
|
||||
<i class="fa fa-id-card me-1"></i> Vidhwan
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($profile->linkedin_id)
|
||||
<a href="{{ $profile->linkedin_id }}" target="_blank" rel="noopener noreferrer"
|
||||
class="btn btn-outline-info btn-sm">
|
||||
<i class="fa fa-linkedin"></i> LinkedIn
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p><strong>Email:</strong> {{ $profile->email }}</p>
|
||||
<p><strong>Phone:</strong> {{ $profile->phone_number ?: 'N/A' }}</p>
|
||||
<p><strong>Employee ID:</strong> {{ $profile->employee_id ?: 'N/A' }}</p>
|
||||
<p><strong>Date of Joining:</strong>
|
||||
{{ $profile->date_of_joining ? $profile->date_of_joining->format('d M Y') : 'N/A' }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<p><strong>Qualification:</strong>
|
||||
{{ is_array($profile->qualification) ? implode(', ', $profile->qualification) : ($profile->qualification ?: 'N/A') }}
|
||||
</p>
|
||||
<p><strong>Address:</strong> {{ $profile->address ?: 'N/A' }}</p>
|
||||
<p><strong>Vidhwan ID:</strong> {{ $profile->vidhwan_id ?: 'N/A' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-end mt-3">
|
||||
<a href="{{ route('faculty.profile.edit') }}" class="btn btn-primary">
|
||||
<i class="fa fa-pen me-1"></i> Edit Profile
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user