Skip to content

Commit

Permalink
feat(MONIT): agrega nuevo switch agenda dinamica
Browse files Browse the repository at this point in the history
  • Loading branch information
maring0019 committed Sep 27, 2023
1 parent 8698b11 commit b9f6d9c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export interface IConceptoTurneable {
semanticTag: string;
noNominalizada: boolean;
auditable: boolean;
agendaDinamica: boolean;
ambito: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@
</plex-bool>
</td>
</tr>
<tr>
<td *ngIf="!editable">
<strong>Agenda dinámica:</strong>
<plex-text *ngIf="!conceptoTurneable.agendaDinamica" [(ngModel)]="paraFalse"
name="usuario" [disabled]="true">
</plex-text>
<plex-text *ngIf="conceptoTurneable.agendaDinamica" [(ngModel)]="paraTrue"
name="usuario" [disabled]="true">
</plex-text>
</td>
<td *ngIf="editable">
<strong>Agenda dinámica:</strong>
&nbsp;
<plex-bool [(ngModel)]="agendaDinamica" type="slide" name="agendaDinamica">
</plex-bool>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class DetalleConceptoTurneableComponent implements OnInit, OnChanges {

auditable;
nominalizada;
agendaDinamica;
editable = false;
paraFalse = 'NO';
paraTrue = 'SI';
Expand Down Expand Up @@ -40,6 +41,7 @@ export class DetalleConceptoTurneableComponent implements OnInit, OnChanges {
const cambios = {
noNominalizada: !this.nominalizada,
auditable: this.auditable,
agendaDinamica: this.agendaDinamica,
ambito: this.objectSelect2array(this.ambitoActual),
};
this.toggleEdicion();
Expand All @@ -63,6 +65,13 @@ export class DetalleConceptoTurneableComponent implements OnInit, OnChanges {
} else {
this.auditable = false;
}

if (this.conceptoTurneable.agendaDinamica) {
this.agendaDinamica = true;
} else {
this.agendaDinamica = false;
}

// carga los posibles ambitos
this.ambitos = [
{
Expand Down Expand Up @@ -128,6 +137,7 @@ export class DetalleConceptoTurneableComponent implements OnInit, OnChanges {
return (
(this.conceptoTurneable.noNominalizada !== !this.nominalizada) ||
(this.conceptoTurneable.auditable !== this.auditable) ||
(this.conceptoTurneable.agendaDinamica !== this.agendaDinamica) ||
(!this.arrayEquals(this.conceptoTurneable.ambito, this.objectSelect2array(this.ambitoActual)))
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class NuevoConceptoTurneableComponent implements OnInit {
semanticTag: null,
noNominalizada: null,
auditable: null,
agendaDinamica: null,
ambito: null,
};
nominalizada = false;
Expand Down

0 comments on commit b9f6d9c

Please sign in to comment.