Skip to content

Commit

Permalink
add page edit department
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeng Souy committed May 21, 2023
1 parent 2752769 commit 8bcf556
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/Http/Controllers/DepartmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ public function indexDepartment()
{
return view('department.add-department');
}

/** edit record */
public function editDepartment()
{
return view('department.edit-departmen');
}
}
72 changes: 72 additions & 0 deletions resources/views/department/edit-departmen.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

@extends('layouts.master')
@section('content')
{{-- message --}}
{!! Toastr::message() !!}
<div class="page-wrapper">
<div class="content container-fluid">
<div class="page-header">
<div class="row align-items-center">
<div class="col">
<h3 class="page-title">Edit Department</h3>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="departments.html">Department</a></li>
<li class="breadcrumb-item active">Edit Department</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<form>
<div class="row">
<div class="col-12">
<h5 class="form-title"><span>Department Details</span></h5>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Department ID <span class="login-danger">*</span></label>
<input type="text" class="form-control" value="PRE1534">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Department Name <span class="login-danger">*</span></label>
<input type="text" class="form-control" value="MCA">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>Head of Department <span class="login-danger">*</span></label>
<input type="text" class="form-control" value="Lois A">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms calendar-icon">
<label>Department Start Date <span class="login-danger">*</span></label>
<input class="form-control datetimepicker" type="text"
placeholder="DD-MM-YYYY">
</div>
</div>
<div class="col-12 col-sm-4">
<div class="form-group local-forms">
<label>No of Students <span class="login-danger">*</span></label>
<input type="text" class="form-control" value="200">
</div>
</div>
<div class="col-12">
<div class="student-submit">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
4 changes: 2 additions & 2 deletions resources/views/sidebar/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
</ul>
</li>

<li class="submenu {{set_active(['department/add/page'])}}">
<li class="submenu {{set_active(['department/add/page','department/edit/page'])}}">
<a href="#"><i class="fas fa-building"></i>
<span> Departments</span>
<span class="menu-arrow"></span>
</a>
<ul>
<li><a href="departments.html">Department List</a></li>
<li><a href="{{ route('department/add/page') }}" class="{{set_active(['department/add/page'])}}">Department Add</a></li>
<li><a href="edit-department.html">Department Edit</a></li>
<li><a href="{{ route('department/edit/page') }}" class="{{set_active(['department/edit/page'])}}">Department Edit</a></li>
</ul>
</li>
<li class="submenu">
Expand Down
1 change: 1 addition & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,5 @@ function set_active( $route ) {
// ----------------------- department -----------------------------//
Route::controller(DepartmentController::class)->group(function () {
Route::get('department/add/page', 'indexDepartment')->middleware('auth')->name('department/add/page'); // page add department
Route::get('department/edit/page', 'editDepartment')->middleware('auth')->name('department/edit/page'); // page add department
});

0 comments on commit 8bcf556

Please sign in to comment.