diff --git a/.env b/.env index 098261d..96c6431 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -APP_NAME=OMIS +APP_NAME=StocksNew APP_ENV=local APP_KEY=base64:VoHTBVxg0gnGqmljdwxqtxkcqVUq+9nYYYtHGX4APKU= APP_DEBUG=true diff --git a/Modules/Settings/app/Http/Controllers/.gitkeep b/Modules/Settings/app/Http/Controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/app/Http/Controllers/SettingsController.php b/Modules/Settings/app/Http/Controllers/SettingsController.php new file mode 100644 index 0000000..94f239d --- /dev/null +++ b/Modules/Settings/app/Http/Controllers/SettingsController.php @@ -0,0 +1,67 @@ +> + */ + protected $listen = []; + + /** + * Indicates if events should be discovered. + * + * @var bool + */ + protected static $shouldDiscoverEvents = true; + + /** + * Configure the proper event listeners for email verification. + * + * @return void + */ + protected function configureEmailVerification(): void + { + + } +} diff --git a/Modules/Settings/app/Providers/RouteServiceProvider.php b/Modules/Settings/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..14da30e --- /dev/null +++ b/Modules/Settings/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('Settings', '/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('Settings', '/routes/api.php')); + } +} diff --git a/Modules/Settings/app/Providers/SettingsServiceProvider.php b/Modules/Settings/app/Providers/SettingsServiceProvider.php new file mode 100644 index 0000000..2c3dc36 --- /dev/null +++ b/Modules/Settings/app/Providers/SettingsServiceProvider.php @@ -0,0 +1,120 @@ +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->register(EventServiceProvider::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. + * + * @return array + */ + public function provides(): array + { + return []; + } + + /** + * @return array + */ + 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/Settings/app/Repositories/.gitkeep b/Modules/Settings/app/Repositories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/composer.json b/Modules/Settings/composer.json new file mode 100644 index 0000000..fdda8d8 --- /dev/null +++ b/Modules/Settings/composer.json @@ -0,0 +1,30 @@ +{ + "name": "nwidart/settings", + "description": "", + "authors": [ + { + "name": "Nicolas Widart", + "email": "n.widart@gmail.com" + } + ], + "extra": { + "laravel": { + "providers": [], + "aliases": { + + } + } + }, + "autoload": { + "psr-4": { + "Modules\\Settings\\": "app/", + "Modules\\Settings\\Database\\Factories\\": "database/factories/", + "Modules\\Settings\\Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Modules\\Settings\\Tests\\": "tests/" + } + } +} diff --git a/Modules/Settings/config/.gitkeep b/Modules/Settings/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/config/config.php b/Modules/Settings/config/config.php new file mode 100644 index 0000000..e81d946 --- /dev/null +++ b/Modules/Settings/config/config.php @@ -0,0 +1,5 @@ + 'Settings', +]; diff --git a/Modules/Settings/database/factories/.gitkeep b/Modules/Settings/database/factories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/database/migrations/.gitkeep b/Modules/Settings/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/database/seeders/.gitkeep b/Modules/Settings/database/seeders/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/database/seeders/SettingsDatabaseSeeder.php b/Modules/Settings/database/seeders/SettingsDatabaseSeeder.php new file mode 100644 index 0000000..4d6e058 --- /dev/null +++ b/Modules/Settings/database/seeders/SettingsDatabaseSeeder.php @@ -0,0 +1,16 @@ +call([]); + } +} diff --git a/Modules/Settings/module.json b/Modules/Settings/module.json new file mode 100644 index 0000000..c5dbc13 --- /dev/null +++ b/Modules/Settings/module.json @@ -0,0 +1,11 @@ +{ + "name": "Settings", + "alias": "settings", + "description": "", + "keywords": [], + "priority": 0, + "providers": [ + "Modules\\Settings\\Providers\\SettingsServiceProvider" + ], + "files": [] +} diff --git a/Modules/Settings/package.json b/Modules/Settings/package.json new file mode 100644 index 0000000..d6fbfc8 --- /dev/null +++ b/Modules/Settings/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/Settings/resources/assets/.gitkeep b/Modules/Settings/resources/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/resources/assets/js/app.js b/Modules/Settings/resources/assets/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/resources/assets/sass/app.scss b/Modules/Settings/resources/assets/sass/app.scss new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/resources/views/.gitkeep b/Modules/Settings/resources/views/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/resources/views/index.blade.php b/Modules/Settings/resources/views/index.blade.php new file mode 100644 index 0000000..d794cc8 --- /dev/null +++ b/Modules/Settings/resources/views/index.blade.php @@ -0,0 +1,7 @@ +@extends('settings::layouts.master') + +@section('content') +

Hello World

+ +

Module: {!! config('settings.name') !!}

+@endsection diff --git a/Modules/Settings/resources/views/layouts/master.blade.php b/Modules/Settings/resources/views/layouts/master.blade.php new file mode 100644 index 0000000..cf6bb7e --- /dev/null +++ b/Modules/Settings/resources/views/layouts/master.blade.php @@ -0,0 +1,29 @@ + + + + + + + + + + Settings Module - {{ config('app.name', 'Laravel') }} + + + + + + + + + + {{-- Vite CSS --}} + {{-- {{ module_vite('build-settings', 'resources/assets/sass/app.scss') }} --}} + + + + @yield('content') + + {{-- Vite JS --}} + {{-- {{ module_vite('build-settings', 'resources/assets/js/app.js') }} --}} + diff --git a/Modules/Settings/routes/.gitkeep b/Modules/Settings/routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Settings/routes/api.php b/Modules/Settings/routes/api.php new file mode 100644 index 0000000..27956d4 --- /dev/null +++ b/Modules/Settings/routes/api.php @@ -0,0 +1,19 @@ +prefix('v1')->group(function () { + Route::apiResource('settings', SettingsController::class)->names('settings'); +}); diff --git a/Modules/Settings/routes/web.php b/Modules/Settings/routes/web.php new file mode 100644 index 0000000..c4e878d --- /dev/null +++ b/Modules/Settings/routes/web.php @@ -0,0 +1,19 @@ +names('settings'); +}); diff --git a/Modules/Settings/vite.config.js b/Modules/Settings/vite.config.js new file mode 100644 index 0000000..6d947b7 --- /dev/null +++ b/Modules/Settings/vite.config.js @@ -0,0 +1,26 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + build: { + outDir: '../../public/build-settings', + emptyOutDir: true, + manifest: true, + }, + plugins: [ + laravel({ + publicDirectory: '../../public', + buildDirectory: 'build-settings', + input: [ + __dirname + '/resources/assets/sass/app.scss', + __dirname + '/resources/assets/js/app.js' + ], + refresh: true, + }), + ], +}); + +//export const paths = [ +// 'Modules/Settings/resources/assets/sass/app.scss', +// 'Modules/Settings/resources/assets/js/app.js', +//]; \ No newline at end of file diff --git a/Modules/Stocks/app/Http/Controllers/.gitkeep b/Modules/Stocks/app/Http/Controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/app/Http/Controllers/StocksController.php b/Modules/Stocks/app/Http/Controllers/StocksController.php new file mode 100644 index 0000000..150255e --- /dev/null +++ b/Modules/Stocks/app/Http/Controllers/StocksController.php @@ -0,0 +1,67 @@ +> + */ + protected $listen = []; + + /** + * Indicates if events should be discovered. + * + * @var bool + */ + protected static $shouldDiscoverEvents = true; + + /** + * Configure the proper event listeners for email verification. + * + * @return void + */ + protected function configureEmailVerification(): void + { + + } +} diff --git a/Modules/Stocks/app/Providers/RouteServiceProvider.php b/Modules/Stocks/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..ac889a0 --- /dev/null +++ b/Modules/Stocks/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('Stocks', '/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('Stocks', '/routes/api.php')); + } +} diff --git a/Modules/Stocks/app/Providers/StocksServiceProvider.php b/Modules/Stocks/app/Providers/StocksServiceProvider.php new file mode 100644 index 0000000..78b0f5e --- /dev/null +++ b/Modules/Stocks/app/Providers/StocksServiceProvider.php @@ -0,0 +1,120 @@ +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->register(EventServiceProvider::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. + * + * @return array + */ + public function provides(): array + { + return []; + } + + /** + * @return array + */ + 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/Stocks/app/Repositories/.gitkeep b/Modules/Stocks/app/Repositories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/composer.json b/Modules/Stocks/composer.json new file mode 100644 index 0000000..56f1583 --- /dev/null +++ b/Modules/Stocks/composer.json @@ -0,0 +1,30 @@ +{ + "name": "nwidart/stocks", + "description": "", + "authors": [ + { + "name": "Nicolas Widart", + "email": "n.widart@gmail.com" + } + ], + "extra": { + "laravel": { + "providers": [], + "aliases": { + + } + } + }, + "autoload": { + "psr-4": { + "Modules\\Stocks\\": "app/", + "Modules\\Stocks\\Database\\Factories\\": "database/factories/", + "Modules\\Stocks\\Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Modules\\Stocks\\Tests\\": "tests/" + } + } +} diff --git a/Modules/Stocks/config/.gitkeep b/Modules/Stocks/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/config/config.php b/Modules/Stocks/config/config.php new file mode 100644 index 0000000..673fcd2 --- /dev/null +++ b/Modules/Stocks/config/config.php @@ -0,0 +1,5 @@ + 'Stocks', +]; diff --git a/Modules/Stocks/database/factories/.gitkeep b/Modules/Stocks/database/factories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/database/migrations/.gitkeep b/Modules/Stocks/database/migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/database/seeders/.gitkeep b/Modules/Stocks/database/seeders/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/database/seeders/StocksDatabaseSeeder.php b/Modules/Stocks/database/seeders/StocksDatabaseSeeder.php new file mode 100644 index 0000000..366f235 --- /dev/null +++ b/Modules/Stocks/database/seeders/StocksDatabaseSeeder.php @@ -0,0 +1,16 @@ +call([]); + } +} diff --git a/Modules/Stocks/module.json b/Modules/Stocks/module.json new file mode 100644 index 0000000..0049682 --- /dev/null +++ b/Modules/Stocks/module.json @@ -0,0 +1,11 @@ +{ + "name": "Stocks", + "alias": "stocks", + "description": "", + "keywords": [], + "priority": 0, + "providers": [ + "Modules\\Stocks\\Providers\\StocksServiceProvider" + ], + "files": [] +} diff --git a/Modules/Stocks/package.json b/Modules/Stocks/package.json new file mode 100644 index 0000000..d6fbfc8 --- /dev/null +++ b/Modules/Stocks/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/Stocks/resources/assets/.gitkeep b/Modules/Stocks/resources/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/resources/assets/js/app.js b/Modules/Stocks/resources/assets/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/resources/assets/sass/app.scss b/Modules/Stocks/resources/assets/sass/app.scss new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/resources/views/.gitkeep b/Modules/Stocks/resources/views/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/resources/views/index.blade.php b/Modules/Stocks/resources/views/index.blade.php new file mode 100644 index 0000000..94157c7 --- /dev/null +++ b/Modules/Stocks/resources/views/index.blade.php @@ -0,0 +1,7 @@ +@extends('stocks::layouts.master') + +@section('content') +

