Skip to content

Commit

Permalink
Arregla campos nuevos con tablas basicas. Closes #230
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Oct 2, 2023
1 parent 52c2395 commit 48c67a0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/cor1440_gen.git
revision: e54a0ce7fccecbe020aa99d607a69badd9a9c9f5
revision: fbb7cca9d4a183c516412d0d3ec96b8b18a29186
branch: main
specs:
cor1440_gen (2.2.0.beta4)
Expand All @@ -46,7 +46,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/heb412_gen.git
revision: 3508d31bc0af92a43137f03cace09a142a1d511a
revision: d52ba35198275dfe6eb2b21a711012949b758e93
branch: main
specs:
heb412_gen (2.2.0.beta4)
Expand All @@ -57,15 +57,15 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/jos19.git
revision: 995798ca0fd106190bb5ad25794a5023a6e7fd25
revision: 20139effa97a86277a28bdb60291d13343d98d52
branch: main
specs:
jos19 (2.2.0.beta4)
rails (>= 7.0.4)

GIT
remote: https://gitlab.com/pasosdeJesus/mr519_gen.git
revision: a6270706b5f6019c34ad7e40fa31377e4e251cbc
revision: e1145e67286320069d48e159c81ea1b30ee77524
branch: main
specs:
mr519_gen (2.2.0.beta4)
Expand All @@ -74,7 +74,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: cd8649fd776db25e83c771a03f1172e72465b1c5
revision: 76a5fc04d1c6d26e52d4f15e1e0c68b499f96db2
branch: main
specs:
msip (2.2.0.beta4)
Expand All @@ -94,7 +94,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/sivel2_gen.git
revision: 2ff20852fd34c1d36d25c4449fa0b0d053f80c80
revision: 0fa38a4c02552b76cf4ea1a66235e9183fc60f43
branch: main
specs:
sivel2_gen (2.2.0.beta4)
Expand Down Expand Up @@ -298,7 +298,7 @@ GEM
net-protocol
net-protocol (0.2.1)
timeout
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.4)
Expand Down
24 changes: 24 additions & 0 deletions app/models/msip/persona.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ class Persona < ActiveRecord::Base
allow_destroy: true,
reject_if: :all_blank

belongs_to :ultimo_departamento_trabajo,
validate: true,
class_name: "Msip::Departamento",
foreign_key: "ultimo_departamento_trabajo_id",
optional: true

belongs_to :ultima_regionpago,
validate: true,
class_name: "::Regionpago",
foreign_key: "ultima_regionpago_id",
optional: true

belongs_to :ultimo_cargoestado,
validate: true,
class_name: "::Cargoestado",
foreign_key: "ultimo_cargoestado_id",
optional: true

belongs_to :ultima_entidad,
validate: true,
class_name: "Msip::Orgsocial",
foreign_key: "ultima_entidad_id",
optional: true

validates :tdocumento_id, presence: true, allow_blank: false
validates :numerodocumento, presence: true, allow_blank: false,
uniqueness: { scope: :tdocumento,
Expand Down
4 changes: 4 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ es:
caso_ids: Casos en los que es Vic. Directa
familiarvictima_ids: Casos en los que es Vic. Indirecta
ultimo_cargoestado_id: Cargo con el estado más reciente
ultimo_cargoestado: Cargo con el estado más reciente
ultima_entidad_id: Entidad estatal más reciente
ultima_entidad: Entidad estatal más reciente
ultimo_celular_trabajo: Celular del trabajo más reciente
ultimo_correo_trabajo: Correo del trabajo más reciente
ultima_regionpago_id: Regional de pago más reciente
ultima_regionpago: Regional de pago más reciente
ultimo_departamento_trabajo_id: Departamento de trabajo más reciente
ultimo_departamento_trabajo: Departamento de trabajo más reciente
"msip/solicitud":
Solicitud: Observacion
Solicitudes: Observaciones
Expand Down
7 changes: 0 additions & 7 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
--

-- *not* creating schema, since initdb creates it


--
-- Name: es_co_utf_8; Type: COLLATION; Schema: public; Owner: -
--
Expand Down

0 comments on commit 48c67a0

Please sign in to comment.