diff --git a/Modules/Employee/app/Http/Controllers/.gitkeep b/Modules/Employee/app/Http/Controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/app/Http/Controllers/EmployeeController.php b/Modules/Employee/app/Http/Controllers/EmployeeController.php new file mode 100644 index 0000000..cf8691d --- /dev/null +++ b/Modules/Employee/app/Http/Controllers/EmployeeController.php @@ -0,0 +1,67 @@ +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(EmployeeInterface::class, EmployeeRepository::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/Employee/app/Providers/RouteServiceProvider.php b/Modules/Employee/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..3cb405d --- /dev/null +++ b/Modules/Employee/app/Providers/RouteServiceProvider.php @@ -0,0 +1,49 @@ +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('Employee', '/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('Employee', '/routes/api.php')); + } +} diff --git a/Modules/Employee/app/Repositories/.gitkeep b/Modules/Employee/app/Repositories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/app/Repositories/EmployeeInterface.php b/Modules/Employee/app/Repositories/EmployeeInterface.php new file mode 100644 index 0000000..947e916 --- /dev/null +++ b/Modules/Employee/app/Repositories/EmployeeInterface.php @@ -0,0 +1,12 @@ +update($newDetails); + } + +} diff --git a/Modules/Employee/composer.json b/Modules/Employee/composer.json new file mode 100644 index 0000000..5385853 --- /dev/null +++ b/Modules/Employee/composer.json @@ -0,0 +1,30 @@ +{ + "name": "nwidart/employee", + "description": "", + "authors": [ + { + "name": "Nicolas Widart", + "email": "n.widart@gmail.com" + } + ], + "extra": { + "laravel": { + "providers": [], + "aliases": { + + } + } + }, + "autoload": { + "psr-4": { + "Modules\\Employee\\": "app/", + "Modules\\Employee\\Database\\Factories\\": "database/factories/", + "Modules\\Employee\\Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Modules\\Employee\\Tests\\": "tests/" + } + } +} diff --git a/Modules/Employee/config/.gitkeep b/Modules/Employee/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/config/config.php b/Modules/Employee/config/config.php new file mode 100644 index 0000000..1468608 --- /dev/null +++ b/Modules/Employee/config/config.php @@ -0,0 +1,5 @@ + 'Employee', +]; diff --git a/Modules/Employee/database/migrations/.gitkeep b/Modules/Employee/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/database/seeders/.gitkeep b/Modules/Employee/database/seeders/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/database/seeders/EmployeeDatabaseSeeder.php b/Modules/Employee/database/seeders/EmployeeDatabaseSeeder.php new file mode 100644 index 0000000..d778134 --- /dev/null +++ b/Modules/Employee/database/seeders/EmployeeDatabaseSeeder.php @@ -0,0 +1,16 @@ +call([]); + } +} diff --git a/Modules/Employee/module.json b/Modules/Employee/module.json new file mode 100644 index 0000000..bffedee --- /dev/null +++ b/Modules/Employee/module.json @@ -0,0 +1,11 @@ +{ + "name": "Employee", + "alias": "employee", + "description": "", + "keywords": [], + "priority": 0, + "providers": [ + "Modules\\Employee\\Providers\\EmployeeServiceProvider" + ], + "files": [] +} diff --git a/Modules/Employee/package.json b/Modules/Employee/package.json new file mode 100644 index 0000000..d6fbfc8 --- /dev/null +++ b/Modules/Employee/package.json @@ -0,0 +1,15 @@ +{ + "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/Employee/resources/assets/.gitkeep b/Modules/Employee/resources/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/resources/assets/js/app.js b/Modules/Employee/resources/assets/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/resources/assets/sass/app.scss b/Modules/Employee/resources/assets/sass/app.scss new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/resources/views/.gitkeep b/Modules/Employee/resources/views/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/resources/views/index.blade.php b/Modules/Employee/resources/views/index.blade.php new file mode 100644 index 0000000..8031d3b --- /dev/null +++ b/Modules/Employee/resources/views/index.blade.php @@ -0,0 +1,1043 @@ +@extends('layouts.app') + +@section('content') +
+
+ + +
+
+
+

Team

+ +
+ +
+ +
+
+
+ + +
+
+
+
+ +
+ +
+
+ + + +
+
+ +
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Nancy Martino
+
+

Team Leader & HR

+
+
+
+
+
+
+
225
+

Projects

+
+
+
197
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
HB +
+
+
+
Henry Baird
+
+

Full Stack Developer

+
+
+
+
+
+
+
352
+

Projects

+
+
+
376
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Frank Hook
+
+

Project Manager

+
+
+
+
+
+
+
164
+

Projects

+
+
+
182
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Jennifer Carter
+
+

UI/UX Designer

+
+
+
+
+
+
+
241
+

Projects

+
+
+
204
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
ME +
+
+
+
Megan Elmore
+
+

Team Leader & Web Developer

+
+
+
+
+
+
+
201
+

Projects

+
+
+
263
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Alexis Clarke
+
+

Backend Developer

+
+
+
+
+
+
+
132
+

Projects

+
+
+
147
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
NC +
+
+
+
Nathan Cole
+
+

Front-End Developer

+
+
+
+
+
+
+
352
+

Projects

+
+
+
376
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Joseph Parker
+
+

Full Stack Developer

+
+
+
+
+
+
+
64
+

Projects

+
+
+
93
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Erica Kernan
+
+

Web Designer

+
+
+
+
+
+
+
345
+

Projects

+
+
+
298
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
DP +
+
+
+
Donald Palmer
+
+

Wed Developer

+
+
+
+
+
+
+
97
+

Projects

+
+
+
135
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
Jack Gough
+
+

React Js Developer

+
+
+
+
+
+
+
87
+

Projects

+
+
+
121
+

Tasks

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
MW +
+
+
+
Marie Ward
+
+

Backend Developer

+
+
+
+
+
+
+
145
+

Projects

+
+
+
210
+

Tasks

+
+
+
+ +
+
+
+
+
+ +
+ + + + + +
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+
+ +
+
Nancy Martino
+

Team Leader & HR

+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+
+
+
124
+

Projects

+
+
+ +
+
+
81
+

Tasks

+
+
+ +
+ +
+
Personal Details
+
+

Number

+
+(256) 2451 8974
+
+
+

Email

+
nancymartino@email.com
+
+
+

Location

+
Carson City - USA
+
+
+
+
File Manager
+
+
+
+ +
+
+
+
Images
+

4469 Files

+
+
+ 12 GB +
+
+
+
+
+ +
+
+
+
Documents
+

46 Files

+
+
+ 3.46 GB +
+
+
+
+
+ +
+
+
+
Media
+

124 Files

+
+
+ 4.3 GB +
+
+
+
+
+ +
+
+
+
Others
+

18 Files

+
+
+ 846 MB +
+
+
+
+ +
+ + View Profile +
+
+ +
+
+
+ +
+
+@endsection diff --git a/Modules/Employee/resources/views/layouts/master.blade.php b/Modules/Employee/resources/views/layouts/master.blade.php new file mode 100644 index 0000000..a7d0f0d --- /dev/null +++ b/Modules/Employee/resources/views/layouts/master.blade.php @@ -0,0 +1,29 @@ + + + + + + + + + + Employee Module - {{ config('app.name', 'Laravel') }} + + + + + + + + + + {{-- Vite CSS --}} + {{-- {{ module_vite('build-employee', 'resources/assets/sass/app.scss') }} --}} + + + + @yield('content') + + {{-- Vite JS --}} + {{-- {{ module_vite('build-employee', 'resources/assets/js/app.js') }} --}} + diff --git a/Modules/Employee/resources/views/show.blade.php b/Modules/Employee/resources/views/show.blade.php new file mode 100644 index 0000000..7191c1f --- /dev/null +++ b/Modules/Employee/resources/views/show.blade.php @@ -0,0 +1,2112 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+ +
+
+
+
+
+
+ user-img +
+
+ +
+
+

Anna Adame

+

Owner & Founder

+
+
California, United + States
+
+ Themesbrand +
+
+
+
+ +
+
+
+
+

24.3K

+

Followers

+
+
+
+
+

1.3K

+

Following

+
+
+
+
+ + +
+ +
+ +
+
+
+ + +
+
+
+
+
+
+
Complete Your Profile
+
+
+
30%
+
+
+
+
+ +
+
+
Info
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Full Name :Anna Adame
Mobile :+(1) 987 6543
E-mail :daveadame@velzon.com
Location :California, United States +
Joining Date24 Nov 2021
+
+
+
+ +
+
+
Portfolio
+ +
+
+ +
+
+
Skills
+ +
+
+ +
+
+
+
+
Suggestions
+
+
+ +
+
+
+
+
+ +
+
+
+
Esther James
+

Frontend Developer

+
+
+
+ +
+
+
+
+ +
+
+
+
Jacqueline Steve
+

UI/UX Designer

+
+
+
+ +
+
+
+
+ +
+
+
+
George Whalen
+

Backend Developer

+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
Popular Posts
+
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+
About
+

Hi I'm Anna Adame, It will be as simple as Occidental; in fact, it will be Occidental. To an + English person, it will seem like simplified English, as a skeptical Cambridge friend of mine + told me what Occidental is European languages are members of the same family.

+

You always want to make sure that your fonts work well together and try to limit the number of + fonts you use to three or less. Experiment and play around with the fonts that you already have + in the software you’re working with reputable font websites. This may be the most commonly + encountered tip I received from the designers I spoke with. They highly encourage that you use + different fonts in one design, but do not over-exaggerate and go overboard.

+
+
+
+
+
+ +
+
+
+

Designation :

+
Lead Designer / Developer
+
+
+
+ +
+
+
+
+ +
+
+
+

Website :

+ www.velzon.com +
+
+
+ +
+ +
+ +
+ +
+
+
+
+

Recent Activity

+ +
+
+
+
+
+
+
+ +
+
+ In an awareness campaign, it is vital for people to begin put 2 and 2 together + and begin to recognize your cause. Too much or too little spacing, as in the + example below, can make things unpleasant for the reader. The goal is to make + your text as comfortable to read as possible. A wonderful serenity has taken + possession of my entire soul, like these sweet mornings of spring which I enjoy + with my whole heart. +
+
+
+ + +
+ +
+
+ " A wonderful serenity has + taken possession of my + entire soul, like these + sweet mornings of spring + which I enjoy with my whole + heart. Each design is a new, + unique piece of art birthed + into this world, and while + you have the opportunity to + be creative and make your + own style choices. " +
+
+
+
+ +
+
+

Every team project can have a velzon. Use the + velzon to share information with your team to understand and contribute to + your project.

+ +
+
+
+
+ +
+
+
+
+
+
+ +
+
+ It makes a statement, it’s + impressive graphic design. + Increase or decrease the + letter spacing depending on + the situation and try, try + again until it looks right, + and each letter has the + perfect spot of its own. +
+
+
+ +
+ +
+
+ Powerful, clean & modern + responsive bootstrap 5 admin + template. The maximum file + size for uploads in this demo : +
+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ +
+ +
+
+

+ " This is an awesome + admin dashboard + template. It is + extremely well + structured and uses + state of the art + components (e.g. one of + the only templates using + boostrap 5.1.3 so far). + I integrated it into a + Rails 6 project. Needs + manual integration work + of course but the + template structure made + it easy. "

+
+
+
+
+ +
+
+
+
+
+ +
+ +
+
+ In an awareness campaign, it + is vital for people to begin + put 2 and 2 together and + begin to recognize your + cause. Too much or too + little spacing, as in the + example below, can make + things unpleasant for the + reader. The goal is to make + your text as comfortable to + read as possible. A + wonderful serenity has taken + possession of my entire + soul, like these sweet + mornings of spring which I + enjoy with my whole heart. +
+
+
+ +
+ +
+
+ " A wonderful serenity has + taken possession of my + entire soul, like these + sweet mornings of spring + which I enjoy with my whole + heart. Each design is a new, + unique piece of art birthed + into this world, and while + you have the opportunity to + be creative and make your + own style choices. " +
+
+
+
+ +
+
+

+ Every team project can + have a velzon. Use the + velzon to share + information with your + team to understand and + contribute to your + project.

+ +
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
Activities
+
+
+
+ +
+
+
Oliver Phillips New
+

We talked about a project on linkedin.

+ Today +
+
+
+
+
+ N +
+
+
+
Nancy Martino In Progress
+

Create new + project Buildng product

+ + Yesterday +
+
+
+
+ +
+
+
Natasha Carey Completed +
+

Adding a new event with attachments

+
+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ 25 Nov +
+
+
+
+ +
+
+
Bethany Johnson
+

added a new member to velzon dashboard

+ 19 Nov +
+
+
+
+
+
+ +
+
+
+
+
Your order is placed Out of Delivery
+

These customers can rest assured their order has been placed.

+ 16 Nov +
+
+
+
+ +
+
+
Lewis Pratt
+

They all have something to say + beyond the words on the page. They can come across as + casual or neutral, exotic or graphic.

+ 22 Oct +
+
+
+
+
+
+ +
+
+
+
+
Monthly sales report
+

+ 2 days left notification to submit the monthly sales + report. Reports Builder +

+ 15 Oct +
+
+
+
+ +
+
+
New ticket received Completed
+

User Erica245 submitted a + ticket.

+ 26 Aug +
+
+
+
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
Chat App + Update
+

Last Update : 2 year Ago

+
+
+
Inprogress
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ J +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
ABC Project + Customization
+

Last Update : 2 month Ago

+
+
+
Progress
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ 2+ +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Client - Frank + Hook
+

Last Update : 1 hr Ago

+
+
+
New
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+
+ M +
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Velzon + Project
+

Last Update : 11 hr Ago

+
+
+
Completed
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Brand Logo + Design
+

Last Update : 10 min Ago

+
+
+
New
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ E +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Chat App +
+

Last Update : 8 hr Ago

+
+
+
Inprogress
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+
+ R +
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Project + Update
+

Last Update : 48 min Ago

+
+
+
Inprogress
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Client - + Jennifer
+

Last Update : 30 min Ago

+
+
+
Process
+
+
+ +
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Bsuiness + Template - UI/UX design
+

Last Update : 7 month Ago

+
+
+
Completed
+
+
+
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ 2+ +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+
Update + Project
+

Last Update : 1 month Ago

+
+
+
New
+
+
+
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+
+ A +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
Bank Management + System
+

Last Update : 10 month Ago

+
+
+
Completed
+
+
+
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ 2+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
PSD to HTML + Convert
+

Last Update : 29 min Ago

+
+
+
New
+
+
+
+
+
+
+
Members :
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
    +
  • + +
  • +
  • + 1 +
  • +
  • + 2 +
  • +
  • + 3 +
  • +
  • + 4 +
  • +
  • + 5 +
  • +
  • + +
  • +
+
+
+
+ +
+ +
+ +
+ +
+
+
+
+
Documents
+
+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
File NameTypeSizeUpload DateAction
+
+
+
+ +
+
+ +
+
Zip File4.57 MB12 Dec 2021 + +
+
+
+
+ +
+
+ +
+
PDF File8.89 MB24 Nov 2021 + +
+
+
+
+ +
+
+ +
+
MP4 File14.62 MB19 Nov 2021 + +
+
+
+
+ +
+
+ +
+
XSL File2.38 KB14 Nov 2021 + +
+ + Floder File87.24 MB08 Nov 2021 + +
+
+
+
+ +
+
+
+
+ Velzon-logo.png +
+
+
+
PNG File879 KB02 Nov 2021 + +
+
+ +
+
+
+
+
+ +
+ +
+
+ +
+ +
+
+@endsection + +@push('js') + + +@endpush diff --git a/Modules/Employee/routes/.gitkeep b/Modules/Employee/routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Employee/routes/api.php b/Modules/Employee/routes/api.php new file mode 100644 index 0000000..c1106e6 --- /dev/null +++ b/Modules/Employee/routes/api.php @@ -0,0 +1,19 @@ +prefix('v1')->group(function () { + Route::apiResource('employee', EmployeeController::class)->names('employee'); +}); diff --git a/Modules/Employee/routes/web.php b/Modules/Employee/routes/web.php new file mode 100644 index 0000000..b192147 --- /dev/null +++ b/Modules/Employee/routes/web.php @@ -0,0 +1,19 @@ +names('employee'); +}); diff --git a/Modules/Employee/vite.config.js b/Modules/Employee/vite.config.js new file mode 100644 index 0000000..599733b --- /dev/null +++ b/Modules/Employee/vite.config.js @@ -0,0 +1,26 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + build: { + outDir: '../../public/build-employee', + emptyOutDir: true, + manifest: true, + }, + plugins: [ + laravel({ + publicDirectory: '../../public', + buildDirectory: 'build-employee', + input: [ + __dirname + '/resources/assets/sass/app.scss', + __dirname + '/resources/assets/js/app.js' + ], + refresh: true, + }), + ], +}); + +//export const paths = [ +// 'Modules/Employee/resources/assets/sass/app.scss', +// 'Modules/Employee/resources/assets/js/app.js', +//]; \ No newline at end of file diff --git a/Modules/Leave/app/Http/Controllers/LeaveController.php b/Modules/Leave/app/Http/Controllers/LeaveController.php index 7f65e29..3ca1131 100644 --- a/Modules/Leave/app/Http/Controllers/LeaveController.php +++ b/Modules/Leave/app/Http/Controllers/LeaveController.php @@ -6,6 +6,7 @@ use App\Http\Controllers\Controller; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Modules\Leave\Repositories\LeaveInterface; +use Yoeunes\Toastr\Facades\Toastr; class LeaveController extends Controller { @@ -14,6 +15,12 @@ class LeaveController extends Controller public function __construct(LeaveInterface $leaveRepository) { $this->leaveRepository = $leaveRepository; + + $this->middleware('role_or_permission:access leaves|create leaves|edit leaves|delete leaves', ['only' => ['index', 'show']]); + $this->middleware('role_or_permission:create leaves', ['only' => ['create', 'store']]); + $this->middleware('role_or_permission:edit leaves', ['only' => ['edit', 'update']]); + $this->middleware('role_or_permission:delete leaves', ['only' => ['destroy']]); + } /** @@ -22,8 +29,7 @@ class LeaveController extends Controller public function index() { $data['leaves'] = $this->leaveRepository->findAll(); - // dd($data['leaves']); - return view('leave::index'); + return view('leave::index',$data); } /** @@ -43,7 +49,7 @@ class LeaveController extends Controller $inputData = $request->all(); try { $this->leaveRepository->create($inputData); - toastr()->success('Leave Created Succesfully'); + Toastr()->success('Leave Created Succesfully'); } catch (\Throwable $th) { toastr()->error($th->getMessage()); } @@ -63,7 +69,9 @@ class LeaveController extends Controller */ public function edit($id) { - return view('leave::edit'); + $data['title'] = 'Edit Leave'; + $data['leave'] = $this->leaveRepository->getLeaveById($id); + return view('leave::edit',$data); } /** @@ -71,7 +79,14 @@ class LeaveController extends Controller */ public function update(Request $request, $id): RedirectResponse { - // + $inputData = $request->all(); + try { + $this->leaveRepository->update($id,$inputData); + toastr()->success('Leave Updated Succesfully'); + } catch (\Throwable $th) { + toastr()->error($th->getMessage()); + } + return redirect()->route('leave.index'); } /** @@ -79,6 +94,7 @@ class LeaveController extends Controller */ public function destroy($id) { - // + $this->leaveRepository->delete($id); + toastr()->success('Leave Deleted Succesfully'); } } diff --git a/Modules/Leave/app/Models/Leave.php b/Modules/Leave/app/Models/Leave.php index 48f2185..c691311 100644 --- a/Modules/Leave/app/Models/Leave.php +++ b/Modules/Leave/app/Models/Leave.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class Leave extends Model { protected $table = 'leaves'; + protected $primaryKey = 'leave_id'; protected $guarded = []; } diff --git a/Modules/Leave/app/Repositories/LeaveRepository.php b/Modules/Leave/app/Repositories/LeaveRepository.php index abdb3a5..e62b14f 100644 --- a/Modules/Leave/app/Repositories/LeaveRepository.php +++ b/Modules/Leave/app/Repositories/LeaveRepository.php @@ -28,7 +28,7 @@ class LeaveRepository implements LeaveInterface public function update($leaveId, array $newDetails) { - return Leave::whereId($leaveId)->update($newDetails); + return Leave::where('leave_id',$leaveId)->update($newDetails); } } diff --git a/Modules/Leave/resources/views/create.blade.php b/Modules/Leave/resources/views/create.blade.php index 22a97da..92dd147 100644 --- a/Modules/Leave/resources/views/create.blade.php +++ b/Modules/Leave/resources/views/create.blade.php @@ -24,7 +24,7 @@
-
+ @csrf @include('leave::partials.action')
diff --git a/Modules/Leave/resources/views/edit.blade.php b/Modules/Leave/resources/views/edit.blade.php new file mode 100644 index 0000000..67912e4 --- /dev/null +++ b/Modules/Leave/resources/views/edit.blade.php @@ -0,0 +1,47 @@ +@extends('layouts.app') + +@section('content') +
+
+ +
+
+
+