Hello World

+ +

Module: {!! config('stocks.name') !!}

+@endsection diff --git a/Modules/Stocks/resources/views/layouts/master.blade.php b/Modules/Stocks/resources/views/layouts/master.blade.php new file mode 100644 index 0000000..eb26d9a --- /dev/null +++ b/Modules/Stocks/resources/views/layouts/master.blade.php @@ -0,0 +1,29 @@ + + + + + + + + + + Stocks Module - {{ config('app.name', 'Laravel') }} + + + + + + + + + + {{-- Vite CSS --}} + {{-- {{ module_vite('build-stocks', 'resources/assets/sass/app.scss') }} --}} + + + + @yield('content') + + {{-- Vite JS --}} + {{-- {{ module_vite('build-stocks', 'resources/assets/js/app.js') }} --}} + diff --git a/Modules/Stocks/routes/.gitkeep b/Modules/Stocks/routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/Stocks/routes/api.php b/Modules/Stocks/routes/api.php new file mode 100644 index 0000000..0948629 --- /dev/null +++ b/Modules/Stocks/routes/api.php @@ -0,0 +1,19 @@ +prefix('v1')->group(function () { + Route::apiResource('stocks', StocksController::class)->names('stocks'); +}); diff --git a/Modules/Stocks/routes/web.php b/Modules/Stocks/routes/web.php new file mode 100644 index 0000000..00e17f8 --- /dev/null +++ b/Modules/Stocks/routes/web.php @@ -0,0 +1,19 @@ +names('stocks'); +}); diff --git a/Modules/Stocks/vite.config.js b/Modules/Stocks/vite.config.js new file mode 100644 index 0000000..52cf6f1 --- /dev/null +++ b/Modules/Stocks/vite.config.js @@ -0,0 +1,26 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + build: { + outDir: '../../public/build-stocks', + emptyOutDir: true, + manifest: true, + }, + plugins: [ + laravel({ + publicDirectory: '../../public', + buildDirectory: 'build-stocks', + input: [ + __dirname + '/resources/assets/sass/app.scss', + __dirname + '/resources/assets/js/app.js' + ], + refresh: true, + }), + ], +}); + +//export const paths = [ +// 'Modules/Stocks/resources/assets/sass/app.scss', +// 'Modules/Stocks/resources/assets/js/app.js', +//]; \ No newline at end of file diff --git a/app/Helpers/OMIS.php b/app/Helpers/BIBStocks.php similarity index 99% rename from app/Helpers/OMIS.php rename to app/Helpers/BIBStocks.php index f72a1be..e19da51 100644 --- a/app/Helpers/OMIS.php +++ b/app/Helpers/BIBStocks.php @@ -3,13 +3,13 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; -class OMIS +class BIBStocks { - // public function __construct() - // { - // $this->initDB(); - // $this->seedPermissions(); - // } + public function __construct() + { + $this->initDB(); + $this->seedPermissions(); + } public static function sendSMSWithCurl($destination, $message) { @@ -74,7 +74,7 @@ class OMIS return "Error: Form (ID/Alias: $formID) not found."; } $csrfToken = csrf_token(); - if (session('success')) { + if (session('success')) { echo ''; diff --git a/database/migrations/2024_09_03_161257_create_tbl_settings_table.php b/database/migrations/2024_09_03_161257_create_tbl_settings_table.php new file mode 100644 index 0000000..972ff9b --- /dev/null +++ b/database/migrations/2024_09_03_161257_create_tbl_settings_table.php @@ -0,0 +1,62 @@ +id('setting_id'); + $table->string('title')->nullable(); + $table->text('description')->nullable(); + $table->string('url1')->nullable(); + $table->string('url2')->nullable(); + $table->string('email')->nullable(); + $table->string('phone')->nullable(); + $table->string('secondary_phone')->nullable(); + $table->text('google_map')->nullable(); + $table->string('fb')->nullable(); + $table->string('insta')->nullable(); + $table->string('twitter')->nullable(); + $table->string('tiktok')->nullable(); + $table->string('primary_logo')->nullable(); + $table->string('secondary_logo')->nullable(); + $table->string('thumb')->nullable(); + $table->string('icon')->nullable(); + $table->string('og_image')->nullable(); + $table->string('no_image', 250)->nullable(); + $table->string('copyright_text', 250)->nullable(); + $table->text('content1')->nullable(); + $table->text('content2')->nullable(); + $table->text('content3')->nullable(); + $table->string('seo_title')->nullable(); + $table->text('seo_description')->nullable(); + $table->text('seo_keywords')->nullable(); + $table->text('og_tags')->nullable(); + $table->integer('display_order')->default(0); + $table->integer('status')->default(0); + $table->timestamps(); + $table->integer('createdby'); + $table->integer('updatedby'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tbl_settings'); + } +} + diff --git a/database/migrations/2024_09_03_161854_create_tbl_fabriccategories_table.php b/database/migrations/2024_09_03_161854_create_tbl_fabriccategories_table.php new file mode 100644 index 0000000..c649a17 --- /dev/null +++ b/database/migrations/2024_09_03_161854_create_tbl_fabriccategories_table.php @@ -0,0 +1,41 @@ +id('febriccategory_id'); + $table->string('title')->nullable(); + $table->string('alias')->nullable(); + $table->text('description')->nullable(); + $table->string('color')->nullable(); + $table->integer('display_order')->nullable(); + $table->integer('status')->nullable(); + $table->text('remarks')->nullable(); + $table->dateTime('created_at')->nullable(); + $table->integer('createdby')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->integer('updatedby')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tbl_fabriccategories'); + } +} \ No newline at end of file diff --git a/database/migrations/2024_09_03_161929_create_tbl_masterunits_table.php b/database/migrations/2024_09_03_161929_create_tbl_masterunits_table.php new file mode 100644 index 0000000..0dd6571 --- /dev/null +++ b/database/migrations/2024_09_03_161929_create_tbl_masterunits_table.php @@ -0,0 +1,39 @@ +id('masterunit_id'); + $table->string('title')->nullable(); + $table->string('alias')->nullable(); + $table->text('description')->nullable(); + $table->integer('display_order')->nullable(); + $table->integer('status')->nullable(); + $table->text('remarks')->nullable(); + $table->dateTime('created_at')->nullable(); + $table->integer('createdby')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->integer('updatedby')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tbl_masterunits'); + } +} \ No newline at end of file diff --git a/database/migrations/2024_09_03_162203_create_tbl_stocks_table.php b/database/migrations/2024_09_03_162203_create_tbl_stocks_table.php new file mode 100644 index 0000000..b4596c9 --- /dev/null +++ b/database/migrations/2024_09_03_162203_create_tbl_stocks_table.php @@ -0,0 +1,48 @@ +id('stock_id'); + $table->integer('stocklocations_id')->nullable(); + $table->string('title')->nullable(); + $table->string('alias')->nullable(); + $table->integer('products_id')->nullable(); + $table->string('s')->nullable(); + $table->string('m')->nullable(); + $table->string('l')->nullable(); + $table->string('xl')->nullable(); + $table->string('xxl')->nullable(); + $table->string('xxxl')->nullable(); + $table->string('fs')->nullable(); + $table->integer('display_order')->nullable(); + $table->integer('status')->nullable(); + $table->text('remarks')->nullable(); + $table->dateTime('created_at')->nullable(); + $table->integer('createdby')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->integer('updatedby')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tbl_stocks'); + } +} \ No newline at end of file diff --git a/database/migrations/2024_09_03_164741_create_tbl_paymentmodes_table.php b/database/migrations/2024_09_03_164741_create_tbl_paymentmodes_table.php new file mode 100644 index 0000000..ac149f1 --- /dev/null +++ b/database/migrations/2024_09_03_164741_create_tbl_paymentmodes_table.php @@ -0,0 +1,40 @@ +id('paymentmode_id'); + $table->string('title')->nullable(); + $table->string('alias')->nullable(); + $table->text('description')->nullable(); + $table->integer('display_order')->nullable(); + $table->integer('status')->nullable(); + $table->text('remarks')->nullable(); + $table->dateTime('created_at')->nullable(); + $table->integer('createdby')->nullable(); + $table->dateTime('updated_at')->nullable(); + $table->integer('updatedby')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tbl_paymentmodes'); + } +} \ No newline at end of file diff --git a/modules_statuses.json b/modules_statuses.json index 52a80a8..2b056c3 100644 --- a/modules_statuses.json +++ b/modules_statuses.json @@ -11,5 +11,11 @@ "Payroll": true, "Office": true, "Meeting": true, - "Training": true + "Training": true, + "Customer": true, + "Order": true, + "Product": true, + "Supplier": true, + "Settings": true, + "Stocks": true } \ No newline at end of file diff --git a/resources/views/layouts/partials/sidebar.blade.php b/resources/views/layouts/partials/sidebar.blade.php index 073c9c9..959796f 100644 --- a/resources/views/layouts/partials/sidebar.blade.php +++ b/resources/views/layouts/partials/sidebar.blade.php @@ -34,7 +34,7 @@ Dashboard - @role('admin') + {{-- @role('admin') - @endcan - - - - - - @can('attendance.index') - - @endcan - - @can('leave.index') - - @endcan - - - - - - @can('calendar.index') - - @endcan - - @can(['client.index', 'project.index']) - - - - @endcan - - - - @role('admin') - - - - @endrole - - @can(['asset.index']) + {{-- @can(['asset.index']) - @endcan + @endcan --}} - @can(['payment.index']) - - - - @endcan - - @role('admin') - - - - @endrole + + + + + + + + + + {{-- --}} {{-- --}} + --}} {{-- --}} + @role('admin') -