// Generated by CoffeeScript 1.6.3
var __hasProp = {}.hasOwnProperty,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

define(["backbone", "views/TableView"], function(Backbone) {
  var PayAndBonusView, _ref;
  return PayAndBonusView = (function(_super) {
    __extends(PayAndBonusView, _super);

    function PayAndBonusView() {
      _ref = PayAndBonusView.__super__.constructor.apply(this, arguments);
      return _ref;
    }

    PayAndBonusView.prototype.title = " ";

    PayAndBonusView.prototype.columns = {
      title: {
        header: "Worker Id",
        draw: function(model) {
          return model.get("workerId");
        }
      },
      hitid: {
        header: "HIT Id",
        draw: function(model) {
          return model.get("hitId");
        }
      },
      submit_time: {
        header: "Submit Time",
        draw: function(model) {
          return new Date(model.get("submit_time"));
        }
      },
      expire: {
        header: " ",
        draw: function(model) {
          var button, id;
          id = model.get("assignmentId");
          button = "<button id=" + id + " class='btn btn-small approve btn-success'>Approve</button>";
          return button;
        }
      },
      extend: {
        header: " ",
        draw: function(model) {
          var button, id;
          id = model.get("assignmentId");
          button = "<button id=" + id + " class='btn btn-small reject btn-danger'>Reject</button>";
          return button;
        }
      }
    };

    PayAndBonusView.prototype.pagination = true;

    PayAndBonusView.prototype.size = 25;

    return PayAndBonusView;

  })(Backbone.TableView);
});
