dmencu 0.3.53 → 0.3.54

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.
@@ -16,9 +16,11 @@ begin
16
16
  where operativo = new.operativo and enc = new.enc;
17
17
  select estado_al_asignar into v_estado_al_asignar from estados where operativo = new.operativo and estado = new.estado;
18
18
  if new.asignado is null then
19
- update tem
20
- set tarea_proxima = new.tarea, tarea_actual = new.tarea_anterior, estado_actual = new.estado
21
- where operativo = new.operativo and enc = new.enc;
19
+ if coalesce(v_tarea_actual,'nulo') = new.tarea then
20
+ update tem
21
+ set tarea_proxima = new.tarea, tarea_actual = new.tarea_anterior, estado_actual = new.estado
22
+ where operativo = new.operativo and enc = new.enc;
23
+ end if;
22
24
  else
23
25
  if v_tarea_actual is distinct from new.tarea then
24
26
  update tem
@@ -29,20 +29,15 @@ begin
29
29
  if new.recepcionista is null then
30
30
  raise exception 'Error: no es posible asignar en la encuesta % del operativo % ya que no se indicó un/a recepcionista', new.enc, new.operativo;
31
31
  end if;
32
+ if not (new.tarea = coalesce(v_tarea_actual,'nulo') or new.tarea = coalesce(v_tarea_proxima,'nulo')) then
33
+ raise exception 'Error: no es posible modificar la encuesta % del operativo % ya que la tarea actual definida en TEM no coincide con la tarea %', new.enc, new.operativo, new.tarea;
34
+ end if;
32
35
  end if;
33
36
  if old.recepcionista is distinct from new.recepcionista then
34
- if not v_permite_asignar then
35
- raise exception 'Error: no es posible modificar recepcionista en la encuesta % del operativo % ya que su estado no lo permite', new.enc, new.operativo;
36
- end if;
37
37
  if new.recepcionista is null and new.asignado is not null then
38
38
  raise exception 'Error: no es posible quitar el recepcionista de la encuesta % del operativo % ya que se la misma se encuentra asignada', new.enc, new.operativo;
39
39
  end if;
40
40
  end if;
41
- if not (new.tarea = coalesce(v_tarea_actual,'nulo') or
42
- ((old.asignado is distinct from new.asignado) or (old.recepcionista is distinct from new.recepcionista))
43
- and new.tarea = coalesce(v_tarea_proxima,'nulo')) then
44
- raise exception 'Error: no es posible modificar la encuesta % del operativo % ya que la tarea actual definida en TEM no coincide con la tarea %', new.enc, new.operativo, new.tarea;
45
- end if;
46
41
  if old.asignado is distinct from new.asignado then
47
42
  if new.asignado is null then
48
43
  new.estado = '0D';
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.3.53",
4
+ "version": "0.3.54",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "main": "dist/server/server/app-dmencu.js",
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "@material-ui/core": "^4.12.4",
15
15
  "memoize-one": "~6.0.0",
16
- "meta-enc": "^1.4.8",
16
+ "meta-enc": "^1.4.9",
17
17
  "procesamiento": "^1.0.10",
18
18
  "backend-plus": "^1.18.8",
19
19
  "qrcode": "^1.5.3",