Commit 18b769ed by Triyah Fatmawati

Merge branch 'development' of http://git.unesa.ac.id/febrysan/kalendar-unesa into development

parents 3c7ab4e3 378882f3
<?php
namespace App\Http\Controllers\Http\Controllers\User;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AgendaController extends Controller
{
public function index()
{
}
}
<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Models\Agenda;
use App\Models\Kategori;
use Exception;
use Illuminate\Console\View\Components\Alert;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
class AgendaController extends Controller
{
public function index()
{
$data = Agenda::with(['rPegawai', 'rKategori', 'rAttachment'])
->with()
return view('user.index');
}
public function create()
{
$kategori = Kategori::query()->get();
return view('user.create')->with('data', $kategori);
}
public function store(Request $request)
{
// dd($request);
$data = [];
DB::beginTransaction();
// Validator::make($request->all(), [
// 'nama' => 'required|string',
// 'tanggal' => 'required',
// 'waktu' => 'required',
// 'lokasi' => 'string',
// 'link_zoom' => 'required|string',
// 'id_zoom' => 'required|string',
// 'passcode_zoom' => 'required|string',
// ]);
try{
// $swalData = [
// 'type' => 'success',
// 'title' => 'Agenda'
// ];
$data = $request->except(['_method','_token']);
$data['id'] =
$data['idunit'] = '1526d530-d992-49ba-b663-3ed703b96a0f'; //nanti bakal diambil dari session user
$data['statusacara'] = 0;
Agenda::query()->create($data);
DB::commit();
return back()->with('notify-swal', );
alert()->flash('Data berhasil ditambahkan', 'success');
}
catch(Exception $e){
dd($e);
Log::debug('Tambah Agenda Error');
Log::error($e);
DB::rollBack();
}
}
}
......@@ -2,31 +2,37 @@
namespace App\Models;
use App\Traits\Uuid;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Agenda extends Model
{
use Uuid;
public $incrementing = false;
protected $table = 'ms_agenda';
protected $keyType = 'string';
protected $fillable = [
'id',
'nama',
'tanggal',
'waktu_mulai',
'waktu_selesai',
'waktu',
'lokasi',
'statusacara',
'idunit',
'idkategori',
'linkzoom',
'idattachment',
'created_at',
'updated_at',
'deleted_at',
'userid_created',
'userid_updated'
'userid_updated',
'idzoom',
'passcode'
];
// public function rUserAgenda()
......
......@@ -2,12 +2,16 @@
namespace App\Models;
use App\Traits\Uuid;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class UserAgenda extends Model
{
use Uuid;
use HasFactory;
public $incrementing = false;
protected $keyType = 'string';
protected $table = 'tr_agenda_pegawai';
protected $fillable = [
......@@ -18,6 +22,7 @@ class UserAgenda extends Model
'created_at',
'updated_at',
'deleted_at',
'idattachmenet'
];
// public function rPegawai()
......
......@@ -9,7 +9,8 @@
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7"
"laravel/tinker": "^2.7",
"realrashid/sweet-alert": "^6.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.8",
......
......@@ -2943,6 +2943,96 @@
"time": "2023-01-12T18:13:24+00:00"
},
{
"name": "realrashid/sweet-alert",
"version": "v6.0.0",
"source": {
"type": "git",
"url": "https://github.com/realrashid/sweet-alert.git",
"reference": "efe53185ddd48ef1cc22399bfdae55e83fe36bf2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/realrashid/sweet-alert/zipball/efe53185ddd48ef1cc22399bfdae55e83fe36bf2",
"reference": "efe53185ddd48ef1cc22399bfdae55e83fe36bf2",
"shasum": ""
},
"require": {
"laravel/framework": "^5.6|^6.0|^7.0|^8.0|^9.0|^9.11|9.14.*|^10.0",
"php": "^7.2|^8.0"
},
"require-dev": {
"symfony/thanks": "^1.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"RealRashid\\SweetAlert\\SweetAlertServiceProvider"
],
"aliases": {
"Alert": "RealRashid\\SweetAlert\\Facades\\Alert"
}
}
},
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"RealRashid\\SweetAlert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Rashid Ali",
"email": "realrashid05@gmail.com",
"homepage": "https://realrashid.com",
"role": "Developer"
}
],
"description": "A BEAUTIFUL, RESPONSIVE, CUSTOMIZABLE, ACCESSIBLE (WAI-ARIA) REPLACEMENT FOR JAVASCRIPT'S POPUP BOXES FOR LARAVEL BY RASHID ALI",
"homepage": "https://github.com/realrashid/sweet-alert",
"keywords": [
"alert",
"laravel",
"laravel-package",
"notifier",
"noty",
"sweet-alert",
"sweet-alert2",
"toast"
],
"support": {
"docs": "https://realrashid.github.io/sweet-alert/",
"email": "realrashid05@gmail.com",
"issues": "https://github.com/realrashid/sweet-alert/issues",
"source": "https://github.com/realrashid/sweet-alert"
},
"funding": [
{
"url": "https://ko-fi.com/realrashid",
"type": "custom"
},
{
"url": "https://www.buymeacoffee.com/realrashid",
"type": "custom"
},
{
"url": "https://issuehunt.io/r/realrashid",
"type": "issuehunt"
},
{
"url": "https://tidelift.com/funding/github/packagist/realrashid/sweet-alert",
"type": "tidelift"
}
],
"time": "2023-02-15T07:13:11+00:00"
},
{
"name": "symfony/console",
"version": "v6.2.8",
"source": {
......
......@@ -181,6 +181,7 @@
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
RealRashid\SweetAlert\SweetAlertServiceProvider::class,
/*
* Package Service Providers...
......@@ -209,6 +210,7 @@
*/
'aliases' => Facade::defaultAliases()->merge([
'Alert' => RealRashid\SweetAlert\Facades\Alert::class,
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
......
......@@ -93,6 +93,42 @@
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
'eoffice' => [
'driver' => 'pgsql',
'host' => env('DB_HOST_EOFFICE', 'localhost'),
'port' => env('DB_PORT_EOFFICE', '5432'),
'database' => env('DB_DATABASE_EOFFICE', 'forge'),
'username' => env('DB_USERNAME_EOFFICE', 'forge'),
'password' => env('DB_PASSWORD_EOFFICE', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
'isdm' => [
'driver' => 'pgsql',
'host' => env('DB_HOST_ISDM', 'localhost'),
'port' => env('DB_PORT_ISDM', '5432'),
'database' => env('DB_DATABASE_ISDM', 'forge'),
'username' => env('DB_USERNAME_ISDM', 'forge'),
'password' => env('DB_PASSWORD_ISDM', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
'siakad' => [
'driver' => 'pgsql',
'host' => env('DB_HOST_SIAKAD', 'localhost'),
'port' => env('DB_PORT_SIAKAD', '5432'),
'database' => env('DB_DATABASE_SIAKAD', 'forge'),
'username' => env('DB_USERNAME_SIAKAD', 'forge'),
'password' => env('DB_PASSWORD_SIAKAD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
],
/*
......
<?php
return [
/*
|--------------------------------------------------------------------------
| CDN LINK
|--------------------------------------------------------------------------
| By default SweetAlert2 use its local sweetalert.all.js
| file.
| However, you can use its cdn if you want.
|
*/
'cdn' => env('SWEET_ALERT_CDN'),
/*
|--------------------------------------------------------------------------
| Always load the sweetalert.all.js
|--------------------------------------------------------------------------
| There might be situations where you will always want the sweet alert
| js package to be there for you. (for eg. you might use it heavily to
| show notifications or you might want to use the native js) then this
| might be handy.
|
*/
'alwaysLoadJS' => env('SWEET_ALERT_ALWAYS_LOAD_JS', false),
/*
|--------------------------------------------------------------------------
| Never load the sweetalert.all.js
|--------------------------------------------------------------------------
| If you want to handle the sweet alert js package by yourself
| (for eg. you might want to use laravel mix) then this can be
| handy.
| If you set always load js to true & never load js to false,
| it's going to prioritize the never load js.
|
| alwaysLoadJs = true & neverLoadJs = true => js will not be loaded
| alwaysLoadJs = true & neverLoadJs = false => js will be loaded
| alwaysLoadJs = false & neverLoadJs = false => js will be loaded when
| you set alert/toast by using the facade/helper functions.
*/
'neverLoadJS' => env('SWEET_ALERT_NEVER_LOAD_JS', false),
/*
|--------------------------------------------------------------------------
| AutoClose Timer
|--------------------------------------------------------------------------
|
| This is for the all Modal windows.
| For specific modal just use the autoClose() helper method.
|
*/
'timer' => env('SWEET_ALERT_TIMER', 5000),
/*
|--------------------------------------------------------------------------
| Width
|--------------------------------------------------------------------------
|
| Modal window width, including paddings (box-sizing: border-box).
| Can be in px or %.
| The default width is 32rem.
| This is for the all Modal windows.
| for particular modal just use the width() helper method.
*/
'width' => env('SWEET_ALERT_WIDTH', '32rem'),
/*
|--------------------------------------------------------------------------
| Height Auto
|--------------------------------------------------------------------------
| By default, SweetAlert2 sets html's and body's CSS height to auto !important.
| If this behavior isn't compatible with your project's layout,
| set heightAuto to false.
|
*/
'height_auto' => env('SWEET_ALERT_HEIGHT_AUTO', true),
/*
|--------------------------------------------------------------------------
| Padding
|--------------------------------------------------------------------------
|
| Modal window padding.
| Can be in px or %.
| The default padding is 1.25rem.
| This is for the all Modal windows.
| for particular modal just use the padding() helper method.
*/
'padding' => env('SWEET_ALERT_PADDING', '1.25rem'),
/*
|--------------------------------------------------------------------------
| Animation
|--------------------------------------------------------------------------
| Custom animation with [Animate.css](https://daneden.github.io/animate.css/)
| If set to false, modal CSS animation will be use default ones.
| For specific modal just use the animation() helper method.
|
*/
'animation' => [
'enable' => env('SWEET_ALERT_ANIMATION_ENABLE', false),
],
'animatecss' => env('SWEET_ALERT_ANIMATECSS', 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'),
/*
|--------------------------------------------------------------------------
| ShowConfirmButton
|--------------------------------------------------------------------------
| If set to false, a "Confirm"-button will not be shown.
| It can be useful when you're using custom HTML description.
| This is for the all Modal windows.
| For specific modal just use the showConfirmButton() helper method.
|
*/
'show_confirm_button' => env('SWEET_ALERT_CONFIRM_BUTTON', true),
/*
|--------------------------------------------------------------------------
| ShowCloseButton
|--------------------------------------------------------------------------
| If set to true, a "Close"-button will be shown,
| which the user can click on to dismiss the modal.
| This is for the all Modal windows.
| For specific modal just use the showCloseButton() helper method.
|
*/
'show_close_button' => env('SWEET_ALERT_CLOSE_BUTTON', false),
/*
|--------------------------------------------------------------------------
| Toast position
|--------------------------------------------------------------------------
| Modal window or toast position, can be 'top',
| 'top-start', 'top-end', 'center', 'center-start',
| 'center-end', 'bottom', 'bottom-start', or 'bottom-end'.
| For specific modal just use the position() helper method.
|
*/
'toast_position' => env('SWEET_ALERT_TOAST_POSITION', 'top-end'),
/*
|--------------------------------------------------------------------------
| Progress Bar
|--------------------------------------------------------------------------
| If set to true, a progress bar at the bottom of a popup will be shown.
| It can be useful with toasts.
|
*/
'timer_progress_bar' => env('SWEET_ALERT_TIMER_PROGRESS_BAR', false),
/*
|--------------------------------------------------------------------------
| Middleware
|--------------------------------------------------------------------------
| Modal window or toast, config for the Middleware
|
*/
'middleware' => [
'autoClose' => env('SWEET_ALERT_MIDDLEWARE_AUTO_CLOSE', false),
'toast_position' => env('SWEET_ALERT_MIDDLEWARE_TOAST_POSITION', 'top-end'),
'toast_close_button' => env('SWEET_ALERT_MIDDLEWARE_TOAST_CLOSE_BUTTON', true),
'timer' => env('SWEET_ALERT_MIDDLEWARE_ALERT_CLOSE_TIME', 6000),
'auto_display_error_messages' => env('SWEET_ALERT_AUTO_DISPLAY_ERROR_MESSAGES', false),
],
/*
|--------------------------------------------------------------------------
| Custom Class
|--------------------------------------------------------------------------
| A custom CSS class for the modal:
|
*/
'customClass' => [
'container' => env('SWEET_ALERT_CONTAINER_CLASS'),
'popup' => env('SWEET_ALERT_POPUP_CLASS'),
'header' => env('SWEET_ALERT_HEADER_CLASS'),
'title' => env('SWEET_ALERT_TITLE_CLASS'),
'closeButton' => env('SWEET_ALERT_CLOSE_BUTTON_CLASS'),
'icon' => env('SWEET_ALERT_ICON_CLASS'),
'image' => env('SWEET_ALERT_IMAGE_CLASS'),
'content' => env('SWEET_ALERT_CONTENT_CLASS'),
'input' => env('SWEET_ALERT_INPUT_CLASS'),
'actions' => env('SWEET_ALERT_ACTIONS_CLASS'),
'confirmButton' => env('SWEET_ALERT_CONFIRM_BUTTON_CLASS'),
'cancelButton' => env('SWEET_ALERT_CANCEL_BUTTON_CLASS'),
'footer' => env('SWEET_ALERT_FOOTER_CLASS'),
],
];
@extends('layouts.main')
@section('title', 'Agenda')
@section('container')
<div class="app-content content">
<div class="content-overlay"></div>
<div class="content-wrapper">
<div class="content-header row">
<div class="content-header-left col-12 mb-2 mt-1">
<div class="row breadcrumbs-top">
<div class="col-12">
<div class="breadcrumb-wrapper col-12">
<ol class="breadcrumb p-0 mb-0">
<li class="breadcrumb-item"><a href="{{ route('user.dashboard') }}"><i class="bx bx-home-alt"></i></a></li>
<li class="breadcrumb-item"><a href="#">Agenda</a></li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div class="content-body">
<div class="pb-1">
<a class="btn btn-primary btn-sm" id="tambah-agenda" href="{{ route('user.tambah-agenda') }}">Tambah Agenda</a>
</div>
<!-- Basic Tables start -->
<div class="row" id="basic-table">
<div class="col-12">
<div class="card">
<div class="card-content">
<div class="card-body">
<!-- Table with outer spacing -->
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Nama Agenda</th>
<th>Tanggal</th>
<th>Pukul</th>
<th>Tempat</th>
<th>LOCATION</th>
<th>ACTION</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-bold-500">Michael Right</td>
<td>$15/hr</td>
<td class="text-bold-500">UI/UX</td>
<td>Remote</td>
<td>Austin,Taxes</td>
<td><a href="#"><i class="badge-circle badge-circle-light-secondary bx bx-envelope font-medium-1"></i></a></td>
</tr>
<tr>
<td class="text-bold-500">Morgan Vanblum</td>
<td>$13/hr</td>
<td class="text-bold-500">Graphic concepts</td>
<td>Remote</td>
<td>Shangai,China</td>
<td><a href="#"><i class="badge-circle badge-circle-light-secondary bx bx-envelope font-medium-1"></i></a></td>
</tr>
<tr>
<td class="text-bold-500">Tiffani Blogz</td>
<td>$15/hr</td>
<td class="text-bold-500">Animation</td>
<td>Remote</td>
<td>Austin,Texas</td>
<td><a href="#"><i class="badge-circle badge-circle-light-secondary bx bx-envelope font-medium-1"></i></a></td>
</tr>
<tr>
<td class="text-bold-500">Ashley Boul</td>
<td>$15/hr</td>
<td class="text-bold-500">Animation</td>
<td>Remote</td>
<td>Austin,Texas</td>
<td><a href="#"><i class="badge-circle badge-circle-light-secondary bx bx-envelope font-medium-1"></i></a></td>
</tr>
<tr>
<td class="text-bold-500">Mikkey Mice</td>
<td>$15/hr</td>
<td class="text-bold-500">Animation</td>
<td>Remote</td>
<td>Austin,Texas</td>
<td><a href="#"><i class="badge-circle badge-circle-light-secondary bx bx-envelope font-medium-1"></i></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Basic Tables end -->
</div>
</div>
</div>
@endsection
\ No newline at end of file
......@@ -42,6 +42,10 @@
<link rel="stylesheet" type="text/css" href="/assets/css/style.css">
<!-- END: Custom CSS-->
<!-- BEGIN: Sweet Alert-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.css">
<!-- END: Sweet Alert-->
</head>
<!-- END: Head-->
......@@ -75,6 +79,8 @@
@include('layouts.js')
@stack('custom-js')
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.js"></script>
</body>
<!-- END: Body-->
</html>
\ No newline at end of file
@if (config('sweetalert.alwaysLoadJS') === true && config('sweetalert.neverLoadJS') === false )
<script src="{{ $cdn ?? asset('vendor/sweetalert/sweetalert.all.js') }}"></script>
@endif
@if (Session::has('alert.config'))
@if(config('sweetalert.animation.enable'))
<link rel="stylesheet" href="{{ config('sweetalert.animatecss') }}">
@endif
@if (config('sweetalert.alwaysLoadJS') === false && config('sweetalert.neverLoadJS') === false)
<script src="{{ $cdn ?? asset('vendor/sweetalert/sweetalert.all.js') }}"></script>
@endif
<script>
Swal.fire({!! Session::pull('alert.config') !!});
</script>
@endif
<?php
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\User\AgendaController;
use App\Http\Controllers\KategoriController;
use App\Http\Controllers\KategoriDokumenController;
use App\Http\Controllers\RoleController;
......@@ -21,7 +22,7 @@
return view('login');
});
Route::get('dashboard', [DashboardController::class, 'index']);
Route::get('dashboard', [DashboardController::class, 'index'])->name('user.dashboard');
// Data Master
Route::get('/kategori', [KategoriController::class,'index'])->name('kategori.index');
......@@ -30,6 +31,9 @@
Route::put('/update-kategori/{id}',[KategoriController::class,'update'])->name('kategori.update');
Route::get('/hapus-kategori/{id}',[KategoriController::class,'destroy'])->name('kategori.delete');
Route::get('/agenda', [AgendaController::class,'index'])->name('user.agenda');
Route::get('/tambah-agenda', [AgendaController::class,'create'])->name('user.tambah-agenda');
Route::post('/simpan-agenda', [AgendaController::class,'store'])->name('user.simpan-agenda');
Route::get('/kategori-dokumen', [KategoriDokumenController::class,'index'])->name('kategoridoc.index');
Route::post('/tambah-kategori-dokumen',[KategoriDokumenController::class,'store'])->name('kategoridoc.create');
Route::get('/edit-kategori-dokumen',[KategoriDokumenController::class,'edit'])->name('kategoridoc.edit');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment