Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------------------------------------
- // REGISTRO DE LA PROPIEDAD DE PR
- // POR: INVID LLC
- // PROPOSITO:
- // Implementa modelo de backbone.js para el Retiro de Documentos.
- //----------------------------------------------------------------------------------------------------
- var MisCertificacionesModel = BaseModel.extend({
- urlRoot: function(){
- return (this.customUrl) ? this.customUrl : "/api/certificacion"
- },
- defaults: {
- ID: null,
- Turno: '',
- NumeroPropiedad: '',
- CodigoDemarcacion: '',
- Demarcaciones: '',
- Secciones: '',
- TipoCertificacion: '',
- Recibo: '',
- TipoCertificacionTexto: function () {
- return (this.TipoCertificacion == "NP" ? "Certificación negativa persona" :
- this.TipoCertificacion == "NF" ? "Certificación negativa finca" :
- this.TipoCertificacion == "E" ? "Certificación con estudio" :
- this.TipoCertificacion == "L" ? "Certificación literal" : "")
- },
- Estatus: function () {
- if (this.FechaDevuelta)
- return "Devuelta"
- if (this.FechaRetirada)
- return "Retirada"
- if (this.FechaExpedicion)
- return "Expedida"
- if (this.FechaCertificador)
- return "Pendiente"
- if (this.FechaSolicitud)
- return "Solicitada"
- return "."
- },
- },
- initialize: function(){
- this.set("Secciones", app.lookup.secciones)
- this.set("Demarcaciones", app.lookup.demarcaciones)
- },
- getMainData: function(){
- return {
- ID: this.attributes.ID,
- }
- }
- })
- var MisCertificacionesCollection = BaseCollection.extend({
- model: MisCertificacionesModel
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement