From 621596690eacf3d968b375bdd8abb911436b3ee4 Mon Sep 17 00:00:00 2001 From: phyusin Date: Fri, 4 May 2018 14:30:17 +0630 Subject: [PATCH] change UI in order reservation --- app/assets/javascripts/order_reservation.js | 4 ++-- app/views/origami/order_reservation/index.html.erb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/order_reservation.js b/app/assets/javascripts/order_reservation.js index 990e4a74..07eab9e1 100644 --- a/app/assets/javascripts/order_reservation.js +++ b/app/assets/javascripts/order_reservation.js @@ -282,8 +282,8 @@ function callback_url(callback,ref_no,order_id,status,time,exptime){ function timeFormat(date){ var isPM = date.getHours() >= 12; var isMidday = date.getHours() == 12; - var time = [date.getHours() - (isPM && !isMidday ? 12 : 0), - date.getMinutes() || '00'].join(':') + + var time = [(date.getHours()>10? date.getHours() : '0'+date.getHours()) - (isPM && !isMidday ? 12 : 0), + (date.getMinutes()>10? date.getMinutes() : '0'+date.getMinutes()) || '00'].join(':') + (isPM ? ' PM' : ' AM'); return time; } diff --git a/app/views/origami/order_reservation/index.html.erb b/app/views/origami/order_reservation/index.html.erb index 89c4b4e9..34664428 100644 --- a/app/views/origami/order_reservation/index.html.erb +++ b/app/views/origami/order_reservation/index.html.erb @@ -378,7 +378,7 @@ - + @@ -411,4 +411,6 @@
-
\ No newline at end of file +
+ +