leave user employee module setup
This commit is contained in:
0
Modules/User/resources/assets/.gitkeep
Normal file
0
Modules/User/resources/assets/.gitkeep
Normal file
0
Modules/User/resources/assets/js/app.js
Normal file
0
Modules/User/resources/assets/js/app.js
Normal file
0
Modules/User/resources/assets/sass/app.scss
Normal file
0
Modules/User/resources/assets/sass/app.scss
Normal file
0
Modules/User/resources/views/.gitkeep
Normal file
0
Modules/User/resources/views/.gitkeep
Normal file
44
Modules/User/resources/views/create.blade.php
Normal file
44
Modules/User/resources/views/create.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">{{ $title }}</h4>
|
||||
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">{{ $title }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('user.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('user::partials.action', ['btnType' => 'Save'])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
44
Modules/User/resources/views/edit.blade.php
Normal file
44
Modules/User/resources/views/edit.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box d-sm-flex align-items-center justify-content-between">
|
||||
<h4 class="mb-sm-0">{{ $title }}</h4>
|
||||
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Dashboards</a></li>
|
||||
<li class="breadcrumb-item active">{{ $title }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('user.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('user::partials.action', ['btnType' => 'Save'])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
|
||||
</div>
|
||||
<!-- container-fluid -->
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
73
Modules/User/resources/views/index.blade.php
Normal file
73
Modules/User/resources/views/index.blade.php
Normal file
@ -0,0 +1,73 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="page-content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h4>{{ label('Users List') }}</h4>
|
||||
<a href="{{ route('user.create') }}" class="btn btn-info"><span>{{ label('Create New') }}</span></a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Sn.') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Name') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Email') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('User Name') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Role') }}</span></th>
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Branch') }}</span></th>
|
||||
|
||||
<th class="tb-col"><span class="overline-title">{{ label('Employee') }}</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">{{ label('Action') }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data as $item)
|
||||
<tr data-id="{{ $item->id }}" data-display_order="{{ $item->display_order }}"
|
||||
class="draggable-row">
|
||||
<td class="tb-col">{{ $i++ }}</td>
|
||||
<td class="tb-col">{{ $item->name }}</td>
|
||||
<td class="tb-col">{{ $item->email }}</td>
|
||||
<td class="tb-col">{{ $item->username }}</td>
|
||||
<td class="tb-col">{!! getFieldData('tbl_roles', 'title', 'role_id', $item->roles_id) !!}
|
||||
<td class="tb-col">{!! getFieldData('tbl_branches', 'title', 'branch_id', $item->branches_id) !!}
|
||||
|
||||
<td class="tb-col">{!! getFieldData('tbl_employees', 'title', 'employee_id', $item->employees_id) !!}
|
||||
</td>
|
||||
<td class="tb-col">
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="javascript:void(0);" class="link-info fs-15 view-item-btn" data-bs-toggle="modal"
|
||||
data-bs-target="#viewModal">
|
||||
<i class="ri-eye-line"></i>
|
||||
</a>
|
||||
<a href="{{ route('user.edit', $item->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('user.destroy', $item->id) }}"
|
||||
data-id="{{ $item->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-line"></i></a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('user::partials.view')
|
||||
@endsection
|
29
Modules/User/resources/views/layouts/master.blade.php
Normal file
29
Modules/User/resources/views/layouts/master.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<!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>User 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-user', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-user', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
23
Modules/User/resources/views/partials/action.blade.php
Normal file
23
Modules/User/resources/views/partials/action.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Name</label>
|
||||
<input type="text" class="form-control" id="name" placeholder="Enter name" name="name"
|
||||
value="{{ old('end_date', $leave->name ?? '') }}" required>
|
||||
<div class="invalid-feedback">
|
||||
Please enter employee name.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email"
|
||||
value="{{ old('email', $leave->email ?? '') }}">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary">{{ $btnType }}</button>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
16
Modules/User/resources/views/partials/view.blade.php
Normal file
16
Modules/User/resources/views/partials/view.blade.php
Normal file
@ -0,0 +1,16 @@
|
||||
<div class="modal fade" id="viewModal" tabindex="-1" aria-labelledby="viewModalLabel" aria-modal="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalgridLabel">View User</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('user.store') }}" class="needs-validation" novalidate method="post">
|
||||
@csrf
|
||||
@include('user::partials.action', ['btnType' => 'View'])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user