2014-11-28 20:49:41 -05:00
|
|
|
RootView = require 'views/core/RootView'
|
2014-11-25 14:09:29 -05:00
|
|
|
template = require 'templates/account/payments-view'
|
|
|
|
CocoCollection = require 'collections/CocoCollection'
|
|
|
|
Payment = require 'models/Payment'
|
|
|
|
|
|
|
|
module.exports = class PaymentsView extends RootView
|
|
|
|
id: "payments-view"
|
|
|
|
template: template
|
|
|
|
|
|
|
|
constructor: (options) ->
|
|
|
|
super(options)
|
2014-12-03 22:43:57 -05:00
|
|
|
@payments = new CocoCollection([], { url: '/db/payment', model: Payment, comparator:'_id' })
|
2015-02-11 16:12:42 -05:00
|
|
|
@supermodel.loadCollection(@payments, 'payments', {cache: false})
|
2014-11-25 14:09:29 -05:00
|
|
|
|
|
|
|
getRenderData: ->
|
|
|
|
c = super()
|
|
|
|
c.payments = @payments
|
2015-02-11 16:12:42 -05:00
|
|
|
c
|