Removed console log for debugging.
This commit is contained in:
parent
f8a75f02b8
commit
9ef972d111
1 changed files with 6 additions and 6 deletions
|
@ -62,10 +62,10 @@ class App.TicketZoom extends App.Controller
|
||||||
fetchMayBe: (data) =>
|
fetchMayBe: (data) =>
|
||||||
if @ticketUpdatedAtLastCall
|
if @ticketUpdatedAtLastCall
|
||||||
if new Date(data.updated_at).getTime() is new Date(@ticketUpdatedAtLastCall).getTime()
|
if new Date(data.updated_at).getTime() is new Date(@ticketUpdatedAtLastCall).getTime()
|
||||||
console.log('debug no fetch, current ticket already there or requested')
|
#console.log('debug no fetch, current ticket already there or requested')
|
||||||
return
|
return
|
||||||
if new Date(data.updated_at).getTime() < new Date(@ticketUpdatedAtLastCall).getTime()
|
if new Date(data.updated_at).getTime() < new Date(@ticketUpdatedAtLastCall).getTime()
|
||||||
console.log('debug no fetch, current ticket already newser or requested')
|
#console.log('debug no fetch, current ticket already newser or requested')
|
||||||
return
|
return
|
||||||
@ticketUpdatedAtLastCall = data.updated_at
|
@ticketUpdatedAtLastCall = data.updated_at
|
||||||
|
|
||||||
|
@ -131,19 +131,19 @@ class App.TicketZoom extends App.Controller
|
||||||
|
|
||||||
# check if ticket has changed
|
# check if ticket has changed
|
||||||
newTicketRaw = data.assets.Ticket[@ticket_id]
|
newTicketRaw = data.assets.Ticket[@ticket_id]
|
||||||
console.log(newTicketRaw.updated_at)
|
#console.log(newTicketRaw.updated_at)
|
||||||
console.log(@ticketUpdatedAtLastCall)
|
#console.log(@ticketUpdatedAtLastCall)
|
||||||
|
|
||||||
if @ticketUpdatedAtLastCall
|
if @ticketUpdatedAtLastCall
|
||||||
|
|
||||||
# ignore if record is already shown
|
# ignore if record is already shown
|
||||||
if ignoreSame && new Date(newTicketRaw.updated_at).getTime() is new Date(@ticketUpdatedAtLastCall).getTime()
|
if ignoreSame && new Date(newTicketRaw.updated_at).getTime() is new Date(@ticketUpdatedAtLastCall).getTime()
|
||||||
console.log('debug no fetched, current ticket already there or requested')
|
#console.log('debug no fetched, current ticket already there or requested')
|
||||||
return
|
return
|
||||||
|
|
||||||
# do not render if newer ticket is already requested
|
# do not render if newer ticket is already requested
|
||||||
if new Date(newTicketRaw.updated_at).getTime() < new Date(@ticketUpdatedAtLastCall).getTime()
|
if new Date(newTicketRaw.updated_at).getTime() < new Date(@ticketUpdatedAtLastCall).getTime()
|
||||||
console.log('fetched no fetch, current ticket already newer')
|
#console.log('fetched no fetch, current ticket already newer')
|
||||||
return
|
return
|
||||||
|
|
||||||
# remember current record if newer as requested record
|
# remember current record if newer as requested record
|
||||||
|
|
Loading…
Reference in a new issue