Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
bf44886663 | |||
2c2526ef72 | |||
9a50f296fe |
@ -14,7 +14,8 @@ class CalendarController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('admin::index');
|
||||
$data['title'] = 'Calendar';
|
||||
return view('admin::calendars.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -22,7 +23,7 @@ class CalendarController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin::create');
|
||||
return view('admin::calendars.create');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,7 +39,7 @@ class CalendarController extends Controller
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin::show');
|
||||
return view('admin::calendars.show');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,7 +47,7 @@ class CalendarController extends Controller
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('admin::edit');
|
||||
return view('admin::calendars.edit');
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,15 +6,24 @@ use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\Attendance\Repositories\AttendanceRepository;
|
||||
|
||||
class AttendanceController extends Controller
|
||||
{
|
||||
private $attendanceRepository;
|
||||
|
||||
public function __construct(AttendanceRepository $attendanceRepository)
|
||||
{
|
||||
$this->attendanceRepository = $attendanceRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('attendance::index');
|
||||
$data['title'] = 'Attendance Lists';
|
||||
$data['attendanceLists'] = $this->attendanceRepository->findAll();
|
||||
return view('attendance::attendances.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -22,7 +31,9 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('attendance::create');
|
||||
$data['title'] = 'Create Attendance';
|
||||
$data['editable'] = false;
|
||||
return view('attendance::attendances.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,7 +41,17 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
//
|
||||
$request->merge([
|
||||
'date' => $request->date ? $request->date : now()->format('Y-m-d'),
|
||||
]);
|
||||
|
||||
try {
|
||||
$this->attendanceRepository->create($request->all());
|
||||
toastr()->success('Attendance Created Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('attendance.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,7 +59,7 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('attendance::show');
|
||||
return view('attendance::attendances.show');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,7 +67,17 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('attendance::edit');
|
||||
try {
|
||||
$data['title'] = 'Edit Attendance';
|
||||
$data['editable'] = true;
|
||||
$data['attendance'] = $this->attendanceRepository->getAttendanceById($id);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
|
||||
return view('attendance::attendances.edit', $data);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,7 +85,15 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
try {
|
||||
|
||||
$this->attendanceRepository->update($id, $request->all());
|
||||
toastr()->success('Attendance Updated Successfully');
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('attendance.index');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,6 +101,12 @@ class AttendanceController extends Controller
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
try {
|
||||
$this->attendanceRepository->delete($id);
|
||||
toastr()->success('Attendance Deleted Successfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('attendance.index');
|
||||
}
|
||||
}
|
||||
|
30
Modules/Attendance/app/Models/Attendance.php
Normal file
30
Modules/Attendance/app/Models/Attendance.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Attendance\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Attendance\Database\factories\AttendanceFactory;
|
||||
|
||||
class Attendance extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_attendances';
|
||||
protected $primaryKey = 'attendance_id';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'clock_in_time',
|
||||
'clock_out_time',
|
||||
'work_from_type',
|
||||
'date',
|
||||
'status',
|
||||
'total_hours',
|
||||
'description',
|
||||
'remarks',
|
||||
'createdBy',
|
||||
'updatedBy',
|
||||
];
|
||||
}
|
12
Modules/Attendance/app/Repositories/AttendanceInterface.php
Normal file
12
Modules/Attendance/app/Repositories/AttendanceInterface.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Attendance\Repositories;
|
||||
|
||||
interface AttendanceInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getAttendanceById($attendanceId);
|
||||
public function delete($attendanceId);
|
||||
public function create(array $attendanceDetails);
|
||||
public function update($attendanceId, array $newDetails);
|
||||
}
|
35
Modules/Attendance/app/Repositories/AttendanceRepository.php
Normal file
35
Modules/Attendance/app/Repositories/AttendanceRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Attendance\Repositories;
|
||||
|
||||
use Modules\Attendance\Models\Attendance;
|
||||
|
||||
|
||||
class AttendanceRepository implements AttendanceInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Attendance::get();
|
||||
}
|
||||
|
||||
public function getAttendanceById($attendanceId)
|
||||
{
|
||||
return Attendance::findOrFail($attendanceId);
|
||||
}
|
||||
|
||||
public function delete($attendanceId)
|
||||
{
|
||||
Attendance::destroy($attendanceId);
|
||||
}
|
||||
|
||||
public function create(array $attendanceDetails)
|
||||
{
|
||||
return Attendance::create($attendanceDetails);
|
||||
}
|
||||
|
||||
public function update($attendanceId, array $newDetails)
|
||||
{
|
||||
return Attendance::where('attendance_id', $attendanceId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_attendances', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('attendance_id')->autoIncrement();
|
||||
$table->unsignedBigInteger('employee_id')->nullable();
|
||||
$table->time('clock_in_time')->nullable();
|
||||
$table->time('clock_out_time')->nullable();
|
||||
$table->string('work_from_type')->nullable();
|
||||
$table->date('date')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('total_hours')->nullable();
|
||||
$table->mediumText('description')->nullable();
|
||||
$table->mediumText('remarks')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_attendances');
|
||||
}
|
||||
};
|
@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class='card'>
|
||||
<div class='card-body'>
|
||||
|
||||
{{ html()->form('POST')->route('attendance.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('attendance::partials.attendances.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,23 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class='card'>
|
||||
<div class='card-body'>
|
||||
|
||||
{{ html()->modelForm($attendance, 'PUT')->route('attendance.update', $attendance->attendance_id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('attendance::partials.attendances.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
238
Modules/Attendance/resources/views/attendances/index.blade.php
Normal file
238
Modules/Attendance/resources/views/attendances/index.blade.php
Normal file
@ -0,0 +1,238 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('attendance.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i>Mark Attendance</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="dataTable table-bordered table-hover mt-3 table" id="example">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="px-2" style="vertical-align: middle;">Employee</th>
|
||||
<th class="f-11 pl-1 pr-2">1
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Mon
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">2
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Tue
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">3
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Wed
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">4
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Thu
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">5
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Fri
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">6
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sat
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">7
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sun
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">8
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Mon
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">9
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Tue
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">10
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Wed
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">11
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Thu
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">12
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Fri
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">13
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sat
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">14
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sun
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">15
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Mon
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">16
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Tue
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">17
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Wed
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">18
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Thu
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">19
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Fri
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">20
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sat
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">21
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sun
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">22
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Mon
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">23
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Tue
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">24
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Wed
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">25
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Thu
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">26
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Fri
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">27
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sat
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">28
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Sun
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">29
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Mon
|
||||
</span>
|
||||
</th>
|
||||
<th class="f-11 pl-1 pr-2">30
|
||||
<br>
|
||||
<span class="text-dark-grey f-10">
|
||||
Tue
|
||||
</span>
|
||||
</th>
|
||||
<th class="px-2 text-right">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="w-10 px-2">
|
||||
<div class="align-items-center mw-50">
|
||||
<div class="text-truncate">
|
||||
<h5 class="f-12 mb-0">
|
||||
<a href="https://demo.worksuite.biz/account/employees/1" class="text-darkest-grey">Mr.
|
||||
Fletcher Berge <span class="badge badge-secondary ml-1 pr-1">It's you</span></a>
|
||||
</h5>
|
||||
<p class="f-12 text-dark-grey mb-0">
|
||||
Junior
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="text-dark f-w-500 attendance-total w-100 px-2 text-right">
|
||||
0 / <span class="text-lightest">30</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,32 @@
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Employee')->class('form-label') }}
|
||||
{{ html()->select('employee_id')->class('form-select')->placeholder('Select Employee') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Clock In')->class('form-label') }}
|
||||
{{ html()->time('clock_in_time')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Clock Out')->class('form-label') }}
|
||||
{{ html()->time('clock_out_time')->class('form-control') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Date')->class('form-label') }}
|
||||
{{ html()->date('date')->class('form-control')->placeholder('Attendance Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-6">
|
||||
{{ html()->label('Working From')->class('form-label') }}
|
||||
{{ html()->select('work_from_type', ['home' => 'Home', 'office' => 'Office', 'other' => 'Other'])->class('form-select')->placeholder('Working From') }}
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
{{ html()->button($editable ? 'Update' : 'Mark Attendance', 'submit')->class('btn btn-success') }}
|
||||
</div>
|
||||
</div>
|
@ -10,7 +10,7 @@ class Employee extends Model
|
||||
protected $table = 'tbl_employees';
|
||||
protected $primaryKey = 'id';
|
||||
protected $guarded = [];
|
||||
protected $appends = ['full_name'];
|
||||
protected $appends = (['full_name']);
|
||||
|
||||
protected function getFullNameAttribute()
|
||||
{
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Modules\Employee\Repositories;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Modules\Employee\Models\Employee;
|
||||
|
||||
class EmployeeRepository implements EmployeeInterface
|
||||
@ -39,7 +38,7 @@ class EmployeeRepository implements EmployeeInterface
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return Employee::pluck(DB::raw('CONCAT(first_name," ", middle_name , " ",last_name) AS full_name'), 'id');
|
||||
return Employee::pluck('first_name', 'id');
|
||||
}
|
||||
|
||||
// public function uploadImage($file)
|
||||
|
@ -34,7 +34,6 @@
|
||||
{{ html()->label('Date of Birth')->class('form-label') }}
|
||||
{{ html()->date('dob')->class('form-control')->placeholder('Choose Date of Birth')->required() }}
|
||||
{{ html()->div('Please choose dob')->class('invalid-feedback') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@ -56,9 +55,7 @@
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Upload Profile Picture')->class('form-label') }}
|
||||
{{ html()->file('profile_picture')->class('form-control') }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row gy-1 mt-1">
|
||||
|
@ -110,14 +110,8 @@ class LeaveController extends Controller
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->leaveRepository->delete($id);
|
||||
|
||||
toastr()->success('Leave Deleted Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
//throw $th;
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
$this->leaveRepository->delete($id);
|
||||
|
||||
toastr()->success('Leave Deleted Succesfully');
|
||||
}
|
||||
}
|
||||
|
@ -1,110 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\PMS\Models\Client;
|
||||
use Modules\PMS\Repositories\ClientInterface;
|
||||
|
||||
class ClientController extends Controller
|
||||
{
|
||||
private $clientRepository;
|
||||
|
||||
public function __construct(ClientInterface $clientRepository)
|
||||
{
|
||||
$this->clientRepository = $clientRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Client List';
|
||||
$data['clients'] = $this->clientRepository->findAll();
|
||||
return view('pms::client.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Client';
|
||||
$data['status'] = Client::STATUS;
|
||||
$data['countryList'] = [1 => 'Nepal'];
|
||||
|
||||
return view('pms::client.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$inputData = $request->all();
|
||||
try {
|
||||
$this->clientRepository->create($inputData);
|
||||
toastr()->success('Client Created Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('client.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$data['title'] = 'View Client';
|
||||
$data['client'] = $this->clientRepository->getClientById($id);
|
||||
$data['status'] = Client::STATUS;
|
||||
$data['countryList'] = [1 => 'Nepal'];
|
||||
return view('pms::client.show', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = 'Edit Client';
|
||||
$data['client'] = $this->clientRepository->getClientById($id);
|
||||
$data['status'] = Client::STATUS;
|
||||
$data['countryList'] = [1 => 'Nepal'];
|
||||
return view('pms::client.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
$inputData = $request->except(['_method', '_token']);
|
||||
try {
|
||||
$this->clientRepository->update($id, $inputData);
|
||||
toastr()->success('Client Update Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('client.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->clientRepository->delete($id);
|
||||
|
||||
toastr()->success('Client Deleted Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
//throw $th;
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class PMSController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('pms::index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('pms::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('pms::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('pms::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Employee\Repositories\EmployeeInterface;
|
||||
use Modules\PMS\Models\Project;
|
||||
use Modules\PMS\Repositories\ClientInterface;
|
||||
use Modules\PMS\Repositories\ProjectInterface;
|
||||
|
||||
class ProjectController extends Controller
|
||||
{
|
||||
private $projectRepository;
|
||||
private $clientRepository;
|
||||
private $employeeRepository;
|
||||
|
||||
public function __construct(
|
||||
ProjectInterface $projectRepository,
|
||||
ClientInterface $clientRepository,
|
||||
EmployeeInterface $employeeRepository) {
|
||||
$this->projectRepository = $projectRepository;
|
||||
$this->clientRepository = $clientRepository;
|
||||
$this->employeeRepository = $employeeRepository;
|
||||
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Project List';
|
||||
$data['projects'] = $this->projectRepository->findAll();
|
||||
return view('pms::project.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Project';
|
||||
$data['status'] = Project::STATUS;
|
||||
$data['categoryList'] = Project::CATEGORY;
|
||||
$data['clientList'] = $this->clientRepository->pluck();
|
||||
$data['memberList'] = $this->employeeRepository->pluck();
|
||||
|
||||
return view('pms::project.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$inputData = $request->all();
|
||||
try {
|
||||
$this->projectRepository->create($inputData);
|
||||
toastr()->success('Project Created Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('project.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$data['title'] = 'View Project';
|
||||
$data['project'] = $this->projectRepository->getProjectById($id);
|
||||
$data['status'] = Project::STATUS;
|
||||
$data['countryList'] = [1 => 'Nepal'];
|
||||
return view('pms::project.show', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = 'Edit Project';
|
||||
$data['project'] = $this->projectRepository->getProjectById($id);
|
||||
$data['status'] = Project::STATUS;
|
||||
$data['categoryList'] = Project::CATEGORY;
|
||||
$data['clientList'] = $this->clientRepository->pluck();
|
||||
$data['memberList'] = $this->employeeRepository->pluck();
|
||||
return view('pms::project.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
$inputData = $request->except(['_method', '_token']);
|
||||
try {
|
||||
$this->projectRepository->update($id, $inputData);
|
||||
toastr()->success('Project Update Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('project.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->projectRepository->delete($id);
|
||||
|
||||
toastr()->success('Project Deleted Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
//throw $th;
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,124 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Employee\Repositories\EmployeeInterface;
|
||||
use Modules\PMS\Models\Task;
|
||||
use Modules\PMS\Repositories\ProjectInterface;
|
||||
use Modules\PMS\Repositories\TaskInterface;
|
||||
|
||||
class TaskController extends Controller
|
||||
{
|
||||
private $taskRepository;
|
||||
private $projectRepository;
|
||||
private $employeeRepository;
|
||||
|
||||
public function __construct(
|
||||
TaskInterface $taskRepository,
|
||||
ProjectInterface $projectRepository,
|
||||
EmployeeInterface $employeeRepository) {
|
||||
$this->taskRepository = $taskRepository;
|
||||
$this->projectRepository = $projectRepository;
|
||||
$this->employeeRepository = $employeeRepository;
|
||||
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Task List';
|
||||
$data['tasks'] = $this->taskRepository->findAll();
|
||||
return view('pms::task.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Task';
|
||||
$data['status'] = Task::STATUS;
|
||||
$data['priority'] = Task::PRIORITY;
|
||||
$data['categoryList'] = Task::CATEGORY;
|
||||
$data['projectList'] = $this->projectRepository->pluck();
|
||||
$data['memberList'] = $this->employeeRepository->pluck();
|
||||
|
||||
return view('pms::task.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
$inputData = $request->all();
|
||||
try {
|
||||
$this->taskRepository->create($inputData);
|
||||
toastr()->success('Task Created Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('task.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$data['title'] = 'View Task';
|
||||
$data['task'] = $this->taskRepository->getTaskById($id);
|
||||
$data['status'] = Task::STATUS;
|
||||
return view('pms::task.show', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$data['title'] = 'Edit Task';
|
||||
$data['task'] = $this->taskRepository->getTaskById($id);
|
||||
$data['status'] = Task::STATUS;
|
||||
$data['priority'] = Task::PRIORITY;
|
||||
$data['categoryList'] = Task::CATEGORY;
|
||||
$data['projectList'] = $this->projectRepository->pluck();
|
||||
$data['memberList'] = $this->employeeRepository->pluck();
|
||||
return view('pms::task.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
$inputData = $request->except(['_method', '_token']);
|
||||
try {
|
||||
$this->taskRepository->update($id, $inputData);
|
||||
toastr()->success('Task Update Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
toastr()->error($th->getMessage());
|
||||
}
|
||||
return redirect()->route('task.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$this->taskRepository->delete($id);
|
||||
|
||||
toastr()->success('Task Deleted Succesfully');
|
||||
} catch (\Throwable $th) {
|
||||
//throw $th;
|
||||
toastr()->error($th->getMessage());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ClientRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Models;
|
||||
|
||||
use App\Traits\CreatedUpdatedBy;
|
||||
use App\Traits\StatusTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Client extends Model
|
||||
{
|
||||
use StatusTrait, CreatedUpdatedBy;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $table = 'tbl_clients';
|
||||
protected $guarded = [];
|
||||
protected $appends = ['status_name'];
|
||||
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Models;
|
||||
|
||||
use App\Traits\CreatedUpdatedBy;
|
||||
use App\Traits\StatusTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Employee\Models\Employee;
|
||||
|
||||
class Project extends Model
|
||||
{
|
||||
use StatusTrait, CreatedUpdatedBy;
|
||||
|
||||
protected $table = 'tbl_projects';
|
||||
protected $guarded = [];
|
||||
protected $appends = ['status_name'];
|
||||
|
||||
const CATEGORY = [
|
||||
10 => 'Vue',
|
||||
11 => 'Laravel',
|
||||
];
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class, 'client_id');
|
||||
}
|
||||
|
||||
public function members()
|
||||
{
|
||||
return $this->belongsTo(Employee::class, 'members_id');
|
||||
}
|
||||
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Models;
|
||||
|
||||
use App\Traits\CreatedUpdatedBy;
|
||||
use App\Traits\StatusTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Employee\Models\Employee;
|
||||
|
||||
class Task extends Model
|
||||
{
|
||||
use StatusTrait, CreatedUpdatedBy;
|
||||
|
||||
protected $table = 'tbl_tasks';
|
||||
protected $guarded = [];
|
||||
protected $appends = ['status_name', 'priority_status'];
|
||||
|
||||
const CATEGORY = [
|
||||
10 => 'Vue',
|
||||
11 => 'Laravel',
|
||||
];
|
||||
|
||||
const PRIORITY = [
|
||||
10 => 'High',
|
||||
11 => 'Meduim',
|
||||
12 => 'Low',
|
||||
];
|
||||
|
||||
protected function priorityStatus(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function (mixed $value, array $attributes) {
|
||||
switch ($attributes['priority']) {
|
||||
case '10':
|
||||
return '<span class="badge bg-danger">' . self::PRIORITY[$attributes['priority']] . '</span>';
|
||||
break;
|
||||
case '11':
|
||||
return '<span class="badge bg-info">' . self::PRIORITY[$attributes['priority']] . '</span>';
|
||||
break;
|
||||
case '12':
|
||||
return '<span class="badge bg-primary">' . self::PRIORITY[$attributes['priority']] . '</span>';
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
},
|
||||
set: fn($value) => $value,
|
||||
);
|
||||
}
|
||||
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo(Project::class, 'project_id');
|
||||
}
|
||||
|
||||
public function assigned()
|
||||
{
|
||||
return $this->belongsTo(Employee::class, 'assigned_id');
|
||||
}
|
||||
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\PMS\Repositories\ClientInterface;
|
||||
use Modules\PMS\Repositories\ClientRepository;
|
||||
use Modules\PMS\Repositories\ProjectInterface;
|
||||
use Modules\PMS\Repositories\ProjectRepository;
|
||||
use Modules\PMS\Repositories\TaskInterface;
|
||||
use Modules\PMS\Repositories\TaskRepository;
|
||||
|
||||
class PMSServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected string $moduleName = 'PMS';
|
||||
|
||||
protected string $moduleNameLower = 'pms';
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
$this->registerCommands();
|
||||
$this->registerCommandSchedules();
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(ClientInterface::class, ClientRepository::class);
|
||||
$this->app->bind(ProjectInterface::class, ProjectRepository::class);
|
||||
$this->app->bind(TaskInterface::class, TaskRepository::class);
|
||||
$this->app->register(RouteServiceProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register commands in the format of Command::class
|
||||
*/
|
||||
protected function registerCommands(): void
|
||||
{
|
||||
// $this->commands([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register command Schedules.
|
||||
*/
|
||||
protected function registerCommandSchedules(): void
|
||||
{
|
||||
// $this->app->booted(function () {
|
||||
// $schedule = $this->app->make(Schedule::class);
|
||||
// $schedule->command('inspire')->hourly();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*/
|
||||
public function registerTranslations(): void
|
||||
{
|
||||
$langPath = resource_path('lang/modules/' . $this->moduleNameLower);
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom($langPath);
|
||||
} else {
|
||||
$this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*/
|
||||
protected function registerConfig(): void
|
||||
{
|
||||
$this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower . '.php')], 'config');
|
||||
$this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*/
|
||||
public function registerViews(): void
|
||||
{
|
||||
$viewPath = resource_path('views/modules/' . $this->moduleNameLower);
|
||||
$sourcePath = module_path($this->moduleName, 'resources/views');
|
||||
|
||||
$this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower . '-module-views']);
|
||||
|
||||
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
|
||||
|
||||
$componentNamespace = str_replace('/', '\\', config('modules.namespace') . '\\' . $this->moduleName . '\\' . ltrim(config('modules.paths.generator.component-class.path'), config('modules.paths.app_folder', '')));
|
||||
Blade::componentNamespace($componentNamespace, $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*/
|
||||
public function provides(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getPublishableViewPaths(): array
|
||||
{
|
||||
$paths = [];
|
||||
foreach (config('view.paths') as $path) {
|
||||
if (is_dir($path . '/modules/' . $this->moduleNameLower)) {
|
||||
$paths[] = $path . '/modules/' . $this->moduleNameLower;
|
||||
}
|
||||
}
|
||||
|
||||
return $paths;
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*/
|
||||
public function map(): void
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*/
|
||||
protected function mapWebRoutes(): void
|
||||
{
|
||||
Route::middleware('web')->group(module_path('PMS', '/routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*/
|
||||
protected function mapApiRoutes(): void
|
||||
{
|
||||
Route::middleware('api')->prefix('api')->name('api.')->group(module_path('PMS', '/routes/api.php'));
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
interface ClientInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getClientById($clientId);
|
||||
public function delete($clientId);
|
||||
public function create($clientDetails);
|
||||
public function update($clientId, array $newDetails);
|
||||
public function pluck();
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
use Modules\PMS\Models\Client;
|
||||
|
||||
class ClientRepository implements ClientInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Client::paginate(20);
|
||||
}
|
||||
|
||||
public function getClientById($ClientId)
|
||||
{
|
||||
return Client::findOrFail($ClientId);
|
||||
}
|
||||
|
||||
public function delete($ClientId)
|
||||
{
|
||||
Client::destroy($ClientId);
|
||||
}
|
||||
|
||||
public function create($ClientDetails)
|
||||
{
|
||||
return Client::create($ClientDetails);
|
||||
}
|
||||
|
||||
public function update($ClientId, array $newDetails)
|
||||
{
|
||||
return Client::whereId($ClientId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return Client::pluck('client_name', 'id');
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
interface ProjectInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getProjectById($clientId);
|
||||
public function delete($clientId);
|
||||
public function create($clientDetails);
|
||||
public function update($clientId, array $newDetails);
|
||||
public function pluck();
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
use Modules\PMS\Models\Project;
|
||||
|
||||
class ProjectRepository implements ProjectInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Project::paginate(20);
|
||||
}
|
||||
|
||||
public function getProjectById($ProjectId)
|
||||
{
|
||||
return Project::findOrFail($ProjectId);
|
||||
}
|
||||
|
||||
public function delete($ProjectId)
|
||||
{
|
||||
Project::destroy($ProjectId);
|
||||
}
|
||||
|
||||
public function create($ProjectDetails)
|
||||
{
|
||||
return Project::create($ProjectDetails);
|
||||
}
|
||||
|
||||
public function update($ProjectId, array $newDetails)
|
||||
{
|
||||
return Project::whereId($ProjectId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return Project::pluck('project_name', 'id');
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
interface TaskInterface
|
||||
{
|
||||
public function findAll();
|
||||
public function getTaskById($clientId);
|
||||
public function delete($clientId);
|
||||
public function create($clientDetails);
|
||||
public function update($clientId, array $newDetails);
|
||||
public function pluck();
|
||||
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Modules\PMS\Models\Task;
|
||||
|
||||
class TaskRepository implements TaskInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Task::paginate(20);
|
||||
}
|
||||
|
||||
public function getTaskById($TaskId)
|
||||
{
|
||||
return Task::findOrFail($TaskId);
|
||||
}
|
||||
|
||||
public function delete($TaskId)
|
||||
{
|
||||
Task::destroy($TaskId);
|
||||
}
|
||||
|
||||
public function create($TaskDetails)
|
||||
{
|
||||
return Task::create($TaskDetails);
|
||||
}
|
||||
|
||||
public function update($TaskId, array $newDetails)
|
||||
{
|
||||
return Task::whereId($TaskId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function pluck()
|
||||
{
|
||||
return Task::pluck(DB::raw('CONCAT(first_name," ", middle_name , " ",last_name) AS full_name'), 'id');
|
||||
}
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "nwidart/pms",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Widart",
|
||||
"email": "n.widart@gmail.com"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [],
|
||||
"aliases": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\PMS\\": "app/",
|
||||
"Modules\\PMS\\Database\\Factories\\": "database/factories/",
|
||||
"Modules\\PMS\\Database\\Seeders\\": "database/seeders/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Modules\\PMS\\Tests\\": "tests/"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'PMS',
|
||||
];
|
@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_clients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('client_name')->nullable();
|
||||
$table->unsignedBigInteger('country_id')->nullable();
|
||||
$table->string('email_address')->nullable();
|
||||
$table->string('company')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->longText('desc')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_clients');
|
||||
}
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_projects', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('project_code')->nullable();
|
||||
$table->string('project_name')->nullable();
|
||||
$table->unsignedBigInteger('client_id')->nullable();
|
||||
$table->unsignedBigInteger('project_category_id')->nullable();
|
||||
$table->json('members_id')->nullable();
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('end_date')->nullable();
|
||||
$table->longText('summary')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_projects');
|
||||
}
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('tbl_tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->unsignedBigInteger('task_category_id')->nullable();
|
||||
$table->unsignedBigInteger('project_id')->nullable();
|
||||
$table->date('start_date')->nullable();
|
||||
$table->date('due_date')->nullable();
|
||||
$table->json('assigned_id')->nullable();
|
||||
$table->longText('desc')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('priority')->nullable();
|
||||
$table->unsignedBigInteger('createdBy')->nullable();
|
||||
$table->unsignedBigInteger('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tbl_tasks');
|
||||
}
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\database\seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PMSDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"name": "PMS",
|
||||
"alias": "pms",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"priority": 0,
|
||||
"providers": [
|
||||
"Modules\\PMS\\Providers\\PMSServiceProvider"
|
||||
],
|
||||
"files": []
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^1.1.2",
|
||||
"laravel-vite-plugin": "^0.7.5",
|
||||
"sass": "^1.69.5",
|
||||
"postcss": "^8.3.7",
|
||||
"vite": "^4.0.0"
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
{{ html()->form('POST')->route('client.store')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::client.partials.action')
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,22 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
|
||||
{{ html()->modelForm($client, 'PUT')->route('client.update', $client->id)->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::client.partials.action')
|
||||
{{ html()->closeModelForm() }}
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,65 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
|
||||
<div class="mb-2 text-end">
|
||||
<a href="{{ route('client.create') }}" class="btn btn-success btn-md waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Add</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Client Name</th>
|
||||
<th>Email</th>
|
||||
<th>Company</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($clients as $key => $client)
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>{{ $client->client_name }}</td>
|
||||
<td>{{ $client->email_address }}</td>
|
||||
<td>{{ $client->company }}</td>
|
||||
<td>{!! $client->status_name !!}</td>
|
||||
<td>
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('client.show', $client->id) }}" class="link-info fs-15">
|
||||
<i class="ri-eye-line"></i>
|
||||
</a>
|
||||
<a href="{{ route('client.edit', $client->id) }}" class="link-success fs-15 edit-item-btn"><i
|
||||
class="ri-edit-2-line"></i></a>
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('client.destroy', $client->id) }}"
|
||||
data-id="{{ $client->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,65 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-1">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Client Name')->class('form-label') }}
|
||||
{{ html()->text('client_name')->class('form-control')->placeholder('Enter Client Name')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Email')->class('form-label') }}
|
||||
{{ html()->email('email_address')->class('form-control')->placeholder('Enter Email')->required() }}
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('desc')->class('form-control')->placeholder('Enter Description...') }}
|
||||
</div> --}}
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Country')->class('form-label') }}
|
||||
{{ html()->select('country_id', $countryList)->class('form-control')->placeholder('Select Country')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Adress')->class('form-label') }}
|
||||
{{ html()->text('address')->class('form-control')->placeholder('Enter Address') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Company')->class('form-label') }}
|
||||
{{ html()->text('company')->class('form-control')->placeholder('Enter Company')->attributes(['id' => 'cleave-prefixq']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card -->
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('client.index') }}" class="btn btn-danger w-sm">Cancel</a>
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-control')->placeholder('Select Status') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
@ -1,49 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-body p-4">
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
<table class="table-borderless mb-0 table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Client Name</span></th>
|
||||
<td>{{ $client->client_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Company</span></th>
|
||||
<td>{{ $client->company }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Email</span></th>
|
||||
<td>{{ $client->email_address }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Address</span></th>
|
||||
<td>{{ $client->address }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('client.index') }}" class="btn btn-secondary w-sm">Back</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,7 +0,0 @@
|
||||
@extends('pms::layouts.master')
|
||||
|
||||
@section('content')
|
||||
<h1>Hello World</h1>
|
||||
|
||||
<p>Module: {!! config('pms.name') !!}</p>
|
||||
@endsection
|
@ -1,29 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<title>PMS Module - {{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<meta name="description" content="{{ $description ?? '' }}">
|
||||
<meta name="keywords" content="{{ $keywords ?? '' }}">
|
||||
<meta name="author" content="{{ $author ?? '' }}">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
{{-- Vite CSS --}}
|
||||
{{-- {{ module_vite('build-pms', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-pms', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
@ -1,18 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
{{ html()->form('POST')->route('project.store')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::project.partials.action')
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,22 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
|
||||
{{ html()->modelForm($project, 'PUT')->route('project.update', $project->id)->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::project.partials.action')
|
||||
{{ html()->closeModelForm() }}
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,71 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
|
||||
<div class="mb-2 text-end">
|
||||
<a href="{{ route('project.create') }}" class="btn btn-success btn-md waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Add</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Code</th>
|
||||
<th>Project Name</th>
|
||||
<th>Members</th>
|
||||
<th>Start Date</th>
|
||||
<th>Deadline</th>
|
||||
<th>Client</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($projects as $key => $project)
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>{{ $project->project_code }}</td>
|
||||
<td>{{ $project->project_name }}</td>
|
||||
<td>{{ $project->members_id }}</td>
|
||||
<td>{{ $project->start_date }}</td>
|
||||
<td class="text-danger">{{ $project->end_date }}</td>
|
||||
<td>{{ optional($project->client)->client_name }}</td>
|
||||
<td>{!! $project->status_name !!}</td>
|
||||
<td>
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('project.show', $project->id) }}" class="link-info fs-15">
|
||||
<i class="ri-eye-line"></i>
|
||||
</a>
|
||||
<a href="{{ route('project.edit', $project->id) }}"
|
||||
class="link-success fs-15 edit-item-btn"><i class="ri-edit-2-line"></i></a>
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('project.destroy', $project->id) }}"
|
||||
data-id="{{ $project->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,95 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-1">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Project Code')->class('form-label') }}
|
||||
{{ html()->text('project_code')->class('form-control')->placeholder('Enter Project Code')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Project Name')->class('form-label') }}
|
||||
{{ html()->text('project_name')->class('form-control')->placeholder('Enter Project Name')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Project Category')->class('form-label') }}
|
||||
{{ html()->select('project_category_id', $categoryList)->class('form-control')->placeholder('Select Project Category')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Client')->class('form-label') }}
|
||||
{{ html()->select('client_id', $clientList)->class('form-control')->placeholder('Select Client')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Team Members')->class('form-label') }}
|
||||
{{ html()->select('members_id', $memberList)->class('form-control')->placeholder('Select Member')->required() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Summary')->class('form-label') }}
|
||||
{{ html()->textarea('summary')->class('form-control')->placeholder('Enter Summary...') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('project.index') }}" class="btn btn-danger w-sm">Cancel</a>
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-control')->required() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Date</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Start Date')->class('form-label') }}
|
||||
{{ html()->date('start_date')->class('form-control')->placeholder('Choose Start Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('End Date')->class('form-label') }}
|
||||
{{ html()->date('end_date')->class('form-control')->placeholder('Choose End Date') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
@ -1,49 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-body p-4">
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
<table class="table-borderless mb-0 table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Project Name</span></th>
|
||||
<td>{{ $project->project_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Code</span></th>
|
||||
<td>{{ $project->project_code }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Members</span></th>
|
||||
<td>{{ $project->members_id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Summary</span></th>
|
||||
<td>{{ $project->summary }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('project.index') }}" class="btn btn-secondary w-sm">Back</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,18 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
{{ html()->form('POST')->route('task.store')->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::task.partials.action')
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,22 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
|
||||
{{ html()->modelForm($task, 'PUT')->route('task.update', $task->id)->class(['needs-validation'])->attributes(['novalidate', 'enctype' => 'multipart/form-data'])->open() }}
|
||||
@include('pms::task.partials.action')
|
||||
{{ html()->closeModelForm() }}
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,73 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
|
||||
<div class="mb-2 text-end">
|
||||
<a href="{{ route('task.create') }}" class="btn btn-success btn-md waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Add</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Title</th>
|
||||
<th>Category</th>
|
||||
<th>Project</th>
|
||||
<th>Start Date</th>
|
||||
<th>Deadline</th>
|
||||
<th>Assigned</th>
|
||||
<th>Priority</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($tasks as $key => $task)
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>{{ $task->title }}</td>
|
||||
<td>{{ $task->task_category_id }}</td>
|
||||
<td>{{ optional($task->project)->project_name }}</td>
|
||||
<td>{{ $task->start_date }}</td>
|
||||
<td class="text-danger">{{ $task->due_date }}</td>
|
||||
<td>{{ optional($task->assigned)->full_name }}</td>
|
||||
<td>{!! $task->priority_status !!}</td>
|
||||
<td>{!! $task->status_name !!}</td>
|
||||
<td>
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('task.show', $task->id) }}" class="link-info fs-15">
|
||||
<i class="ri-eye-line"></i>
|
||||
</a>
|
||||
<a href="{{ route('task.edit', $task->id) }}" class="link-success fs-15 edit-item-btn"><i
|
||||
class="ri-edit-2-line"></i></a>
|
||||
|
||||
<a href="javascript:void(0);" data-link="{{ route('task.destroy', $task->id) }}"
|
||||
data-id="{{ $task->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,96 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row gy-1">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Enter Title')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Task Category')->class('form-label') }}
|
||||
{{ html()->select('task_category_id', $categoryList)->class('form-control')->placeholder('Select Task Category')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Project')->class('form-label') }}
|
||||
{{ html()->select('project_id', $projectList)->class('form-control')->placeholder('Select Project')->required() }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Assigned User')->class('form-label') }}
|
||||
{{ html()->select('assigned_id', $memberList)->class('form-control')->placeholder('Select Assigned User')->required() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('desc')->class('form-control')->placeholder('Enter Description...') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('task.index') }}" class="btn btn-danger w-sm">Cancel</a>
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-control')->required() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Date</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Priority')->class('form-label') }}
|
||||
{{ html()->select('priority', $priority)->class('form-control')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Start Date')->class('form-label') }}
|
||||
{{ html()->date('start_date')->class('form-control')->placeholder('Choose Start Date') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Due Date')->class('form-label') }}
|
||||
{{ html()->date('due_date')->class('form-control')->placeholder('Choose Due Date') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
@ -1,49 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-body p-4">
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
<table class="table-borderless mb-0 table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Title</span></th>
|
||||
<td>{{ $task->title }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Task Category</span></th>
|
||||
<td>{{ $task->task_category_id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Project</span></th>
|
||||
<td>{{ $task->project_id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Description</span></th>
|
||||
<td>{{ $task->desc }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('task.index') }}" class="btn btn-secondary w-sm">Back</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\PMS\Http\Controllers\PMSController;
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------------------
|
||||
* API Routes
|
||||
*--------------------------------------------------------------------------
|
||||
*
|
||||
* Here is where you can register API routes for your application. These
|
||||
* routes are loaded by the RouteServiceProvider within a group which
|
||||
* is assigned the "api" middleware group. Enjoy building your API!
|
||||
*
|
||||
*/
|
||||
|
||||
Route::middleware(['auth:sanctum'])->prefix('v1')->group(function () {
|
||||
Route::apiResource('pms', PMSController::class)->names('pms');
|
||||
});
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\PMS\Http\Controllers\ClientController;
|
||||
use Modules\PMS\Http\Controllers\PMSController;
|
||||
use Modules\PMS\Http\Controllers\ProjectController;
|
||||
use Modules\PMS\Http\Controllers\TaskController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::group([], function () {
|
||||
Route::resource('pms', PMSController::class)->names('pms');
|
||||
Route::resource('client', ClientController::class)->names('client');
|
||||
Route::resource('project', ProjectController::class)->names('project');
|
||||
Route::resource('task', TaskController::class)->names('task');
|
||||
|
||||
});
|
@ -1,26 +0,0 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: '../../public/build-pms',
|
||||
emptyOutDir: true,
|
||||
manifest: true,
|
||||
},
|
||||
plugins: [
|
||||
laravel({
|
||||
publicDirectory: '../../public',
|
||||
buildDirectory: 'build-pms',
|
||||
input: [
|
||||
__dirname + '/resources/assets/sass/app.scss',
|
||||
__dirname + '/resources/assets/js/app.js'
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
//export const paths = [
|
||||
// 'Modules/PMS/resources/assets/sass/app.scss',
|
||||
// 'Modules/PMS/resources/assets/js/app.js',
|
||||
//];
|
@ -1,91 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Taxation\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Companies;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Employee\Repositories\EmployeeInterface;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
|
||||
private $employeeRepository;
|
||||
|
||||
public function __construct(EmployeeInterface $employeeRepository)
|
||||
{
|
||||
$this->employeeRepository = $employeeRepository;
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data['title'] = 'Invoice List';
|
||||
$data['invoices'] = [];
|
||||
return view('taxation::invoice.index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data['title'] = 'Create Invoice';
|
||||
$data['companyList'] = Companies::pluck('title', 'company_id');
|
||||
$data['employeeList'] = $this->employeeRepository->pluck();
|
||||
|
||||
return view('taxation::invoice.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('taxation::invoice.show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('taxation::invoice.edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id): RedirectResponse
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function cloneProduct(Request $request)
|
||||
{
|
||||
$data = [];
|
||||
$numInc = $request->numberInc;
|
||||
$script = true;
|
||||
return response()->json([
|
||||
'view' => view('taxation::invoice.clone-product', compact('data', 'numInc', 'script'))->render(),
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<div class="card card-body product-card card-border-secondary mb-2 border">
|
||||
<div class="row gy-2 mb-2">
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Product')->class('form-label') }}
|
||||
{{ html()->text('product_id')->class('form-control')->placeholder('Enter Product Name')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{{ html()->label('Unit')->class('form-label') }}
|
||||
{{ html()->text('unit')->class('form-control')->placeholder('Enter Unit')->required() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{{ html()->label('Rate')->class('form-label') }}
|
||||
{{ html()->text('rate')->class('form-control product-price cleave-numeral')->placeholder('Enter Rate')->attributes(['id' => 'cleave-numeral']) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{{ html()->label('Quantity')->class('form-label') }}
|
||||
{{ html()->text('qty')->class('form-control product-quantity cleave-numeral')->placeholder('Enter QTY')->attributes(['id' => 'cleave-numeral']) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{{ html()->label('Amount')->class('form-label') }}
|
||||
{{ html()->text('amt')->class('form-control product-line-price bg-light')->placeholder('Enter Amount')->isReadOnly() }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->text('desc')->class('form-control')->placeholder('Enter Description') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 d-flex justify-content-end align-items-end">
|
||||
<button type="button" class="btn btn-danger btn-icon waves-effect btn-remove waves-light"><i
|
||||
class="ri-delete-bin-5-line"></i></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -1,207 +0,0 @@
|
||||
<div class="row gy-1">
|
||||
<h5 class="text-primary text-center">Invoice Details</h5>
|
||||
<div class="border border-dashed"></div>
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Company')->class('form-label') }}
|
||||
{{ html()->select('company_id', $companyList)->class('form-control')->placeholder('Select Company')->required() }}
|
||||
{{ html()->div('Please select company')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Invoice No.')->class('form-label') }}
|
||||
{{ html()->text('invoice_no')->class('form-control')->placeholder('Enter Invoice No')->attributes(['id' => 'cleave-prefix']) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('VAT No.')->class('form-label') }}
|
||||
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter VAT No') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Sales Date')->class('form-label') }}
|
||||
{{ html()->date('sale_date')->class('form-control')->placeholder('Choose Sales Date')->required() }}
|
||||
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Bill Issue Date')->class('form-label') }}
|
||||
{{ html()->date('isse_date')->class('form-control')->placeholder('Choose Bill Issue Date')->required() }}
|
||||
{{ html()->div('Please choose invoice date')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row gy-1 my-2">
|
||||
<h5 class="text-primary text-center">Buyer Details</h5>
|
||||
<div class="border border-dashed"></div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Buyer')->class('form-label') }}
|
||||
{{ html()->select('buyer_id', $employeeList)->class('form-control')->placeholder('Select Buyer') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Address No.')->class('form-label') }}
|
||||
{{ html()->text('buyer_address')->class('form-control')->placeholder('Enter Address') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('VAT No.')->class('form-label') }}
|
||||
{{ html()->text('vat_no')->class('form-control')->placeholder('Enter Buyer VAT No') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Contact No')->class('form-label') }}
|
||||
{{ html()->date('sale_date')->class('form-control')->placeholder('Enter Contact No') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Mode of Payment')->class('form-label') }}
|
||||
{{ html()->select('buyer_id', [1 => 'Cash', 2 => 'Bank', 3 => 'Credit'])->class('form-control')->placeholder('Select Payment Mode') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- <div class="row mt-2">
|
||||
<p class="text-primary">Shipping Details</p>
|
||||
<div class="border border-dashed"></div>
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Address')->class('form-label') }}
|
||||
{{ html()->text('address')->class('form-control')->placeholder('Enter Address') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{ html()->label('Shipping Date')->class('form-label') }}
|
||||
{{ html()->date('shiiping_date')->class('form-control')->placeholder('Enter Temporary Address') }}
|
||||
</div>
|
||||
</div> --}}
|
||||
|
||||
<div class="row gy-1 gx-2 mt-1">
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-info btn-icon add-btn text-end"><i class="ri-add-line"></i></button>
|
||||
</div>
|
||||
@include('taxation::invoice.clone-product')
|
||||
<div class="appendProductCard"></div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end w-30 mb-2">
|
||||
<table class="table-borderless align-middle">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Sub Total</th>
|
||||
<td style="width:150px;">
|
||||
<input type="text" class="form-control bg-light border-0" id="subtotal" placeholder="$0.00"
|
||||
readonly="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Estimated Tax (11%)</th>
|
||||
<td>
|
||||
<input type="text" class="form-control bg-light border-0" id="tax" placeholder="$0.00"
|
||||
readonly="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Discount</th>
|
||||
<td>
|
||||
<input type="text" class="form-control bg-light border-0" id="discount" placeholder="$0.00"
|
||||
readonly="">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-top border-top-dashed">
|
||||
<th scope="row">Total Amount</th>
|
||||
<td>
|
||||
<input type="text" class="form-control bg-light border-0" id="total" placeholder="$0.00"
|
||||
readonly="">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mb-4 text-end">
|
||||
<button type="submit" class="btn btn-success w-sm">Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/libs/cleave.js/cleave.min.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/pages/form-masks.init.js') }}"></script>
|
||||
|
||||
<script>
|
||||
$("body").on('click', '.add-btn', function(e) {
|
||||
e.preventDefault();
|
||||
numberInc = $('.product-card').length
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{ route('cloneProduct') }}',
|
||||
data: {
|
||||
numberInc: numberInc
|
||||
},
|
||||
success: function(response) {
|
||||
$('.appendProductCard').append(response.view)
|
||||
// $('#invoice-container').html(response.view).fadeIn()
|
||||
},
|
||||
error: function(xhr) {
|
||||
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '.btn-remove', function() {
|
||||
if ($('.product-card').length > 1) {
|
||||
$(this).parents(".product-card").remove();
|
||||
}
|
||||
recalculate();
|
||||
});
|
||||
|
||||
|
||||
function amountKeyup() {
|
||||
$("body").on('keyup', '.product-price', function() {
|
||||
var priceInput = $(this);
|
||||
var qtyInput = priceInput.closest(".row").find(".product-quantity");
|
||||
var linePrice = priceInput.closest(".row").find(".product-line-price");
|
||||
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
|
||||
});
|
||||
|
||||
$("body").on('keyup', '.product-quantity', function() {
|
||||
var priceInput = $(this);
|
||||
var qtyInput = priceInput.closest(".row").find(".product-price");
|
||||
var linePrice = priceInput.closest(".row").find(".product-line-price");
|
||||
updateQuantity(priceInput.val(), qtyInput.val(), linePrice);
|
||||
});
|
||||
}
|
||||
|
||||
amountKeyup()
|
||||
|
||||
function updateQuantity(rate, qty, linePriceInput) {
|
||||
var amount = (rate * qty).toFixed(2);
|
||||
linePriceInput.val(amount);
|
||||
recalculate();
|
||||
}
|
||||
|
||||
function recalculate() {
|
||||
var subtotal = 0;
|
||||
$(".product-line-price").each(function() {
|
||||
if ($(this).val()) {
|
||||
subtotal += parseFloat($(this).val());
|
||||
}
|
||||
});
|
||||
|
||||
var tax = subtotal * 0.125;
|
||||
var discount = subtotal * 0.15;
|
||||
var shipping = subtotal > 0 ? 65 : 0;
|
||||
var total = subtotal + tax + shipping - discount;
|
||||
|
||||
$("#subtotal").val(subtotal.toFixed(2));
|
||||
$("#tax").val(tax.toFixed(2));
|
||||
$("#discount").val(discount.toFixed(2));
|
||||
$("#shipping").val(shipping.toFixed(2));
|
||||
$("#total").val(total.toFixed(2));
|
||||
// $("#totalamountInput").val(total.toFixed(2));
|
||||
// $("#amountTotalPay").val(total.toFixed(2));
|
||||
}
|
||||
</script>
|
||||
@endpush
|
@ -6,16 +6,19 @@
|
||||
<!-- start page title -->
|
||||
@include('layouts.partials.breadcrumb', ['title' => $title])
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('invoice.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('taxation::invoice.partials.action')
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('leaveType.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('leave::leave.partials.action')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
@ -9,9 +9,9 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<h5 class="card-title flex-grow-1 mb-0">Leave Lists</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('invoice.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
<a href="{{ route('leaveType.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Add</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,14 +22,14 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Id</th>
|
||||
<th>Leave Type</th>
|
||||
<th>Created By</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($invoices as $key => $leaveType)
|
||||
@forelse ($leaveTypes as $key => $leaveType)
|
||||
<tr>
|
||||
<td>{{ $key + 1 }}</td>
|
||||
<td>{{ $leaveType->employee_id }}</td>
|
@ -0,0 +1,25 @@
|
||||
<div class="mb-3">
|
||||
|
||||
<label for="employee_id" class="form-label">Employee Name</label>
|
||||
{{ html()->select('employee_id', $employeeList)->class('form-select')->placeholder('Select Employee') }}
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="start_date" class="form-label">Start Leave Date</label>
|
||||
<input type="date" class="form-control" id="start_date" name="start_date"
|
||||
value="{{ old('start_date', $leave->start_date ?? '') }}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="end_date" class="form-label">End Leave Date</label>
|
||||
<input type="date" class="form-control" id="end_date" name="end_date"
|
||||
value="{{ old('end_date', $leave->end_date ?? '') }}">
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary">{{ isset($leave) ? 'Update' : 'Add Leave' }}</button>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Taxation\Http\Controllers\InvoiceController;
|
||||
use Modules\Taxation\Http\Controllers\TaxationController;
|
||||
|
||||
/*
|
||||
@ -13,11 +12,8 @@ use Modules\Taxation\Http\Controllers\TaxationController;
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
*/
|
||||
|
||||
Route::group([], function () {
|
||||
Route::resource('taxation', TaxationController::class)->names('taxation');
|
||||
Route::resource('invoice', InvoiceController::class)->names('invoice');
|
||||
Route::get('clone-product', [InvoiceController::class, 'cloneProduct'])->name('cloneProduct');
|
||||
|
||||
});
|
||||
|
@ -17,9 +17,9 @@ trait CreatedUpdatedBy
|
||||
if ($model->isDirty('createdOn') && !$model->isDirty('createdOn')) {
|
||||
$model->createdOn = now();
|
||||
}
|
||||
// if (!$model->isDirty('status')) {
|
||||
// $model->status = 11;
|
||||
// }
|
||||
if (!$model->isDirty('status')) {
|
||||
$model->status = 1;
|
||||
}
|
||||
});
|
||||
|
||||
// updating updated_by when model is updated
|
||||
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
|
||||
trait StatusTrait
|
||||
{
|
||||
const STATUS = [
|
||||
11 => 'Active',
|
||||
10 => 'In-Active',
|
||||
];
|
||||
|
||||
protected function statusName(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function (mixed $value, array $attributes) {
|
||||
// dd($value, $attributes);
|
||||
switch ($attributes['status']) {
|
||||
case '10':
|
||||
return '<span class="badge bg-danger">' . self::STATUS[$attributes['status']] . '</span>';
|
||||
break;
|
||||
case '11':
|
||||
return '<span class="badge bg-success">' . self::STATUS[$attributes['status']] . '</span>';
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
},
|
||||
set: fn($value) => $value,
|
||||
);
|
||||
}
|
||||
}
|
@ -4,6 +4,5 @@
|
||||
"Attendance": true,
|
||||
"User": true,
|
||||
"Admin": true,
|
||||
"Taxation": true,
|
||||
"PMS": true
|
||||
"Taxation": true
|
||||
}
|
18295
public/assets/css/app.min.css
vendored
18295
public/assets/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,74 +1 @@
|
||||
var cleaveDate,
|
||||
cleaveDateFormat,
|
||||
cleaveTime,
|
||||
cleaveTimeFormat,
|
||||
cleaveNumeral,
|
||||
cleaveDelimiter,
|
||||
cleaveDelimiters,
|
||||
cleavePrefix,
|
||||
cleaveBlocks;
|
||||
document.querySelector("#cleave-date") &&
|
||||
(cleaveDate = new Cleave("#cleave-date", {
|
||||
date: !0,
|
||||
delimiter: "-",
|
||||
datePattern: ["d", "m", "Y"],
|
||||
})),
|
||||
document.querySelector("#cleave-date-format") &&
|
||||
(cleaveDateFormat = new Cleave("#cleave-date-format", {
|
||||
date: !0,
|
||||
datePattern: ["m", "y"],
|
||||
})),
|
||||
document.querySelector("#cleave-time") &&
|
||||
(cleaveTime = new Cleave("#cleave-time", {
|
||||
time: !0,
|
||||
timePattern: ["h", "m", "s"],
|
||||
})),
|
||||
|
||||
|
||||
document.querySelector("#cleave-time-format") &&
|
||||
(cleaveTimeFormat = new Cleave("#cleave-time-format", {
|
||||
time: !0,
|
||||
timePattern: ["h", "m"],
|
||||
})),
|
||||
|
||||
document.querySelectorAll(".cleave-numeral").forEach(function (element) {
|
||||
new Cleave(element, {
|
||||
numeral: !0,
|
||||
numeralThousandsGroupStyle: "thousand",
|
||||
});
|
||||
});
|
||||
|
||||
// document.querySelector("cleave-numeral") &&
|
||||
// (cleaveNumeral = new Cleave(".cleave-numeral", {
|
||||
// numeral: !0,
|
||||
// numeralThousandsGroupStyle: "thousand",
|
||||
// })),
|
||||
document.querySelector("#cleave-ccard") &&
|
||||
(cleaveBlocks = new Cleave("#cleave-ccard", {
|
||||
blocks: [4, 4, 4, 4],
|
||||
uppercase: !0,
|
||||
})),
|
||||
document.querySelector("#cleave-delimiter") &&
|
||||
(cleaveDelimiter = new Cleave("#cleave-delimiter", {
|
||||
delimiter: "·",
|
||||
blocks: [3, 3, 3],
|
||||
uppercase: !0,
|
||||
})),
|
||||
document.querySelector("#cleave-delimiters") &&
|
||||
(cleaveDelimiters = new Cleave("#cleave-delimiters", {
|
||||
delimiters: [".", ".", "-"],
|
||||
blocks: [3, 3, 3, 2],
|
||||
uppercase: !0,
|
||||
})),
|
||||
document.querySelector("#cleave-prefix") &&
|
||||
(cleavePrefix = new Cleave("#cleave-prefix", {
|
||||
prefix: "INV",
|
||||
delimiter: "-",
|
||||
blocks: [3, 4, 4, 4],
|
||||
uppercase: !0,
|
||||
})),
|
||||
document.querySelector("#cleave-phone") &&
|
||||
(cleaveBlocks = new Cleave("#cleave-phone", {
|
||||
delimiters: ["(", ")", "-"],
|
||||
blocks: [0, 3, 3, 4],
|
||||
}));
|
||||
var cleaveDate,cleaveDateFormat,cleaveTime,cleaveTimeFormat,cleaveNumeral,cleaveDelimiter,cleaveDelimiters,cleavePrefix,cleaveBlocks;document.querySelector("#cleave-date")&&(cleaveDate=new Cleave("#cleave-date",{date:!0,delimiter:"-",datePattern:["d","m","Y"]})),document.querySelector("#cleave-date-format")&&(cleaveDateFormat=new Cleave("#cleave-date-format",{date:!0,datePattern:["m","y"]})),document.querySelector("#cleave-time")&&(cleaveTime=new Cleave("#cleave-time",{time:!0,timePattern:["h","m","s"]})),document.querySelector("#cleave-time-format")&&(cleaveTimeFormat=new Cleave("#cleave-time-format",{time:!0,timePattern:["h","m"]})),document.querySelector("#cleave-numeral")&&(cleaveNumeral=new Cleave("#cleave-numeral",{numeral:!0,numeralThousandsGroupStyle:"thousand"})),document.querySelector("#cleave-ccard")&&(cleaveBlocks=new Cleave("#cleave-ccard",{blocks:[4,4,4,4],uppercase:!0})),document.querySelector("#cleave-delimiter")&&(cleaveDelimiter=new Cleave("#cleave-delimiter",{delimiter:"·",blocks:[3,3,3],uppercase:!0})),document.querySelector("#cleave-delimiters")&&(cleaveDelimiters=new Cleave("#cleave-delimiters",{delimiters:[".",".","-"],blocks:[3,3,3,2],uppercase:!0})),document.querySelector("#cleave-prefix")&&(cleavePrefix=new Cleave("#cleave-prefix",{prefix:"PREFIX",delimiter:"-",blocks:[6,4,4,4],uppercase:!0})),document.querySelector("#cleave-phone")&&(cleaveBlocks=new Cleave("#cleave-phone",{delimiters:["(",")","-"],blocks:[0,3,3,4]}));
|
@ -110,7 +110,7 @@
|
||||
<script src="{{ asset('assets/libs/feather-icons/feather.min.js') }}"></script>
|
||||
|
||||
{{-- <script src="{{ asset('assets/js/pages/plugins/lord-icon-2.1.0.js') }}"></script> --}}
|
||||
|
||||
|
||||
<script src="{{ asset('assets/js/plugins.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('assets/libs/@ckeditor/ckeditor5-build-classic/build/ckeditor.js') }}"></script>
|
||||
@ -123,7 +123,9 @@
|
||||
|
||||
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
|
||||
|
||||
<script src="{{ asset('assets/libs/fullcalendar/index.global.min.j') }}s"></script>
|
||||
<script src="{{ asset('assets/libs/fullcalendar/index.global.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('assets/libs/choices.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('assets/js/pages/calendar.init.js') }}"></script>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div id="preloader">
|
||||
<div id="pre-status">
|
||||
<div class="spinner-border text-primary avatar-sm" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
<div id="status">
|
||||
<div class="spinner-border text-primary avatar-sm" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -34,40 +34,12 @@
|
||||
<a href="#" class="nav-link"> <i class="ri-home-line"></i>Dashboard </a>
|
||||
</li>
|
||||
|
||||
<!--- PMS Start-->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link {{ \Request::is('client') || \Request::is('project') || \Request::is('task') ? 'active' : '' }}"
|
||||
href="#PMS" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="PMS">
|
||||
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-vendors">PMS</span>
|
||||
</a>
|
||||
<div
|
||||
class="menu-dropdown {{ \Request::is('client') || \Request::is('project') || \Request::is('task') ? 'show' : '' }} collapse"
|
||||
id="PMS">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('client.index') }}"
|
||||
class="nav-link @if (\Request::is('client') || \Request::is('client/*')) active @endif">Client</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('project.index') }}"
|
||||
class="nav-link @if (\Request::is('project') || \Request::is('project/*')) active @endif">Projects</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('task.index') }}"
|
||||
class="nav-link @if (\Request::is('task') || \Request::is('task/*')) active @endif">Tasks</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<!--- PMS End-->
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuOne" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="MenuOne">
|
||||
<i class="ri-building-2-line"></i> <span data-key="t-companies">Company Setup</span>
|
||||
</a>
|
||||
|
||||
<div class="menu-dropdown collapse" id="MenuOne">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
|
||||
@ -80,29 +52,63 @@
|
||||
<a href="{{ route('company.index') }}"
|
||||
class="nav-link @if (\Request::is('company') || \Request::is('company/*')) active @endif">Company</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuAttendance" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="MenuAttendance">
|
||||
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-attendances">Attendance</span>
|
||||
</a>
|
||||
<div class="menu-dropdown collapse" id="MenuAttendance">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('attendance.index') }}"
|
||||
class="nav-link @if (\Request::is('attendance')) active @endif">Attendance Report</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuTwo" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="MenuTwo">
|
||||
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-vendors">Vendor Setup</span>
|
||||
</a>
|
||||
<div class="menu-dropdown collapse" id="MenuTwo">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('vendortypes.index') }}"
|
||||
class="nav-link @if (\Request::is('vendortype') || \Request::is('vendortype/*')) active @endif">Vendor Type</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('vendors.index') }}"
|
||||
class="nav-link @if (\Request::is('vendors') || \Request::is('vendors/*')) active @endif">Vendor</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li> --}}
|
||||
|
||||
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link @if (\Request::is('employee') || \Request::is('employee/*')) active @endif"
|
||||
href="{{ route('employee.index') }}">
|
||||
<i class="ri-team-line"></i> <span data-key="t-widgets">Employee</span>
|
||||
</a>
|
||||
</li> --}}
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link @if (\Request::is('calendar') || \Request::is('calendar/*')) active @endif"
|
||||
href="{{ route('calendar.index') }}">
|
||||
<i class="ri-team-line"></i> <span data-key="t-widgets">Calendar</span>
|
||||
<i class="ri-calendar-line"></i> <span data-key="t-widgets">Calendar</span>
|
||||
</a>
|
||||
</li> --}}
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#leave" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="leave">
|
||||
<i class="ri-shopping-cart-2-line"></i> <span data-key="t-vendors">Leave</span>
|
||||
@ -110,6 +116,7 @@
|
||||
<div class="menu-dropdown collapse" id="leave">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('leaveType.index') }}"
|
||||
class="nav-link @if (\Request::is('leavetype') || \Request::is('leavetype/*')) active @endif">Leave Type</a>
|
||||
@ -120,13 +127,33 @@
|
||||
class="nav-link @if (\Request::is('leave') || \Request::is('leave/*')) active @endif">Apply Leave</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="" class="nav-link @if (\Request::is('leaveReport') || \Request::is('leaveReport/*')) active @endif">Leave Report</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#taxation" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="taxation">
|
||||
<i class="ri-book-2-line"></i> <span data-key="t-masters">Taxation</span>
|
||||
</a>
|
||||
<div class="menu-dropdown collapse" id="taxation">
|
||||
<ul class="nav nav-sm flex-column">
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('user.index') }}"
|
||||
class="nav-link @if (\Request::is('user') || \Request::is('user/*')) active @endif">Users</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li> --}}
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuThree" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="MenuThree">
|
||||
<a class="nav-link menu-link" href="#MenuThree" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="MenuThree">
|
||||
<i class="ri-dashboard-2-line"></i> <span data-key="t-masters">Master</span>
|
||||
</a>
|
||||
<div class="menu-dropdown collapse" id="MenuThree">
|
||||
@ -179,9 +206,9 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuFour" data-bs-toggle="collapse" role="button" aria-expanded="false"
|
||||
aria-controls="MenuFour">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#MenuFour" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="MenuFour">
|
||||
<i class="ri-dashboard-2-line"></i> <span data-key="t-hrs">HR</span>
|
||||
</a>
|
||||
<div class="menu-dropdown collapse" id="MenuFour">
|
||||
@ -239,15 +266,12 @@
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</li> --}}
|
||||
</li>
|
||||
|
||||
{{-- <li class="nav-item">
|
||||
<a href="#" class="nav-link"> <i class="ri-settings-2-line"></i>Setting</a>
|
||||
</li> --}}
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- Sidebar -->
|
||||
|
@ -19,7 +19,7 @@ Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
Route::get('/invoice-test', function () {
|
||||
Route::get('/invoice', function () {
|
||||
return view('invoice');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user