-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
173 lines (154 loc) · 6.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="id" data-bs-theme="">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tracking Money</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<!-- FontAwesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="https://cdn.datatables.net/2.0.2/css/dataTables.dataTables.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Quicksand:[email protected]&display=swap" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="dist/css/style.css">
<script>
const prefers = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
let html = document.querySelector('html');
document.getcookie = function (name) {
let match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
if (match) return match[2];
}
if (document.getcookie('theme')) {
setTheme(document.getcookie('theme'));
} else {
setTheme(prefers);
}
function setTheme(theme) {
if (theme == 'dark') {
html.classList.remove('light');
html.classList.add('dark');
} else {
html.classList.remove('dark');
html.classList.add('light');
}
html.setAttribute('data-bs-theme', theme);
}
</script>
</head>
<body>
<div class="modal fade" id="myModal" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<form id="myForm" name="myForm">
<div class="modal-header">
<h5 class="modal-title" id="modalLabel">Tambah Pengeluaran</h5>
</div>
<div class="modal-body">
<div class="mb-3">
<input class="form-control" type="date" name="tanggal" id="tanggal" required>
</div>
<div class="row" id="input-wrap">
<div class="col mb-3">
<input class="form-control" type="text" name="jenis" id="jenis" placeholder="Jenis" required>
</div>
<div class="col mb-3">
<select class="form-select" name="metode" id="metode" required>
<option class="d-none" value="" selected>Pilih metode:</option>
<option value="Cash">Cash</option>
<option value="BRI">BRI</option>
<option value="Seabank">Seabank</option>
<option value="Gopay">Gopay</option>
<option value="Dana">Dana</option>
<option value="OVO">OVO</option>
</select>
</div>
</div>
<div>
<input class="form-control" type="number" name="total" id="total" placeholder="Jumlah (Rp.)">
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" id="submit">Submit</button>
<button class="btn btn-primary d-none" id="sendForm" type="button" disabled>
<span class="spinner-border spinner-border-sm" aria-hidden="true"></span>
<span role="status">Loading...</span>
</button>
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<div class="container-fluid" id="wrapper">
<h4 class="mt-3 text-center">PENGELUARAN BULANAN</h4>
<hr>
<div class="row d-flex">
<div class="col d-flex gap-2">
<button class="btn btn-success px-3" type="button" id="input" data-bs-toggle='modal' data-bs-target="#myModal">
<i class="fas fa-pencil"></i>
<span class="none">Edit</span>
</button>
<button class="btn btn-warning px-3" type="button" id="refresh" onclick="window.location.reload()">
<i class="fas fa-rotate"></i>
<span class="none">Refresh</span>
</button>
</div>
<div class="col d-flex justify-content-end">
<button class="btn btn-secondary dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<span id="iconTheme"></span>
<ul class="dropdown-menu">
<li onclick="setTheme('dark')" id="setDark">
<span class="dropdown-item">
<i class="bi bi-moon-stars-fill"></i> Dark</span>
</li>
<li onclick="setTheme('light')" id="setLight">
<span class="dropdown-item">
<i class="bi bi-sun-fill"></i> Light</span>
</li>
</ul>
</button>
</div>
</div>
<div class="mt-3" id="wraptable">
<div class="text-center" id="loadtable">
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="d-flex justify-content-center d-none" style="width: 100%;" id="infoMsg">
<div class="alert alert-info" role="alert" style="width: fit-content;">
<i class="bi bi-info-circle-fill"></i>
Tidak ada data yang tersedia
</div>
</div>
<table id="myTable" class="table table-hover table-striped table-bordered text-center"></table>
</div>
</div>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<!-- FontAwesome -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js"
integrity="sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<!-- Custom JS -->
<script src="dist/js/main.js"></script>
<script>
$(document).ready(function () {
$('#modal').modal('show');
});
</script>
</body>
</html>