-
Notifications
You must be signed in to change notification settings - Fork 0
/
Belajar.html
142 lines (129 loc) · 4.98 KB
/
Belajar.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>FROM Input</h1>
<label for="Kode_Produk">Kode Produk:</label>
<input
type="text"
id="Kode_Produk"
name="id_Kode_Produk"
placeholder="MD-01"
readonly
/>
<form id="productForm">
<div class="form-group">
<label for="nama_produk">Nama Produk</label>
<input type="text" name="nama_produk"
id="nama_produk"
placeholder="Nama Produk" required>
</div>
<div class="form-group">
<label for="category">Kategori</label>
<select id="category" required>
<option value="" disabled>Pilih Kategori </option>
<option value="Makanan">Makanan</option>
<option value="Minuman">Minuman</option>
</select>
</div>
<div class="form-group">
<label for="productImage">URL Gambar</label>
<input type="text" id="productImage"
placeholder="URL Gambar" >
</div>
<div class="form-group">
<label for="price">Harga</label>
<input type="number" id="price" required>
</div>
<div class="form-group">
<label for="unit">Satuan</label>
<select id="unit" required>
<option value="" disabled>Pilih Satuan </option>
<option value="Ayam KFC">Ayam KFC</option>
<option value="Moca float">Moca float</option>
<option value="Kopi">Kopi</option>
<option value="Cocacola">Cocacola</option>
<option value="Fanta">Fanta</option>
</select>
</div>
<div class="form-group">
<label for="stock">Stok Awal</label>
<input type="number" id="stock" required>
</div>
<button type="submit">Tambah Produk</button>
</form>
<table id="productTable">
<thead>
<tr>
<th>Kode Produk</th>
<th>Nama</th>
<th>Kategori</th>
<th>Gambar</th>
<th>Harga</th>
<th>Satuan</th>
<th>Stok</th>
<th>Aksi</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<!-- Modal untuk Edit Produk -->
<div id="editModal" class="modal">
<div class="modal-content">
<span class="close" id="closeModal">×</span>
<h2>Edit Produk</h2>
<form id="editProductForm">
<div class="form-group">
<label for="editProductName">Nama Produk</label>
<input type="text" id="editProductName">
</div>
<div class="form-group">
<label for="editCategory">Kategori</label>
<select id="editCategory">
<option value="Makanan">Makanan</option>
<option value="Minuman">Minuman</option>
<option value="Cemilan">Cemilan</option>
</select>
</div>
<div class="form-group">
<label for="editProductImage">URL Gambar</label>
<input type="text" id="editProductImage">
</div>
<div class="form-group">
<label for="editPrice">Harga</label>
<input type="number" id="editPrice">
</div>
<div class="form-group">
<label for="editUnit">Satuan</label>
<select id="editUnit">
<option value="Porsi">Porsi</option>
<option value="Cup">Cup</option>
<option value="Botol">Botol</option>
</select>
</div>
<div class="form-group">
<label for="editStock">Stok</label>
<input type="number" id="editStock">
</div>
<button type="submit">Simpan</button>
</form>
</div>
</div>
<!-- Modal untuk Konfirmasi Hapus -->
<div id="deleteConfirmModal" class="modal">
<div class="modal-content">
<h2>Apakah Anda yakin ingin menghapus produk ini?</h2>
<button id="confirmDelete" class="delete-btn">Ya, Hapus</button>
<button id="cancelDelete" class="cancel-btn">Batal</button>
</div>
</div>
<script src="funcition.js"></script>
</body>
</html>