{{ $title }}

+ +
+ +
+ +
+
+
+ +
+
+
+
+
+ @csrf + @method('put') + + @include('leave::partials.action') +
+
+
+
+
+ + +
+ +
+@endsection + +@push('js') + +@endpush diff --git a/Modules/Leave/resources/views/index.blade.php b/Modules/Leave/resources/views/index.blade.php index 82f6cc4..0aab2c4 100644 --- a/Modules/Leave/resources/views/index.blade.php +++ b/Modules/Leave/resources/views/index.blade.php @@ -49,250 +49,97 @@
Leave Lists
- Add
- +
- - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @forelse ($leaves as $key => $leave) + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + @empty + @endforelse +
NamePositionOfficeAgeStart dateSalaryS.NEmployee NameStart DateEnd DateCreated AtAction
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
{{ $key + 1 }}{{ $leave->employee_id }}{{ $leave->start_date }}{{ $leave->end_date }}{{ $leave->created_at }} +
+ + + + -
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
- + @include('leave::partials.view') @endsection + +@push('js') + +@endpush diff --git a/Modules/Leave/resources/views/partials/action.blade.php b/Modules/Leave/resources/views/partials/action.blade.php index bae23c3..c9219f4 100644 --- a/Modules/Leave/resources/views/partials/action.blade.php +++ b/Modules/Leave/resources/views/partials/action.blade.php @@ -1,27 +1,38 @@
- - + +
- Please enter Employee Name. + Please enter employee name.
-
+{{--
-
+
--}} +
- - + +
+
- - + +
+ +{{--
-
+ --}} +
- +
+ +@push('js') + +@endpush diff --git a/Modules/Leave/resources/views/partials/view.blade.php b/Modules/Leave/resources/views/partials/view.blade.php new file mode 100644 index 0000000..c17e8df --- /dev/null +++ b/Modules/Leave/resources/views/partials/view.blade.php @@ -0,0 +1,16 @@ + diff --git a/Modules/Leave/resources/views/show.blade.php b/Modules/Leave/resources/views/show.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 03b0033..a65405e 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,7 +15,7 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // \App\Models\User::factory(10)->create(); + \App\Models\User::factory(10)->create(); $admin = \App\Models\User::factory()->create([ 'name' => 'Admin User', @@ -34,10 +34,10 @@ class DatabaseSeeder extends Seeder $adminRole = Role::create(['name' => 'admin']); $memberRole = Role::create(['name' => 'member']); - $permission = Permission::create(['name' => 'create products']); - $permission = Permission::create(['name' => 'access products']); - $permission = Permission::create(['name' => 'edit products']); - $permission = Permission::create(['name' => 'delete products']); + $permission = Permission::create(['name' => 'create leaves']); + $permission = Permission::create(['name' => 'access leaves']); + $permission = Permission::create(['name' => 'edit leaves']); + $permission = Permission::create(['name' => 'delete leaves']); $permission = Permission::create(['name' => 'access roles']); $permission = Permission::create(['name' => 'edit roles']); diff --git a/database/seeders/PermissionSeeder.php b/database/seeders/PermissionSeeder.php new file mode 100644 index 0000000..d4f82f0 --- /dev/null +++ b/database/seeders/PermissionSeeder.php @@ -0,0 +1,36 @@ + 'create leaves']); + $permission = Permission::create(['name' => 'access leaves']); + $permission = Permission::create(['name' => 'edit leaves']); + $permission = Permission::create(['name' => 'delete leaves']); + + $permission = Permission::create(['name' => 'access roles']); + $permission = Permission::create(['name' => 'edit roles']); + $permission = Permission::create(['name' => 'create roles']); + $permission = Permission::create(['name' => 'delete roles']); + + $permission = Permission::create(['name' => 'access users']); + $permission = Permission::create(['name' => 'edit users']); + $permission = Permission::create(['name' => 'create users']); + $permission = Permission::create(['name' => 'delete users']); + + $permission = Permission::create(['name' => 'access permissions']); + $permission = Permission::create(['name' => 'edit permissions']); + $permission = Permission::create(['name' => 'create permissions']); + $permission = Permission::create(['name' => 'delete permissions']); + } +} diff --git a/modules_statuses.json b/modules_statuses.json index bf189e4..da4a80a 100644 --- a/modules_statuses.json +++ b/modules_statuses.json @@ -1,4 +1,5 @@ { "Leave": true, - "Attendance": true + "Attendance": true, + "Employee": true } \ No newline at end of file diff --git a/public/assets/css/nepali.datepicker.v4.0.1.min.css b/public/assets/css/nepali.datepicker.v4.0.1.min.css new file mode 100644 index 0000000..61ce502 --- /dev/null +++ b/public/assets/css/nepali.datepicker.v4.0.1.min.css @@ -0,0 +1 @@ +.ndc-chevron::before{border-style:solid;border-width:.25em .25em 0 0;content:"";display:inline-block;height:.3em;left:.15em;position:relative;top:5px;transform:rotate(-45deg);vertical-align:top;width:.3em;border-color:#fff;box-sizing:initial}.ndc-chevron.ndc-right:before{left:-1px;transform:rotate(45deg)}.ndc-chevron.ndc-left:before{left:1px;transform:rotate(-135deg)}div#ndp-nepali-box{position:absolute;top:-999px;z-index:9999}div#ndp-nepali-box,div.ndp-nepali-box{width:202px;font-family:"Trebuchet MS",Tahoma,Verdana,Arial,sans-serif;border:1px solid #a6c9e2;background-color:#fdfefe;padding:1px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}div.ndp-nepali-calendar-div div.ndp-nepali-box{top:unset!important}div#ndp-nepali-box .hidden,div.ndp-nepali-box .hidden{display:none}div#ndp-table-div{margin:0}div#ndp-table-div table{border-spacing:2px;border-collapse:separate}div.ndp-nepali-box td.ndp-link-disabled a{cursor:default!important}div#ndp-nepali-box td.ndp-date,div.ndp-nepali-box td.ndp-date{padding:2px;border:1px solid #c5dbec;background:#dfeffc;color:#2e6e9e}div#ndp-nepali-box td.ndp-selected,div.ndp-nepali-box td.ndp-selected{border:1px solid #fad42e;background:#fbec88;color:#363636;text-align:center}div#ndp-nepali-box td.ndp-current,div.ndp-nepali-box td.ndp-current{padding:2px;border:1px solid #fed22f;background:#f5f8f9;text-align:center;font-weight:700}div#ndp-nepali-box td.ndp-current a,div.ndp-nepali-box td.ndp-current a{color:#e17009;display:block}div#ndp-nepali-box td.ndp-date a,div#ndp-nepali-box td.ndp-selected a,div.ndp-nepali-box td.ndp-date a,div.ndp-nepali-box td.ndp-selected a{display:block;color:#1c94c4;text-decoration:none;width:20px;text-align:center;font-weight:700}a.ndp-disabled{color:#ccc!important}div#ndp-nepali-box td.ndp-current:hover,div#ndp-nepali-box td.ndp-date:hover,div.ndp-nepali-box td.ndp-current:hover,div.ndp-nepali-box td.ndp-date:hover{border:1px solid #fed22f;opacity:.8}div#ndp-nepali-box td.ndp-date a:hover,div.ndp-nepali-box td.ndp-date a:hover{color:#1c94c4}div#ndp-nepali-box table,div.ndp-nepali-box table{width:100%}div#ndp-nepali-box table,div#ndp-nepali-box td,div#ndp-nepali-box tr,div.ndp-nepali-box table,div.ndp-nepali-box td,div.ndp-nepali-box tr{font-size:12px;height:19px;line-height:19px;border-collapse:separate;border-spacing:2px}div#ndp-nepali-box a,div.ndp-nepali-box a{text-decoration:none}.ndp-days th,.ndp-header{text-align:center;font-weight:700}.ndp-header{border:1px solid #4297d7;background:#87b6d9;color:#fff;font-size:13px;padding:2px;line-height:20px;margin:2px;display:flex;justify-content:space-between;align-items:center}.ndp-next:hover,.ndp-prev:hover{background:#fed22f}.ndp-next,.ndp-prev{display:inline-block;width:1.3em;height:1.3em;background:#247ac4;border-radius:50%}.ndp-next.ndp-disabled,.ndp-prev.ndp-disabled{background:#ccc}.ndp-prev{left:7px}.ndp-next{right:7px}#currentMonth #ndp-month-select,#currentMonth #ndp-year-select{color:#000;font-size:12px;font-weight:400;padding:2px 1px 0;height:22px}.ndp-corner-all,.ndp-corner-left,.ndp-corner-tl,.ndp-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}.ndp-corner-all,.ndp-corner-right,.ndp-corner-top,.ndp-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}.ndp-corner-all,.ndp-corner-bl,.ndp-corner-bottom,.ndp-corner-left{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}.ndp-corner-all,.ndp-corner-bottom,.ndp-corner-br,.ndp-corner-right{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px} \ No newline at end of file diff --git a/public/assets/css/nepaliDatePicker.min.css b/public/assets/css/nepaliDatePicker.min.css deleted file mode 100644 index b578cba..0000000 --- a/public/assets/css/nepaliDatePicker.min.css +++ /dev/null @@ -1 +0,0 @@ -.nepali-date-picker{background:#fff;border:1px solid #ccc;box-shadow:0 5px 15px -5px rgba(0,0,0,.506);box-sizing:border-box;color:#333;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:8px;position:absolute;z-index:9999;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nepali-date-picker table{background-color:transparent;border-collapse:collapse;width:100%;max-width:100%;box-sizing:border-box;margin:0;padding:0;border:2px solid rgba(129,120,120,.17)}.nepali-date-picker table thead{background:#dedede}.nepali-date-picker table th{color:#999;font-weight:700;text-align:center;cursor:default;background:#f1f1f1}.nepali-date-picker table thead td{color:#8b8686;font-weight:700}.nepali-date-picker table td{border:1px solid rgba(154,150,150,.46);color:#666;padding:0;width:35px;text-align:center;font-size:14px}.nepali-date-picker table tbody td{cursor:pointer}.nepali-date-picker table tbody td.current-month-date:hover{background-color:#718fcd;color:#fff;font-weight:700}.nepali-date-picker table td.current-month-date.disable,.nepali-date-picker table td.other-month-date{color:#ccc;cursor:default}.nepali-date-picker table tbody td.current-month-date.disable:hover{background-color:inherit;color:#ccc;font-weight:400}.nepali-date-picker .icon{opacity:.5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.nepali-date-picker .icon:hover{opacity:1}.nepali-date-picker .prev-btn.icon{background-position:80px center;float:left;height:30px;width:20px}.current-month-date.active,.drop-down-content li.active{background-color:#7bde77;color:#fff;font-weight:700}.nepali-date-picker .next-btn.icon{background-position:0 center;float:right;height:30px;width:20px}.nepali-date-picker .today-btn.icon{background-position:130px center;display:block;float:left;height:30px;margin:0 15px;width:20px}.nepali-date-picker .current-month-txt,.nepali-date-picker .current-year-txt{color:#545b54;font-weight:700;padding-right:20px;cursor:pointer;position:relative;display:inline-block;line-height:30px}.nepali-date-picker .current-month-txt{text-align:right;width:80px}.nepali-date-picker .current-month-txt:hover,.nepali-date-picker .current-year-txt:hover{text-decoration:underline}.nepali-date-picker .calendar-controller i.icon-drop-down{background-position:12px -15px;height:30px;position:absolute;width:20px}.nepali-date-picker .drop-down-content{background-color:#fff;border:1px solid #ccc;box-shadow:0 3px 3px 0 rgba(0,0,0,.32);display:none;height:99px;padding:5px;position:absolute;width:100%}.nepali-date-picker .scrollbar-wrapper{border-left:1px solid rgba(204,204,204,.2);height:100%;position:absolute;right:0;top:0;width:15px}.scrollbar{background-color:#000;border-radius:2.5px;display:block;height:100%;opacity:.5;position:absolute;right:6.5px;width:5px}.nepali-date-picker .drop-down-content .option-wrapper{height:100%;overflow-x:hidden;overflow-y:scroll;padding:0;position:relative}.nepali-date-picker .drop-down-content ul{list-style:none;margin:0;padding:0 5px 0 0}.drop-down-content li{border-bottom:1px solid rgba(159,153,153,.39);font-size:16px;font-weight:400;line-height:20px;text-align:right}.drop-down-content li:hover{background:#718fcd}.drop-down-content li:last-child{border-bottom:medium none}::-webkit-scrollbar{width:13px;height:13px}::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}::-webkit-scrollbar-thumb{background:rgba(0,0,0,.5)} \ No newline at end of file diff --git a/public/assets/libs/nepalidatepicker/jquery.nepaliDatePicker.min.js b/public/assets/libs/nepalidatepicker/jquery.nepaliDatePicker.min.js deleted file mode 100644 index ff7a81b..0000000 --- a/public/assets/libs/nepalidatepicker/jquery.nepaliDatePicker.min.js +++ /dev/null @@ -1 +0,0 @@ -var calendarFunctions={};!function($){var calendarData={bsMonths:["बैशाख","जेठ","असार","सावन","भदौ","असोज","कार्तिक","मंसिर","पौष","माघ","फागुन","चैत"],bsDays:["आईत","सोम","मंगल","बुध","बिही","शुक्र","शनि"],nepaliNumbers:["०","१","२","३","४","५","६","७","८","९"],bsMonthUpperDays:[[30,31],[31,32],[31,32],[31,32],[31,32],[30,31],[29,30],[29,30],[29,30],[29,30],[29,30],[30,31]],extractedBsMonthData:[[0,1,1,22,1,3,1,1,1,3,1,22,1,3,1,3,1,22,1,3,1,19,1,3,1,1,3,1,2,2,1,3,1],[1,2,2,2,2,2,2,1,3,1,3,1,2,2,2,3,2,2,2,1,3,1,3,1,2,2,2,2,2,2,2,2,2,2,2,1,3,1,2,2,2,2,2,2,2,2,2,2,2,1,3,1,2,2,2,2,2,1,1,1,2,2,2,2,2,1,3,1,1,2],[0,1,2,1,3,1,3,1,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,1,3,1,3,1,2,2,2,2,2,2,2,2,2,1,3,1,3,1,2,2,2,2,2,2,2,2,2,1,3,1,3,1,1,1,1,2,2,2,2,2,1,3,1,1,2],[1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,2,2,2,1,3,1,3,1,3,1,3,1,3,1,2,2,2,1,3,1,3,1,3,1,3,1,3,1,3,2,2,1,3,1,2,2,2,1,2],[59,1,26,1,28,1,2,1,12],[0,1,2,2,2,2,2,2,2,2,2,2,2,1,3,1,3,1,3,1,2,2,2,2,2,2,2,2,2,2,2,1,3,1,2,2,2,2,2,2,2,2,2,2,2,1,3,1,2,2,2,2,2,2,2,2,2,2,5,1,1,2,2,1,3,1,2,1,2],[0,12,1,3,1,3,1,5,1,11,1,3,1,3,1,18,1,3,1,3,1,18,1,3,1,3,1,27,1,2],[1,2,2,2,2,1,2,2,2,2,2,2,2,3,1,3,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,15,2,4],[0,1,2,2,2,2,1,3,1,3,1,3,1,2,2,2,3,2,2,2,1,3,1,3,1,3,1,2,2,2,2,2,2,2,1,3,1,3,1,3,1,2,2,2,2,2,2,2,2,2,1,3,1,3,1,2,2,2,15,2,4],[1,1,3,1,3,1,14,1,3,1,1,1,3,1,14,1,3,1,3,1,3,1,18,1,3,1,3,1,3,1,14,1,3,15,1,2,1,1],[0,1,1,3,1,3,1,10,1,3,1,3,1,1,1,3,1,3,1,10,1,3,1,3,1,3,1,3,1,14,1,3,1,3,1,3,1,3,1,10,1,20,1,1,1],[1,2,2,1,3,1,3,1,3,1,2,2,2,2,2,3,2,2,2,2,2,1,3,1,3,1,3,1,2,2,2,2,2,2,2,1,3,1,3,1,3,1,3,1,2,2,2,2,2,2,2,1,3,1,3,1,20,3]],minBsYear:1970,maxBsYear:2100,minAdDateEqBsDate:{ad:{year:1913,month:3,date:13},bs:{year:1970,month:1,date:1}}},validationFunctions={validateRequiredParameters:function(requiredParameters){$.each(requiredParameters,function(key,value){if("undefined"==typeof value||null===value)throw new ReferenceError("Missing required parameters: "+Object.keys(requiredParameters).join(", "))})},validateBsYear:function(bsYear){if("number"!=typeof bsYear||null===bsYear)throw new TypeError("Invalid parameter bsYear value");if(bsYearcalendarData.maxBsYear)throw new RangeError("Parameter bsYear value should be in range of "+calendarData.minBsYear+" to "+calendarData.maxBsYear)},validateAdYear:function(adYear){if("number"!=typeof adYear||null===adYear)throw new TypeError("Invalid parameter adYear value");if(adYearcalendarData.maxBsYear-57)throw new RangeError("Parameter adYear value should be in range of "+(calendarData.minBsYear-57)+" to "+(calendarData.maxBsYear-57))},validateBsMonth:function(bsMonth){if("number"!=typeof bsMonth||null===bsMonth)throw new TypeError("Invalid parameter bsMonth value");if(bsMonth<1||bsMonth>12)throw new RangeError("Parameter bsMonth value should be in range of 1 to 12")},validateAdMonth:function(adMonth){if("number"!=typeof adMonth||null===adMonth)throw new TypeError("Invalid parameter adMonth value");if(adMonth<1||adMonth>12)throw new RangeError("Parameter adMonth value should be in range of 1 to 12")},validateBsDate:function(bsDate){if("number"!=typeof bsDate||null===bsDate)throw new TypeError("Invalid parameter bsDate value");if(bsDate<1||bsDate>32)throw new RangeError("Parameter bsDate value should be in range of 1 to 32")},validateAdDate:function(adDate){if("number"!=typeof adDate||null===adDate)throw new TypeError("Invalid parameter adDate value");if(adDate<1||adDate>31)throw new RangeError("Parameter adDate value should be in range of 1 to 31")},validatePositiveNumber:function(numberParameters){$.each(numberParameters,function(key,value){if("number"!=typeof value||null===value||value<0)throw new ReferenceError("Invalid parameters: "+Object.keys(numberParameters).join(", "));if("yearDiff"===key&&value>calendarData.maxBsYear-calendarData.minBsYear+1)throw new RangeError("Parameter yearDiff value should be in range of 0 to "+(calendarData.maxBsYear-calendarData.minBsYear+1))})}};$.extend(calendarFunctions,{getNepaliNumber:function(number){if("undefined"==typeof number)throw new Error("Parameter number is required");if("number"!=typeof number||number<0)throw new Error("Number should be positive integer");var prefixNum=Math.floor(number/10),suffixNum=number%10;return 0!==prefixNum?calendarFunctions.getNepaliNumber(prefixNum)+calendarData.nepaliNumbers[suffixNum]:calendarData.nepaliNumbers[suffixNum]},getNumberByNepaliNumber:function(nepaliNumber){if("undefined"==typeof nepaliNumber)throw new Error("Parameter nepaliNumber is required");if("string"!=typeof nepaliNumber)throw new Error("Parameter nepaliNumber should be in string");for(var number=0,i=0;ibsMonthDays?bsMonthDays:bsDate;var eqAdDate=calendarFunctions.getAdDateByBsDate(bsYear,bsMonth,bsDate),weekDay=eqAdDate.getDay()+1,formattedDate=calendarFunctions.bsDateFormat(dateFormatPattern,bsYear,bsMonth,bsDate);return{bsYear:bsYear,bsMonth:bsMonth,bsDate:bsDate,weekDay:weekDay,formattedDate:formattedDate,adDate:eqAdDate,bsMonthFirstAdDate:bsMonthFirstAdDate,bsMonthDays:bsMonthDays}},getAdDateByBsDate:function(bsYear,bsMonth,bsDate){validationFunctions.validateRequiredParameters({bsYear:bsYear,bsMonth:bsMonth,bsDate:bsDate}),validationFunctions.validateBsYear(bsYear),validationFunctions.validateBsMonth(bsMonth),validationFunctions.validateBsDate(bsDate);var daysNumFromMinBsYear=calendarFunctions.getTotalDaysNumFromMinBsYear(bsYear,bsMonth,bsDate),adDate=new Date(calendarData.minAdDateEqBsDate.ad.year,calendarData.minAdDateEqBsDate.ad.month,calendarData.minAdDateEqBsDate.ad.date-1);return adDate.setDate(adDate.getDate()+daysNumFromMinBsYear),adDate},getTotalDaysNumFromMinBsYear:function(bsYear,bsMonth,bsDate){if(validationFunctions.validateRequiredParameters({bsYear:bsYear,bsMonth:bsMonth,bsDate:bsDate}),validationFunctions.validateBsYear(bsYear),validationFunctions.validateBsMonth(bsMonth),validationFunctions.validateBsDate(bsDate),bsYearcalendarData.maxBsYear)return null;for(var daysNumFromMinBsYear=0,diffYears=bsYear-calendarData.minBsYear,month=1;month<=12;month++)daysNumFromMinBsYear+=month2085&&bsYear<2088?bsDate-2:2085===bsYear&&bsMonth>5?bsDate-2:bsYear>2088?bsDate-4:2088===bsYear&&bsMonth>5?bsDate-4:bsDate},getMonthDaysNumFormMinBsYear:function(bsMonth,yearDiff){validationFunctions.validateRequiredParameters({bsMonth:bsMonth,yearDiff:yearDiff}),validationFunctions.validateBsMonth(bsMonth),validationFunctions.validatePositiveNumber({yearDiff:yearDiff});var yearCount=0,monthDaysFromMinBsYear=0;if(0===yearDiff)return 0;for(var bsMonthData=calendarData.extractedBsMonthData[bsMonth-1],i=0;iyearCount+bsMonthData[i])){monthDaysFromMinBsYear+=calendarData.bsMonthUpperDays[bsMonth-1][bsMonthUpperDaysIndex]*(yearDiff-yearCount),yearCount=yearDiff-yearCount;break}yearCount+=bsMonthData[i],monthDaysFromMinBsYear+=calendarData.bsMonthUpperDays[bsMonth-1][bsMonthUpperDaysIndex]*bsMonthData[i]}return monthDaysFromMinBsYear},getBsMonthDays:function(bsYear,bsMonth){validationFunctions.validateRequiredParameters({bsYear:bsYear,bsMonth:bsMonth}),validationFunctions.validateBsYear(bsYear),validationFunctions.validateBsMonth(bsMonth);for(var yearCount=0,totalYears=bsYear+1-calendarData.minBsYear,bsMonthData=calendarData.extractedBsMonthData[bsMonth-1],i=0;i=1&&adDate');$("body").append($nepaliDatePicker),""!==$element.val()?datePickerPlugin.renderFormattedSpecificDateCalendar($nepaliDatePicker,datePickerPlugin.options.dateFormat,$element.val()):datePickerPlugin.renderCurrentMonthCalendar($nepaliDatePicker),datePickerPlugin.addEventHandler($element,$nepaliDatePicker),datePickerPlugin.addCommonEventHandler($nepaliDatePicker)},addCommonEventHandler:function(){var $datePickerWrapper=$(".nepali-date-picker");$(document).click(function(event){var $targetElement=$(event.target);$targetElement.is($(".nepali-date-picker"))||($datePickerWrapper.hide(),$datePickerWrapper.find(".drop-down-content").hide())})},addEventHandler:function($element,$nepaliDatePicker){$element.click(function(){if($(".nepali-date-picker").is(":visible"))return void $(".nepali-date-picker").hide();var inputFieldPosition=$(this).offset();return $nepaliDatePicker.css({top:inputFieldPosition.top+$(this).outerHeight(!0),left:inputFieldPosition.left}),$element.val()&&datePickerPlugin.renderFormattedSpecificDateCalendar($nepaliDatePicker,datePickerPlugin.options.dateFormat,$element.val()),$nepaliDatePicker.show(),datePickerPlugin.eventFire($element,$nepaliDatePicker,"show"),!1}),$nepaliDatePicker.on("click",".next-btn",function(event){event.preventDefault();var preCalendarData={bsYear:$nepaliDatePicker.data().bsYear,bsMonth:$nepaliDatePicker.data().bsMonth,bsDate:$nepaliDatePicker.data().bsDate};return datePickerPlugin.renderNextMonthCalendar($nepaliDatePicker),datePickerPlugin.triggerChangeEvent($element,$nepaliDatePicker,preCalendarData),$nepaliDatePicker.show(),!1}),$nepaliDatePicker.on("click",".prev-btn",function(event){event.preventDefault();var preCalendarData={bsYear:$nepaliDatePicker.data().bsYear,bsMonth:$nepaliDatePicker.data().bsMonth,bsDate:$nepaliDatePicker.data().bsDate};datePickerPlugin.renderPreviousMonthCalendar($nepaliDatePicker);$nepaliDatePicker.data();return datePickerPlugin.triggerChangeEvent($element,$nepaliDatePicker,preCalendarData),$nepaliDatePicker.show(),!1}),$nepaliDatePicker.on("click",".today-btn",function(event){event.preventDefault();var preCalendarData={bsYear:$nepaliDatePicker.data().bsYear,bsMonth:$nepaliDatePicker.data().bsMonth,bsDate:$nepaliDatePicker.data().bsDate};datePickerPlugin.renderCurrentMonthCalendar($nepaliDatePicker);$nepaliDatePicker.data();return datePickerPlugin.triggerChangeEvent($element,$nepaliDatePicker,preCalendarData),$nepaliDatePicker.show(),!1}),$nepaliDatePicker.on("click",".current-year-txt, .current-month-txt",function(){if($(this).find(".drop-down-content").is(":visible"))$(this).find(".drop-down-content").hide();else{$nepaliDatePicker.find(".drop-down-content").hide(),$(this).find(".drop-down-content").show();var $optionWrapper=$(this).find(".option-wrapper");$optionWrapper.scrollTop(0);var scrollTopTo=$optionWrapper.find(".active").position().top;$optionWrapper.scrollTop(scrollTopTo)}return!1}),$nepaliDatePicker.on("click",".current-month-date",function(){if(!$(this).hasClass("disable")){var datePickerData=$nepaliDatePicker.data(),bsYear=datePickerData.bsYear,bsMonth=datePickerData.bsMonth,preDate=datePickerData.bsDate,bsDate=$(this).data("date"),dateText=calendarFunctions.bsDateFormat(datePickerPlugin.options.dateFormat,bsYear,bsMonth,bsDate);return $element.val(dateText),datePickerPlugin.setCalendarDate($nepaliDatePicker,bsYear,bsMonth,bsDate),datePickerPlugin.renderMonthCalendar($nepaliDatePicker),preDate!==bsDate&&datePickerPlugin.eventFire($element,$nepaliDatePicker,"dateChange"),datePickerPlugin.eventFire($element,$nepaliDatePicker,"dateSelect"),datePickerPlugin.options.closeOnDateSelect?$nepaliDatePicker.hide():$nepaliDatePicker.show(),!1}}),$nepaliDatePicker.on("click",".drop-down-content li",function(){var $dropDown=$(this).parents(".drop-down-content");$dropDown.data("value",$(this).data("value")),$dropDown.attr("data-value",$(this).data("value"));var preCalendarData={bsYear:$nepaliDatePicker.data().bsYear,bsMonth:$nepaliDatePicker.data().bsMonth,bsDate:$nepaliDatePicker.data().bsDate},bsMonth=$nepaliDatePicker.find(".month-drop-down").data("value"),bsYear=$nepaliDatePicker.find(".year-drop-down").data("value"),bsDate=preCalendarData.bsDate;datePickerPlugin.setCalendarDate($nepaliDatePicker,bsYear,bsMonth,bsDate),datePickerPlugin.renderMonthCalendar($nepaliDatePicker);$nepaliDatePicker.data();return datePickerPlugin.triggerChangeEvent($element,$nepaliDatePicker,preCalendarData),$nepaliDatePicker.show(),!1})},triggerChangeEvent:function($element,$nepaliDatePicker,preCalendarData){var calendarData=$nepaliDatePicker.data();preCalendarData.bsYear!==calendarData.bsYear&&datePickerPlugin.eventFire($element,$nepaliDatePicker,"yearChange"),preCalendarData.bsMonth!==calendarData.bsMonth&&datePickerPlugin.eventFire($element,$nepaliDatePicker,"monthChange"),preCalendarData.bsDate!==calendarData.bsDate&&datePickerPlugin.eventFire($element,$nepaliDatePicker,"dateChange")},eventFire:function($element,$nepaliDatePicker,eventType){switch(eventType){case"generate":$element.trigger({type:eventType,message:"Nepali date picker initialize",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"show":$element.trigger({type:eventType,message:"Show nepali date picker",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"close":$element.trigger({type:eventType,message:"close nepali date picker",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"dateSelect":$element.trigger({type:eventType,message:"Select date",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"dateChange":$element.trigger({type:eventType,message:"Change date",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"monthChange":$element.trigger({type:eventType,message:"Change month",datePickerData:$nepaliDatePicker.data(),time:new Date});break;case"yearChange":$element.trigger({type:eventType,message:"Change year",datePickerData:$nepaliDatePicker.data(),time:new Date})}},setCalendarDate:function($nepaliDatePicker,bsYear,bsMonth,BsDate){$nepaliDatePicker.data(calendarFunctions.getBsMonthInfoByBsDate(bsYear,bsMonth,BsDate,datePickerPlugin.options.dateFormat))},renderMonthCalendar:function($nepaliDatePicker){$nepaliDatePicker.find(".calendar-wrapper").remove(),$nepaliDatePicker.append(datePickerPlugin.getCalendar($nepaliDatePicker)).hide()},getCalendar:function($nepaliDatePicker){var calendarWrapper=$('
');calendarWrapper.append(datePickerPlugin.getCalendarController($nepaliDatePicker));var calendarTable=$("");return calendarTable.append(datePickerPlugin.getCalendarHeader()),calendarTable.append(datePickerPlugin.getCalendarBody($nepaliDatePicker)),calendarWrapper.append(calendarTable),calendarWrapper},getCalendarController:function($nepaliDatePicker){var calendarController=$("
");return calendarController.append(''),calendarController.append(''),calendarController.append(datePickerPlugin.getMonthDropOption($nepaliDatePicker)),calendarController.append(datePickerPlugin.getYearDropOption($nepaliDatePicker)),calendarController.append(''),calendarController},getMonthDropOption:function($nepaliDatePicker){var datePickerData=$nepaliDatePicker.data(),$monthSpan=$('
');$monthSpan.text(calendarData.bsMonths[datePickerData.bsMonth-1]),$monthSpan.append('');for(var data=[],i=0;i<12;i++)data.push({label:calendarData.bsMonths[i],value:i+1});var $monthDropOption=datePickerPlugin.getCustomSelectOption(data,datePickerData.bsMonth).addClass("month-drop-down");return $monthSpan.append($monthDropOption),$monthSpan},getYearDropOption:function($nepaliDatePicker){var datePickerData=$nepaliDatePicker.data(),$yearSpan=$('
');$yearSpan.text(calendarFunctions.getNepaliNumber(datePickerData.bsYear)),$yearSpan.append('');for(var data=[],i=datePickerPlugin.options.yearStart;i<=datePickerPlugin.options.yearEnd;i++)data.push({label:calendarFunctions.getNepaliNumber(i),value:i});var $yearDropOption=datePickerPlugin.getCustomSelectOption(data,datePickerData.bsYear).addClass("year-drop-down");return $yearSpan.append($yearDropOption),$yearSpan},getCustomSelectOption:function(datas,activeValue){var $dropDown=$('
"),tableRow=$(""),i=0;i<7;i++)tableRow.append("");return calendarHeader.append(tableRow),calendarHeader},getCalendarBody:function($nepaliDatePicker){var datePickerData=$nepaliDatePicker.data(),weekCoverInMonth=Math.ceil((datePickerData.bsMonthFirstAdDate.getDay()+datePickerData.bsMonthDays)/7),preMonth=datePickerData.bsMonth-1!==0?datePickerData.bsMonth-1:12,preYear=12===preMonth?datePickerData.bsYear-1:datePickerData.bsYear,preMonthDays=preYear>=calendarData.minBsYear?calendarFunctions.getBsMonthDays(preYear,preMonth):30,minBsDate=null,maxBsDate=null;null!==datePickerPlugin.options.minDate&&(minBsDate=calendarFunctions.parseFormattedBsDate(datePickerPlugin.options.dateFormat,datePickerPlugin.options.minDate)),null!==datePickerPlugin.options.maxDate&&(maxBsDate=calendarFunctions.parseFormattedBsDate(datePickerPlugin.options.dateFormat,datePickerPlugin.options.maxDate));for(var calendarBody=$(""),i=0;i"),k=1;k<=7;k++){var calendarDate=7*i+k-datePickerData.bsMonthFirstAdDate.getDay(),isCurrentMonthDate=!0;if(calendarDate<=0?(calendarDate=preMonthDays+calendarDate,isCurrentMonthDate=!1):calendarDate>datePickerData.bsMonthDays&&(calendarDate-=datePickerData.bsMonthDays,isCurrentMonthDate=!1),isCurrentMonthDate){var $td=$('");calendarDate==datePickerData.bsDate&&$td.addClass("active"),datePickerPlugin.disableIfOutOfRange($td,datePickerData,minBsDate,maxBsDate,calendarDate),tableRow.append($td)}else tableRow.append('")}calendarBody.append(tableRow)}return calendarBody},disableIfOutOfRange:function($td,datePickerData,minBsDate,maxBsDate,calendarDate){return null!==minBsDate&&(datePickerData.bsYearmaxBsDate.bsYear?$td.addClass("disable"):datePickerData.bsYear===maxBsDate.bsYear&&datePickerData.bsMonth>maxBsDate.bsMonth?$td.addClass("disable"):datePickerData.bsYear===maxBsDate.bsYear&&datePickerData.bsMonth===maxBsDate.bsMonth&&calendarDate>maxBsDate.bsDate&&$td.addClass("disable")),$td},renderCurrentMonthCalendar:function($nepaliDatePicker){var currentDate=new Date,currentBsDate=calendarFunctions.getBsDateByAdDate(currentDate.getFullYear(),currentDate.getMonth()+1,currentDate.getDate()),bsYear=currentBsDate.bsYear,bsMonth=currentBsDate.bsMonth,bsDate=currentBsDate.bsDate;datePickerPlugin.setCalendarDate($nepaliDatePicker,bsYear,bsMonth,bsDate),datePickerPlugin.renderMonthCalendar($nepaliDatePicker)},renderPreviousMonthCalendar:function($nepaliDatePicker){var datePickerData=$nepaliDatePicker.data(),prevMonth=datePickerData.bsMonth-1>0?datePickerData.bsMonth-1:12,prevYear=12!==prevMonth?datePickerData.bsYear:datePickerData.bsYear-1,prevDate=datePickerData.bsDate;return prevYeardatePickerPlugin.options.yearEnd?null:(datePickerPlugin.setCalendarDate($nepaliDatePicker,prevYear,prevMonth,prevDate),void datePickerPlugin.renderMonthCalendar($nepaliDatePicker))},renderNextMonthCalendar:function($nepaliDatePicker){var datePickerData=$nepaliDatePicker.data(),nextMonth=datePickerData.bsMonth+1<=12?datePickerData.bsMonth+1:1,nextYear=1!==nextMonth?datePickerData.bsYear:datePickerData.bsYear+1,nextDate=datePickerData.bsDate;return nextYeardatePickerPlugin.options.yearEnd?null:(datePickerPlugin.setCalendarDate($nepaliDatePicker,nextYear,nextMonth,nextDate),void datePickerPlugin.renderMonthCalendar($nepaliDatePicker))},renderFormattedSpecificDateCalendar:function($nepaliDatePicker,dateFormat,dateFormattedText){var datePickerDate=calendarFunctions.parseFormattedBsDate(dateFormat,dateFormattedText);datePickerPlugin.setCalendarDate($nepaliDatePicker,datePickerDate.bsYear,datePickerDate.bsMonth,datePickerDate.bsDate),datePickerPlugin.renderMonthCalendar($nepaliDatePicker)}};return this.each(function(){var $element=$(this);datePickerPlugin.init($element)}),datePickerPlugin.addCommonEventHandler(),this}}(jQuery,calendarFunctions); \ No newline at end of file diff --git a/public/assets/libs/nepalidatepicker/nepali.datepicker.v4.0.1.min.js b/public/assets/libs/nepalidatepicker/nepali.datepicker.v4.0.1.min.js new file mode 100644 index 0000000..b8ddcca --- /dev/null +++ b/public/assets/libs/nepalidatepicker/nepali.datepicker.v4.0.1.min.js @@ -0,0 +1 @@ +var NepaliFunctions=function(){"use strict";var e=["MM-DD-YYYY","MM/DD/YYYY","YYYY-MM-DD","YYYY/MM/DD","DD-MM-YYYY","DD/MM/YYYY"],t="YYYY-MM-DD",n="MM/DD/YYYY";function r(){var e=[],t={year:2e3,month:9,day:17},r={year:1944,month:1,day:1};e[1970]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1971]=[31,31,32,31,32,30,30,29,30,29,30,30],e[1972]=[31,32,31,32,31,30,30,30,29,29,30,31],e[1973]=[30,32,31,32,31,30,30,30,29,30,29,31],e[1974]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1975]=[31,31,32,32,31,30,30,29,30,29,30,30],e[1976]=[31,32,31,32,31,30,30,30,29,29,30,31],e[1977]=[30,32,31,32,31,31,29,30,29,30,29,31],e[1978]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1979]=[31,31,32,32,31,30,30,29,30,29,30,30],e[1980]=[31,32,31,32,31,30,30,30,29,29,30,31],e[1981]=[31,31,31,32,31,31,29,30,30,29,30,30],e[1982]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1983]=[31,31,32,32,31,30,30,29,30,29,30,30],e[1984]=[31,32,31,32,31,30,30,30,29,29,30,31],e[1985]=[31,31,31,32,31,31,29,30,30,29,30,30],e[1986]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1987]=[31,32,31,32,31,30,30,29,30,29,30,30],e[1988]=[31,32,31,32,31,30,30,30,29,29,30,31],e[1989]=[31,31,31,32,31,31,30,29,30,29,30,30],e[1990]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1991]=[31,32,31,32,31,30,30,30,29,29,30,30],e[1992]=[31,32,31,32,31,30,30,30,29,30,29,31],e[1993]=[31,31,31,32,31,31,30,29,30,29,30,30],e[1994]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1995]=[31,32,31,32,31,30,30,30,29,29,30,30],e[1996]=[31,32,31,32,31,30,30,30,29,30,29,31],e[1997]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1998]=[31,31,32,31,31,31,30,29,30,29,30,30],e[1999]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2e3]=[30,32,31,32,31,30,30,30,29,30,29,31],e[2001]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2002]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2003]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2004]=[30,32,31,32,31,30,30,30,29,30,29,31],e[2005]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2006]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2007]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2008]=[31,31,31,32,31,31,29,30,30,29,29,31],e[2009]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2010]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2011]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2012]=[31,31,31,32,31,31,29,30,30,29,30,30],e[2013]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2014]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2015]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2016]=[31,31,31,32,31,31,29,30,30,29,30,30],e[2017]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2018]=[31,32,31,32,31,30,30,29,30,29,30,30],e[2019]=[31,32,31,32,31,30,30,30,29,30,29,31],e[2020]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2021]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2022]=[31,32,31,32,31,30,30,30,29,29,30,30],e[2023]=[31,32,31,32,31,30,30,30,29,30,29,31],e[2024]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2025]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2026]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2027]=[30,32,31,32,31,30,30,30,29,30,29,31],e[2028]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2029]=[31,31,32,31,32,30,30,29,30,29,30,30],e[2030]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2031]=[30,32,31,32,31,30,30,30,29,30,29,31],e[2032]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2033]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2034]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2035]=[30,32,31,32,31,31,29,30,30,29,29,31],e[2036]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2037]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2038]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2039]=[31,31,31,32,31,31,29,30,30,29,30,30],e[2040]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2041]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2042]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2043]=[31,31,31,32,31,31,29,30,30,29,30,30],e[2044]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2045]=[31,32,31,32,31,30,30,29,30,29,30,30],e[2046]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2047]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2048]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2049]=[31,32,31,32,31,30,30,30,29,29,30,30],e[2050]=[31,32,31,32,31,30,30,30,29,30,29,31],e[2051]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2052]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2053]=[31,32,31,32,31,30,30,30,29,29,30,30],e[2054]=[31,32,31,32,31,30,30,30,29,30,29,31],e[2055]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2056]=[31,31,32,31,32,30,30,29,30,29,30,30],e[2057]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2058]=[30,32,31,32,31,30,30,30,29,30,29,31],e[2059]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2060]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2061]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2062]=[30,32,31,32,31,31,29,30,29,30,29,31],e[2063]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2064]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2065]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2066]=[31,31,31,32,31,31,29,30,30,29,29,31],e[2067]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2068]=[31,31,32,32,31,30,30,29,30,29,30,30],e[2069]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2070]=[31,31,31,32,31,31,29,30,30,29,30,30],e[2071]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2072]=[31,32,31,32,31,30,30,29,30,29,30,30],e[2073]=[31,32,31,32,31,30,30,30,29,29,30,31],e[2074]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2075]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2076]=[31,32,31,32,31,30,30,30,29,29,30,30],e[2077]=[31,32,31,32,31,30,30,30,29,30,29,31],e[2078]=[31,31,31,32,31,31,30,29,30,29,30,30],e[2079]=[31,31,32,31,31,31,30,29,30,29,30,30],e[2080]=[31,32,31,32,31,30,30,30,29,29,30,30],e[2081]=[31,31,32,32,31,30,30,30,29,30,30,30],e[2082]=[30,32,31,32,31,30,30,30,29,30,30,30],e[2083]=[31,31,32,31,31,30,30,30,29,30,30,30],e[2084]=[31,31,32,31,31,30,30,30,29,30,30,30],e[2085]=[31,32,31,32,30,31,30,30,29,30,30,30],e[2086]=[30,32,31,32,31,30,30,30,29,30,30,30],e[2087]=[31,31,32,31,31,31,30,30,29,30,30,30],e[2088]=[30,31,32,32,30,31,30,30,29,30,30,30],e[2089]=[30,32,31,32,31,30,30,30,29,30,30,30],e[2090]=[30,32,31,32,31,30,30,30,29,30,30,30],e[2091]=[31,31,32,31,31,31,30,30,29,30,30,30],e[2092]=[30,31,32,32,31,30,30,30,29,30,30,30],e[2093]=[30,32,31,32,31,30,30,30,29,30,30,30],e[2094]=[31,31,32,31,31,30,30,30,29,30,30,30],e[2095]=[31,31,32,31,31,31,30,29,30,30,30,30],e[2096]=[30,31,32,32,31,30,30,29,30,29,30,30],e[2097]=[31,32,31,32,31,30,30,30,29,30,30,30],e[2098]=[31,31,32,31,31,31,29,30,29,30,29,31],e[2099]=[31,31,32,31,31,31,30,29,29,30,30,30];var a={year:1970,month:1,day:1},i={year:2099,month:12,day:30};function o(e){var t=0;return e.forEach((function(e){t+=e})),t}function u(e,t){var n=Date.UTC(e.year,e.month-1,e.day),r=Date.UTC(t.year,t.month-1,t.day);return Math.abs((r-n)/864e5)}function l(t,n){var r=0,a=0;for(a=t.year;a<=n.year;a+=1)r+=o(e[a]);for(a=0;ae[t.year][t.month-1];)t.day-=e[t.year][t.month-1],t.month+=1,t.month>12&&(t.month=1,t.year+=1);return{year:t.year,month:t.month,day:t.day}}return{minDate:function(){return a},maxDate:function(){return i},countAdDays:u,countBsDays:l,addBsDays:c,addAdDays:s,bs2ad:function(e){var n=l(t,e);return s(r,n)},ad2bs:function(e){var n=u(r,e);return c(t,n)},getDaysInMonth:function(t,n){return e[t][n-1]}}}function a(n){return n=n&&e.indexOf(n)>-1?n:t}function i(e,t){return"string"==typeof e&&(e=u(e,t=a(t)))&&(e.format=t),e}function o(e){return e?(delete e.format,e):null}function u(e,t){if(!e||!t)return null;var n=[],r={year:null,month:null,day:null};switch(t){case"MM/DD/YYYY":3==(n=e.split("/")).length&&(r={year:Number(n[2]),month:Number(n[0]),day:Number(n[1])});break;case"MM-DD-YYYY":3==(n=e.split("-")).length&&(r={year:Number(n[2]),month:Number(n[0]),day:Number(n[1])});break;case"YYYY-MM-DD":3==(n=e.split("-")).length&&(r={year:Number(n[0]),month:Number(n[1]),day:Number(n[2])});break;case"YYYY/MM/DD":3==(n=e.split("/")).length&&(r={year:Number(n[0]),month:Number(n[1]),day:Number(n[2])});break;case"DD-MM-YYYY":3==(n=e.split("-")).length&&(r={year:Number(n[2]),month:Number(n[1]),day:Number(n[0])});break;case"DD/MM/YYYY":3==(n=e.split("/")).length&&(r={year:Number(n[2]),month:Number(n[1]),day:Number(n[0])})}return r?.year&&r?.month&&r?.day||(r=null),r}function d(n,r){var a="";function i(e){return(e=Number(e))<10?"0"+e:e}switch(r=r&&e.indexOf(r)>-1?r:t){case"MM/DD/YYYY":a=i(n.month)+"/"+i(n.day)+"/"+n.year;break;case"MM-DD-YYYY":a=i(n.month)+"-"+i(n.day)+"-"+n.year;break;case"YYYY-MM-DD":a=n.year+"-"+i(n.month)+"-"+i(n.day);break;case"YYYY/MM/DD":a=n.year+"/"+i(n.month)+"/"+i(n.day);break;case"DD-MM-YYYY":a=i(n.day)+"-"+i(n.month)+"-"+n.year;break;case"DD/MM/YYYY":a=i(n.day)+"/"+i(n.month)+"/"+n.year}return a}function l(e,t,n){if(t=(e=i(e,t))?.format,!e)return null;var o=(new r).ad2bs(e);return t?(t=a(t),d(o,n=a(n))):o}function s(e,t,n){if(t=(e=i(e,t))?.format,!e)return null;var o=(new r).bs2ad(e);return t?(t=a(t),d(o,n=a(n))):o}function c(e,t){if(t=(e=i(e,t))?.format,!e)return!1;var n=new r,a=n.minDate(),o=n.maxDate(),u=e.day+100*e.month+1e4*e.year,d=a.day+100*a.month+1e4*a.year;if(u>o.day+100*o.month+1e4*o.year||u0&&e.month<=12&&e.day>0&&e.day<=l}function m(e){var t=new Date;t.setHours(t.getHours()+5),t.setMinutes(t.getMinutes()+45);var n=t.getUTCDate(),r=t.getUTCMonth()+1,i={year:t.getUTCFullYear(),month:r,day:n};return e?d(i,e=a(e)):i}function f(e){var t=l(m());return e?d(t,e=a(e)):t}function h(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}function p(){return["Baisakh","Jestha","Ashar","Shrawan","Bhadra","Ashoj","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"]}function y(){return["बैशाख","जेठ","अषाढ","श्रावण","भाद्र","आश्विन","कार्तिक","मङ्सिर","पौष","माघ","फाल्गुन","चैत्र"]}function v(){return["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहिवार","शुक्रवार","शनिवार"]}function b(e){return e=Number(e),isNaN(e)||e<0||e>6?null:["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहिवार","शुक्रवार","शनिवार"][Number(e)]}function g(){return["आ","सो","मं","बु","बि","शु","श"]}function D(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}function N(e){return e=Number(e),isNaN(e)||e<0||e>6?null:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][Number(e)]}function A(){return["S","M","T","W","T","F","S"]}function M(e,t){var n=new r,a=n.minDate(),i=n.maxDate();return(ei.year)&&(ta.month)?0:n.getDaysInMonth(e,t)}function B(e){function t(e){switch(e){case"0":return"०";case"1":return"१";case"2":return"२";case"3":return"३";case"4":return"४";case"5":return"५";case"6":return"६";case"7":return"७";case"8":return"८";case"9":return"९";default:return e}}e=e.toString();var n="",r=0;for(r=0;r-1,n=e.indexOf("-")>-1,r=null;if(t){var a=e.split("/");3==a.length&&((r=o(a)).parsedFormat=r.parsedFormat.join("/"))}else if(n){var i=e.split("-");3==i.length&&((r=o(i)).parsedFormat=r.parsedFormat.join("-"))}function o(e){var t={},n=[],r=[];e.forEach((function(e,t){var n=parseInt(e),a={index:t,value:n,year:!1,month:!1,day:!1};n>0&&n>999?a.year=!0:n>0&&n>12?a.day=!0:n>0&&n<=12&&(a.month=!0,a.day=!0),r.push(a)}));var a=r.filter((function(e){return 1==e.year}))[0];if(a){t.year=a.value,n[a.index]="YYYY";var i=r.filter((function(e){return 1==e.day})),o=r.filter((function(e){return 1==e.month}));1==o.length?(t.month=o[0].value,n[o[0].index]="MM",1==i.length?(t.day=i[0].value,n[i[0].index]="DD"):(i=i.find((function(e){return!e.month})),t.day=i.value,n[i.index]="DD")):2==o.length&&(t.day=o[0==a.index?1:0].value,t.month=o[0==a.index?0:1].value,n[o[0].index]=0==a.index?"MM":"DD",n[o[1].index]=0==a.index?"DD":"MM")}if(t?.year&&t?.month&&t?.day){var u=M(t.year,t.month);t.day>u&&(t=null,n=null)}else t=null,n=null;return{parsedDate:t,parsedFormat:n}}return r},ValidateBsDate:c,CompareBsDates:function(e,t,n){if(!(e=o(e=i(e,n=a(n)))))return null;if(!(t=o(t=i(t,n))))return null;if(c(e)&&c(t)){e=this.BS2AD(e),t=this.BS2AD(t);var r=new Date(e.year,e.month-1,e.day),u=new Date(t.year,t.month-1,t.day);return r.getTime()>u.getTime()}return 1e4*e.year+100*e.month+e.day>1e4*t.year+100*t.month+t.day},BetweenBsDates:function(e,t,r,u,d){if(!(e=o(e=i(e,u=a(u)))))return null;if(!(t=o(t=i(t,u))))return null;if(!(r=o(r=i(r,u))))return null;if(!c(e)||!c(t)||!c(r))return null;d=!0===d;var l=this.BS2AD(e),s=this.BS2AD(t),m=this.BS2AD(r),f=new Date(this.ConvertDateFormat(l,n)),h=new Date(this.ConvertDateFormat(s,n)),p=new Date(this.ConvertDateFormat(m,n)),y=!1;return d?f>=h&&f<=p&&(y=!0):f>h&&f11?null:["January","February","March","April","May","June","July","August","September","October","November","December"][e]},GetBsMonths:p,GetBsMonth:function(e){return e=Number(e),isNaN(e)||e<0||e>11?null:["Baisakh","Jestha","Ashar","Shrawan","Bhadra","Ashoj","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"][e]},GetBsDaysUnicode:v,GetBsDayUnicode:b,GetBsDaysUnicodeShort:g,GetBsDayUnicodeShort:function(e){return e=Number(e),isNaN(e)||e<0||e>6?null:["आ","सो","मं","बु","बि","शु","श"][Number(e)]},GetAdDays:D,GetAdDay:N,GetAdDaysShort:A,GetAdDayShort:function(e){return e=Number(e),isNaN(e)||e<0||e>6?null:["S","M","T","W","T","F","S"][Number(e)]},GetBsMonthsInUnicode:y,GetBsMonthInUnicode:function(e){return e=Number(e),isNaN(e)||e<0||e>11?null:["बैशाख","जेठ","अषाढ","श्रावण","भाद्र","आश्विन","कार्तिक","मङ्सिर","पौष","माघ","फाल्गुन","चैत्र"][e]},GetDaysInAdMonth:function(e,t){return new Date(e,t,0).getDate()},GetDaysInBsMonth:M,AdDatesDiff:function(e,t,n){return(e=i(e,n=a(n)))&&(t=i(t,n))?(new r).countAdDays(e,t):null},BsDatesDiff:function(e,t,n){return(e=i(e,n=a(n)))&&(t=i(t,n))?!(!c(e)||!c(t))&&(e=o(e),t=o(t),e=s(e),t=s(t),(new r).countAdDays(e,t)):null},BsAddDays:function(e,t,n){if(n=(e=i(e,n))?.format,!e)return null;e=o(e);var r=NepaliFunctions.BS2AD(e);return(r=new Date(r.year,r.month-1,r.day)).setDate(r.getDate()+t),r={year:r.getFullYear(),month:r.getMonth()+1,day:r.getDate()},e=NepaliFunctions.AD2BS(r),n?NepaliFunctions.ConvertDateFormat(e,n):e},GetBsFullDate:function(e,t,n){if(!(e=i(e,n)))return null;var r=[],a="";return t?(r=["बैशाख","जेठ","अषाढ","श्रावण","भाद्र","आश्विन","कार्तिक","मङ्सिर","पौष","माघ","फाल्गुन","चैत्र"],a=`${B(e.day)} ${r[e.month-1]} ${B(e.year)}`):(r=["Baisakh","Jestha","Ashar","Shrawan","Bhadra","Ashoj","Kartik","Mangsir","Poush","Magh","Falgun","Chaitra"],a=`${e.day} ${r[e.month-1]} ${e.year}`),a},GetAdFullDate:function(e,t){return(e=i(e,t))?`${e.day} ${NepaliFunctions.GetAdMonth(e.month-1)} ${e.year}`:null},GetAdFullDay:function(e,t){return(e=i(e,t))?N((e=new Date(e.year,e.month-1,e.day)).getDay()):null},GetBsFullDay:function(e,t){if(!(e=o(e=i(e,t))))return null;var n=NepaliFunctions.BS2AD(e);return N((n=new Date(n.year,n.month-1,n.day)).getDay())},GetBsFullDayInUnicode:function(e,t){if(!(e=o(e=i(e,t))))return null;var n=NepaliFunctions.BS2AD(e);return b((n=new Date(n.year,n.month-1,n.day)).getDay())},ConvertToUnicode:B,ConvertToNumber:function(e){function t(e){switch(e){case"०":return 0;case"१":return 1;case"२":return 2;case"३":return 3;case"४":return 4;case"५":return 5;case"६":return 6;case"७":return 7;case"८":return 8;case"९":return 9;default:return e}}e=e.toString();for(var n="",r=0;r13)return null;var n="",r=0,a=e.toString();if(a.indexOf(".")>-1){var i=a.split(".");r=Number(i[1])}var o=Math.floor(e%100),u=null;e.toString().length>2&&(u=e.toString().substring(e.toString().length-3,e.toString().length-2));var d=Math.floor(e%1e5);d=(d=d.toString()).substring(0,d.length-3);var l=Math.floor(e%1e7);l=(l=l.toString()).substring(0,l.length-5);var s=Math.floor(e%1e9);s=(s=s.toString()).substring(0,s.length-7);var c=Math.floor(e%1e11);c=(c=c.toString()).substring(0,c.length-9);var m=Math.floor(e%1e13);function f(e){var t={0:"",1:"One",2:"Two",3:"Three",4:"Four",5:"Five",6:"Six",7:"Seven",8:"Eight",9:"Nine",10:"Ten",11:"Eleven",12:"Twelve",13:"Thirteen",14:"Fourteen",15:"Fifteen",16:"Sixteen",17:"Seventeen",18:"Eighteen",19:"Nineteen",20:"Twenty",30:"Thirty",40:"Forty",50:"Fifty",60:"Sixty",70:"Seventy",80:"Eighty",90:"Ninety"},n=(e=Number(e)).toString();return e<20?t[e]:t[10*n[0]]+" "+t[n[1]]}for((m=(m=m.toString()).substring(0,m.length-11))>0&&(n+=f(m)+" Kharab"),c>0&&(n+=" "+f(c)+" Arab"),s>0&&(n+=" "+f(s)+" Crore"),l>0&&(n+=" "+f(l)+" Lakh"),d>0&&(n+=" "+f(d)+" Thousand"),u>0&&(n+=" "+f(u)+" Hundred"),o>0&&(n+=" "+f(o)),""!=n.trim()&&t&&(n+=" Rupees"),r>0&&t&&(n+=" and "+f(r)+" Paisa");n.indexOf(" ")>-1;)n=n.replace(" "," ");return n.trim()},NumberToWordsUnicode:function(e,t){if(e=e||0,isNaN(e)||Math.floor(e).toString().length>13)return null;var n=["सुन्य","एक","दुई","तीन","चार","पाँच","छ","सात","आठ","नौ","दस","एघार","बाह्र","तेह्र","चौध","पन्ध्र","सोह्र","सत्र","अठाह्र","उन्नाइस","बीस","एकाइस","बाइस","तेइस","चौबीस","पचीस","छब्बीस","सत्ताइस","अठ्ठाइस","उनन्तीस","तीस","एकतीस","बतीस","तेतीस","चौतीस","पैतीस","छतीस","सरतीस","अरतीस","उननचालीस","चालीस","एकचालीस","बयालिस","तीरचालीस","चौवालिस","पैंतालिस","छयालिस","सरचालीस","अरचालीस","उननचास","पचास","एकाउन्न","बाउन्न","त्रिपन्न","चौवन्न","पच्पन्न","छपन्न","सन्ताउन्न","अन्ठाउँन्न","उनान्न्साठी ","साठी","एकसाठी","बासाठी","तीरसाठी","चौंसाठी","पैसाठी","छैसठी","सत्सठ्ठी","अर्सठ्ठी","उनन्सत्तरी","सतरी","एकहत्तर","बहत्तर","त्रिहत्तर","चौहत्तर","पचहत्तर","छहत्तर","सत्हत्तर","अठ्हत्तर","उनास्सी","अस्सी","एकासी","बयासी","त्रीयासी","चौरासी","पचासी","छयासी","सतासी","अठासी","उनान्नब्बे","नब्बे","एकान्नब्बे","बयान्नब्बे","त्रियान्नब्बे","चौरान्नब्बे","पंचान्नब्बे","छयान्नब्बे","सन्तान्‍नब्बे","अन्ठान्नब्बे","उनान्सय"],r="",a=0,i="";if(-1!=(e=e.toString()).indexOf(".")){var o=e.split(".");e=o[0];var u=(a=o[1]).substring(0,2).toString();1==u.length&&(u=u.toString()+"0"),i=n[parseInt(u)].toString()+" पैसा"}if(!(e.length>13)){var d=Math.floor(e%100),l="";e.toString().length>2&&(l=e.toString().substring(e.toString().length-3,e.toString().length-2));var s=Math.floor(e%1e5);s=(s=s.toString()).substring(0,s.length-3);var c=Math.floor(e%1e7);c=(c=c.toString()).substring(0,c.length-5);var m=Math.floor(e%1e9);m=(m=m.toString()).substring(0,m.length-7);var f=Math.floor(e%1e11);f=(f=f.toString()).substring(0,f.length-9);var h=Math.floor(e%1e13);return(h=(h=h.toString()).substring(0,h.length-11))>0&&(r+=n[h]+" खरब"),f>0&&(r+=" "+n[f]+" अरब"),m>0&&(r+=" "+n[m]+" करोड"),c>0&&(r+=" "+n[c]+" लाख"),s>0&&(r+=" "+n[s]+" हजार"),l>0&&(r+=" "+n[l]+" सय"),d>0&&(r+=" "+n[d]),""!=r.trim()&&t&&(r+=" रुपैंया"),a>0&&t&&(r+=(""!=r.trim()?" ":"")+i),r.trim()}alert("Number greater than kharab not supported")}}}();!function(){"use strict";var e=!1,t=!1,n=[],r=null;function a(){t=!0}function i(){t=!1}function o(t){var n=document.getElementById("ndp-nepali-box");n&&n.remove(),e=!1}function u(t){var n={};if(e)o();else{var u=document.getElementById(t);!function(e){if(!document.getElementById("ndp-nepali-box")){var t=m(e);document.querySelector(t.container).insertAdjacentElement("beforeend",p(t));var n=document.getElementById("ndp-nepali-box");n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",i)}}(t),n=m(t),r=t;var l=u.value;n.unicodeDate&&(l=NepaliFunctions.ConvertToNumber(l));var s="";l?s=NepaliFunctions.ConvertToDateObject(l,n.dateFormat):(s=NepaliFunctions.GetCurrentBsDate(),n.disableAfter&&NepaliFunctions.CompareBsDates(s,n.disableAfter)&&(s=n.disableAfter));var c=null;null==s?(s=NepaliFunctions.GetCurrentBsDate(),c=""):c=NepaliFunctions.ConvertDateFormat(s,"YYYY-MM-DD"),d(s.year,s.month,c),function(e){var t=function(e){if("body"!=m().container){var t=e.getBoundingClientRect();return{x:t.x,y:t.y}}var n=0,r=0;return n+=function(e){var t=0;for(;e;)t+=e.offsetLeft,e=e.offsetParent;return t+=document.firstChild.offsetLeft||0}(e),r+=function(e){var t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t+=document.firstChild.offsetTop||0}(e),{x:n,y:r}}(e),n=function(e){var t=window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop;return e.y-t}(t),r=function(e,t){var n=window.pageYOffset||(document.documentElement||document.body.parentNode||document.body).scrollTop;return window.innerHeight-t.y-e.offsetHeight+n}(e,t),a=document.getElementById("ndp-nepali-box"),i=a.offsetHeight,o=t.y+e.offsetHeight;r0&&f[0].parentNode.removeChild(f[0]);var h=o.ndpYearCount||0,p=document.getElementById("currentMonth"+a);p.innerHTML="";var y=document.createElement("SPAN");y.innerHTML=" ";var v=document.createElement("SPAN");v.innerHTML=u?NepaliFunctions.GetBsMonth(t-1):NepaliFunctions.GetBsMonthInUnicode(t-1);var b=document.createElement("SPAN");b.innerHTML=u?e:NepaliFunctions.ConvertToUnicode(e),o.ndpMonth&&o.ndpYear?(p.appendChild(s(t,e,n,r)),p.appendChild(c(t,e,h,n,r))):o.ndpMonth?(p.appendChild(s(t,e,n,r)),p.appendChild(y),p.appendChild(b)):o.ndpYear?(p.appendChild(v),p.appendChild(y),p.appendChild(c(t,e,h,n,r))):(p.appendChild(v),p.appendChild(y),p.appendChild(b));var g=function(e,t){var n=e,r=t+1;return r>12&&(n+=1,r=1),{year:n,month:r}}(e,t),D=function(e,t){var n=e,r=t-1;return r<1&&(n-=1,r=12),{year:n,month:r}}(e,t),N=g.year,A=g.month,M=D.year,B=D.month,Y=document.getElementById("ndp-header"+a),C=document.getElementById("prev"+a);C&&C.parentNode.removeChild(C);var F=document.getElementById("next"+a);F&&F.parentNode.removeChild(F);var T=!0;o.disableBefore&&NepaliFunctions.CompareBsDates(o.disableBefore,{year:M,month:B,day:NepaliFunctions.GetDaysInBsMonth(M,B)})&&(T=!1);var E=document.createElement("SPAN");E.setAttribute("class","ndc-chevron ndc-left");var S=document.createElement("A");S.setAttribute("id","prev"+a),S.setAttribute("title","Previous Month"),S.setAttribute("class",T?"ndp-prev":"ndp-prev ndp-disabled"),S.setAttribute("href","javascript:void(0)"),S.appendChild(E),T&&S.addEventListener("click",(function(){d(M,B,n,r)}));var I=!0;o.disableAfter&&NepaliFunctions.CompareBsDates({year:N,month:A,day:1},o.disableAfter)&&(I=!1);var x=document.createElement("SPAN");x.setAttribute("class","ndc-chevron ndc-right");var w=document.createElement("A");w.setAttribute("id","next"+a),w.setAttribute("title","Next Month"),w.setAttribute("class",I?"ndp-next":"ndp-next ndp-disabled"),w.setAttribute("href","javascript:void(0)"),w.appendChild(x),I&&w.addEventListener("click",(function(){d(N,A,n,r)})),Y.insertBefore(S,Y.firstChild),Y.appendChild(w),i.getElementsByTagName("table")[0].insertAdjacentElement("beforeend",function(e,t,n,r){var a,i,o,u=m(r),d="english"==u.language;if(n){var s=NepaliFunctions.ConvertToDateObject(n,"YYYY-MM-DD");a=s.year,i=s.month,o=s.day}var c=NepaliFunctions.GetCurrentBsDate(),f=c.year,h=c.month,p=c.day,y=NepaliFunctions.GetDaysInBsMonth(e,t),v={year:e,month:t,day:1},b=NepaliFunctions.BS2AD(v),g=b.year,D=b.month,N=b.day,A=new Date(g,D-1,N).getDay(),M=0,B=0,Y=A+y,C="",F="",T=0;"object"!=typeof u.disableBefore&&u.disableBefore&&u.dateFormat&&(u.disableBefore=NepaliFunctions.ConvertToDateObject(u.disableBefore,u.dateFormat));"object"!=typeof u.disableAfter&&u.disableAfter&&u.dateFormat&&(u.disableAfter=NepaliFunctions.ConvertToDateObject(u.disableAfter,u.dateFormat));!u.disableBefore&&Number.isInteger(u.disableDaysBefore)&&parseInt(u.disableDaysBefore)>=0&&(u.disableBefore=NepaliFunctions.BsAddDays(NepaliFunctions.GetCurrentBsDate(),-1*parseInt(u.disableDaysBefore)));!u.disableAfter&&Number.isInteger(u.disableDaysAfter)&&parseInt(u.disableDaysAfter)>=0&&(u.disableAfter=NepaliFunctions.BsAddDays(NepaliFunctions.GetCurrentBsDate(),parseInt(u.disableDaysAfter)));var E=document.createElement("TBODY"),S=document.createElement("TR"),I=document.createElement("TD"),x=document.createElement("A");for(;B0&&E.appendChild(S);return E}(e,t,n,r))}function l(e){var t=e.getAttribute("data-value"),n=m();if(!n.isDiv){var a=NepaliFunctions.ConvertToDateObject(t,n.dateFormat);n.ndpEnglishInput&&(document.getElementById(n.ndpEnglishInput).value=NepaliFunctions.ConvertDateFormat(NepaliFunctions.BS2AD(a),n.dateFormat)),document.getElementById(r).value=n.unicodeDate?NepaliFunctions.ConvertToUnicode(t):t,n.onChange&&n.onChange({bs:t,ad:NepaliFunctions.ConvertDateFormat(NepaliFunctions.BS2AD(a),n.dateFormat),object:a}),o()}}function s(e,t,n,r){var a="";r&&(a="-"+r);var i=m(),o="english"==i.language,u=1,l=12;i.disableBefore&&i.disableBefore.year==t&&(u=i.disableBefore.month),i.disableAfter&&i.disableAfter.year==t&&(l=i.disableAfter.month);var s=o?NepaliFunctions.GetBsMonths():NepaliFunctions.GetBsMonthsInUnicode(),c=document.createElement("SELECT");return c.setAttribute("id","ndp-month-select"+a),s.forEach((function(t,n){if(n>=u-1&&n<=l-1){var r=document.createElement("OPTION");r.setAttribute("value",n+1),r.innerHTML=t,n+1==e&&r.setAttribute("selected","selected"),c.appendChild(r)}})),c.addEventListener("change",(function(){!function(e,t,n){var r="";n&&(r="-"+n);var a=m(n);e=a.ndpYear?parseInt(document.getElementById("ndp-year-select"+r).value):e;var i=parseInt(document.getElementById("ndp-month-select"+r).value);d(e,i,t,n)}(t,n,r)})),c}function c(e,t,n,r,a){var i="";a&&(i="-"+a);var o=m(a),u="english"==o.language,l=1970,s=2099;o.disableBefore&&o.disableBefore.year>l&&(l=o.disableBefore.year),o.disableAfter&&o.disableAfter.year0&&parseInt(t)-Math.round(n/2)>=l?parseInt(t)-Math.round(n/2):l,h=Math.round(n/2)>0&&parseInt(t)+Math.round(n/2)<=s?parseInt(t)+Math.round(n/2):s;f<=h;){var p=document.createElement("OPTION");p.setAttribute("value",f),p.innerHTML=u?f:NepaliFunctions.ConvertToUnicode(f),t==f&&p.setAttribute("selected","selected"),c.appendChild(p),f+=1}return c.addEventListener("change",(function(){!function(e,t,n){var r="";n&&(r="-"+n);var a=m(n),i=document.getElementById("ndp-year-select"+r),o=document.getElementById("ndp-month-select"+r),u=parseInt(i.value);e=a.ndpMonth?parseInt(o.value):e;var l=a.disableDaysBefore,s=a.disableDaysAfter;l&&l.year==u&&e<=l.month&&(e=l.month);s&&s.year==u&&e>=s.month&&(e=s.month);d(u,e,t,n)}(e,r,a)})),c}function m(e){var t={};if(e||(e=r),e){var a=n[e],i=a.dateFormat||"YYYY-MM-DD",o=a.disableBefore?NepaliFunctions.ConvertToDateObject(a.disableBefore,i):{year:1970,month:1,day:1},u=a.disableAfter?NepaliFunctions.ConvertToDateObject(a.disableAfter,i):{year:2099,month:12,day:30},d=a.disableDaysBefore||(0==a.disableDaysBefore?0:null),l=a.disableDaysAfter||(0==a.disableDaysAfter?0:null);Number.isInteger(d)&&d>=0&&(o=NepaliFunctions.BsAddDays(NepaliFunctions.GetCurrentBsDate(),-1*d)),Number.isInteger(l)&&l>=0&&(u=NepaliFunctions.BsAddDays(NepaliFunctions.GetCurrentBsDate(),l)),a&&(t={ndpTriggerButton:a.ndpTriggerButton||null,ndpTriggerButtonClass:a.ndpTriggerButtonClass||null,ndpTriggerButtonText:a.ndpTriggerButtonText||null,ndpEnglishInput:a.ndpEnglishInput||null,ndpYearCount:a.ndpYearCount||null,ndpYear:a.ndpYear||null,ndpMonth:a.ndpMonth||null,disableDaysBefore:d,disableDaysAfter:l,disableBefore:o,disableAfter:u,dateFormat:i,onChange:a.onChange||null,unicodeDate:a.unicodeDate||null,readOnlyInput:a.readOnlyInput||!1,container:a.container||"body",language:a.language||"nepali",id:a.id||null,isDiv:a.isDiv||!1,onDateClick:a.onDateClick})}return t}function f(){var e=document.activeElement.getAttribute("id");o(),u(e)}function h(){var e=document.activeElement;if(e.classList.contains("ndp-nepali-calendar")){var t=window.event||arguments.callee.caller.arguments[0];27!=t.which&&9!=t.which||(o(t.which),t.stopPropagation())}}function p(e){var t="english"==e.language,n=document.createElement("DIV"),r="";e.isDiv?(r="-"+e.id,n.setAttribute("class","ndp-nepali-box ndp-corner-all")):(n.setAttribute("id","ndp-nepali-box"),n.setAttribute("class","ndp-corner-all")),n.setAttribute("tabindex","-1"),n.addEventListener("keydown",h);var a=document.createElement("DIV");a.setAttribute("id","ndp-header"+r),a.setAttribute("class","ndp-corner-all ndp-header");var i=document.createElement("SPAN");i.setAttribute("id","currentMonth"+r),a.appendChild(i);var o=document.createElement("DIV");o.setAttribute("id","currentMonth"+r);var u=document.createElement("TABLE"),d=document.createElement("TR");d.setAttribute("class","ndp-days"),(t?NepaliFunctions.GetAdDaysShort():NepaliFunctions.GetBsDaysUnicodeShort()).forEach((function(e){var t=document.createElement("TH");t.innerHTML=e,d.appendChild(t)}));var l=document.createElement("THEAD");l.appendChild(d);var s=document.createElement("TBODY");return u.appendChild(l),u.appendChild(s),o.appendChild(u),n.appendChild(a),n.appendChild(o),n}Object.prototype.nepaliDatePicker=function(l){var s=this;if("remove"!=l){if(l=void 0===l?{}:l,s.length&&s.length>0)for(y=0;y0)for(y=0;y0)for(var y=0;y0}},"undefined"!=typeof module&&module.hasOwnProperty("exports")?module.exports=nepaliDatePicker:Object.defineProperty(Object.prototype,"nepaliDatePicker",{enumerable:!1,value:nepaliDatePicker})}(); \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index dc16795..c69fe29 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1,6 +1,6 @@ + data-sidebar-image="none" data-preloader="enable"> @@ -28,7 +28,7 @@ - + @@ -41,6 +41,9 @@ + + + @@ -80,7 +83,6 @@ -
"+calendarData.bsDays[i]+"
'+calendarFunctions.getNepaliNumber(calendarDate)+"'+calendarFunctions.getNepaliNumber(calendarDate)+"