diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b2ef2f2008b053427289934226ee823c1aae6292
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,13 @@
+stages:
+  - deploy
+
+deploy-railway:
+  stage: deploy
+  image: ubuntu
+  only:
+    - pushes
+    - main
+  script:
+    - apt-get update && apt-get install -y curl
+    - curl -fsSL https://railway.app/install.sh | sh
+    - railway up --service=$RAILWAY_SERVICE_NAME -d
\ No newline at end of file
diff --git a/Procfile b/Procfile
index 10c02ca49d8080a814ed025590c6597d316d646d..2847bc7760de00dbe968e37663c23e3e3fbb01b5 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1,2 @@
 release: python manage.py migrate
-web: gunicorn project_django.wsgi --log-file -
\ No newline at end of file
+web: python manage.py migrate && gunicorn sirest.wsgi
\ No newline at end of file
diff --git a/account/forms.py b/account/forms.py
index c78f9c79597d48fd0598e8f877c5b45c3cb21a6b..127a1cc433e5693c91134c5794e059a6c675e9f8 100644
--- a/account/forms.py
+++ b/account/forms.py
@@ -15,96 +15,96 @@ for record in records:
 
 class RegisterFormAdmin(forms.Form):
     email = forms.EmailField(label='Email', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Email'}))
+        attrs={'class': 'form-control', 'placeholder': 'Email', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     password = forms.CharField(label='Password', max_length=50, widget=forms.PasswordInput(
-        attrs={'class': 'form-control', 'placeholder': '***********'}))
+        attrs={'class': 'form-control', 'placeholder': '***********', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nama = forms.CharField(label='Nama', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_hp = forms.CharField(label='No HP', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No HP'}))
+        attrs={'class': 'form-control', 'placeholder': 'No HP', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
 
 class RegisterFormPelanggan(forms.Form):
     email = forms.EmailField(label='Email', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Email'}))
+        attrs={'class': 'form-control', 'placeholder': 'Email', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     password = forms.CharField(label='Password', max_length=50, widget=forms.PasswordInput(
-        attrs={'class': 'form-control', 'placeholder': '***********'}))
+        attrs={'class': 'form-control', 'placeholder': '***********', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nama = forms.CharField(label='Nama', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_hp = forms.CharField(label='No HP', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No HP'}))
+        attrs={'class': 'form-control', 'placeholder': 'No HP', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nik = forms.CharField(label='NIK', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'NIK'}))
+        attrs={'class': 'form-control', 'placeholder': 'NIK', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nama_bank = forms.CharField(label='Nama Bank', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama Bank'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama Bank', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_rekening = forms.CharField(label='No Rekening', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No Rekening'}))
+        attrs={'class': 'form-control', 'placeholder': 'No Rekening', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     # tanggal lahir date picker
     tanggal_lahir = forms.DateField(label='Tanggal Lahir', widget=forms.DateInput({
                                     'class': 'form-control', 'type': 'date'}))
     # jenis kelamin dropdown
     jenis_kelamin = forms.ChoiceField(label='Jenis Kelamin', choices=[('L', 'Laki-Laki'), ('P', 'Perempuan')], widget=forms.Select(
-        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Jenis Kelamin'}))
+        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Jenis Kelamin', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
 
 class RegisterFormRestoran(forms.Form):
     email = forms.EmailField(label='Email', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Email'}))
+        attrs={'class': 'form-control', 'placeholder': 'Email', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     password = forms.CharField(label='Password', max_length=50, widget=forms.PasswordInput(
-        attrs={'class': 'form-control', 'placeholder': '***********'}))
+        attrs={'class': 'form-control', 'placeholder': '***********', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nama = forms.CharField(label='Nama', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_hp = forms.CharField(label='No HP', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No HP'}))
+        attrs={'class': 'form-control', 'placeholder': 'No HP', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nik = forms.CharField(label='NIK', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'NIK'}))
+        attrs={'class': 'form-control', 'placeholder': 'NIK', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     nama_bank = forms.CharField(label='Nama Bank', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama Bank'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama Bank', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_rekening = forms.CharField(label='No Rekening', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No Rekening'}))
+        attrs={'class': 'form-control', 'placeholder': 'No Rekening', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
     nama_restoran = forms.CharField(label='Nama Restoran', max_length=25, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama Restoran'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama Restoran', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     cabang = forms.CharField(label='Cabang', max_length=25, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Cabang'}))
+        attrs={'class': 'form-control', 'placeholder': 'Cabang', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     no_hp_restoran = forms.CharField(label='No Telepon Restoran', max_length=18, widget=forms.TextInput(
         attrs={'class': 'form-control', 'placeholder': 'No Telepon Restoran'}))
     jalan = forms.CharField(label='Jalan', max_length=30, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Jalan'}))
+        attrs={'class': 'form-control', 'placeholder': 'Jalan', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     kecamatan = forms.CharField(label='Kecamatan', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Kecamatan'}))
+        attrs={'class': 'form-control', 'placeholder': 'Kecamatan', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     kota = forms.CharField(label='Kota', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Kota'}))
+        attrs={'class': 'form-control', 'placeholder': 'Kota', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
     # provinsi dropdown
     provinsi = forms.ChoiceField(label='Provinsi', choices=DATA_PROVINSI, widget=forms.Select(
-        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2l', 'placeholder': 'Provinsi'}))
+        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2l', 'placeholder': 'Provinsi', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     # kategori dropdown
     kategori = forms.ChoiceField(label='Kategori', choices=DATA_KATEGORI, widget=forms.Select(
-        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Kategori'}))
+        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Kategori', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
 
 
 class RegisterFormKurir(forms.Form):
     email = forms.EmailField(label='Email', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Email'}))
+        attrs={'class': 'form-control', 'placeholder': 'Email', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     password = forms.CharField(label='Password', max_length=50, widget=forms.PasswordInput(
-        attrs={'class': 'form-control', 'placeholder': '***********'}))
+        attrs={'class': 'form-control', 'placeholder': '***********', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     nama = forms.CharField(label='Nama', max_length=50, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     no_hp = forms.CharField(label='No HP', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No HP'}))
+        attrs={'class': 'form-control', 'placeholder': 'No HP', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     nik = forms.CharField(label='NIK', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'NIK'}))
+        attrs={'class': 'form-control', 'placeholder': 'NIK', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     nama_bank = forms.CharField(label='Nama Bank', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nama Bank'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nama Bank', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     no_rekening = forms.CharField(label='No Rekening', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No Rekening'}))
+        attrs={'class': 'form-control', 'placeholder': 'No Rekening', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
 
     plat_no_kendaraan = forms.CharField(label='Plat No Kendaraan', max_length=10, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Plat No Kendaraan'}))
+        attrs={'class': 'form-control', 'placeholder': 'Plat No Kendaraan', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     no_sim = forms.CharField(label='No SIM', max_length=20, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'No SIM'}))
+        attrs={'class': 'form-control', 'placeholder': 'No SIM', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     # Jenis Kendaraan Dropdown
     jenis_kendaraan = forms.ChoiceField(label='Jenis Kendaraan', choices=[('Car', 'Mobil'), ('Motorcycle', 'Motor')], widget=forms.Select(
-        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Jenis Kendaraan'}))
+        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Jenis Kendaraan', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
     merk_kendaraan = forms.CharField(label='Merk Kendaraan', max_length=15, widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Merk Kendaraan'}))
+        attrs={'class': 'form-control', 'placeholder': 'Merk Kendaraan', 'oninvalid' : "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput' : "setCustomValidity('')"}))
diff --git a/account/views.py b/account/views.py
index 5ce9038d15781d4e56c3270d624b35b091ba9c20..8619f615f629612d061c5ffd85b473937923281d 100644
--- a/account/views.py
+++ b/account/views.py
@@ -9,6 +9,9 @@ import re
 
 
 def show_main(request):
+    cursor.execute('set search_path to sirest')
+    
+
     # Jika user sudah login, redirect ke halaman dashboard
     if request.COOKIES.get('role'):
         email = request.COOKIES.get('email')
@@ -23,7 +26,6 @@ def show_main(request):
                 f'select day, starthours, endhours from restaurant r, restaurant_operating_hours roh where name = rname and branch = rbranch and email = \'{email}\''
             )
             records_hours = cursor.fetchall()
-            print(records)
             context = {
                 'email': records[0][0],
                 'password': records[0][1],
@@ -53,7 +55,6 @@ def show_main(request):
             response.set_cookie('rname', records[0][5])
             response.set_cookie('rbranch', records[0][6])
             response.set_cookie('adminid', records[0][20])
-            print('masuk resto')
             return response
 
         # Role Admin -> Dashboard Admin
@@ -90,7 +91,6 @@ def show_main(request):
                 elif (records_actor[i][0],) in list_restaurant:
                     records_actor[i] += ('Restoran', )
 
-            print(records_admin)
 
             context = {
                 'role': 'admin',
@@ -105,7 +105,6 @@ def show_main(request):
             response = render(request, 'dashboard_admin.html', context)
             response.set_cookie('role', 'admin')
             response.set_cookie('email', records_admin[0][0])
-            print('masuk admin')
             return response
 
         # Role Customer -> Dashboard Customer
@@ -132,7 +131,6 @@ def show_main(request):
             response.set_cookie('role', 'customer')
             response.set_cookie('email', records[0][0])
             response.set_cookie('adminid', records[0][13])
-            print('masuk pelanggan')
             return response
 
         # Role Courier -> Dashboard Courier
@@ -161,7 +159,6 @@ def show_main(request):
             response.set_cookie('role', 'courier')
             response.set_cookie('email', records[0][0])
             response.set_cookie('adminid', records[0][15])
-            print('masuk kurir')
             return response
 
     # Jika tidak ada cookie role, redirect ke halaman login
@@ -169,6 +166,7 @@ def show_main(request):
 
 
 def logout_user(request):
+    cursor.execute('set search_path to sirest')
     response = HttpResponseRedirect(reverse('account:show_main'))
     for cookie in request.COOKIES:
         response.delete_cookie(cookie)
@@ -176,6 +174,7 @@ def logout_user(request):
 
 
 def login(request):
+    cursor.execute('set search_path to sirest')
     # if user is logged in, redirect to dashboard
     if request.COOKIES.get('role'):
         return HttpResponseRedirect(reverse('account:show_main'))
@@ -229,7 +228,6 @@ def login(request):
                 response = render(request, 'dashboard_admin.html', context)
                 response.set_cookie('role', 'admin')
                 response.set_cookie('email', records_admin[0][0])
-                print('masuk admin')
                 return response
 
             cursor.execute(
@@ -272,7 +270,6 @@ def login(request):
                 response.set_cookie('rname', records[0][5])
                 response.set_cookie('rbranch', records[0][6])
                 response.set_cookie('adminid', records[0][20])
-                print('masuk resto')
                 return response
 
             cursor.execute(
@@ -296,19 +293,16 @@ def login(request):
                     'adminid': records[0][15],
                     'role': 'courier'
                 }
-                # print(context)
                 response = render(request, 'dashboard_pengguna.html', context)
                 response.set_cookie('role', 'courier')
                 response.set_cookie('email', records[0][0])
                 response.set_cookie('adminid', records[0][15])
-                print('masuk kurir')
                 return response
 
             cursor.execute(
                 f'select * from user_acc u, customer c, transaction_actor ta where u.email = c.email and u.email = \'{email}\' and c.email = ta.email')
             records = cursor.fetchmany()
             if (len(records) == 1):
-                # print(records)
                 context = {
                     'email': records[0][0],
                     'password': records[0][1],
@@ -324,12 +318,10 @@ def login(request):
                     'adminid': records[0][13],
                     'role': 'customer'
                 }
-                # print(context)
                 response = render(request, 'dashboard_pengguna.html', context)
                 response.set_cookie('role', 'customer')
                 response.set_cookie('email', records[0][0])
                 response.set_cookie('adminid', records[0][13])
-                print('masuk pelanggan')
                 return response
 
         else:
@@ -345,10 +337,12 @@ def login(request):
 
 
 def register(request):
+    cursor.execute('set search_path to sirest')
     return render(request, 'register.html')
 
 
 def register_admin(request):
+    cursor.execute('set search_path to sirest')
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         email = request.POST.get('email')
         password = request.POST.get('password')
@@ -433,6 +427,7 @@ def register_admin(request):
 
 
 def register_pelanggan(request):
+    cursor.execute('set search_path to sirest')
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         email = request.POST.get('email')
         password = request.POST.get('password')
@@ -528,6 +523,7 @@ def register_pelanggan(request):
 
 
 def register_restoran(request):
+    cursor.execute('set search_path to sirest')
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         email = request.POST.get('email')
         password = request.POST.get('password')
@@ -630,6 +626,7 @@ def register_restoran(request):
 
 
 def register_kurir(request):
+    cursor.execute('set search_path to sirest')
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         email = request.POST.get('email')
         password = request.POST.get('password')
@@ -728,10 +725,15 @@ def register_kurir(request):
 
 
 def dashboard_admin(request):
+    cursor.execute('set search_path to sirest')
+    role = request.COOKIES.get('role')
+
     return render(request, 'dashboard_admin.html')
 
 
 def profile_restoran(request, email):
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(
         f'select * from user_acc u, transaction_actor t, restaurant r where u.email = \'{email}\' and u.email = t.email and t.email = r.email')
     record = cursor.fetchall()
@@ -750,11 +752,13 @@ def profile_restoran(request, email):
         'jadwal': records_hours,
         'promo': records_promo,
     }
- 
     return render(request, 'profile_restoran.html', context)
 
 
 def profile_pelanggan(request, email):
+    cursor.execute('set search_path to sirest')
+    role = request.COOKIES.get('role')
+
     cursor.execute(
         f'select u.email, password, fname || \' \' || lname as name, phonenum, nik, bankname, accountno, birthdate, sex, restopay, adminid from user_acc u, transaction_actor t, customer c where u.email = \'{email}\' and u.email = t.email and t.email = c.email')
     record = cursor.fetchall()
@@ -766,6 +770,9 @@ def profile_pelanggan(request, email):
 
 
 def profile_kurir(request, email):
+    cursor.execute('set search_path to sirest')
+    role = request.COOKIES.get('role')
+
     cursor.execute(
         f'select * from user_acc u, transaction_actor t, courier c where u.email = \'{email}\' and u.email = t.email and t.email = c.email')
     record = cursor.fetchall()
@@ -776,6 +783,7 @@ def profile_kurir(request, email):
     return render(request, 'profile_kurir.html', context)
 
 def verifikasi_user(request, email_user, email_admin):
+    cursor.execute('set search_path to sirest')
     cursor.execute(
         f'update transaction_actor set adminid = \'{email_admin}\' where email = \'{email_user}\'')
     connection.commit()
diff --git a/sirest/settings.py b/sirest/settings.py
index 87ee5d7cbe5db3b81a096ce4497c912222ae8098..2722869896c461acb5f0111c3bf39c756eafe141 100644
--- a/sirest/settings.py
+++ b/sirest/settings.py
@@ -46,6 +46,7 @@ INSTALLED_APPS = [
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
+    'sirest',
     'account',
     'trigger_6',
     'trigger3',
@@ -58,7 +59,7 @@ MIDDLEWARE = [
     'django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
-    'django.middleware.csrf.CsrfViewMiddleware',
+    # 'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
diff --git a/templates/navbar.html b/templates/navbar.html
index 0d1a3227c5832d46a693de4d6450375b918c2285..1477208a894dfaa936fa3c4aa56900b0d402a361 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -1,135 +1,66 @@
 <head>
-  <script>
-    function menu(e) {
-      let list = document.getElementById("list-navbar");
-      e.name === "menu"
-        ? ((e.name = "close"), list.classList.remove("hidden"))
-        : ((e.name = "menu"), list.classList.add("hidden"));
-    }
-  </script>
-  <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
+    <script>
+        function menu(e){
+            let list = document.getElementById('list-navbar');
+            e.name === 'menu' ? (e.name = "close", list.classList.remove('hidden')) :( e.name = "menu", list.classList.add('hidden'))
+        }
+    </script>
+    <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
 </head>
 
-<nav
-  class="sticky z-50 top-0 md:px-20 px-4 py-2 bg-[#DD5353] shadow-2xl md:flex md:items-center md:justify-between mb-3"
-  id="navbar">
-  <div class="flex gap-2 md:w-full justify-between">
-    <a href="{% url 'account:show_main' %}">
-      <div class="text-2xl font-bold text-[#fff] flex items-center cursor-pointer hover:text-cream-tua">
-        {% if adminid is not none %}
-        SIREST {{role}} {{rname}} {{rbranch}}
-        {% else %}
-        SIREST {{role}} {{rname}} {{rbranch}}
-        <h3 class="text-xs">Not Verified</h3>
-        {% endif %}
-      </div>
-    </a>
-    <div class="text-3xl cursor-pointer flex items-center md:hidden">
-      <ion-icon name="menu" onclick="menu(this)" class="fill-white"></ion-icon>
-    </div>
-  </div>
-  <div id="list-navbar" class="text-base text-white hidden md:show md:flex md:flex-row md:items-center md:justify-end">
-    <div class="md:mx-5 my-3 md:my-0">
-      <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500">Dashboard</a>
-    </div>
-
-    <!-- {admin start} -->
-    {% if role == 'admin' %}
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Restoran</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Kategori Restoran</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Kategori Restoran</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Kategori Makanan</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Kategori Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Bahan Makanan</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Bahan Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger3:daftar_restoran' %}">Daftar Restoran dan Makanan</a>
+<nav class="sticky z-50 top-0 md:px-20 px-4 py-2 bg-[#DD5353] shadow-2xl md:flex md:items-center md:justify-between mb-3" id="navbar">
+    <div class="flex gap-2 md:w-full justify-between">
+        <a href="{% url 'account:show_main' %}">
+            <div class="text-2xl font-bold text-[#fff] flex items-center cursor-pointer hover:text-cream-tua">
+                {% comment %}  if adminid is not none {% endcomment %}
+                {% if adminid is not none %}
+                    SIREST {{role}} {{rname}} {{rbranch}}
+                {% else %}
+                    SIREST {{role}} {{rname}} {{rbranch}} <h3 class="text-xs"> Not Verified</h3>
+                {% endif %}
+            </div>
+        </a>
+        <div class="text-3xl cursor-pointer flex items-center md:hidden">
+            <ion-icon name="menu" onclick="menu(this)" class="fill-white"></ion-icon>
         </div>
-      </div>
     </div>
-    <!-- {admin start} -->
-    {% if role == 'admin' %}
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Restoran</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Kategori Restoran</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Kategori Restoran</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Kategori Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Kategori Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Bahan Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Bahan Makanan</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Restoran dan Makanan</a>
+    <div id="list-navbar" class="text-base text-white hidden md:show md:flex md:flex-row md:items-center md:justify-end">
+        <div class="md:mx-5 my-3 md:my-0">
+            <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500">Dashboard</a>
         </div>
-      </div>
-    </div>
 
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Promo</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger_6:show_daftar_promo' %}">Daftar Promo</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger_6:show_buat_promo' %}">Buat Promo</a>
-        </div>
-      </div>
-    </div>
+        <!-- {admin start} -->
+        {% if role == 'admin' %}
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Restoran</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger5:daftar_kategori' %}">Daftar Kategori Restoran</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger5:buat_kategori' %}">Buat Kategori Restoran</a>
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Daftar Kategori Makanan</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Buat Kategori Makanan</a>
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger5:daftar_bahanmakanan' %}">Daftar Bahan Makanan</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger5:buat_bahanmakanan' %}">Buat Bahan Makanan</a>
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger3:daftar_restoran' %}">Daftar Restoran dan Makanan</a>
+                </div>
+            </div>
+        </div>   
+
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Promo</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_daftar_promo' %}">Daftar Promo</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_buat_promo' %}">Buat Promo</a>
+                </div>
+            </div>
+        </div>   
 
     <div @click.away="open = false" class="relative" x-data="{ open: false }">
       <button @click="open = !open"
@@ -153,74 +84,87 @@
           <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
             href="{% url 'trigger3:tambah_tarif' %}">Buat Tarif Pengiriman per KM</a>
         </div>
-      </div>
-    </div>
-    {% endif %}
-    <!-- admin end -->
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Pesanan</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Daftar Tarif Pengiriman per KM</a>
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Tarif Pengiriman per KM</a>
-        </div>
-      </div>
-    </div>
-    {% endif %}
-    <!-- admin end -->
+        {% endif %}   
+        <!-- admin end -->
 
-    <!-- pelanggan start -->
-    {% if role == 'customer' and adminid != None %}
-    <div class="md:mx-5 my-3 md:my-0  text-center">
-      <a href="{% url 'trigger3:daftar_restoran' %}"
-        class="hover:text-[#DBC8AC] hover:text-lg duration-500 whitespace-nowrap">Daftar Restoran dan Makanan</a>
-    </div>
-    <!-- pelanggan start -->
-    {% if role == 'customer' and adminid != None %}
-    <div class="md:mx-5 my-3 md:my-0 text-center">
-      <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500 whitespace-nowrap">Daftar Restoran dan
-        Makanan</a>
-      {% endif %}
-    </div>
+        <!-- pelanggan start -->
+        {% if role == 'customer' and adminid != None %}
+        <div class="md:mx-5 my-3 md:my-0  text-center">
+            <a href="{% url 'trigger3:daftar_restoran' %}" class="hover:text-[#DBC8AC] hover:text-lg duration-500 whitespace-nowrap">Daftar Restoran dan Makanan</a>
+        </div>
 
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Pesanan</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Buat Pesanan</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="#">Pesanan Berlangsung</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger_6:show_riwayat' %}">Riwayat Pesanan</a>
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Pesanan</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Buat Pesanan</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Pesanan Berlangsung</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_riwayat' %}">Riwayat Pesanan</a>
+                </div>
+            </div>
+        </div>   
+        
+        <div class="md:mx-5 my-3 md:my-0">
+            <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500">Restopay</a>
+        </div>
+        {% endif %}
+        <!-- pelanggan end -->
+        
+        <!-- restoran start -->
+        {% if role == 'restaurant' and adminid != None %}
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500 whitespace-nowrap">
+                <span>Jam Operasional</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Daftar Jam Operasional</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Buat Jam Operasional</a>
+                </div>
+            </div>
+        </div> 
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Makanan</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger3:makanan_resto' %}">Daftar Makanan</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger3:tambah_makanan' %}">Buat Makanan</a>
+                </div>
+            </div>
+        </div> 
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Pesanan</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Pesanan Berlangsung</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_riwayat' %}">Riwayat Pesanan</a>
+                </div>
+            </div>
+        </div> 
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Promo</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_daftar_promo' %}">Daftar Promo Tersedia</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="#">Daftar Promo Restoran</a>
+                </div>
+            </div>
+        </div> 
+        <div class="md:mx-5 my-3 md:my-0">
+            <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500">RestoPay</a>
         </div>
       </div>
     </div>
@@ -256,29 +200,20 @@
           <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
             href="{% url 'trigger_2:buat_jam_operasional' %}">Buat Jam Operasional</a>
         </div>
-      </div>
-    </div>
-    <div @click.away="open = false" class="relative" x-data="{ open: false }">
-      <button @click="open = !open"
-        class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
-        <span>Makanan</span>
-        <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}"
-          class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1">
-          <path fill-rule="evenodd"
-            d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
-            clip-rule="evenodd"></path>
-        </svg>
-      </button>
-      <div x-show="open" x-transition:enter="transition ease-out duration-100"
-        x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100"
-        x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
-        x-transition:leave-end="transform opacity-0 scale-95"
-        class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
-        <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
-          <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger3:makanan_resto' %}">Daftar Makanan</a>
-          <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
-            href="{% url 'trigger3:tambah_makanan' %}">Buat Makanan</a>
+        <div @click.away="open = false" class="relative" x-data="{ open: false }">
+            <button @click="open = !open" class="flex flex-row items-center w-full md:mx-5 my-3 md:my-0 text-left bg-transparent rounded-lg focus:outline-none focus:shadow-outline hover:text-[#DBC8AC] hover:text-lg duration-500">
+                <span>Pesanan</span>
+                <svg fill="currentColor" viewBox="0 0 20 20" :class="{'rotate-180': open, 'rotate-0': !open}" class="inline w-4 h-4 mt-1 ml-1 transition-transform duration-200 transform md:-mt-1"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
+            </button>
+            <div x-show="open" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 w-full mt-2 origin-top-right rounded-md shadow-lg md:w-48">
+                <div class="px-2 py-2 bg-white text-gray-900 rounded-md shadow ">
+                    <a class="block px-4 py-2 mt-2 rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger5:pemesanan_kurir' %}">Pesanan Berlangsung</a>
+                    <a class="block px-4 py-2 mt-2  rounded-lg hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline" href="{% url 'trigger_6:show_riwayat' %}">Riwayat Pesanan</a>
+                </div>
+            </div>
+        </div> 
+        <div class="md:mx-5 my-3 md:my-0">
+            <a href="" class="hover:text-[#DBC8AC] hover:text-lg duration-500">RestoPay</a>
         </div>
       </div>
     </div>
diff --git a/trigger5/migrations/0001_initial.py b/trigger5/migrations/0001_initial.py
new file mode 100644
index 0000000000000000000000000000000000000000..02ba8cc26489a0c16686d5288d0e7cb0f6d15d26
--- /dev/null
+++ b/trigger5/migrations/0001_initial.py
@@ -0,0 +1,21 @@
+# Generated by Django 4.1 on 2022-12-08 03:04
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='KategoriResto',
+            fields=[
+                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('title', models.TextField()),
+            ],
+        ),
+    ]
diff --git a/trigger5/migrations/0002_alter_kategoriresto_title.py b/trigger5/migrations/0002_alter_kategoriresto_title.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d83a1aa7f96d1b5315ad10ace2e145a56635a23
--- /dev/null
+++ b/trigger5/migrations/0002_alter_kategoriresto_title.py
@@ -0,0 +1,18 @@
+# Generated by Django 4.1 on 2022-12-08 04:07
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('trigger5', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='kategoriresto',
+            name='title',
+            field=models.CharField(max_length=255, null=True),
+        ),
+    ]
diff --git a/trigger5/migrations/0003_rename_title_kategoriresto_kategori.py b/trigger5/migrations/0003_rename_title_kategoriresto_kategori.py
new file mode 100644
index 0000000000000000000000000000000000000000..d119b3919e6163eeb771d9590bf16b6f92ff0cca
--- /dev/null
+++ b/trigger5/migrations/0003_rename_title_kategoriresto_kategori.py
@@ -0,0 +1,18 @@
+# Generated by Django 4.1 on 2022-12-08 04:14
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('trigger5', '0002_alter_kategoriresto_title'),
+    ]
+
+    operations = [
+        migrations.RenameField(
+            model_name='kategoriresto',
+            old_name='title',
+            new_name='kategori',
+        ),
+    ]
diff --git a/trigger5/templates/buat_bahanmakanan.html b/trigger5/templates/buat_bahanmakanan.html
index 07b5fb235e9636c562db2641ed29b98380f1c8ff..8343d74f838a1df5df9baeef980da35b156bdc84 100644
--- a/trigger5/templates/buat_bahanmakanan.html
+++ b/trigger5/templates/buat_bahanmakanan.html
@@ -19,11 +19,11 @@
                         <div class="flex flex-col justify-around gap-2 w-full">
                             <div class="flex flex-col text-sm font-medium block justify-around">
                                 <p>Bahan Makanan:</p>
-                                <input type="text" name="kategori" id="kategori" class="form-control rounded-lg text-black" placeholder="Beras">
+                                <input type="text" name="bahan" id="bahan" class="form-control rounded-lg text-black" placeholder="Beras">
                             </div>
                             <div class="flex justify-center">
                                 <!-- <button type="submit" name="submit" class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded" onclick="location.href = '/trigger3/daftartarif'">SIMPAN</button> -->
-                                <input type="submit"  value="SIMPAN" class=" text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" onclick="location.href = '/trigger3/daftartarif'"/> 
+                                <input type="submit"  value="SIMPAN" class=" text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"> 
                             </div>
                         </div>
                     </div>
diff --git a/trigger5/templates/buat_kategori.html b/trigger5/templates/buat_kategori.html
index d7f953e73732a162c79657df7253f65faffc4d14..76c3b605c9944259f9b93634998ee000a11fe232 100644
--- a/trigger5/templates/buat_kategori.html
+++ b/trigger5/templates/buat_kategori.html
@@ -23,7 +23,7 @@
                             </div>
                             <div class="flex justify-center">
                                 <!-- <button type="submit" name="submit" class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded" onclick="location.href = '/trigger3/daftartarif'">SIMPAN</button> -->
-                                <input type="submit"  value="SIMPAN" class=" text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" onclick="location.href = '/trigger3/daftartarif'"/> 
+                                <input type="submit"  value="SIMPAN" class=" text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"> 
                             </div>
                         </div>
                     </div>
diff --git a/trigger5/templates/daftar_bahanmakanan.html b/trigger5/templates/daftar_bahanmakanan.html
index 97f3836421d5c1267dfbd20cd29564a0e1aef8fd..0205853d20d6d3193efab8741438616adc1fc6cb 100644
--- a/trigger5/templates/daftar_bahanmakanan.html
+++ b/trigger5/templates/daftar_bahanmakanan.html
@@ -34,32 +34,23 @@
                         </tr>
                     </thead>
                     <tbody>
+                        {% for iter in list_ingredient %}
                         <tr class="border-b">
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                1
+                                {{ forloop.counter }}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Garam
+                                {{iter.1}}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
                                 <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr class="border-b">
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                2
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Gula
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
+                                    {% if iter.2 %}
+                                        <a href="hapus-bahanmakanan/{{iter.0}}" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
+                                    {% endif %}
                                 </div>
                             </td>
                         </tr>
+                        {% endfor %}
                     </tbody>
                 </table>
             </div>
diff --git a/trigger5/templates/daftar_kategori.html b/trigger5/templates/daftar_kategori.html
index 85b4b9b994b299ad57bf4af8f23b5cefc872df23..aa4ddec76ad585d48b36dfdb92e41f27ff7f6001 100644
--- a/trigger5/templates/daftar_kategori.html
+++ b/trigger5/templates/daftar_kategori.html
@@ -34,45 +34,23 @@
                         </tr>
                     </thead>
                     <tbody>
+                        {% for iter in list_kategori_resto %}
                         <tr class="border-b">
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                1
+                                {{ forloop.counter }}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Indonesia
+                                {{iter.1}}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
                                 <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr class="border-b">
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                2
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                India
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
-                                </div>
-                            </td>
-                        </tr>
-                        <tr class="border-b">
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                3
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Jepang
-                            </td>
-                            <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
+                                    {% if iter.2 %}
+                                        <a href="hapus-kategori/{{iter.0}}" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Hapus</a>
+                                    {% endif %}
                                 </div>
                             </td>
                         </tr>
+                        {% endfor %}
                     </tbody>
                 </table>
             </div>
diff --git a/trigger5/templates/detail_pemesanan_kurir.html b/trigger5/templates/detail_pemesanan_kurir.html
index 72f0fa6c8e6bbeb9711000cfd8fa203717dd0aef..0c6df8b35373f268b626d9ab9dac4bce3696a2ff 100644
--- a/trigger5/templates/detail_pemesanan_kurir.html
+++ b/trigger5/templates/detail_pemesanan_kurir.html
@@ -7,31 +7,33 @@
         <div class="login w-[25rem] drop-shadow-2xl flex flex-col justify-center items-center bg-cream-tua p-10 rounded-xl lg:scale-120 md:scale-100 scale-85">
             <h1 class="text-xl font-bold mb-3 text-center">Detail Pemesanan (Kurir)</h1>
             <div class="text-left">
-                <p>Waktu Pemesanan: 2022-11-04 11:30:05</p>
-                <p>Nama Pelanggan: Mikayla Putri</p>
-                <p>Jalan: Jalan Bahagia nomor 72</p>
-                <p>Kecamatan: Cinere</p>
-                <p>Kota: Depok</p>
-                <p>Provinsi: Jawa Barat</p>
-                <p>Restoran: Warung Mantap Depok</p>
-                <p>Jalan: Jalan Sejahtera nomor 5</p>
-                <p>Kecamatan: Bojongsari</p>
-                <p>Kota: Depok</p>
-                <p>Provinsi: Jawa Barat</p>
+                <p>Waktu Pemesanan: {{waktu}}</p>
+                <p>Nama Pelanggan: {{nama}}</p>
+                <p>Jalan: {{jalan}}</p>
+                <p>Kecamatan: {{kec}}</p>
+                <p>Kota: {{kota}}</p>
+                <p>Provinsi: {{prov}}</p>
+                <p>Restoran: {{resto}}</p>
+                <br>
+                <p>Jalan: {{jalanr}}</p>
+                <p>Kecamatan: {{kecr}}</p>
+                <p>Kota: {{kotar}}</p>
+                <p>Provinsi: {{provr}}</p>
                 <p>Makanan yang dipesan:</p>
-                <p>Ayam Goreng (1) - [catatan bila ada]</p>
-                <p>Ice Cream (2) - [catatan bila ada]</p>
-                <p>Total Harga Makanan: 11000</p>
-                <p>Total Diskon: 0</p>
-                <p>Biaya Pengantaran: 4000</p>
-                <p>Total Biaya: 15000</p>
-                <p>Jenis Pembayaran: RestoPay</p>
-                <p>Status Pembayaran: Berhasil</p>
+                {% for eat in makanan %}
+                    <p>{{eat.0}} ({{eat.1}}) - [{{eat.2}}]</p>
+                {% endfor %}
+                <p>Total Harga Makanan: {{totalfood}}</p>
+                <p>Total Diskon: {{totaldisc}}</p>
+                <p>Biaya Pengantaran: {{deliveryfee}}</p>
+                <p>Total Biaya: {{totalsemua}}</p>
+                <p>Jenis Pembayaran: {{jenisbayar}}</p>
+                <p>Status Pembayaran: {{statusbayar}}</p>
                 <p>Status Pesanan: Pesanan Diantar</p>
-                <p>Kurir: Doni Suryana</p>
-                <p>Plat Kendaraan: B 0001 KNN</p>
-                <p>Jenis Kendaraan: Motor</p>
-                <p>Merk Kendaraan: Honda Vario</p>
+                <p>Kurir: {{kurir}}</p>
+                <p>Plat Kendaraan: {{plat}}</p>
+                <p>Jenis Kendaraan: {{jeniskendaraan}}</p>
+                <p>Merk Kendaraan: {{merk}}</p>
 
             </div>
             <button class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded mt-2" onclick="location.href = '/trigger5/pemesanankurir'">Kembali</button>
diff --git a/trigger5/templates/pemesanan_kurir.html b/trigger5/templates/pemesanan_kurir.html
index 418de8b846640714cf00e8729c00177459c7589c..cbad496b30a9dd98bb9e1ed19db05bd35d12fcc1 100644
--- a/trigger5/templates/pemesanan_kurir.html
+++ b/trigger5/templates/pemesanan_kurir.html
@@ -43,31 +43,36 @@
                         </tr>
                     </thead>
                     <tbody>
+                        {% for iter in list_transaksi %}
                         <tr class="border-b">
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                1
+                                {{ forloop.counter }}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Warung Mantap Depok
+                                {{iter.1}}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                Mikayla Putri
+                                {{iter.0}}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
-                                2022-11-04 11:30:05
+                                {{iter.2}}
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
                                 Pesanan Diantar
                             </td>
                             <td class="text-sm text-gray-900 font-light px-6 py-4 whitespace-nowrap">
+                                <!-- Working -->
                                 <div>
-                                    <a href="{% url 'trigger5:detail_pemesanan_kurir' %}" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Detail</a>
+                                    <a href="selesai/{{iter.3}}" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Selesai</a>
                                 </div>
+
                                 <div>
-                                    <a href="" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Selesai</a>
+                                    <a href="detail/{{iter.3}}" class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Detail</a>
                                 </div>
+                                
                             </td>
                         </tr>
+                        {% endfor %}
                     </tbody>
                 </table>
             </div>
diff --git a/trigger5/urls.py b/trigger5/urls.py
index e243b67673de0e5de2045b9f0434a8922de72d1c..5f23450d0762d0e3c985905873bc610e97744c41 100644
--- a/trigger5/urls.py
+++ b/trigger5/urls.py
@@ -7,7 +7,11 @@ urlpatterns = [
     path('buatkategori/', buat_kategori, name='buat_kategori'),
     path('daftarkategori/', daftar_kategori, name='daftar_kategori'),
     path('pemesanankurir/', pemesanan_kurir, name='pemesanan_kurir'),
-    path('detailpemesanankurir/', detail_pemesanan_kurir, name='detail_pemesanan_kurir'),
+    #path('detailpemesanankurir/', detail_pemesanan_kurir, name='detail_pemesanan_kurir'),
     path('buatbahanmakanan/', buat_bahanmakanan, name='buat_bahanmakanan'),
     path('daftarbahanmakanan/', daftar_bahanmakanan, name='daftar_bahanmakanan'),
+    path('daftarkategori/hapus-kategori/<int:id>', hapus_kategori, name='hapus_kategori'),
+    path('daftarbahanmakanan/hapus-bahanmakanan/<int:id>', hapus_bahanmakanan, name='hapus_bahanmakanan'),
+    path('pemesanankurir/selesai/<str:id>', selesai_pemesanan, name='selesai_pemesanan'),
+    path('pemesanankurir/detail/<str:id>', detail_pemesanan, name='detail_pemesanan'),
 ]
\ No newline at end of file
diff --git a/trigger5/views.py b/trigger5/views.py
index 0d628fc870737316603ca40f142ae306f206e423..d64be6ae0c3d5e8f4e48efc28d989d353ba8d5a6 100644
--- a/trigger5/views.py
+++ b/trigger5/views.py
@@ -1,21 +1,334 @@
-from django.shortcuts import render
+from django.shortcuts import *
+from django.urls import reverse
+from django.http import HttpResponse, HttpResponseRedirect
+from account.forms import *
+from utils.query import *
+from datetime import datetime
+
+def getFirst(x):
+    return x[0]
 
 # Create your views here.
 
 def buat_kategori(request):
-    return render(request, "buat_kategori.html")
+    role = request.COOKIES.get('role')
+    #adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+
+    if request.method == 'POST':
+        cursor.execute(f'select id from restaurant_category;')
+        all_id = cursor.fetchall()
+        list_id = list(map(int,list(map(getFirst,all_id))))
+        id = max(list_id)+1
+        #print("what ",id)
+        try :
+            cursor.execute(f""" 
+                INSERT INTO RESTAURANT_CATEGORY VALUES
+                ('{id}',
+                '{request.POST['kategori']}')
+            """)
+            connection.commit()
+            return redirect('trigger5:daftar_kategori')
+        except Exception as e :
+            messages.error(request, e)
+            connection.rollback()
+
+
+            
+
+    return render(request, "buat_kategori.html", {'role':request.COOKIES.get('role')})
 
 def daftar_kategori(request):
-    return render(request, "daftar_kategori.html")
+    role = request.COOKIES.get('role')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+    cursor.execute(f""" 
+        SELECT * from restaurant_category;
+    """)
+
+    data_kategori_resto = cursor.fetchall()
+    final_data_kategori_resto = []
+    for cat in data_kategori_resto:
+        cursor.execute(
+            f'SELECT * from RESTAURANT_CATEGORY, RESTAURANT R where Rcategory = \'{cat[0]}\''
+        )
+        canDelete = (len(cursor.fetchall()) == 0)
+        tuple_new = cat + (canDelete, )
+        final_data_kategori_resto.append(tuple_new)
+
+    print(final_data_kategori_resto)
+
+    context = {
+        'list_kategori_resto': final_data_kategori_resto,
+        'role':request.COOKIES.get('role'),
+    }
+    return render(request, "daftar_kategori.html", context)
+
+def hapus_kategori(request,id):
+    role = request.COOKIES.get('role')
+    adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+    cursor.execute(f'DELETE from RESTAURANT_CATEGORY where id = \'{id}\'')
+
+    return redirect('trigger5:daftar_kategori')
+
 
 def pemesanan_kurir(request):
-    return render(request, "pemesanan_kurir.html")
+    role = request.COOKIES.get('role')
+    adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'courier':
+        return redirect("/")
+    cursor.execute('set search_path to sirest')
+    cursor.execute(f""" 
+        SELECT Email, Datetime from TRANSACTION_HISTORY where tsid >= '4' except (SELECT Email, Datetime from TRANSACTION_HISTORY where tsid >= '5');
+    """)
+
+    data_transaksi = cursor.fetchall()
+    # print("what ", len(data_transaksi))
+    # cursor.execute(f"""SELECT Email, Datetime, TSID from TRANSACTION_HISTORY where tsid >= '4'""")
+    # print(cursor.fetchall())
+    # cursor.execute(f"""SELECT Email, Datetime, TSID from TRANSACTION_HISTORY where tsid >= '5'""")
+    # print(cursor.fetchall())
+    final_data_transaksi = []
+    for tra in data_transaksi:
+        cursor.execute(
+            f'SELECT FName , LName from USER_ACC where email = \'{tra[0]}\''
+        )
+        simpan = cursor.fetchall()
+        nama = simpan[0][0] + " " + simpan[0][1]
+
+        cursor.execute(
+            f'SELECT RName , RBranch FROM TRANSACTION_FOOD WHERE Email = \'{tra[0]}\' AND Datetime = \'{tra[1]}\''
+        )
+        simpan = cursor.fetchall()
+        resto = simpan[0][0] + " " + simpan[0][1]
+
+        new_tuple = (nama, resto, tra[1], tra[1].strftime("%Y-%m-%d %H:%M:%S") + " " + tra[0])
+        final_data_transaksi.append(new_tuple)
+
+    context = {
+        'list_transaksi': final_data_transaksi,
+        'role':request.COOKIES.get('role'),
+        'adminid': adminid,
+    }
+    return render(request, "pemesanan_kurir.html", context)
+
+def detail_pemesanan(request,id):
+    role = request.COOKIES.get('role')
+    adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'courier':
+        return redirect("/")
+    pk = id.split()
+    email = pk[2]
+    jam = pk[0] + " " + pk[1]
+    cursor.execute(
+        f'SELECT street, district, city, province, totalfood, totaldiscount, deliveryfee, totalprice, dfid, pmid, psid, courierid FROM TRANSACTION AS T WHERE T.Email = \'{email}\' AND T.Datetime = \'{jam}\';'
+    )
+    
+    simpan = cursor.fetchall()
+    jalan = simpan[0][0]
+    kec = simpan[0][1]
+    kota = simpan[0][2]
+    prov = simpan[0][3]
+    totalfood = simpan[0][4]
+    totaldisc = simpan[0][5]
+    deliveryfee = simpan[0][6]
+    totalsemua = simpan[0][7]
+    dfid = simpan[0][8]
+    pmid = simpan[0][9]
+    psid = simpan[0][10]
+    courierid = simpan[0][11]
+
+    cursor.execute(
+        f'SELECT TF.rname, TF.rbranch FROM TRANSACTION_FOOD AS TF WHERE TF.Email = \'{email}\' AND TF.Datetime = \'{jam}\';'
+    )
+    simpan = cursor.fetchall()
+    restoname = simpan[0][0]
+    restobranch = simpan[0][1]
+    namaresto = restoname + " " + restobranch
+    cursor.execute(
+        f'SELECT TF.foodname, TF.amount, TF.Note FROM TRANSACTION_FOOD AS TF WHERE TF.Email = \'{email}\' AND TF.Datetime = \'{jam}\';'
+    )
+    makanan = cursor.fetchall()
+
+    cursor.execute(
+        f'SELECT R.street, R.district, R.city, R.province FROM RESTAURANT AS R WHERE R.Rname = \'{restoname}\' AND R.RBranch = \'{restobranch}\';'
+    )
+
+    simpan = cursor.fetchall()
+    jalanr = simpan[0][0]
+    kecr = simpan[0][1]
+    kotar = simpan[0][2]
+    provr = simpan[0][3]
+
+    cursor.execute(
+        f'SELECT name FROM PAYMENT_METHOD WHERE Id= \'{pmid}\';'
+    )
+
+    simpan = cursor.fetchall()
+    jenisbayar = simpan[0][0]
 
-def detail_pemesanan_kurir(request):
-    return render(request, "detail_pemesanan_kurir.html")
+    cursor.execute(
+        f'SELECT name FROM PAYMENT_STATUS WHERE Id= \'{psid}\';'
+    )
+
+    simpan = cursor.fetchall()
+    statusbayar = simpan[0][0]
+
+    cursor.execute(
+        f'SELECT platenum, vehicletype,vehiclebrand FROM Courier WHERE email= \'{courierid}\';'
+    )
+
+    simpan = cursor.fetchall()
+    plat = simpan[0][0]
+    jeniskendaraan = simpan[0][1]
+    merk = simpan[0][2]
+
+    cursor.execute(
+        f'SELECT fname, lname FROM user_acc WHERE email= \'{email}\';'
+    )
+
+    simpan = cursor.fetchall()
+    nama = simpan[0][0] + " " + simpan[0][1]
+
+    cursor.execute(
+        f'SELECT fname, lname FROM user_acc WHERE email= \'{courierid}\';'
+    )
+
+    simpan = cursor.fetchall()
+    namakurir = simpan[0][0] + " " + simpan[0][1]
+
+    context = {
+        'waktu' : jam,
+        'nama' : nama,
+        'jalan': jalan,
+        'kec': kec,
+        'kota': kota,
+        'prov': prov,
+        'resto': namaresto,
+        'jalanr': jalanr,
+        'kecr': kecr,
+        'kotar': kotar,
+        'provr': provr,
+        'makanan': makanan,
+        'totalfood': totalfood,
+        'totaldisc': totaldisc,
+        'deliveryfee': deliveryfee,
+        'totalsemua': totalsemua,
+        'jenisbayar': jenisbayar,
+        'statusbayar': statusbayar,
+        'kurir': namakurir,
+        'plat': plat,
+        'jeniskendaraan': jeniskendaraan,
+        'merk': merk,
+        'role':request.COOKIES.get('role'),
+        'adminid': adminid,
+    }
+    return render(request, "detail_pemesanan_kurir.html", context)
+
+def selesai_pemesanan(request, id):
+    role = request.COOKIES.get('role')
+    adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'courier':
+        return redirect("/")
+    pk = id.split()
+    cursor.execute("SELECT now();")
+    jam = cursor.fetchall()[0][0]
+    cursor.execute(f""" 
+            INSERT INTO TRANSACTION_HISTORY VALUES
+            (
+            '{pk[2]}',
+            '{pk[0]+ " " + pk[1]}',
+            '{'5'}',
+            '{jam}'
+            )
+    """)
+
+    return redirect('trigger5:pemesanan_kurir')
 
 def buat_bahanmakanan(request):
-    return render(request, "buat_bahanmakanan.html")
+    role = request.COOKIES.get('role')
+    #adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+    if request.method == 'POST':
+        cursor.execute(f'select id from ingredient;')
+        all_id = cursor.fetchall()
+        list_id = list(map(int,list(map(getFirst,all_id))))
+        id = max(list_id)+1
+        #print("what ",id)
+
+        try:
+            cursor.execute(f""" 
+            INSERT INTO INGREDIENT VALUES
+            ('{id}',
+            '{request.POST['bahan']}')
+        """)
+
+            return redirect('trigger5:daftar_bahanmakanan')
+        except Exception as e :
+            messages.error(request, e)
+            connection.rollback()
+
+    return render(request, "buat_bahanmakanan.html", {'role':request.COOKIES.get('role')})
 
 def daftar_bahanmakanan(request):
-    return render(request, "daftar_bahanmakanan.html")
+    role = request.COOKIES.get('role')
+    #adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+    cursor.execute(f""" 
+        SELECT * from ingredient;
+    """)
+
+    data_ingredient = cursor.fetchall()
+    final_data_ingredient = []
+    for ing in data_ingredient:
+        cursor.execute(
+            f'SELECT * from INGREDIENT, FOOD_INGREDIENT where Ingredient = \'{ing[0]}\''
+        )
+        canDelete = (len(cursor.fetchall()) == 0)
+        tuple_new = ing + (canDelete, )
+        final_data_ingredient.append(tuple_new)
+
+    #print(final_data_ingredient)
+
+    context = {
+        'list_ingredient': final_data_ingredient,
+        'role':request.COOKIES.get('role'),
+        #'adminid': adminid,
+        #'rname': request.COOKIES.get('rname'),
+        #'rbranch': request.COOKIES.get('rbranch'),
+    }
+    return render(request, "daftar_bahanmakanan.html", context)
+
+def hapus_bahanmakanan(request,id):
+    role = request.COOKIES.get('role')
+    #adminid = request.COOKIES.get('adminid')
+    if role == None:
+        return redirect("/login")
+    if role != 'admin':
+        return redirect("/")
+    cursor.execute(f'DELETE from INGREDIENT where id = \'{id}\'')
+
+    return redirect('trigger5:daftar_bahanmakanan')
+
+
diff --git a/trigger_2/forms.py b/trigger_2/forms.py
index 95dd289b1a9a5f06d369bccf43274dc7f9d36221..1f1d135cd065c663a70a46cdd198ced15ddab296 100644
--- a/trigger_2/forms.py
+++ b/trigger_2/forms.py
@@ -6,33 +6,33 @@ DATA_HARI = [('Senin', 'Senin'), ('Selasa', 'Selasa'), ('Rabu', 'Rabu'),
 
 class FormIsiSaldo(forms.Form):
     saldo_pengisian = forms.IntegerField(label='Nominal Pengisian', widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nominal'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nominal', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
 
 class FormTarikSaldo(forms.Form):
     saldo_penarikan = forms.IntegerField(label='Nominal Penarikan', widget=forms.TextInput(
-        attrs={'class': 'form-control', 'placeholder': 'Nominal'}))
+        attrs={'class': 'form-control', 'placeholder': 'Nominal', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
 
 class FormBuatJamOperasional(forms.Form):
     # Hari dropdown
     hari = forms.ChoiceField(label='Hari', choices=DATA_HARI, widget=forms.Select(
-        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Hari'}))
+        attrs={'class': 'border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2', 'placeholder': 'Hari', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
     # Jam buka time picker
     jam_buka = forms.TimeField(label='Jam Buka', widget=forms.TimeInput(
-        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time'}))
+        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
     # Jam tutup time picker
     jam_tutup = forms.TimeField(label='Jam Tutup', widget=forms.TimeInput(
-        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time'}))
+        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
 
 class FormEditJamOperasional(forms.Form):
     # Jam buka time picker
     jam_buka = forms.TimeField(label='Jam Buka', widget=forms.TimeInput(
-        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time'}))
+        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
 
     # Jam tutup time picker
     jam_tutup = forms.TimeField(label='Jam Tutup', widget=forms.TimeInput(
-        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time'}))
\ No newline at end of file
+        attrs={'class': 'w-[20rem] h-[2.5rem] rounded-lg border-2 border-gray-300', 'type': 'time', 'oninvalid': "this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')", 'oninput': "setCustomValidity('')"}))
diff --git a/trigger_2/views.py b/trigger_2/views.py
index cc8b6d05dabc34992a857576d534f146f58830cb..e5f458b2b2ea4d4588311b390bcee51408927f11 100644
--- a/trigger_2/views.py
+++ b/trigger_2/views.py
@@ -10,15 +10,25 @@ from django.shortcuts import render, redirect
 
 
 def saldo_restopay(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
     cursor.execute(
         f"SELECT restopay FROM transaction_actor WHERE email = '{email}'")
     saldo = cursor.fetchall()[0][0]
 
+    if request.COOKIES.get('role') == 'restaurant':
+        role = 'restaurant'
+    elif request.COOKIES.get('role') == 'admin':
+        role = 'admin'
+    elif request.COOKIES.get('role') == 'courier':
+        role = 'courier'
+    elif request.COOKIES.get('role') == 'customer':
+        role = 'customer'
+
     context = {
         'saldo': saldo,
         'adminid': request.COOKIES.get('adminid'),
-        'role': 'restaurant',
+        'role': role,
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
     }
@@ -26,6 +36,7 @@ def saldo_restopay(request):
 
 
 def isi_saldo(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
     cursor.execute(
         f"select restopay, bankname, accountno from transaction_actor WHERE email = '{email}'")
@@ -34,6 +45,15 @@ def isi_saldo(request):
     nama_bank = record[1]
     nomor_rekening = record[2]
 
+    if request.COOKIES.get('role') == 'restaurant':
+        role = 'restaurant'
+    elif request.COOKIES.get('role') == 'admin':
+        role = 'admin'
+    elif request.COOKIES.get('role') == 'courier':
+        role = 'courier'
+    elif request.COOKIES.get('role') == 'customer':
+        role = 'customer'
+
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         saldo_pengisian = request.POST.get('saldo_pengisian')
 
@@ -47,7 +67,7 @@ def isi_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Saldo Pengisian tidak boleh kosong',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -65,7 +85,7 @@ def isi_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Input tidak valid',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -82,7 +102,7 @@ def isi_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Input tidak valid',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -108,7 +128,7 @@ def isi_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Isi Saldo Berhasil',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -127,7 +147,7 @@ def isi_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Isi Saldo Gagal',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -142,7 +162,7 @@ def isi_saldo(request):
         'saldo': saldo,
         'nama_bank': nama_bank,
         'nomor_rekening': nomor_rekening,
-        'role': 'restaurant',
+        'role': role,
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
         'adminid': request.COOKIES.get('adminid'),
@@ -152,6 +172,7 @@ def isi_saldo(request):
 
 
 def tarik_saldo(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
     cursor.execute(
         f"select restopay, bankname, accountno from transaction_actor WHERE email = '{email}'")
@@ -160,6 +181,15 @@ def tarik_saldo(request):
     nama_bank = record[1]
     nomor_rekening = record[2]
 
+    if request.COOKIES.get('role') == 'restaurant':
+        role = 'restaurant'
+    elif request.COOKIES.get('role') == 'admin':
+        role = 'admin'
+    elif request.COOKIES.get('role') == 'courier':
+        role = 'courier'
+    elif request.COOKIES.get('role') == 'customer':
+        role = 'customer'
+
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         saldo_penarikan = request.POST.get('saldo_penarikan')
 
@@ -173,7 +203,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Saldo Penarikan tidak boleh kosong',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -190,7 +220,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Input tidak valid',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -207,7 +237,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Input tidak valid',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -224,7 +254,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Saldo tidak mencukupi',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -250,7 +280,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Tarik Saldo Berhasil',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -268,7 +298,7 @@ def tarik_saldo(request):
                 'nama_bank': nama_bank,
                 'nomor_rekening': nomor_rekening,
                 'message': 'Tarik Saldo Gagal',
-                'role': 'restaurant',
+                'role': role,
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'adminid': request.COOKIES.get('adminid'),
@@ -283,7 +313,7 @@ def tarik_saldo(request):
         'saldo': saldo,
         'nama_bank': nama_bank,
         'nomor_rekening': nomor_rekening,
-        'role': 'restaurant',
+        'role': role,
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
         'adminid': request.COOKIES.get('adminid'),
@@ -293,6 +323,7 @@ def tarik_saldo(request):
 
 
 def daftar_pesanan(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
 
     cursor.execute(
@@ -313,9 +344,18 @@ def daftar_pesanan(request):
 
     record = cursor.fetchall()
 
+    if request.COOKIES.get('role') == 'restaurant':
+        role = 'restaurant'
+    elif request.COOKIES.get('role') == 'admin':
+        role = 'admin'
+    elif request.COOKIES.get('role') == 'courier':
+        role = 'courier'
+    elif request.COOKIES.get('role') == 'customer':
+        role = 'customer'
+
     context = {
         'daftar_pesanan': record,
-        'role': 'restaurant',
+        'role': role,
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
         'adminid': request.COOKIES.get('adminid'),
@@ -324,6 +364,7 @@ def daftar_pesanan(request):
 
 
 def ubah_status_pesanan(request, email, datetime, status):
+    cursor.execute('set search_path to sirest')
     if status == "Nunggu Konfirmasi Resto":
         status = 3
     elif status == "Pesanan Dibuat":
@@ -370,6 +411,7 @@ def ubah_status_pesanan(request, email, datetime, status):
 
 
 def detail_pesanan(request, email, datetime):
+    cursor.execute('set search_path to sirest')
     cursor.execute(
         f"""
             select datetime, concat(fname, ' ', lname), street, district, city, province, totalfood, totaldiscount, deliveryfee, totalprice, payment_method.name, payment_status.name
@@ -477,8 +519,18 @@ def detail_pesanan(request, email, datetime):
         jenis_kendaraan = record[0][2]
         merek_kendaraan = record[0][3]
 
+
+    if request.COOKIES.get('role') == 'restaurant':
+        role = 'restaurant'
+    elif request.COOKIES.get('role') == 'admin':
+        role = 'admin'
+    elif request.COOKIES.get('role') == 'courier':
+        role = 'courier'
+    elif request.COOKIES.get('role') == 'customer':
+        role = 'customer'
+        
     context = {
-        'role': 'restaurant',
+        'role': role,
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
         'adminid': request.COOKIES.get('adminid'),
@@ -511,6 +563,7 @@ def detail_pesanan(request, email, datetime):
 
 
 def buat_jam_operasional(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
     rname = request.COOKIES.get('rname')
     rbranch = request.COOKIES.get('rbranch')
@@ -602,6 +655,7 @@ def buat_jam_operasional(request):
 
 
 def daftar_jam_operasional(request):
+    cursor.execute('set search_path to sirest')
     email = request.COOKIES.get('email')
     rname = request.COOKIES.get('rname')
     rbranch = request.COOKIES.get('rbranch')
@@ -629,6 +683,7 @@ def daftar_jam_operasional(request):
 
 
 def edit_jam_operasional(request, rname, rbranch, day):
+    cursor.execute('set search_path to sirest')
     if request.method == 'POST' or 'post' and not request.method == 'GET':
         jam_buka = request.POST.get('jam_buka')
         jam_tutup = request.POST.get('jam_tutup')
@@ -697,6 +752,7 @@ def edit_jam_operasional(request, rname, rbranch, day):
     return render(request, 'edit_jam_operasional.html', context)
 
 def hapus_jam_operasional(request, rname, rbranch, day):
+    cursor.execute('set search_path to sirest')
     try:
         cursor.execute(
             f"""
diff --git a/trigger_6/templates/daftar_promo.html b/trigger_6/templates/daftar_promo.html
index a13feb5c941867e918a09465daae46f1e4b7762a..c60d025af43450cdc603228a2bc1dba8643a459f 100644
--- a/trigger_6/templates/daftar_promo.html
+++ b/trigger_6/templates/daftar_promo.html
@@ -1,5 +1,5 @@
 {% extends 'base.html' %} {% block meta %}
-<title>Riwayat</title>
+<title>Detail Promo</title>
 {% endblock meta %} {% block content %}
 <div class="m-20">
     {% if role == 'admin' %}
diff --git a/trigger_6/templates/detail_promosi_restoran.html b/trigger_6/templates/detail_promosi_restoran.html
index 47d91aa87b97296add8275851d08f866325dd3d5..23be314e467f2914869cc11a0ad9f0df4d49fe02 100644
--- a/trigger_6/templates/detail_promosi_restoran.html
+++ b/trigger_6/templates/detail_promosi_restoran.html
@@ -1,5 +1,5 @@
 {% extends 'base.html' %} {% block meta %}
-<title>Detail Promo</title>
+<title>Detail Promo Restoran</title>
 {% endblock meta %} {% block content %}
 <div class="border-black m-20">
     <div class="flex justify-center items-center p-2 bg-red-300 rounded-t-lg mb-3">
diff --git a/trigger_6/templates/form_promo_hari_spesial.html b/trigger_6/templates/form_promo_hari_spesial.html
index b1e576cb30936f2862554959e4b030cbc9be5e9a..a3ee8eeef071b03121d2d6ce28f29e7b4a95d045 100644
--- a/trigger_6/templates/form_promo_hari_spesial.html
+++ b/trigger_6/templates/form_promo_hari_spesial.html
@@ -15,15 +15,15 @@
                         <div class="flex flex-col justify-around gap-2 w-full">
                             <div class="flex flex-col text-sm font-medium justify-around">
                                 <p>Nama Promo:</p>
-                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black">
+                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Diskon:</p>
-                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black">
+                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Tanggal Berlangsung:</p>
-                                <input type="date" name="date" id="date" class="form-control rounded-lg text-black">
+                                <input type="date" name="date" id="date" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex justify-center">
                                 <input type="submit" name="submit" value="SIMPAN" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"/> 
diff --git a/trigger_6/templates/form_promo_minimum.html b/trigger_6/templates/form_promo_minimum.html
index a3f598592e5358521bdf351ccf87a04e96401a32..4c90b167924bd252d2ce67fb15f956c15b51e945 100644
--- a/trigger_6/templates/form_promo_minimum.html
+++ b/trigger_6/templates/form_promo_minimum.html
@@ -15,15 +15,15 @@
                         <div class="flex flex-col justify-around gap-2 w-full">
                             <div class="flex flex-col text-sm font-medium justify-around">
                                 <p>Nama Promo:</p>
-                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black">
+                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Diskon:</p>
-                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black">
+                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Minimum Transaksi:</p>
-                                <input type="text" name="mintransaction" id="mintransaction" class="form-control rounded-lg text-black">
+                                <input type="text" name="mintransaction" id="mintransaction" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex justify-center">
                                 <input type="submit" name="submit" value="SIMPAN" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"/> 
diff --git a/trigger_6/templates/form_promo_restoran.html b/trigger_6/templates/form_promo_restoran.html
index c3477b5197db9270aaa9e9dc3ec8c274000edc5b..56792180ccc5b4789ce9f81d509a22624dc94549 100644
--- a/trigger_6/templates/form_promo_restoran.html
+++ b/trigger_6/templates/form_promo_restoran.html
@@ -69,12 +69,12 @@
                         <div class="flex flex-col justify-around gap-2 w-full">
                             <div class="flex flex-col text-sm font-medium justify-around">
                                 <label for="name">Nama Promo:</label>
-                                <select name="name" id="name"
+                                <select name="name" id="name" required oninput="setCustomValidity('')" oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')"
                                     onchange="handleClick(this.value); this.selectedindex = -1"
                                     class="border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 mt-2">
-                                    <option style="display: none"></option>
+                                    <option style="display: none"></option required>
                                     {% for promoname in record_promoname %}
-                                    <option value="{{ promoname.1 }}">{{ promoname.0 }}</option>
+                                    <option value="{{ promoname.1 }}">{{ promoname.0 }}</option required>
                                     {% endfor %}
                                 </select>
                             </div>
diff --git a/trigger_6/templates/form_ubah_promo_restoran.html b/trigger_6/templates/form_ubah_promo_restoran.html
index e353fab53532ef375c4b5e2ed7ac52e00b257e85..d3de107c7e6f1eae53fc2a9afa5bc1c127d8dc6b 100644
--- a/trigger_6/templates/form_ubah_promo_restoran.html
+++ b/trigger_6/templates/form_ubah_promo_restoran.html
@@ -27,11 +27,11 @@
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Tanggal Mulai:</p>
-                                <input type="date" name="startdate" id="startdate" class="form-control rounded-lg text-black">
+                                <input type="date" name="startdate" id="startdate" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Tanggal Berakhir:</p>
-                                <input type="date" name="enddate" id="enddate" class="form-control rounded-lg text-black">
+                                <input type="date" name="enddate" id="enddate" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             <div class="flex justify-center">
                                 <input type="submit" name="submit" value="SIMPAN" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"/> 
diff --git a/trigger_6/templates/form_ubah_promosi.html b/trigger_6/templates/form_ubah_promosi.html
index f21d9b99f9377eac1dd48410f33084cab6017e9f..0eb40d7455acdf85fec01fe22c35414e94b0bbe0 100644
--- a/trigger_6/templates/form_ubah_promosi.html
+++ b/trigger_6/templates/form_ubah_promosi.html
@@ -15,24 +15,24 @@
                         <div class="flex flex-col justify-around gap-2">
                             <div class="flex flex-col text-sm font-medium justify-around">
                                 <p>Jenis Promosi:</p>
-                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" disabled placeholder='{{jenis_promo}}'>
+                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" disabled placeholder='{{jenis_promo}}' required>
                             </div>
                             <div class="flex flex-col text-sm font-medium justify-around">
                                 <p>Nama Promosi:</p>
-                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" disabled placeholder='{{nama_promo}}''>
+                                <input type="text" name="name" id="name" class="form-control rounded-lg text-black" disabled placeholder='{{nama_promo}}' required>
                             </div>
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Diskon (%):</p>
-                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black">
+                                <input type="text" name="discount" id="discount" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             {% if jenis_promo == 'Promo Minimum Transaksi' %}
                             <div class="flex flex-col text-sm font-medium mb-2 justify-around">
                                 <p>Minimum Transaksi:</p>
-                                <input type="text" name="mintransaction" id="mintransaction" class="form-control rounded-lg text-black">
+                                <input type="text" name="mintransaction" id="mintransaction" class="form-control rounded-lg text-black" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')">
                             </div>
                             {% endif %}
                             <div class="flex justify-center">
-                                <input type="submit" name="submit" value="SIMPAN" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"/> 
+                                <input type="submit" name="submit" value="SIMPAN" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" required oninvalid="this.setCustomValidity('Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu')" oninput="setCustomValidity('')"/> 
                             </div>
                         </div>
                     </div>
diff --git a/trigger_6/views.py b/trigger_6/views.py
index 77a49b3e9dc26452f3a40b6ace6d818d517a9594..70bc5a9827a106159479fd5b5ff409e5b7aec7ac 100644
--- a/trigger_6/views.py
+++ b/trigger_6/views.py
@@ -12,6 +12,13 @@ def show_riwayat(request):
     role = request.COOKIES.get('role')
     email = request.COOKIES.get('email')
 
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     if role == 'restaurant':
         rname = request.COOKIES.get('rname')
         rbranch = request.COOKIES.get('rbranch')
@@ -43,12 +50,20 @@ def show_riwayat(request):
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
         'record': record,
+        'adminid':request.COOKIES.get('adminid')
     }
-    print(record)
+
     return render(request, 'riwayat.html', context)
 
 
 def show_detail_riwayat(request, email, datetime):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+    cursor.execute('set search_path to sirest')
     # query riwayat by id
     sql = f'''select u.fname, u.lname, t.street, t.district, t.city, t.province, r.rname, r.rbranch, t.datetime, t.rating, foo.fname, foo.lname, co.platenum, co.vehicletype, co.vehiclebrand, 
     r.street, r.district, r.city, r.province, t.totalfood, t.totaldiscount, t.deliveryfee, t.totalprice, pm.name, ps.name from transaction t, courier co, transaction_food tf,  
@@ -78,15 +93,22 @@ def show_detail_riwayat(request, email, datetime):
         'role': request.COOKIES.get('role'),
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
+        'adminid':request.COOKIES.get('adminid')
     }
-    print('masuk')
-    print(record_riwayat)
-    print(ordered_food)
-    print(transaction_status)
+
     return render(request, 'detail_riwayat.html', context)
 
 
 def show_form_penilaian(request, email, datetime):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     if request.method == 'POST':
         rating = request.POST.get('nilai')
         if rating != '0':
@@ -98,18 +120,34 @@ def show_form_penilaian(request, email, datetime):
             context = {
                 'status': 'error',
                 'message': 'Data yang diisikan belum lengkap, silahkan lengkapi data terlebih dahulu',
-                'role': request.COOKIES.get('role')
+                'role': request.COOKIES.get('role'),
+                'adminid':request.COOKIES.get('adminid')
             }
             return render(request, 'form_penilaian.html', context)
 
-    return render(request, 'form_penilaian.html', {'role': request.COOKIES.get('role')})
+    return render(request, 'form_penilaian.html', {'role': request.COOKIES.get('role'), 'adminid':request.COOKIES.get('adminid')})
 
 
 def show_buat_promo(request):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
     return render(request, 'buat_promo.html', {'role': request.COOKIES.get('role')})
 
 
 def show_form_promo_minimum(request):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     if request.method == "POST":
         name = request.POST.get('name')
         discount = request.POST.get('discount')
@@ -143,6 +181,15 @@ def show_form_promo_minimum(request):
 
 
 def show_form_promo_hari_spesial(request):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     if request.method == "POST":
         name = request.POST.get('name')
         discount = request.POST.get('discount')
@@ -170,8 +217,16 @@ def show_form_promo_hari_spesial(request):
 
 
 def show_daftar_promo(request):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute('select * from promo')
-    # TODO: GANTI FETCH ALL
     records_promo = cursor.fetchall()
     records_promo = sorted(records_promo, key=lambda x: x[1].lower())
     print(records_promo)
@@ -195,6 +250,7 @@ def show_daftar_promo(request):
         'records_promo': records_promo,
         'role': request.COOKIES.get('role'),
         'rname': request.COOKIES.get('rname'),
+        'adminid':request.COOKIES.get('adminid'),
         'rbranch': request.COOKIES.get('rbranch'),
     }
 
@@ -202,6 +258,15 @@ def show_daftar_promo(request):
 
 
 def show_ubah_promo(request, jenis, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(f'select promoname from promo where id = \'{id}\'')
     record = cursor.fetchall()
     if request.method == 'POST':
@@ -240,6 +305,13 @@ def show_ubah_promo(request, jenis, id):
 
 
 def show_daftar_promo_restoran(request, rname, rbranch):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
     cursor.execute('set search_path to sirest')
     cursor.execute(f'select * from promo p, restaurant_promo r where p.id = r.pid and r.rname = \'{rname}\' and r.rbranch = \'{rbranch}\'')
     records_promo_resto = cursor.fetchall()
@@ -256,13 +328,21 @@ def show_daftar_promo_restoran(request, rname, rbranch):
         'role':request.COOKIES.get('role'),
         'rname':rname,
         'rbranch':rbranch,
-        'empty':len(records_promo_resto)
+        'empty':len(records_promo_resto),
+        'adminid':request.COOKIES.get('adminid')
     }
 
     return render(request, 'daftar_promo_restoran.html', context)
 
 
 def show_form_promo_restoran(request):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
     cursor.execute('set search_path to sirest')
     rname = request.COOKIES.get('rname')
     rbranch = request.COOKIES.get('rbranch')
@@ -284,11 +364,12 @@ def show_form_promo_restoran(request):
         except Exception as e:
             connection.rollback()
             context = {
-                'message':e.args[0:40],
+                'message':e.args[0][0:40],
                 'role':request.COOKIES.get('role'),
                 'rname':rname,
                 'rbranch':rbranch,
                 'record_promoname':record_promoname,
+                'adminid':request.COOKIES.get('adminid')
             }
             return render(request, 'form_promo_restoran.html', context)
 
@@ -297,11 +378,21 @@ def show_form_promo_restoran(request):
         'rname':rname,
         'rbranch':rbranch,
         'record_promoname':record_promoname,
+        'adminid':request.COOKIES.get('adminid')
     }
     return render(request, 'form_promo_restoran.html', context)
 
 
 def show_form_ubah_promo_restoran(request, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(
         f'select promoname, discount from promo where id = \'{id}\'')
     record_pname = cursor.fetchall()
@@ -330,6 +421,7 @@ def show_form_ubah_promo_restoran(request, id):
                 'rname': request.COOKIES.get('rname'),
                 'rbranch': request.COOKIES.get('rbranch'),
                 'discount': record_pname[0][1],
+                'adminid':request.COOKIES.get('adminid')
             }
             return render(request, 'form_ubah_promo_restoran.html', context)
         else:
@@ -349,7 +441,8 @@ def show_form_ubah_promo_restoran(request, id):
                     'role': request.COOKIES.get('role'),
                     'rname': request.COOKIES.get('rname'),
                     'rbranch': request.COOKIES.get('rbranch'),
-                    'discount': record_pname[0][1],
+                    'discount': record_pname[0][1],    
+                    'adminid':request.COOKIES.get('adminid'),
                 }
                 return render(request, 'form_ubah_promo_restoran.html', context)
 
@@ -360,12 +453,22 @@ def show_form_ubah_promo_restoran(request, id):
         'role': request.COOKIES.get('role'),
         'rname': request.COOKIES.get('rname'),
         'rbranch': request.COOKIES.get('rbranch'),
+        'adminid':request.COOKIES.get('adminid')
     }
 
     return render(request, 'form_ubah_promo_restoran.html', context)
 
 
 def show_detail_promo(request, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(f'select * from promo where id = \'{id}\'')
     records_promo = cursor.fetchmany()
 
@@ -385,6 +488,7 @@ def show_detail_promo(request, id):
         'records_promo': records_promo[0],
         'role': request.COOKIES.get('role'),
         'rname': request.COOKIES.get('rname'),
+        'adminid':request.COOKIES.get('adminid'),
         'rbranch': request.COOKIES.get('rbranch'),
     }
 
@@ -392,6 +496,15 @@ def show_detail_promo(request, id):
 
 
 def show_detail_promo_restoran(request, rname, rbranch, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(
         f'select * from promo p, restaurant_promo r where p.id = r.pid and r.pid = \'{id}\' and r.rname = \'{rname}\' and r.rbranch = \'{rbranch}\'')
     record_promo = cursor.fetchall()
@@ -409,30 +522,59 @@ def show_detail_promo_restoran(request, rname, rbranch, id):
     record_promo = list(record_promo[0])
     record_promo[6] = record_promo[6].date()
     record_promo[7] = record_promo[7].date()
+
     context = {
         'record_promo': record_promo,
         'id': id,
-        'rname': rname,
-        'rbranch': rbranch,
+        'rname': request.COOKIES.get('rname'),
+        'rbranch': request.COOKIES.get('rbranch'),
+        'adminid':request.COOKIES.get('adminid'),
+        'role': request.COOKIES.get('role'),
     }
 
-    print(record_promo)
     return render(request, 'detail_promosi_restoran.html', context)
 
 
 def delete_promo(request, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(f'delete from promo where id = \'{id}\'')
     connection.commit()
     return HttpResponseRedirect(reverse('trigger_6:show_daftar_promo'))
 
 
 def delete_promo_restoran(request, rname, rbranch, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(
         f'delete from restaurant_promo where pid = \'{id}\' and rname = \'{rname}\' and rbranch = \'{rbranch}\'')
     connection.commit()
-    return HttpResponseRedirect(reverse('trigger_6:show_daftar_promo_restoran'))
+    return HttpResponseRedirect(reverse('trigger_6:show_daftar_promo_restoran', kwargs={'rname':rname, 'rbranch':rbranch}))
 
 def ubah_form_input(request, id):
+    role = request.COOKIES.get('role')
+
+    if role == None:
+        return redirect("/login")
+    if role != 'restaurant':
+        return redirect("/")
+
+    cursor.execute('set search_path to sirest')
+
     cursor.execute(f'select discount from sirest.promo where id = \'{id}\'')
     discount = cursor.fetchone()