From 23832a46bb8e192800ce5cc0443127ae4ac1b2ed Mon Sep 17 00:00:00 2001 From: JokoPrasetio Date: Wed, 20 Aug 2025 08:57:50 +0700 Subject: [PATCH] format http -> https in production --- app/Providers/AppServiceProvider.php | 4 ++++ public/js/checkout/index.js | 5 ++--- public/js/order_guest/index.js | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 656b4e6..4cfb6ef 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use Illuminate\Support\Facades\Blade; +use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider @@ -22,5 +23,8 @@ class AppServiceProvider extends ServiceProvider { Blade::component('dashboard.pesanan.components.modalExport', 'modalExport'); Blade::component('dashboard.pesanan.components.infoPesanan', 'infoPesanan'); + if ($this->app->environment('production')) { + URL::forceScheme('https'); + } } } diff --git a/public/js/checkout/index.js b/public/js/checkout/index.js index 592e95d..f1f4904 100644 --- a/public/js/checkout/index.js +++ b/public/js/checkout/index.js @@ -444,6 +444,8 @@ function renderCartSummary() {
${item.nama_menu}
Rp ${parseInt(harga).toLocaleString('id-ID')}
+ ${item?.kalori ? `
Kalori : ${item?.kalori} kal
` : ''} + ${item.deskripsi ? `

${item.deskripsi}

` : ''}
${item.apakah_someday @@ -706,7 +708,6 @@ function validateCartBeforeSubmit() { cart.forEach((item, index) => { const pesananList = item.pesanan || []; pesananList.forEach((pesanan, i) => { - console.log(!pesanan.karbohidrat_id, !item?.apakah_someday); if (!pesanan.tgl) { isValid = false; @@ -826,7 +827,6 @@ function initFlatpickrTersedia(item, i) { const id = item?.apakah_someday ? `#tgl_someday-${item.id}-${i}` : `#tanggal-${item.id}-${i}`; - console.log(id); const config = item?.apakah_someday ? { @@ -930,7 +930,6 @@ document.getElementById('submitNote').addEventListener('click', function(e){ const noted = $("#note_order").val() const cart = JSON.parse(sessionStorage.getItem('cart') || '[]'); const item =cart.find(item => item.id === id) - console.log(id, index, item); if(item && item.pesanan && item.pesanan[index]){ item.pesanan[index].catatan = noted diff --git a/public/js/order_guest/index.js b/public/js/order_guest/index.js index cdc60c4..175c238 100644 --- a/public/js/order_guest/index.js +++ b/public/js/order_guest/index.js @@ -202,6 +202,7 @@ `); } + let html = '
'; for (const [label, list] of Object.entries(groups)) { let scheduleInfo = ''; -- 2.47.2