From f7b7d80b87c69405e96172519939cd5b84f88f1c Mon Sep 17 00:00:00 2001 From: Ranjan Date: Fri, 5 Apr 2024 10:02:17 +0545 Subject: [PATCH] issues --- Modules/Leave/Http/Controllers/.gitkeep | 0 .../Http/Controllers/LeaveController.php | 84 ----- Modules/Leave/Models/.gitkeep | 0 Modules/Leave/Models/Leave.php | 12 - Modules/Leave/Providers/.gitkeep | 0 .../Leave/Providers/LeaveServiceProvider.php | 117 ------- .../Leave/Providers/RouteServiceProvider.php | 49 --- Modules/Leave/Repositories/.gitkeep | 0 Modules/Leave/Repositories/LeaveInterface.php | 12 - .../Leave/Repositories/LeaveRepository.php | 34 -- Modules/Leave/composer.json | 30 -- Modules/Leave/config/.gitkeep | 0 Modules/Leave/config/config.php | 5 - Modules/Leave/database/migrations/.gitkeep | 0 .../2024_04_04_102430_create_leaves_table.php | 30 -- Modules/Leave/database/seeders/.gitkeep | 0 .../database/seeders/LeaveDatabaseSeeder.php | 16 - Modules/Leave/module.json | 11 - Modules/Leave/package.json | 15 - Modules/Leave/resources/assets/.gitkeep | 0 Modules/Leave/resources/assets/js/app.js | 0 Modules/Leave/resources/assets/sass/app.scss | 0 Modules/Leave/resources/views/.gitkeep | 0 .../Leave/resources/views/create.blade.php | 40 --- Modules/Leave/resources/views/index.blade.php | 298 ------------------ .../resources/views/layouts/master.blade.php | 29 -- .../resources/views/partials/action.blade.php | 23 -- Modules/Leave/routes/.gitkeep | 0 Modules/Leave/routes/api.php | 19 -- Modules/Leave/routes/web.php | 19 -- Modules/Leave/vite.config.js | 26 -- 31 files changed, 869 deletions(-) delete mode 100644 Modules/Leave/Http/Controllers/.gitkeep delete mode 100644 Modules/Leave/Http/Controllers/LeaveController.php delete mode 100644 Modules/Leave/Models/.gitkeep delete mode 100644 Modules/Leave/Models/Leave.php delete mode 100644 Modules/Leave/Providers/.gitkeep delete mode 100644 Modules/Leave/Providers/LeaveServiceProvider.php delete mode 100644 Modules/Leave/Providers/RouteServiceProvider.php delete mode 100644 Modules/Leave/Repositories/.gitkeep delete mode 100644 Modules/Leave/Repositories/LeaveInterface.php delete mode 100644 Modules/Leave/Repositories/LeaveRepository.php delete mode 100644 Modules/Leave/composer.json delete mode 100644 Modules/Leave/config/.gitkeep delete mode 100644 Modules/Leave/config/config.php delete mode 100644 Modules/Leave/database/migrations/.gitkeep delete mode 100644 Modules/Leave/database/migrations/2024_04_04_102430_create_leaves_table.php delete mode 100644 Modules/Leave/database/seeders/.gitkeep delete mode 100644 Modules/Leave/database/seeders/LeaveDatabaseSeeder.php delete mode 100644 Modules/Leave/module.json delete mode 100644 Modules/Leave/package.json delete mode 100644 Modules/Leave/resources/assets/.gitkeep delete mode 100644 Modules/Leave/resources/assets/js/app.js delete mode 100644 Modules/Leave/resources/assets/sass/app.scss delete mode 100644 Modules/Leave/resources/views/.gitkeep delete mode 100644 Modules/Leave/resources/views/create.blade.php delete mode 100644 Modules/Leave/resources/views/index.blade.php delete mode 100644 Modules/Leave/resources/views/layouts/master.blade.php delete mode 100644 Modules/Leave/resources/views/partials/action.blade.php delete mode 100644 Modules/Leave/routes/.gitkeep delete mode 100644 Modules/Leave/routes/api.php delete mode 100644 Modules/Leave/routes/web.php delete mode 100644 Modules/Leave/vite.config.js diff --git a/Modules/Leave/Http/Controllers/.gitkeep b/Modules/Leave/Http/Controllers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/Http/Controllers/LeaveController.php b/Modules/Leave/Http/Controllers/LeaveController.php deleted file mode 100644 index 7f65e29..0000000 --- a/Modules/Leave/Http/Controllers/LeaveController.php +++ /dev/null @@ -1,84 +0,0 @@ -leaveRepository = $leaveRepository; - } - - /** - * Display a listing of the resource. - */ - public function index() - { - $data['leaves'] = $this->leaveRepository->findAll(); - // dd($data['leaves']); - return view('leave::index'); - } - - /** - * Show the form for creating a new resource. - */ - public function create() - { - $data['title'] = 'Create Leave'; - return view('leave::create', $data); - } - - /** - * Store a newly created resource in storage. - */ - public function store(Request $request): RedirectResponse - { - $inputData = $request->all(); - try { - $this->leaveRepository->create($inputData); - toastr()->success('Leave Created Succesfully'); - } catch (\Throwable $th) { - toastr()->error($th->getMessage()); - } - return redirect()->route('leave.index'); - } - - /** - * Show the specified resource. - */ - public function show($id) - { - return view('leave::show'); - } - - /** - * Show the form for editing the specified resource. - */ - public function edit($id) - { - return view('leave::edit'); - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, $id): RedirectResponse - { - // - } - - /** - * Remove the specified resource from storage. - */ - public function destroy($id) - { - // - } -} diff --git a/Modules/Leave/Models/.gitkeep b/Modules/Leave/Models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/Models/Leave.php b/Modules/Leave/Models/Leave.php deleted file mode 100644 index 0739923..0000000 --- a/Modules/Leave/Models/Leave.php +++ /dev/null @@ -1,12 +0,0 @@ -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(LeaveInterface::class, LeaveRepository::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; - } -} diff --git a/Modules/Leave/Providers/RouteServiceProvider.php b/Modules/Leave/Providers/RouteServiceProvider.php deleted file mode 100644 index 29b900e..0000000 --- a/Modules/Leave/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,49 +0,0 @@ -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('Leave', '/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('Leave', '/routes/api.php')); - } -} diff --git a/Modules/Leave/Repositories/.gitkeep b/Modules/Leave/Repositories/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/Repositories/LeaveInterface.php b/Modules/Leave/Repositories/LeaveInterface.php deleted file mode 100644 index d34795e..0000000 --- a/Modules/Leave/Repositories/LeaveInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -update($newDetails); - } - -} diff --git a/Modules/Leave/composer.json b/Modules/Leave/composer.json deleted file mode 100644 index c2a47e6..0000000 --- a/Modules/Leave/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "nwidart/leave", - "description": "", - "authors": [ - { - "name": "Nicolas Widart", - "email": "n.widart@gmail.com" - } - ], - "extra": { - "laravel": { - "providers": [], - "aliases": { - - } - } - }, - "autoload": { - "psr-4": { - "Modules\\Leave\\": "app/", - "Modules\\Leave\\Database\\Factories\\": "database/factories/", - "Modules\\Leave\\Database\\Seeders\\": "database/seeders/" - } - }, - "autoload-dev": { - "psr-4": { - "Modules\\Leave\\Tests\\": "tests/" - } - } -} diff --git a/Modules/Leave/config/.gitkeep b/Modules/Leave/config/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/config/config.php b/Modules/Leave/config/config.php deleted file mode 100644 index 827548c..0000000 --- a/Modules/Leave/config/config.php +++ /dev/null @@ -1,5 +0,0 @@ - 'Leave', -]; diff --git a/Modules/Leave/database/migrations/.gitkeep b/Modules/Leave/database/migrations/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/database/migrations/2024_04_04_102430_create_leaves_table.php b/Modules/Leave/database/migrations/2024_04_04_102430_create_leaves_table.php deleted file mode 100644 index 0accbdc..0000000 --- a/Modules/Leave/database/migrations/2024_04_04_102430_create_leaves_table.php +++ /dev/null @@ -1,30 +0,0 @@ -tinyInteger('leave_id')->unsigned()->autoIncrement(); - $table->integer('employee_id'); - $table->date('start_date'); - $table->date('end_date'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('leaves'); - } -}; diff --git a/Modules/Leave/database/seeders/.gitkeep b/Modules/Leave/database/seeders/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/database/seeders/LeaveDatabaseSeeder.php b/Modules/Leave/database/seeders/LeaveDatabaseSeeder.php deleted file mode 100644 index 0a3661a..0000000 --- a/Modules/Leave/database/seeders/LeaveDatabaseSeeder.php +++ /dev/null @@ -1,16 +0,0 @@ -call([]); - } -} diff --git a/Modules/Leave/module.json b/Modules/Leave/module.json deleted file mode 100644 index c81af7a..0000000 --- a/Modules/Leave/module.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "Leave", - "alias": "leave", - "description": "", - "keywords": [], - "priority": 0, - "providers": [ - "Modules\\Leave\\Providers\\LeaveServiceProvider" - ], - "files": [] -} diff --git a/Modules/Leave/package.json b/Modules/Leave/package.json deleted file mode 100644 index d6fbfc8..0000000 --- a/Modules/Leave/package.json +++ /dev/null @@ -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" - } -} diff --git a/Modules/Leave/resources/assets/.gitkeep b/Modules/Leave/resources/assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/resources/assets/js/app.js b/Modules/Leave/resources/assets/js/app.js deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/resources/assets/sass/app.scss b/Modules/Leave/resources/assets/sass/app.scss deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/resources/views/.gitkeep b/Modules/Leave/resources/views/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/resources/views/create.blade.php b/Modules/Leave/resources/views/create.blade.php deleted file mode 100644 index c56be23..0000000 --- a/Modules/Leave/resources/views/create.blade.php +++ /dev/null @@ -1,40 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
- -
-
-
-

{{ $title }}

- -
- -
- -
-
-
- -
-
-
-
-
- @csrf - @include('leave::partials.action') -
-
-
-
-
- - -
- -
-@endsection diff --git a/Modules/Leave/resources/views/index.blade.php b/Modules/Leave/resources/views/index.blade.php deleted file mode 100644 index 82f6cc4..0000000 --- a/Modules/Leave/resources/views/index.blade.php +++ /dev/null @@ -1,298 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
- - {{--
-
-
-

Projects

- -
- -
- -
-
-
--}} - - - {{--
-
-
-
- -
-
-
- - -
-
-
-
-
--}} - -
-
-
-
-
Leave Lists
-
- Add -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSydney232010/09/20$85,600
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
-
-
-
-
-
- -
- -
-@endsection diff --git a/Modules/Leave/resources/views/layouts/master.blade.php b/Modules/Leave/resources/views/layouts/master.blade.php deleted file mode 100644 index 17f81bc..0000000 --- a/Modules/Leave/resources/views/layouts/master.blade.php +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - Leave Module - {{ config('app.name', 'Laravel') }} - - - - - - - - - - {{-- Vite CSS --}} - {{-- {{ module_vite('build-leave', 'resources/assets/sass/app.scss') }} --}} - - - - @yield('content') - - {{-- Vite JS --}} - {{-- {{ module_vite('build-leave', 'resources/assets/js/app.js') }} --}} - diff --git a/Modules/Leave/resources/views/partials/action.blade.php b/Modules/Leave/resources/views/partials/action.blade.php deleted file mode 100644 index 04ce95d..0000000 --- a/Modules/Leave/resources/views/partials/action.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
diff --git a/Modules/Leave/routes/.gitkeep b/Modules/Leave/routes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Modules/Leave/routes/api.php b/Modules/Leave/routes/api.php deleted file mode 100644 index 54310e6..0000000 --- a/Modules/Leave/routes/api.php +++ /dev/null @@ -1,19 +0,0 @@ -prefix('v1')->group(function () { - Route::apiResource('leave', LeaveController::class)->names('leave'); -}); diff --git a/Modules/Leave/routes/web.php b/Modules/Leave/routes/web.php deleted file mode 100644 index f99dd31..0000000 --- a/Modules/Leave/routes/web.php +++ /dev/null @@ -1,19 +0,0 @@ -names('leave'); -}); diff --git a/Modules/Leave/vite.config.js b/Modules/Leave/vite.config.js deleted file mode 100644 index 32835dc..0000000 --- a/Modules/Leave/vite.config.js +++ /dev/null @@ -1,26 +0,0 @@ -import { defineConfig } from 'vite'; -import laravel from 'laravel-vite-plugin'; - -export default defineConfig({ - build: { - outDir: '../../public/build-leave', - emptyOutDir: true, - manifest: true, - }, - plugins: [ - laravel({ - publicDirectory: '../../public', - buildDirectory: 'build-leave', - input: [ - __dirname + '/resources/assets/sass/app.scss', - __dirname + '/resources/assets/js/app.js' - ], - refresh: true, - }), - ], -}); - -//export const paths = [ -// 'Modules/Leave/resources/assets/sass/app.scss', -// 'Modules/Leave/resources/assets/js/app.js', -//]; \ No newline at end of file