├── README.md
├── img
├── spoonNfork.png
└── bg-login.svg
├── toko.html
├── css
├── style-toko.css
├── style-index.css
├── style-admin.css
├── style-checkout.css
└── style-menu.css
├── index.html
├── kb.html
├── whkbt.html
├── checkout.html
├── js
├── admin.js
├── main.js
├── storage.js
├── dom.js
├── kb_menu.js
└── whkbt_menu.js
└── admin.html
/README.md:
--------------------------------------------------------------------------------
1 | # JajanKuy.github.io
--------------------------------------------------------------------------------
/img/spoonNfork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Hulhay/jajan-kuy/HEAD/img/spoonNfork.png
--------------------------------------------------------------------------------
/img/bg-login.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/toko.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Jajan Kuy
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
Kedai Berkah
24 |
25 |
26 |
27 |
28 |
29 |
WH | Kedai Betah
30 |
31 |
32 |
33 |
34 |
35 |
Toko SMM
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/css/style-toko.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@300;400&display=swap');
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | body {
10 | font-family: 'Mukta Malar', sans-serif;
11 | }
12 |
13 | header {
14 | display: flex;
15 | align-items: center;
16 | border-bottom: 3px solid #cc080b;
17 | }
18 |
19 | header a i {
20 | font-size: 3em;
21 | text-decoration: none;
22 | color: #cc080b;
23 | }
24 |
25 | main {
26 | display: grid;
27 | grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
28 | grid-gap: 10px;
29 | justify-items: center;
30 | margin: 20px;
31 | }
32 |
33 | main .toko {
34 | text-decoration: none;
35 | color: #000;
36 | }
37 |
38 | main .toko .container{
39 | width: 150px;
40 | height: 150px;
41 | background-color: #fff;
42 | display: flex;
43 | flex-direction: column;
44 | justify-content: center;
45 | align-items: center;
46 | border-radius: 18px;
47 | padding: 10px;
48 | text-align: center;
49 | box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.6);
50 | }
51 |
52 | main .toko .container i {
53 | font-size: 3em;
54 | color: #cc080b;
55 | }
56 |
57 | main .toko .container h2 {
58 | font-size: 1.1em;
59 | }
60 |
61 | footer {
62 | position: fixed;
63 | bottom: 0;
64 | right: 0;
65 | margin-right: 10px;
66 | font-size: 0.8em;
67 | }
--------------------------------------------------------------------------------
/css/style-index.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@300;400&display=swap');
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | body {
10 | height: 100vh;
11 | display: flex;
12 | flex-direction: column;
13 | justify-content: center;
14 | align-items: center;
15 | font-family: 'Mukta Malar', sans-serif;
16 | background: url("/img/bg-login.svg");
17 | background-position: center;
18 | background-size: contain;
19 | background-repeat: no-repeat;
20 | }
21 |
22 | header {
23 | font-size: 1.3em;
24 | line-height: 1.5em;
25 | color: #cc080b;
26 | font-weight: bold;
27 | margin-bottom: 20px;
28 | }
29 |
30 | header p {
31 | text-align: right;
32 | font-size: 0.8em;
33 | }
34 |
35 | form {
36 | display: flex;
37 | flex-direction: column;
38 | align-items: center;
39 | }
40 |
41 | form input, form select {
42 | height: 38px;
43 | width: 100%;
44 | padding: 10px;
45 | margin-bottom: 5px;
46 | border: none;
47 | border-radius: 5px;
48 | color: grey;
49 | }
50 |
51 | form input:focus {
52 | color: #000;
53 | }
54 |
55 | #mulaiJajan {
56 | background-color: #cc080b;
57 | padding: 5px 20px;
58 | margin-top: 30px;
59 | width: 70%;
60 | text-align: center;
61 | border-radius: 10px;
62 | border: none;
63 | color: #fff;
64 | font-size: 1.2em;
65 | cursor: pointer;
66 | }
67 |
68 | footer {
69 | position: fixed;
70 | bottom: 0;
71 | margin-right: 10px;
72 | font-size: 0.8em;
73 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Jajan Kuy
8 |
9 |
10 |
11 |
12 | Jajan Kuy
13 | beta
14 |
15 |
16 |
17 |
39 |
40 |
41 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/kb.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Jajan Kuy
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
Kedai Berkah
23 |
085795377422 / 085775050379
24 |
25 |
26 |
27 |
44 |
45 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/whkbt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Jajan Kuy
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
Warung Haura dan Kedai BeTah
23 |
085220293645 / 089654358807
24 |
25 |
26 |
27 |
44 |
45 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/checkout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Jajan Kuy
10 |
11 |
12 |
13 |
14 |
17 | Checkout
18 |
19 |
20 |
21 | Konfirmasi Pesanan
22 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/css/style-admin.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@300;400&display=swap');
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | body {
10 | font-family: 'Mukta Malar', sans-serif;
11 | height: 100vh;
12 | }
13 |
14 | header {
15 | border-bottom: 2px dashed #aaa;
16 | margin-bottom: 20px;
17 | }
18 |
19 | header h1{
20 | line-height: 1.5em;
21 | color: #cc080b;
22 | font-weight: bold;
23 | padding: 20px 20px 5px;
24 | }
25 |
26 | header p {
27 | padding: 5px 20px 10px;
28 | line-height: 1.3em;
29 | }
30 |
31 | main {
32 | padding-left: 20px;
33 | margin-bottom: 20px;
34 | }
35 |
36 | main form {
37 | display: flex;
38 | flex-direction: column;
39 | width: 90%;
40 | }
41 |
42 | form th {
43 | width: 100px;
44 | text-align: left;
45 | font-weight: bold;
46 | }
47 |
48 | form input, form select {
49 | height: 38px;
50 | width: 100%;
51 | padding: 10px;
52 | margin-bottom: 7px;
53 | border: 1px solid #eee;
54 | border-radius: 5px;
55 | color: black;
56 | background-color: #eee;
57 | }
58 |
59 | form #generate-laporan {
60 | background-color: #cc080b;
61 | width: 30%;
62 | align-self: flex-end;
63 | border-radius: 5px;
64 | border: none;
65 | color: #fff;
66 | padding: 5px;
67 | font-size: 1em;
68 | font-weight: bold;
69 | cursor: pointer;
70 | }
71 |
72 | section form {
73 | display: flex;
74 | flex-direction: column;
75 | width: 90%;
76 | justify-content: center;
77 | align-items: flex-start;
78 | padding-left: 20px;
79 | /*background-color: red;*/
80 | }
81 |
82 | section form textarea {
83 | padding: 10px;
84 | border-radius: 5px;
85 | border-color: #aaa;
86 | }
87 |
88 | .btn-action {
89 | /*background-color: blue;*/
90 | /*width: 60%;*/
91 | }
92 |
93 | .btn-action #salinPesan,
94 | .btn-action #resetPesan {
95 | margin: 10px 5px 0px 0px;
96 | /*width: 40%;*/
97 | align-self: flex-end;
98 | border-radius: 5px;
99 | border: none;
100 | color: #fff;
101 | padding: 7px 15px;
102 | font-size: 1em;
103 | font-weight: bold;
104 | cursor: pointer;
105 | }
106 |
107 | .btn-action #salinPesan {
108 | background-color: #79a33d;
109 | }
110 |
111 | .btn-action #resetPesan {
112 | background-color: #cc080b;
113 | }
114 |
115 | footer {
116 | position: fixed;
117 | top: 0;
118 | right: 0;
119 | margin: 5px 10px;
120 | font-size: 0.7em;
121 | }
--------------------------------------------------------------------------------
/js/admin.js:
--------------------------------------------------------------------------------
1 | const btnBuat = document.getElementById('generate-laporan');
2 | const kamar = document.getElementById('kamar');
3 | const tanggal = document.getElementById('tanggal');
4 | const toko = document.getElementById('toko');
5 | const chat = document.getElementById('laporan');
6 |
7 | btnBuat.addEventListener('click', function() {
8 |
9 | if (kamar.value == 0 || tanggal.value == '' || toko.value == 0) {
10 | alert('Silakan isi form yang tersedia');
11 | return null;
12 | }
13 |
14 | event.preventDefault();
15 | btnBuat.innerText = 'Tunggu';
16 | chat.value = '';
17 |
18 | fetch("https://api.apispreadsheets.com/data/trkwrJHOLsYagj5n/").then(res=>{
19 | if (res.status === 200){
20 | // SUCCESS
21 | res.json().then(data=>{
22 | const listPesanan = data["data"];
23 |
24 | // console.log(listPesanan.nama_pembeli == 'Umar');
25 |
26 | let pesananFiltered = listPesanan.filter(
27 | pesananFiltered => pesananFiltered.timestamp == tanggal.value
28 | && pesananFiltered.nama_toko == toko.value
29 | );
30 |
31 | // console.log(pesananFiltered);
32 | if (pesananFiltered.length == 0) {
33 | alert('Tidak ada pesanan di tanggal dan/atau toko ini');
34 | btnBuat.innerText = 'Buat';
35 | } else {
36 |
37 | let konten = '';
38 | for (let i=0; i form > label');
53 | // informasi.removeAttribute('hidden');
54 | }
55 |
56 | }).catch(err => {
57 | console.log(err);
58 | alert('Terjadi kesalahan. Coba lagi');
59 | })
60 | }
61 | else{
62 | // ERROR
63 | alert('Terjadi kesalahan. Coba lagi.\nAtau hubungi Ust. Prasetyo');
64 | }
65 | })
66 |
67 | })
68 |
69 | // if (chat.value != '') {
70 | // const informasi = document.querySelector('section > form > label');
71 | // informasi.removeAttribute('hidden');
72 | // }
73 |
74 | const btnCopy = document.getElementById('salinPesan');
75 | btnCopy.addEventListener('click', function() {
76 |
77 | event.preventDefault();
78 |
79 | chat.select();
80 | chat.setSelectionRange(0, 99999);
81 | navigator.clipboard.writeText(chat.value);
82 | })
83 |
84 | const btnReset = document.getElementById('resetPesan');
85 | btnReset.addEventListener('click', function() {
86 |
87 | event.preventDefault();
88 |
89 | chat.value = '';
90 | })
--------------------------------------------------------------------------------
/css/style-checkout.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@300;400&display=swap');
2 |
3 | * {
4 | margin: 0;
5 | padding: 0;
6 | box-sizing: border-box;
7 | }
8 |
9 | body {
10 | font-family: 'Mukta Malar', sans-serif;
11 | }
12 |
13 | header {
14 | display: flex;
15 | align-items: center;
16 | border-bottom: 3px solid #cc080b;
17 | }
18 |
19 | button {
20 | border: none;
21 | background: transparent;
22 | cursor: pointer;
23 | }
24 |
25 | button i {
26 | font-size: 4em;
27 | text-decoration: none;
28 | color: #cc080b;
29 | }
30 |
31 | main {
32 | display: flex;
33 | flex-direction: column;
34 | width: 100%;
35 | align-items: center;
36 | margin-top: 20px;
37 | }
38 |
39 | main h2 {
40 | font-size: 1.5em;
41 | letter-spacing: 1px;
42 | }
43 |
44 | main form {
45 | display: flex;
46 | flex-direction: column;
47 | }
48 |
49 | main label {
50 | border-bottom: 1px dashed #aaa;
51 | width: 25%;
52 | }
53 |
54 | main input {
55 | padding: 0px 5px;
56 | font-family: 'Mukta Malar', sans-serif;
57 | font-size: 1em;
58 | border: none;
59 | font-weight: bold;
60 | background-color: #fff;
61 | }
62 |
63 | main #total-harga, main #nama-toko {
64 | text-align: right;
65 | }
66 |
67 | main #nama-toko {
68 | color: #cc080b;
69 | }
70 |
71 | main textarea {
72 | border: none;
73 | font-size: 1em;
74 | line-height: 1.1em;
75 | font-family: 'Mukta Malar', sans-serif;
76 | background-color: #fff;
77 | resize: none;
78 | width: 100%;
79 | padding: 5px;
80 | }
81 |
82 | main #note {
83 | border: 1px solid #aaa;
84 | border-radius: 5px;
85 | }
86 |
87 | .btn-beli {
88 | display: flex;
89 | justify-content: center;
90 | width: 100px;
91 | position: fixed;
92 | bottom: 0;
93 | right: 0;
94 | border: none;
95 | color: #fff;
96 | font-size: 1.5em;
97 | border-radius: 12px;
98 | padding: 16px;
99 | margin: 20px 40px;
100 | background-color: #79a33d;
101 | cursor: pointer;
102 | }
103 |
104 | .sending {
105 | display: flex;
106 | justify-content: center;
107 | width: 130px;
108 | position: fixed;
109 | bottom: 0;
110 | right: 0;
111 | border: none;
112 | color: #fff;
113 | font-size: 1.5em;
114 | border-radius: 12px;
115 | padding: 16px;
116 | margin: 20px 40px;
117 | background-color: #cc080b;
118 | cursor: pointer;
119 | }
120 |
121 | .toHome {
122 | display: flex;
123 | justify-content: center;
124 | width: 150px;
125 | position: fixed;
126 | bottom: 0;
127 | right: 0;
128 | border: none;
129 | color: #fff;
130 | font-size: 1.5em;
131 | border-radius: 12px;
132 | padding: 16px;
133 | margin: 20px 40px;
134 | background-color: #79a33d;
135 | cursor: pointer;
136 | }
137 |
138 | .toHome a {
139 | text-decoration: none;
140 | color: #fff;
141 | }
142 |
143 | .hide {
144 | display: none;
145 | }
--------------------------------------------------------------------------------
/admin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Admin - JK
8 |
9 |
10 |
11 |
15 |
16 |
17 |
70 |
71 |
72 |
73 |
81 |
82 |
83 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/js/main.js:
--------------------------------------------------------------------------------
1 | const menuList = document.getElementById('daftarMenu');
2 |
3 | if (menuList !== null) {
4 | for(const kategori in menu) {
5 | const newCategory = addCategory(kategori)
6 | menuList.append(newCategory);
7 |
8 | let kategoriDisplay = document.getElementById(kategori);
9 |
10 | for (let i=0; i