Unverified Commit 45a27668 authored by MujahidRopiq's avatar MujahidRopiq Committed by GitHub
Browse files

Merge pull request #185 from arneyva/dev-ropiq

update tampilan
No related merge requests found
Showing with 185 additions and 48 deletions
+185 -48
......@@ -36,7 +36,20 @@ public function create()
*/
public function store(Request $request)
{
$rules = [
'spend_every' => 'required|max:12',
'one_score_equal' => 'required|email|unique:clients',
'score_to_email' => 'required|numeric|min_digits:12|max_digits:12',
];
$message = [
'required' => 'Tidak boleh kosong!',
'email' => 'Alamat email tidak valid!',
'min' => 'Minimal :min karakter',
'min_digits' => 'Nomor terdiri dari :min angka',
'max' => 'Maksimal :max karakter',
'max_digits' => 'Nomor terdiri dari :max angka',
'unique' => ':attribute sudah terdaftar',
];
}
/**
......
......@@ -10,7 +10,7 @@
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
......@@ -66,3 +66,4 @@
</div>
@endif
</div>
......@@ -429,14 +429,49 @@ class="mode light-img img-fluid btn-border p-0 flex-column mb-2" data-setting="n
} else {
console.error("Service workers are not supported.");
}
</script>
</script>
<script>
$("document").ready(function() {
setTimeout(function() {
$("div.alert1").remove();
}, 1500); // secs
});
</script>
{{-- sweetalert2 --}}
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
@if(session('success'))
const Toast = Swal.mixin({
toast: true,
position: "top-end",
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.onmouseenter = Swal.stopTimer;
toast.onmouseleave = Swal.resumeTimer;
}
});
Toast.fire({
icon: "success",
title: "{{ session('success') }}"
});
@endif
@if($errors->any())
let errors = {!! json_encode($errors->all()) !!};
let errorList = '<ol>' + errors.map(function(error) {
return '<li style="text-align: start">' + error + '</li>';
}).join('') + '</ol>';
Swal.fire({
icon: 'error',
title: 'Oops...',
html: errorList,
// Anda bisa mengganti '<br>' dengan tag HTML lain untuk menyesuaikan tampilan
});
@endif
</script>
@stack('script')
</body>
......
......@@ -4,10 +4,10 @@
<div class="col-md-12">
<div class="flex-wrap d-flex justify-content-between align-items-center">
<div>
<!-- @yield('pages_title') -->
<h1>Hello {{ Auth::user()->username }}</h1>
@yield('pages_title')
<!-- <h1>Hello {{ Auth::user()->username }}</h1> -->
{{-- <h1>Hello User</h1> --}}
<p>Do something today that your future self will thank you for.</p>
<!-- <p>Do something today that your future self will thank you for.</p> -->
</div>
</div>
......
@extends('templates.main')
<!-- @section('pages_title')
<h1>Client</h1>
@endsection -->
@section('pages_title')
<h1>All Client</h1>
<p>Do Something with all your client</p>
@endsection
@section('content')
<style type="text/css">
.background {
......@@ -19,7 +22,7 @@
</style>
<div class="col-sm-12">
<div class="mt-3">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......@@ -115,7 +118,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="{{ route('people.clients.update', $data['id']) }}" method="POST" enctype="multipart/form-data">
<form class="needs-validation" action="{{ route('people.clients.update', $data['id']) }}" method="POST" enctype="multipart/form-data">
@csrf
@method('patch')
<div class="form-group">
......@@ -203,7 +206,7 @@ class="form-control bg-transparent @error('phone') is-invalid @enderror"
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form action="{{ route('people.clients.store') }}" method="POST" enctype="multipart/form-data">
<form class="needs-validation" action="{{ route('people.clients.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label class="form-label" for="name">Name:</label>
......@@ -249,20 +252,21 @@ class="form-control bg-transparent @error('phone') is-invalid @enderror"
@endsection
@push('script')
<script type="text/javascript" src="{{ asset('hopeui/html/assets/js/form-validator.js') }}"></script>
<script>
$('a[href="#"]').click(function(e) {
e.preventDefault();
});
</script>
@if($errors->any())
<!-- @if($errors->any())
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
var errorModal = new bootstrap.Modal(document.getElementById('editClient'));
errorModal.show();
});
</script>
@endif
@endif -->
<script>
document.addEventListener('DOMContentLoaded', function () {
......
@extends('templates.main')
@section('pages_title')
<h1>Create User Employee</h1>
<p>Create new user employee</p>
@endsection
@section('content')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.12/cropper.min.css" />
<style type="text/css">
......
@extends('templates.main')
@section('pages_title')
<h1>Edit {{ $user->firstname}} {{ $user->lastname}}</h1>
<p>Do Something with {{ $user->firstname}} {{ $user->lastname}} data</p>
@endsection
@section('content')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.12/cropper.min.css" />
<style type="text/css">
......
@extends('templates.main')
@section('pages_title')
<h1>All User Employee</h1>
<p>Do Something with all your employee</p>
@endsection
@section('content')
<style type="text/css">
.background {
......@@ -17,7 +22,7 @@
</style>
<div class="col-sm-12">
<div class="mt-3">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......@@ -83,7 +88,7 @@
</path>
</svg>
</a>
<button type="button" data-bs-toggle="modal" data-bs-target="#staticBackdrop" style="background-color: transparent; border: none; display: inline-block;">
<button type="button" onclick="confirmDelete({{ $data['id'] }})" data-bs-toggle="modal" data-bs-target="#staticBackdrop" style="background-color: transparent; border: none; display: inline-block;">
<a href="#">
<svg class="icon-32" width="32" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
......@@ -105,33 +110,13 @@
</svg>
</a>
</button>
<form id="delete-form-{{ $data['id'] }}" action="{{ route('people.users.destroy', $data['id']) }}" method="POST" style="display: none;">
@csrf
@method('DELETE')
</form>
</div>
</td>
</tr>
<!-- modal hapus -->
<div class="modal fade " id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="background">
<div class="modal-dialog modal-dialog-centered modal-lg overlay">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Delete User</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Anda akan menghapus akun ini!</p>
</div>
<div class="modal-footer">
<form action="{{ route('people.users.destroy', $data['id']) }}" method="post">
@csrf
@method('delete')
<button type="button" class="btn btn-soft-primary" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-soft-danger">Understood</button>
</form>
</div>
</div>
</div>
</div>
</div>
@endforeach
</tbody>
</table>
......@@ -151,8 +136,29 @@
e.preventDefault();
});
</script>
<script>
function confirmDelete(id) {
Swal.fire({
title: 'Apakah Anda yakin?',
text: "Data yang dihapus tidak dapat dikembalikan!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Ya, hapus!',
cancelButtonText: 'Batal'
}).then((result) => {
if (result.isConfirmed) {
document.getElementById(`delete-form-${id}`).submit();
}
});
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function () {
document.addEventListener('DOMContentLoaded', function () {
var filterCollapse = document.getElementById('filter');
// Check if filter state is stored in localStorage
......
@extends('templates.main')
@section('pages_title')
<h1>All Product Brand</h1>
<p>Do Something with all your product brand</p>
@endsection
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
@extends('templates.main')
@section('pages_title')
<h1>All Product Categories</h1>
<p>Do Something with all your product categories</p>
@endsection
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
@extends('templates.main')
@section('pages_title')
<h1>Add New Product</h1>
<p>Add new product to your store </p>
@endsection
<style>
.upload-logo {
padding: 20px 8px;
......@@ -38,7 +44,7 @@
{{-- part 1 --}}
<div class="col-md-12 col-lg-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
</div>
{{-- part 2 sisi kiri --}}
......
@extends('templates.main')
@section('pages_title')
<h1>Edit Product</h1>
<p>Do Something with product's data</p>
@endsection
<style>
.upload-logo {
padding: 20px 8px;
......@@ -38,7 +44,7 @@
{{-- part 1 --}}
<div class="col-md-12 col-lg-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
</div>
{{-- part 2 sisi kiri --}}
......
@extends('templates.main')
@section('pages_title')
<h1>All Products</h1>
<p>Do Something with all your store's products</p>
@endsection
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
@extends('templates.main')
@section('pages_title')
<h1>{{ $data[0]['brand'] }} {{$data[0]['name']}} Detail</h1>
<p>Do Something with all your measurement</p>
@endsection
@section('content')
{{-- part 1 --}}
<div class="col-md-12 col-lg-12">
......
@extends('templates.main')
@section('pages_title')
<h1>All Unit Measurement</h1>
<p>Do Something with all your measurement</p>
@endsection
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
@extends('templates.main')
@section('pages_title')
<h1>Reports</h1>
<p>look up your daily report</p>
@endsection
<style>
.status-completed {
padding: 7px;
......
@extends('templates.main')
@section('pages_title')
<h1>Reports</h1>
<p>look up your daily report</p>
@endsection
<style>
.warehousedeleted {
padding: 7px;
......@@ -17,7 +23,7 @@
@section('content')
<div class="col-sm-12">
<div class="mt-3" style="justify-content-center">
@include('templates.alert')
<!-- @include('templates.alert') -->
</div>
<div class="card">
<div class="card-header d-flex justify-content-between">
......
@extends('templates.main')
@section('pages_title')
<h1>Reports</h1>
<p>look up your daily report</p>
@endsection
<style>
.warehousedeleted {
padding: 7px;
......
@extends('templates.main')
@section('pages_title')
<h1>Reports</h1>
<p>look up your daily report</p>
@endsection
<style>
.warehousedeleted {
padding: 7px;
......
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