Advertisement
eduardomelendezjr

Untitled

Aug 26th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. //----------------------------------------------------------------------------------------------------
  2. // REGISTRO DE LA PROPIEDAD DE PR
  3. // POR: INVID LLC
  4. // PROPOSITO:
  5. // Implementa modelo de backbone.js para el Retiro de Documentos.
  6. //----------------------------------------------------------------------------------------------------
  7. var MisCertificacionesModel = BaseModel.extend({
  8. urlRoot: function(){
  9. return (this.customUrl) ? this.customUrl : "/api/certificacion"
  10. },
  11. defaults: {
  12. ID: null,
  13. Turno: '',
  14. NumeroPropiedad: '',
  15. CodigoDemarcacion: '',
  16. Demarcaciones: '',
  17. Secciones: '',
  18. TipoCertificacion: '',
  19. Recibo: '',
  20. TipoCertificacionTexto: function () {
  21. return (this.TipoCertificacion == "NP" ? "Certificación negativa persona" :
  22. this.TipoCertificacion == "NF" ? "Certificación negativa finca" :
  23. this.TipoCertificacion == "E" ? "Certificación con estudio" :
  24. this.TipoCertificacion == "L" ? "Certificación literal" : "")
  25. },
  26. Estatus: function () {
  27. if (this.FechaDevuelta)
  28. return "Devuelta"
  29. if (this.FechaRetirada)
  30. return "Retirada"
  31. if (this.FechaExpedicion)
  32. return "Expedida"
  33. if (this.FechaCertificador)
  34. return "Pendiente"
  35. if (this.FechaSolicitud)
  36. return "Solicitada"
  37. return "."
  38. },
  39. },
  40. initialize: function(){
  41. this.set("Secciones", app.lookup.secciones)
  42. this.set("Demarcaciones", app.lookup.demarcaciones)
  43. },
  44. getMainData: function(){
  45. return {
  46. ID: this.attributes.ID,
  47. }
  48. }
  49. })
  50.  
  51. var MisCertificacionesCollection = BaseCollection.extend({
  52. model: MisCertificacionesModel
  53. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement