diff --git a/templates/navbar.html b/templates/navbar.html index 6f09b49e78f3f18182c3694143e336bca01c7b2c..9683953cf00d3f5328ba1007d33ee8c3603623c1 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -1,358 +1,189 @@ <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")); - } + 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"> - {% comment %} if adminid is not none {% endcomment %} - {% if adminid is not none or role == 'admin' %} - SIREST {{role}} - {% else %} - SIREST {{role}} <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="{% url 'account:show_main' %}" 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="{% 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> - - <!-- {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> + <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"> + {% 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 @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 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 @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 'trigger3:tarif_detail' %}">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="{% 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> + + <!-- {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" 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 'trigger3:tarif_detail' %}">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="{% url 'trigger3:tambah_tarif' %}">Buat Tarif Pengiriman per KM</a> + </div> + </div> </div> - </div> - {% 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="" - 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> - </div> - </div> - - <div class="md:mx-5 my-3 md:my-0"> - <a - href="{% url 'trigger_2:saldo_restopay' %}" - 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="{% url 'trigger_2:daftar_jam_operasional' %}">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="{% 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> - </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="{% url 'trigger_2:daftar_pesanan' %}">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="{% url 'trigger_6:show_daftar_promo_restoran' rname rbranch %}">Daftar Promo Restoran</a> - </div> - </div> - </div> - <div class="md:mx-5 my-3 md:my-0"> - <a - href="{% url 'trigger_2:saldo_restopay' %}" - class="hover:text-[#DBC8AC] hover:text-lg duration-500" - >Restopay</a - > - </div> - {% endif %} - <!-- restoran end --> - - <!-- kurir start --> - {% if role == 'courier' and adminid != None %} - <div class="md:mx-5 my-3 md:my-0"> - <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="{% 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="{% url 'trigger_2:saldo_restopay' %}" - class="hover:text-[#DBC8AC] hover:text-lg duration-500" - >Restopay</a - > - </div> - {% endif %} - <!-- kurir end --> - - <div class="md:mx-5 my-3 md:my-0"> - <a href="{% url 'account:logout' %}" class="hover:text-[#DBC8AC] hover:text-lg duration-500">Logout</a> - </div> - </div> - </nav> \ No newline at end of file + {% 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> + + <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> + {% endif %} + <!-- restoran end --> + + <!-- kurir start --> + {% if role == 'courier' and adminid != None %} + <div class="md:mx-5 my-3 md:my-0"> + <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="{% 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> + {% endif %} + <!-- kurir end --> + + <div class="md:mx-5 my-3 md:my-0"> + <a href="{% url 'account:logout' %}" class="hover:text-[#DBC8AC] hover:text-lg duration-500">Logout</a> + </div> + </div> +</nav>