dmencu 0.1.39 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ --cambiar el nombre del operativo y el owner correspondiente al operativo
2
+ --set role ggs_capa2022_owner;
3
+ CREATE or replace FUNCTION base.xcalcular_resultado_trg()
4
+ RETURNS trigger
5
+ LANGUAGE 'plpgsql'
6
+ AS $BODY$
7
+ declare
8
+ vresultado text;
9
+ begin
10
+ select case when new.rea=1 then 'efectiva' when new.rea=3 then 'pendiente' when new.rea=4 then 'mixta' when (new.rea=2 and new.norea is not null) then (select grupo from no_rea where new.norea=no_rea::integer ) else null end into vresultado
11
+ from tem
12
+ where operativo='GGS_2022' and enc=new.enc;
13
+
14
+ new.resultado= vresultado ;
15
+ return new;
16
+ end;
17
+ $BODY$;
18
+ /* RECORDAR descomentar y agregar el owner que corresponda al operativo
19
+
20
+ ALTER FUNCTION base.xcalcular_resultado_trg()
21
+ OWNER TO ggs_capa2022_owner;
22
+
23
+ */
24
+ CREATE TRIGGER xcalcular_resultado_trg
25
+ BEFORE INSERT OR UPDATE OF rea, norea
26
+ ON base.tem
27
+ FOR EACH ROW
28
+ EXECUTE PROCEDURE base.xcalcular_resultado_trg();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dmencu",
3
3
  "description": "DM Encu - Encuestas en dispositivo móvil",
4
- "version": "0.1.39",
4
+ "version": "0.1.40",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "main": "dist/server/server/app-dmencu.js",