Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dashboard template and currency format in Helper class #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Helper
{
public static function convertToRupiah($price)
{
return 'Rp. '.number_format($price, 2, ',', '.');
return '$. '.number_format($price, 2, ',', '.');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it's convertToRupiah, it should've been prefixed with Rp. (Rupiah), we can add one more static method for creating dollar convertor if you want, and im open for it.

If we want to support more than 1 convertor, we can find package that has already create it.

}

public static function thisMonth()
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\Models\Transaction;
use App\Repositories\Interface\PaymentRepositoryInterface;
use Illuminate\Http\Request;
use App\Helpers\Helper as Helpers;

class PaymentController extends Controller
{
Expand Down
20 changes: 10 additions & 10 deletions database/factories/RoomFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ public function definition()
'D',
];
$price = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep this change on cloned repo only i think? since overall of this app built with rupiah

450000,
500000,
650000,
700000,
850000,
950000,
1200000,
1500000,
1750000,
2000000,
450,
500,
650,
700,
850,
950,
1200,
1500,
1750,
2000,
];
static $order = 10;

Expand Down
1 change: 1 addition & 0 deletions public/hot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://[::1]:5173
Copy link
Owner

@WailanTirajoh WailanTirajoh Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can ignore this file on .gitignore i guess, feel free to add that there.

14 changes: 9 additions & 5 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ class="rounded-circle mx-auto" alt="logo" style="background-color: white;">
</div>
<div class="row">
<div class="col-lg-12">
<h5 class="card-title text-center">Hotel Information System</h5>
<h5 class="card-title text-center">
Sistema Administrativo Hotelero
<br>
<strong>Inicio de Sesion</strong>
</h5>
</div>
</div>
<form onsubmit="return disableButton()" class="form-signin" action="/postLogin" method="POST">
Expand All @@ -48,7 +52,7 @@ class="rounded-circle mx-auto" alt="logo" style="background-color: white;">
<div class="form-label-group">
<input type="email" id="email" name="email" class="form-control @error('email') is-invalid @enderror"
placeholder="Email" value="{{ old('email') }}" required autofocus>
<label for="email">Email</label>
<label for="email">Correo</label>
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
Expand All @@ -59,7 +63,7 @@ class="rounded-circle mx-auto" alt="logo" style="background-color: white;">
<input type="password" id="password" name="password" autocomplete="new-password"
class="form-control @error('password') is-invalid @enderror" placeholder="Password" value="{{ old('password') }}"
required>
<label for="password">Password</label>
<label for="password">Contrasenia</label>
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
Expand All @@ -77,14 +81,14 @@ class="form-control @error('password') is-invalid @enderror" placeholder="Passwo
style="width: 15px; height: 15px">
</div>
<div id="text_submit">
Login
Confirmar
</div>
</button>
</div>
</div>
</div>
<hr class="my-4">
<p class="text-center">Forgot Password? <a href="/forgot-password">go here</a></p>
<p hidden class="text-center">Olvidaste la contrasenia? <a href="/forgot-password">Click Aqui</a></p>
</form>
</div>
</div>
Expand Down
18 changes: 13 additions & 5 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
</div>
<div class="row">
<div class="col-lg-12">
<h5 class="card-title text-center">Sistem Informasi Perusahaan</h5>
<h5 class="card-title text-center">
Sistema Administrativo Hotelero
<br>
<strong>Registro de Usuario</strong>
</h5>
</div>
</div>
<form class="form-signin" action="http://localhost:81/sip/pelamar/fungsi_daftar" method="post">
Expand All @@ -33,24 +37,28 @@
<div class="form-label-group">
<input type="email" id="email" name="email" class="form-control" placeholder="Email"
value="" required autofocus>
<label for="email">Email</label>
<label for="email">Correo</label>
</div>
<div class="form-label-group">
<input type="password" id="password" name="password" autocomplete="new-password"
class="form-control" placeholder="Password" value="" required>
<label for="password">Password</label>
<label for="password">Contrasenia</label>
</div>
<div class="form-label-group">
<input type="password" id="password_konfirmasi" name="password_konfirmasi"
class="form-control" placeholder="Repead Password" value="" required>
<label for="password_konfirmasi">Konfirmasi password</label>
<label for="password_konfirmasi">
Confirmar Contrasenia</label>

</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 d-flex justify-content-center">
<button class="btn btn-lg btn-primary text-white btn-block text-uppercase"
type="submit">Daftar</button>
type="submit">
Registrarse
</button>
</div>
</div>
<hr class="my-4">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/customer/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<div class="col-lg-8">
<div class="card shadow-sm border">
<div class="card-header">
<h2>Add Customer</h2>
<h2>Crear Cliente</h2>
</div>
<div class="card-body p-3">
<form class="row g-3" method="POST" action="{{ route('customer.store') }}"
enctype="multipart/form-data">
@csrf
<div class="col-md-12">
<label for="name" class="form-label">Name</label>
<label for="name" class="form-label">Nombre</label>
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name"
name="name" value="{{ old('name') }}">
@error('name')
Expand Down
27 changes: 14 additions & 13 deletions resources/views/dashboard/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@extends('template.master')
@section('title', 'Dashboard')

