Skip to content

Commit

Permalink
Actualiza y arregla problemita de https://gitlab.com/pasosdeJesus/siv…
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Dec 5, 2023
1 parent d176769 commit 5e6a65e
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 34 deletions.
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: 932966920f125f0f47e37ace5574ec80ca7a8366
revision: 64e8d7fec274570f73a41f19fded74d236fa413f
branch: main
specs:
msip (2.2.0.beta4)
Expand Down Expand Up @@ -138,7 +138,7 @@ GEM
bindex (0.8.1)
bootsnap (1.17.0)
msgpack (~> 1.2)
brakeman (6.0.1)
brakeman (6.1.0)
builder (3.2.4)
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
Expand Down Expand Up @@ -205,15 +205,15 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.9.1)
irb (1.10.1)
rdoc
reline (>= 0.3.8)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jsbundling-rails (1.2.1)
railties (>= 6.0.0)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
libxml-ruby (4.1.2)
loofah (2.22.0)
Expand All @@ -239,7 +239,7 @@ GEM
minitest (>= 5.0)
ruby-progressbar
msgpack (1.7.2)
net-imap (0.4.6)
net-imap (0.4.7)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -248,7 +248,7 @@ GEM
timeout
net-smtp (0.4.0)
net-protocol
nio4r (2.6.1)
nio4r (2.7.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand Down Expand Up @@ -322,11 +322,11 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.1.0)
rdoc (6.6.0)
rdoc (6.6.1)
psych (>= 4.0.0)
redcarpet (3.6.0)
regexp_parser (2.8.2)
reline (0.4.0)
regexp_parser (2.8.3)
reline (0.4.1)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
Expand All @@ -335,15 +335,15 @@ GEM
rspreadsheet (0.5.3)
andand (>= 1.3)
rubyzip (>= 1.3)
rubocop (1.57.2)
rubocop (1.58.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand Down Expand Up @@ -387,7 +387,7 @@ GEM
sprockets (>= 3.0.0)
stimulus-rails (1.3.0)
railties (>= 6.0.0)
stringio (3.0.9)
stringio (3.1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (1.3.0)
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/controllers/enviar_ficha_caso_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class extends Controller {
for (let [key, value] of datosFormulario.entries()) {
let coincidencia = key.match(/^caso\[(.+?)\]$/);
if (coincidencia) {
let ruta = match[1].split(/\]\[|\[|\]/).filter(p => p !== "");
let ruta = coincidencia[1].split(/\]\[|\[|\]/).filter(p => p !== "");
let actual = objetoFormulario;

for (let i = 0; i < ruta.length; i++) {
Expand Down
122 changes: 104 additions & 18 deletions test/dummy/db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,95 @@ CREATE FUNCTION public.msip_eliminar_familiar_inverso() RETURNS trigger
$$;


--
-- Name: msip_nombre_vereda(); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_nombre_vereda() RETURNS character varying
LANGUAGE sql
AS $$
SELECT 'Vereda '
$$;


--
-- Name: msip_ubicacionpre_id_rtablabasica(); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_ubicacionpre_id_rtablabasica() RETURNS integer
LANGUAGE sql
AS $$
SELECT min(id+1) FROM msip_ubicacionpre WHERE
(id+1) NOT IN (SELECT id FROM msip_ubicacionpre) AND
id<10000000
$$;


--
-- Name: msip_ubicacionpre_nomenclatura(character varying, character varying, character varying, character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_ubicacionpre_nomenclatura(pais character varying, departamento character varying, municipio character varying, vereda character varying, centropoblado character varying, lugar character varying, sitio character varying) RETURNS text[]
LANGUAGE sql
AS $$
SELECT CASE
WHEN pais IS NULL OR pais = '' THEN
array[NULL, NULL]
WHEN departamento IS NULL OR departamento = '' THEN
array[pais, NULL]
WHEN municipio IS NULL OR municipio = '' THEN
array[departamento || ' / ' || pais, departamento]
WHEN (vereda IS NULL OR vereda = '') AND
(centropoblado IS NULL OR centropoblado = '') THEN
array[ municipio || ' / ' || departamento || ' / ' || pais,
municipio || ' / ' || departamento ]
WHEN (vereda IS NULL OR vereda = '') AND
(lugar IS NULL OR lugar = '') THEN
array[ centropoblado || ' / ' || municipio || ' / ' ||
departamento || ' / ' || pais,
centropoblado || ' / ' || municipio || ' / ' ||
departamento ]
WHEN (lugar IS NULL OR lugar = '') THEN
array[ msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' ||
departamento || ' / ' || pais,
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' || departamento]
WHEN (vereda IS NULL OR vereda = '') AND
(sitio IS NULL OR sitio = '') THEN
array[ lugar || ' / ' || centropoblado || ' / ' ||
municipio || ' / ' || departamento || ' / ' || pais,
lugar || ' / ' || centropoblado || ' / ' ||
municipio || ' / ' || departamento]
WHEN (sitio IS NULL OR sitio = '') THEN
array[ lugar || ' / ' ||
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' || departamento || ' / ' || pais,
lugar || ' / ' ||
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' || departamento]
WHEN (vereda IS NULL OR vereda = '') THEN
array[ sitio || ' / ' || lugar || ' / ' ||
centropoblado || ' / ' ||
municipio || ' / ' ||
departamento || ' / ' || pais,
sitio || ' / ' || lugar || ' / ' ||
centropoblado || ' / ' ||
municipio || ' / ' ||
departamento ]
ELSE
array[ sitio || ' / ' || lugar || ' / ' ||
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' ||
departamento || ' / ' || pais,
sitio || ' / ' || lugar || ' / ' ||
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' ||
departamento ]
END
$$;


--
-- Name: probapellido(text); Type: FUNCTION; Schema: public; Owner: -
--
Expand Down Expand Up @@ -2561,7 +2650,8 @@ CREATE TABLE public.msip_ubicacionpre (
longitud double precision,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
nombre_sin_pais character varying(500)
nombre_sin_pais character varying(500),
vereda_id integer
);


Expand Down Expand Up @@ -6303,14 +6393,6 @@ ALTER TABLE ONLY public.sivel2_gen_categoria
ADD CONSTRAINT categoria_contada_en_fkey FOREIGN KEY (contadaen) REFERENCES public.sivel2_gen_categoria(id);


--
-- Name: sivel2_gen_categoria categoria_contadaen_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sivel2_gen_categoria
ADD CONSTRAINT categoria_contadaen_fkey FOREIGN KEY (contadaen) REFERENCES public.sivel2_gen_categoria(id);


--
-- Name: sivel2_gen_contextovictima_victima contextovictima_victima_contextovictima_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -6559,6 +6641,14 @@ ALTER TABLE ONLY public.mr519_gen_encuestapersona
ADD CONSTRAINT fk_rails_54b3e0ed5c FOREIGN KEY (persona_id) REFERENCES public.msip_persona(id);


--
-- Name: msip_ubicacionpre fk_rails_558c98f353; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_rails_558c98f353 FOREIGN KEY (vereda_id) REFERENCES public.msip_vereda(id);


--
-- Name: msip_etiqueta_municipio fk_rails_5672729520; Type: FK CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -7031,14 +7121,6 @@ ALTER TABLE ONLY public.msip_persona
ADD CONSTRAINT persona_tdocumento_id_fkey FOREIGN KEY (tdocumento_id) REFERENCES public.msip_tdocumento(id);


--
-- Name: sivel2_gen_presponsable presponsable_papa_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.sivel2_gen_presponsable
ADD CONSTRAINT presponsable_papa_fkey FOREIGN KEY (papa_id) REFERENCES public.sivel2_gen_presponsable(id);


--
-- Name: sivel2_gen_caso_presponsable presuntos_responsables_caso_id_caso_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -7754,6 +7836,10 @@ INSERT INTO "schema_migrations" (version) VALUES
('20231120094041'),
('20231120175125'),
('20231121135551'),
('20231121203443');
('20231121203443'),
('20231124200056'),
('20231125152802'),
('20231125152810'),
('20231125230000');


6 changes: 3 additions & 3 deletions test/dummy/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ ansi-styles@^3.2.1:
color-convert "^1.9.0"

apexcharts@^3.28.3:
version "3.44.0"
resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.44.0.tgz#b52f95b0d0c2a5357b4614fa42faac956b69a4a9"
integrity sha512-u7Xzrbcxc2yWznN78Jh5NMCYVAsWDfBjRl5ea++rVzFAqjU2hLz4RgKIFwYOBDRQtW1e/Qz8azJTqIJ1+Vu9Qg==
version "3.44.2"
resolved "https://registry.yarnpkg.com/apexcharts/-/apexcharts-3.44.2.tgz#9e3010d949c508810ee0eded3a4802d7fb39ad8c"
integrity sha512-QWOFS/SC1TDsuI8VudVuIwLhs1qE6kwixRvmABMUgTVeVzizRWgQh8pdEIgwl+Zvr0TlM3vHPz6Dc5NP1hJ7BA==
dependencies:
"@yr/monotone-cubic-spline" "^1.0.3"
svg.draggable.js "^2.2.2"
Expand Down

0 comments on commit 5e6a65e

Please sign in to comment.