Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev -> Test Dec 20 Oculta vigencia component & ajustes mod fuente #306

Merged
merged 4 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/@core/interfaces/fuenteFinanciamientoInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export interface FuenteFinanciamientoInterface {
NumeroDocumento: string;
TipoDocumento: string;
Codigo: string;
/* Rubros: Object; */
Rubros?: Object;
}
4 changes: 2 additions & 2 deletions src/app/@core/interfaces/modificationInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface ModApropiationData {

export interface ModFuenteData {
Tipo: TypeGeneral;
MovimientoOrigen: FuenteFinanciamientoInterface;
MovimientoDestino?: FuenteFinanciamientoInterface;
MovimientoOrigen?: FuenteFinanciamientoInterface;
CuentaCredito?: ArbolRubroApropiacionInterface;
Valor: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<nb-alert status="warning">Modificación de fuentes</nb-alert>
<br>
<nb-tabset *ngIf="!localtabActived || !movAfectation || movAfectation.length === 0" class="basic-op-item">
<nb-tab tabTitle="{{ 'GLOBAL.registro' | translate }}">
<nb-tab tabTitle="{{ 'GLOBAL.registro' | translate }}">
<div class="set-mod-value-container">
<div class="value-registration-item">
<form [formGroup]="modValueForm" class="mod-registration-container form-horizontal">
Expand All @@ -22,28 +22,31 @@
</mat-select>
</mat-form-field>

<mat-form-field class="mod-registration-input-item" *ngIf="selectedType && modTypeSelected" floatLabel="always">
<mat-label>{{'MODIF.fuente_origen' | translate }}</mat-label>
<input matInput placeholder="{{'MODIF.fuente_origen' | translate }}"
formControlName="movimientoOrigen" disabled>
<mat-form-field class="mod-registration-input-item" *ngIf="selectedType && modTypeSelected"
floatLabel="always">
<mat-label>{{'MODIF.fuente_origen' | translate }}</mat-label><b>
<input matInput placeholder="{{'MODIF.fuente_origen' | translate }}" formControlName="movimientoOrigen"
disabled></b>
<span matPrefix><button class="selection-button" mat-button
(click)="sourceSelection('origen')">{{'GLOBAL.seleccionar' | translate }} {{'MODIF.fuente_origen' | translate }}</button></span>
(click)="sourceSelection('origen')">{{'GLOBAL.seleccionar' | translate }}
{{'MODIF.fuente_origen' | translate }}</button></span>
<div class="moneyField" *ngIf="movOrigen"><b>{{'GLOBAL.saldo' | translate }} :
{{movOrigen.ValorActual | currency: "COP":"symbol":"4.2-2":"co"}}</b></div>
</mat-form-field>

<mat-form-field class="mod-registration-input-item" floatLabel="always"
*ngIf="selectedType && modTypeSelected && modTypeSelected['Parametros'] && modTypeSelected['Parametros']['MovimientoDestino']">
<mat-label>{{'MODIF.fuente_destino' | translate }}</mat-label>
<input matInput placeholder="{{'MODIF.fuente_destino' | translate }}"
formControlName="movimientoDestino" disabled>
<span matPrefix><button mat-button
(click)="sourceSelection('destino')">{{'GLOBAL.seleccionar' | translate }} {{'MODIF.fuente_destino' | translate }}</button></span>
<div class="moneyField" *ngIf="movDestino"><b>{{'GLOBAL.saldo' | translate }} :
{{movDestino.ValorActual | currency: "COP":"symbol":"4.2-2":"co"}}</b></div>
<mat-form-field class="mod-registration-input-item" *ngIf="selectedType && modTypeSelected"
floatLabel="always">
<mat-label>{{'MODIF.cuenta_credito' | translate }}</mat-label>
<input matInput placeholder="{{'MODIF.fuente_origen' | translate }}" formControlName="cuentaCredito"
disabled>
<span matPrefix><button mat-button>
{{'GLOBAL.ingreso' | translate }} {{'GLOBAL.relacionado' | translate }} </button> </span>
<div class="moneyField" *ngIf="cuentaCredito"><b>{{'GLOBAL.saldo' | translate }} :
{{cuentaCredito.ValorActual | currency: "COP":"symbol":"4.2-2":"co"}}</b></div>
</mat-form-field>

<mat-form-field class="mod-registration-input-item" *ngIf="selectedType && modTypeSelected" floatLabel="always">

<mat-form-field class="mod-registration-input-item" *ngIf="selectedType && modTypeSelected"
floatLabel="always">
<mat-label>{{'GLOBAL.valor' | translate }}</mat-label>
<input matInput currencyMask type="text" placeholder="{{'GLOBAL.valor' | translate }}"
class="moneyField" formControlName="value" />
Expand All @@ -56,38 +59,83 @@
</form>
</div>
<div class="tree-view-item" *ngIf="showMovSelection">
<ngx-list-fuente
(fuenteSeleccionada)="selectFuenteElemntEvent($event)"
[viewItemSelected]="viewItemSelected">
<ngx-list-fuente (fuenteSeleccionada)="selectFuenteElemntEvent($event)"
[viewItemSelected]="viewItemSelected">
</ngx-list-fuente>
</div>
<div *ngIf="desfaseSaldo > 0"> <nb-alert outline="danger">{{ infoSaldoSuperado}} {{desfaseSaldo}}</nb-alert> </div>
<div *ngIf="desfaseSaldo > 0">
<nb-alert outline="danger">{{ infoSaldoSuperado}} {{desfaseSaldo| currency: "COP":"symbol":"4.2-2":"co"}}
</nb-alert>
</div>
</div>
</nb-tab>
</nb-tabset>
<nb-tabset class="basic-op-item" *ngIf="localtabActived && movAfectation && movAfectation.length > 0">
<nb-tab tabTitle="{{ 'GLOBAL.resumen' | translate }}" >
<ngx-show-modification-fuente [(afectationData)]="movAfectation"
(afectationDataChange)="getDataEvent(false)"></ngx-show-modification-fuente>
</nb-tab>
</nb-tabset>
</nb-card-body>
<nb-tabset class="basic-op-item" *ngIf="viewMovAuxActived && movAfectation && movAfectation.length > 0">
<nb-tab tabTitle="{{ 'MODIF.distribuir_rubros' | translate }}">
<form [formGroup]="modDinamicValueForm" class="mod-registration-container form-horizontal">
<div *ngFor="let rubroGasto of rubrosPlanAdquisicionFuente; let i = index">
<nb-checkbox formControlName="numberOfRubro" status="warning"
(checkedChange)="checkedGasto($event,rubroGasto, i)">{{rubroGasto.rubro}}</nb-checkbox>
</div>
<div class="row">
<div class="col-12" formArrayName="rubros_array">
<div class="row" *ngFor="let gasto of target.controls; let i = index" [formGroup]="gasto">
<mat-form-field class="col-12" floatLabel="always">
<mat-label>{{'MODIF.cuenta_credito' | translate }}</mat-label>
<b>
<input matInput placeholder="{{'MODIF.cuenta_credito' | translate }}"
formControlName="cuentaCredito" disabled></b>
<div class="moneyField">{{'GLOBAL.saldo_rubro' | translate }}<b>
<input currencyMask matInput placeholder="{{'GLOBAL.saldo' | translate }}"
formControlName="valorActual" disabled></b>
</div>
</mat-form-field>
<mat-form-field class="col-12" floatLabel="always">
<mat-label>{{'GLOBAL.valor' | translate }}</mat-label>
<input matInput currencyMask type="text" placeholder="{{'GLOBAL.valor' | translate }}"
class="moneyField" formControlName="value" />
</mat-form-field>
<div class="moneyField col-12">
<button mat-button class="mod-registration-input-item button-success" type="submit"
(click)="addModRbToList(gasto.value)" [disabled]="!modDinamicValueForm.valid">
{{ "GLOBAL.agregar" | translate }}
</button>
</div>
</div>
</div>
<div class="col-12">
<nb-alert class="moneyField" outline="success">{{ 'FUENTE_FINANCIAMIENTO.saldo_restante_mov' | translate}}
{{totalCurrentMov| currency: "COP":"symbol":"4.2-2":"co"}}</nb-alert>
</div>
</div>
</form>
</nb-tab>
</nb-tabset>
<nb-tabset class="basic-op-item" *ngIf="localtabActived && movAfectation && movAfectation.length > 0">
<nb-tab tabTitle="{{ 'GLOBAL.resumen' | translate }}">
<ngx-show-modification-fuente [(afectationData)]="movAfectation" (afectationDataChange)="getDataEvent(false)">
</ngx-show-modification-fuente>
</nb-tab>
</nb-tabset>
</nb-card-body>
<nb-card-footer>
<div class="float-md-left">
<button *ngIf="localtabActived && movAfectation && movAfectation.length > 0" (click)="returnToAdd()" class="btn btn-info btn-sm next-button-item"> <i class="nb-arrow-dropleft"></i>
<button *ngIf="localtabActived && movAfectation && movAfectation.length > 0" (click)="returnToAdd()"
class="btn btn-info btn-sm next-button-item"> <i class="nb-arrow-dropleft"></i>
{{
"GLOBAL.volver_registro" | translate
}}</button>
<button *ngIf="!localtabActived && movAfectation && movAfectation.length > 0" (click)="returnToResume()"
class="btn btn-info btn-sm next-button-item"> <i class="nb-arrow-dropright"></i>
{{
"GLOBAL.volver_registro" | translate
}}</button>
<button *ngIf="!localtabActived && movAfectation && movAfectation.length > 0" (click)="returnToResume()" class="btn btn-info btn-sm next-button-item"> <i class="nb-arrow-dropright"></i>
{{
"GLOBAL.resumen" | translate
}}</button>
</div>
<div class="float-md-right">
<button *ngIf="localtabActived && movAfectation && movAfectation.length > 0" class="btn btn-success btn-sm next-button-item"
(click)="getDataEvent(true)">
{{ "GLOBAL.siguiente" | translate }}
</button>
</div>
</div>
<div class="float-md-right">
<button *ngIf="localtabActived && movAfectation && movAfectation.length > 0"
class="btn btn-success btn-sm next-button-item" (click)="getDataEvent(true)">
{{ "GLOBAL.siguiente" | translate }}
</button>
</div>
</nb-card-footer>
</nb-card>
Loading