@section('content')
<div id="dashboard">
<div class="row">
Expand All @@ -8,7 +9,7 @@
<div class="col-lg-6">
<div class="card shadow-sm border" style="border-radius: 0.5rem">
<div class="card-body">
<h5>{{ count($transactions) }} Guests this day</h5>
<h5>{{ count($transactions) }} Hospedados Hoy</h5>
</div>
</div>
</div>
Expand All @@ -28,7 +29,7 @@
<div class="card-header">
<div class="row ">
<div class="col-lg-12 d-flex justify-content-between">
<h3>Today Guests</h3>
<h3>Hospedados del dia</h3>
<div>
<a href="#" class="btn btn-tool btn-sm">
<i class="fas fa-download"></i>
Expand All @@ -45,12 +46,12 @@
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Room</th>
<th class="text-center">Stay</th>
<th>Day Left</th>
<th>Debt</th>
<th class="text-center">Status</th>
<th>Nombre</th>
<th>Cuarto</th>
<th class="text-center">Estadia</th>
<th>Dias Restantes</th>
<th>Debe</th>
<th class="text-center">Estado</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -84,19 +85,19 @@ class="rounded-circle img-thumbnail" width="40" height="40"
<td>
<span
class="justify-content-center badge {{ $transaction->getTotalPrice() - $transaction->getTotalPayment() == 0 ? 'bg-success' : 'bg-warning' }}">
{{ $transaction->getTotalPrice() - $transaction->getTotalPayment() == 0 ? 'Success' : 'Progress' }}
{{ $transaction->getTotalPrice() - $transaction->getTotalPayment() == 0 ? 'Pagado' : 'En proceso' }}
</span>
@if (Helper::getDateDifference(now(), $transaction->check_out) < 1)
<span class="justify-content-center badge bg-danger">
must finish payment
Sin pagar
</span>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="10" class="text-center">
There's no data in this table
Sin datos Disponibles
</td>
</tr>
@endforelse
Expand Down Expand Up @@ -126,7 +127,7 @@ class="justify-content-center badge {{ $transaction->getTotalPrice() - $transact
<div class="card shadow-sm border">
<div class="card-header border-0">
<div class="d-flex justify-content-between">
<h3 class="card-title">Monthly Guests Chart</h3>
<h3 class="card-title">Usuarios por mes</h3>
</div>
</div>
<div class="card-body">
Expand All @@ -152,7 +153,7 @@ class="justify-content-center badge {{ $transaction->getTotalPrice() - $transact
<i class="fas fa-square text-primary"></i> {{ Helper::thisMonth() }}
</span>
<span>
<i class="fas fa-square text-gray"></i> Last month
<i class="fas fa-square text-gray"></i> Ultimo Mes
</span>
</div>
</div>
Expand Down
25 changes: 15 additions & 10 deletions resources/views/template/include/_navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<span
class="position-absolute mt-1 top-0 start-100 translate-middle badge rounded-pill bg-secondary">
{{ auth()->user()->unreadNotifications->count() }}
<span class="visually-hidden">unread messages</span>
<span class="visually-hidden">
mensajes sin responder
</span>
</span>
@endif
</i>
Expand All @@ -27,7 +29,7 @@ class="position-absolute mt-1 top-0 start-100 translate-middle badge rounded-pil
<div class="row">
<div class="col-lg-12">
<li role="presentation">
<div class="dropdown-header">Notifications</div>
<div class="dropdown-header">Notificaciones</div>
</li>
</div>
</div>
Expand All @@ -50,7 +52,7 @@ class="timeline-date">{{ $notification->created_at->diffForHumans() }}</span>
</li>
@empty
<p class="text-center">
There's no new notification
No hay notificaciones
</p>
@endforelse
</ul>
Expand All @@ -63,9 +65,12 @@ class="timeline-date">{{ $notification->created_at->diffForHumans() }}</span>
<div class="row">
<div class="col-lg-12 text-center">
<a href="{{ route('notification.markAllAsRead') }}"
class="float-start mb-2 ms-2">Mark all as read</a>
<a href="{{ route('notification.index') }}" class="float-end mb-2 me-2">See
All</a>
class="float-start mb-2 ms-2">
Marcar Leidas
</a>
<a href="{{ route('notification.index') }}" class="float-end mb-2 me-2">
Ver Todas
</a>
</div>
</div>
</li>
Expand All @@ -81,16 +86,16 @@ class="float-start mb-2 ms-2">Mark all as read</a>
</div>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item"
href="{{ route('user.show', ['user' => auth()->user()->id]) }}">Profil</a>
href="{{ route('user.show', ['user' => auth()->user()->id]) }}">Perfil</a>
</li>
<li><a class="dropdown-item" href="#">Activity</a></li>
<li><a class="dropdown-item" href="#">Setting</a></li>
<li><a class="dropdown-item" href="#">Actividad</a></li>
<li><a class="dropdown-item" href="#">Configuraciones</a></li>
<li>
<hr class="dropdown-divider">
</li>
<form action="/logout" method="POST">
@csrf
<li><button class="dropdown-item" type="submit">Logout</button></li>
<li><button class="dropdown-item" type="submit">Cerrar Sesion</button></li>
</form>
</ul>
</div>
Expand Down
Loading