diff --git a/composer.json b/composer.json index f2396ba..c2bea9b 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "putrakuningan/cetaklabel-module": "dev-master", "putrakuningan/logs-module": "^1.0", "putrakuningan/usermanager-module": "dev-master", + "simplesoftwareio/simple-qrcode": "^4.2", "spatie/laravel-activitylog": "^4.7", "spatie/laravel-permission": "^5.10", "wildside/userstamps": "^2.3", diff --git a/config/settings.php b/config/settings.php index c5d8fd8..b8e089e 100644 --- a/config/settings.php +++ b/config/settings.php @@ -1,237 +1,310 @@ [ - 'default' => \App\Core\Bootstrap\BootstrapDefault::class, - 'auth' => \App\Core\Bootstrap\BootstrapAuth::class, - 'system' => \App\Core\Bootstrap\BootstrapSystem::class, - ], + return [ - 'KT_THEME' => 'metronic', + 'KT_THEME_BOOTSTRAP' => [ + 'default' => BootstrapDefault::class, + 'auth' => BootstrapAuth::class, + 'system' => BootstrapSystem::class, + ], - # Theme layout templates directory + 'KT_THEME' => 'metronic', - 'KT_THEME_LAYOUT_DIR' => 'layout', + # Theme layout templates directory + + 'KT_THEME_LAYOUT_DIR' => 'layout', - # Theme Mode - # Value: light | dark | system + # Theme Mode + # Value: light | dark | system - 'KT_THEME_MODE_DEFAULT' => 'light', - 'KT_THEME_MODE_SWITCH_ENABLED' => true, + 'KT_THEME_MODE_DEFAULT' => 'light', + 'KT_THEME_MODE_SWITCH_ENABLED' => true, - # Theme Direction - # Value: ltr | rtl + # Theme Direction + # Value: ltr | rtl - 'KT_THEME_DIRECTION' => 'ltr', + 'KT_THEME_DIRECTION' => 'ltr', - # Keenicons - # Value: duotone | outline | bold + # Keenicons + # Value: duotone | outline | bold - 'KT_THEME_ICONS' => 'duotone', + 'KT_THEME_ICONS' => 'duotone', - # Theme Assets + # Theme Assets - 'KT_THEME_ASSETS' => [ - 'favicon' => 'assets/media/logos/favicon.ico', - 'fonts' => [ - 'https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700', - ], - 'global' => [ - 'css' => [ - 'assets/plugins/global/plugins.bundle.css', - 'assets/css/style.bundle.css', + 'KT_THEME_ASSETS' => [ + 'favicon' => 'assets/media/logos/favicon.ico', + 'fonts' => [ + 'https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700', ], - 'js' => [ - 'assets/plugins/global/plugins.bundle.js', - 'assets/js/scripts.bundle.js', - 'assets/js/widgets.bundle.js', + 'global' => [ + 'css' => [ + 'assets/plugins/global/plugins.bundle.css', + 'assets/css/style.bundle.css', + ], + 'js' => [ + 'assets/plugins/global/plugins.bundle.js', + 'assets/js/scripts.bundle.js', + 'assets/js/widgets.bundle.js', + ], ], ], - ], - # Theme Vendors + # Theme Vendors - 'KT_THEME_VENDORS' => [ - 'datatables' => [ - 'css' => [ - 'assets/plugins/custom/datatables/datatables.bundle.css', + 'KT_THEME_VENDORS' => [ + 'datatables' => [ + 'css' => [ + 'assets/plugins/custom/datatables/datatables.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/datatables/datatables.bundle.js', + ], ], - 'js' => [ - 'assets/plugins/custom/datatables/datatables.bundle.js', + 'formrepeater' => [ + 'js' => [ + 'assets/plugins/custom/formrepeater/formrepeater.bundle.js', + ], + ], + 'fullcalendar' => [ + 'css' => [ + 'assets/plugins/custom/fullcalendar/fullcalendar.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/fullcalendar/fullcalendar.bundle.js', + ], + ], + 'flotcharts' => [ + 'js' => [ + 'assets/plugins/custom/flotcharts/flotcharts.bundle.js', + ], + ], + 'google-jsapi' => [ + 'js' => [ + '//www.google.com/jsapi', + ], + ], + 'tinymce' => [ + 'js' => [ + 'assets/plugins/custom/tinymce/tinymce.bundle.js', + ], + ], + 'ckeditor-classic' => [ + 'js' => [ + 'assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js', + ], + ], + 'ckeditor-inline' => [ + 'js' => [ + 'assets/plugins/custom/ckeditor/ckeditor-inline.bundle.js', + ], + ], + 'ckeditor-balloon' => [ + 'js' => [ + 'assets/plugins/custom/ckeditor/ckeditor-balloon.bundle.js', + ], + ], + 'ckeditor-balloon-block' => [ + 'js' => [ + 'assets/plugins/custom/ckeditor/ckeditor-balloon-block.bundle.js', + ], + ], + 'ckeditor-document' => [ + 'js' => [ + 'assets/plugins/custom/ckeditor/ckeditor-document.bundle.js', + ], + ], + 'draggable' => [ + 'js' => [ + 'assets/plugins/custom/draggable/draggable.bundle.js', + ], + ], + 'fslightbox' => [ + 'js' => [ + 'assets/plugins/custom/fslightbox/fslightbox.bundle.js', + ], + ], + 'jkanban' => [ + 'css' => [ + 'assets/plugins/custom/jkanban/jkanban.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/jkanban/jkanban.bundle.js', + ], + ], + 'typedjs' => [ + 'js' => [ + 'assets/plugins/custom/typedjs/typedjs.bundle.js', + ], + ], + 'cookiealert' => [ + 'css' => [ + 'assets/plugins/custom/cookiealert/cookiealert.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/cookiealert/cookiealert.bundle.js', + ], + ], + 'cropper' => [ + 'css' => [ + 'assets/plugins/custom/cropper/cropper.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/cropper/cropper.bundle.js', + ], + ], + 'vis-timeline' => [ + 'css' => [ + 'assets/plugins/custom/vis-timeline/vis-timeline.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/vis-timeline/vis-timeline.bundle.js', + ], + ], + 'jstree' => [ + 'css' => [ + 'assets/plugins/custom/jstree/jstree.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/jstree/jstree.bundle.js', + ], + ], + 'prismjs' => [ + 'css' => [ + 'assets/plugins/custom/prismjs/prismjs.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/prismjs/prismjs.bundle.js', + ], + ], + 'leaflet' => [ + 'css' => [ + 'assets/plugins/custom/leaflet/leaflet.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/leaflet/leaflet.bundle.js', + ], + ], + 'amcharts' => [ + 'js' => [ + 'https://cdn.amcharts.com/lib/5/index.js', + 'https://cdn.amcharts.com/lib/5/xy.js', + 'https://cdn.amcharts.com/lib/5/percent.js', + 'https://cdn.amcharts.com/lib/5/radar.js', + 'https://cdn.amcharts.com/lib/5/themes/Animated.js', + ], + ], + 'amcharts-maps' => [ + 'js' => [ + 'https://cdn.amcharts.com/lib/5/index.js', + 'https://cdn.amcharts.com/lib/5/map.js', + 'https://cdn.amcharts.com/lib/5/geodata/worldLow.js', + 'https://cdn.amcharts.com/lib/5/geodata/continentsLow.js', + 'https://cdn.amcharts.com/lib/5/geodata/usaLow.js', + 'https://cdn.amcharts.com/lib/5/geodata/worldTimeZonesLow.js', + 'https://cdn.amcharts.com/lib/5/geodata/worldTimeZoneAreasLow.js', + 'https://cdn.amcharts.com/lib/5/themes/Animated.js', + ], + ], + 'amcharts-stock' => [ + 'js' => [ + 'https://cdn.amcharts.com/lib/5/index.js', + 'https://cdn.amcharts.com/lib/5/xy.js', + 'https://cdn.amcharts.com/lib/5/themes/Animated.js', + ], + ], + 'bootstrap-select' => [ + 'css' => [ + 'assets/plugins/custom/bootstrap-select/bootstrap-select.bundle.css', + ], + 'js' => [ + 'assets/plugins/custom/bootstrap-select/bootstrap-select.bundle.js', + ], + ], + 'chained-select' => [ + 'js' => [ + 'assets/plugins/custom/jquery-chained/jquery.chained.js', + 'assets/plugins/custom/jquery-chained/jquery.chained.remote.js', + ], ], ], - 'formrepeater' => [ - 'js' => [ - 'assets/plugins/custom/formrepeater/formrepeater.bundle.js', - ], - ], - 'fullcalendar' => [ - 'css' => [ - 'assets/plugins/custom/fullcalendar/fullcalendar.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/fullcalendar/fullcalendar.bundle.js', - ], - ], - 'flotcharts' => [ - 'js' => [ - 'assets/plugins/custom/flotcharts/flotcharts.bundle.js', - ], - ], - 'google-jsapi' => [ - 'js' => [ - '//www.google.com/jsapi', - ], - ], - 'tinymce' => [ - 'js' => [ - 'assets/plugins/custom/tinymce/tinymce.bundle.js', - ], - ], - 'ckeditor-classic' => [ - 'js' => [ - 'assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js', - ], - ], - 'ckeditor-inline' => [ - 'js' => [ - 'assets/plugins/custom/ckeditor/ckeditor-inline.bundle.js', - ], - ], - 'ckeditor-balloon' => [ - 'js' => [ - 'assets/plugins/custom/ckeditor/ckeditor-balloon.bundle.js', - ], - ], - 'ckeditor-balloon-block' => [ - 'js' => [ - 'assets/plugins/custom/ckeditor/ckeditor-balloon-block.bundle.js', - ], - ], - 'ckeditor-document' => [ - 'js' => [ - 'assets/plugins/custom/ckeditor/ckeditor-document.bundle.js', - ], - ], - 'draggable' => [ - 'js' => [ - 'assets/plugins/custom/draggable/draggable.bundle.js', - ], - ], - 'fslightbox' => [ - 'js' => [ - 'assets/plugins/custom/fslightbox/fslightbox.bundle.js', - ], - ], - 'jkanban' => [ - 'css' => [ - 'assets/plugins/custom/jkanban/jkanban.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/jkanban/jkanban.bundle.js', - ], - ], - 'typedjs' => [ - 'js' => [ - 'assets/plugins/custom/typedjs/typedjs.bundle.js', - ], - ], - 'cookiealert' => [ - 'css' => [ - 'assets/plugins/custom/cookiealert/cookiealert.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/cookiealert/cookiealert.bundle.js', - ], - ], - 'cropper' => [ - 'css' => [ - 'assets/plugins/custom/cropper/cropper.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/cropper/cropper.bundle.js', - ], - ], - 'vis-timeline' => [ - 'css' => [ - 'assets/plugins/custom/vis-timeline/vis-timeline.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/vis-timeline/vis-timeline.bundle.js', - ], - ], - 'jstree' => [ - 'css' => [ - 'assets/plugins/custom/jstree/jstree.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/jstree/jstree.bundle.js', - ], - ], - 'prismjs' => [ - 'css' => [ - 'assets/plugins/custom/prismjs/prismjs.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/prismjs/prismjs.bundle.js', - ], - ], - 'leaflet' => [ - 'css' => [ - 'assets/plugins/custom/leaflet/leaflet.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/leaflet/leaflet.bundle.js', - ], - ], - 'amcharts' => [ - 'js' => [ - 'https://cdn.amcharts.com/lib/5/index.js', - 'https://cdn.amcharts.com/lib/5/xy.js', - 'https://cdn.amcharts.com/lib/5/percent.js', - 'https://cdn.amcharts.com/lib/5/radar.js', - 'https://cdn.amcharts.com/lib/5/themes/Animated.js', - ], - ], - 'amcharts-maps' => [ - 'js' => [ - 'https://cdn.amcharts.com/lib/5/index.js', - 'https://cdn.amcharts.com/lib/5/map.js', - 'https://cdn.amcharts.com/lib/5/geodata/worldLow.js', - 'https://cdn.amcharts.com/lib/5/geodata/continentsLow.js', - 'https://cdn.amcharts.com/lib/5/geodata/usaLow.js', - 'https://cdn.amcharts.com/lib/5/geodata/worldTimeZonesLow.js', - 'https://cdn.amcharts.com/lib/5/geodata/worldTimeZoneAreasLow.js', - 'https://cdn.amcharts.com/lib/5/themes/Animated.js', - ], - ], - 'amcharts-stock' => [ - 'js' => [ - 'https://cdn.amcharts.com/lib/5/index.js', - 'https://cdn.amcharts.com/lib/5/xy.js', - 'https://cdn.amcharts.com/lib/5/themes/Animated.js', - ], - ], - 'bootstrap-select' => [ - 'css' => [ - 'assets/plugins/custom/bootstrap-select/bootstrap-select.bundle.css', - ], - 'js' => [ - 'assets/plugins/custom/bootstrap-select/bootstrap-select.bundle.js', - ], - ], - 'chained-select' => [ - 'js' => [ - 'assets/plugins/custom/jquery-chained/jquery.chained.js', - 'assets/plugins/custom/jquery-chained/jquery.chained.remote.js', - ], - ], - ], + /* + |-------------------------------------------------------------------------- + | Default Settings Store + |-------------------------------------------------------------------------- + | + | This option controls the default settings store that gets used while + | using this settings library. + | + | Supported: "json", "database" + | + */ + 'store' => 'database', -]; + /* + |-------------------------------------------------------------------------- + | JSON Store + |-------------------------------------------------------------------------- + | + | If the store is set to "json", settings are stored in the defined + | file path in JSON format. Use full path to file. + | + */ + 'path' => storage_path() . '/settings.json', + + /* + |-------------------------------------------------------------------------- + | Database Store + |-------------------------------------------------------------------------- + | + | The settings are stored in the defined file path in JSON format. + | Use full path to JSON file. + | + */ + // If set to null, the default connection will be used. + 'connection' => null, + // Name of the table used. + 'table' => 'settings', + // If you want to use custom column names in database store you could + // set them in this configuration + 'keyColumn' => 'key', + 'valueColumn' => 'value', + + /* + |-------------------------------------------------------------------------- + | Cache settings + |-------------------------------------------------------------------------- + | + | If you want all setting calls to go through Laravel's cache system. + | + */ + 'enableCache' => false, + // Whether to reset the cache when changing a setting. + 'forgetCacheByWrite' => true, + // TTL in seconds. + 'cacheTtl' => 15, + + /* + |-------------------------------------------------------------------------- + | Default Settings + |-------------------------------------------------------------------------- + | + | Define all default settings that will be used before any settings are set, + | this avoids all settings being set to false to begin with and avoids + | hardcoding the same defaults in all 'Settings::get()' calls + | + */ + 'defaults' => [ + 'foo' => 'bar', + ] + + ]; diff --git a/database/migrations/2023_05_25_032718_create_settings_table.php b/database/migrations/2023_05_25_032718_create_settings_table.php new file mode 100644 index 0000000..8e913e8 --- /dev/null +++ b/database/migrations/2023_05_25_032718_create_settings_table.php @@ -0,0 +1,47 @@ +=')) { + $this->tablename = Config::get('settings.table'); + $this->keyColumn = Config::get('settings.keyColumn'); + $this->valueColumn = Config::get('settings.valueColumn'); + } else { + $this->tablename = Config::get('anlutro/l4-settings::table'); + $this->keyColumn = Config::get('anlutro/l4-settings::keyColumn'); + $this->valueColumn = Config::get('anlutro/l4-settings::valueColumn'); + } + } + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create($this->tablename, function(Blueprint $table) + { + $table->increments('id'); + $table->string($this->keyColumn)->index(); + $table->text($this->valueColumn); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop($this->tablename); + } +} diff --git a/resources/views/layout/partials/sidebar-layout/sidebar/_menu.blade.php b/resources/views/layout/partials/sidebar-layout/sidebar/_menu.blade.php index 1aaa9f0..82d49cb 100644 --- a/resources/views/layout/partials/sidebar-layout/sidebar/_menu.blade.php +++ b/resources/views/layout/partials/sidebar-layout/sidebar/_menu.blade.php @@ -308,6 +308,7 @@ + + + + +