[EDIT] AVACEN MODELO PARA CELULAR

parent cc2da01b
...@@ -62,12 +62,23 @@ ...@@ -62,12 +62,23 @@
"outputHashing": "all" "outputHashing": "all"
}, },
"development": { "development": {
"optimization": false, "baseHref": "",
"extractLicenses": false, "budgets": [
"sourceMap": true {
"type": "initial",
"maximumWarning": "10MB",
"maximumError": "10MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
} }
}, },
"defaultConfiguration": "production" "defaultConfiguration": "development"
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
......
...@@ -6,26 +6,26 @@ ...@@ -6,26 +6,26 @@
<div class="body flex flex-col items-center text-[13px] md:text-[18px] relative mx-2 my-5 pb-5 md:mx-0"> <div class="body flex flex-col items-center text-[13px] md:text-[18px] relative mx-2 my-5 pb-5 md:mx-0">
<div class="flex flex-col items-center text-xs md:text-base mx-2 my-5 pb-5 md:mx-0"> <!--<div class="flex flex-col items-center text-xs md:text-base mx-2 my-5 pb-5 md:mx-0 overflow-x-hidden"> -->
<mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] shadow-xl w-full md:w-[75vw] border-4 border-[#d1d9e6]"> <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[95vw] sm:w-[90vw] md:w-[75vw]">
<mat-card-header class="flex flex-col items-start w-full"> <mat-card-header class="flex flex-col items-start w-full">
<mat-label class="text-base md:text-lg font-bold">DATOS PERSONALES</mat-label> <mat-label class="text-base md:text-lg font-bold">DATOS PERSONALES</mat-label>
</mat-card-header> </mat-card-header>
<mat-card-content class="w-full my-2.5" [formGroup]="datos_personal"> <mat-card-content class="w-full my-2.5" [formGroup]="datos_personal">
<!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------> <!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------>
<div class="flex gap-4 mb-4"> <div class="mb-4">
<mat-form-field class="lg:basis-1/4 sm:basis-2/4" appearance="outline" floatLabel="always"> <mat-form-field class="w-full lg:w-1/4" appearance="outline" floatLabel="always">
<mat-label>Especialidad</mat-label> <mat-label>Especialidad</mat-label>
<mat-select formControlName="tipoCargoPersonal" placeholder="[Seleccionar especialidad]" required> <mat-select formControlName="tipoCargoPersonal" placeholder="[Seleccionar especialidad]" required>
<mat-option *ngFor="let option of this.cargosU_list" [value]="option.cargou"> <mat-option *ngFor="let option of this.cargosU_list" [value]="option.cargou">
{{option.tipocargo}} {{ option.tipocargo }}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="flex flex-row gap-4 mb-4"> <div class="mb-4 flex flex-col gap-2 md:flex-row">
<div class="basis-2/4"> <div class="w-full lg:basis-1/3">
<div class="flex flex-row gap-x-2" *ngFor="let personal of listPersonal"> <div class="" *ngFor="let personal of listPersonal">
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-label>Técnico responsable</mat-label> <mat-label>Técnico responsable</mat-label>
<mat-select formControlName="tecnicoPersonal{{personal.index}}" placeholder="[Seleccionar técnico]" (selectionChange)="onEventoSeleccionTecnico($event,personal)" required> <mat-select formControlName="tecnicoPersonal{{personal.index}}" placeholder="[Seleccionar técnico]" (selectionChange)="onEventoSeleccionTecnico($event,personal)" required>
...@@ -34,16 +34,16 @@ ...@@ -34,16 +34,16 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <!--<mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-label>Especialidad del técnico</mat-label> <mat-label>Especialidad del técnico</mat-label>
<input formControlName="areaPersonal{{personal.index}}" matInput placeholder="[Área designada]" value="" readonly> <input formControlName="areaPersonal{{personal.index}}" matInput placeholder="[Área designada]" value="" readonly>
</mat-form-field> </mat-form-field> -->
</div> </div>
</div> </div>
<div class="basis-2/4"> <div class="basis-2/3">
<!-- agregar botones de agregar o disminuir Tecnico responsable --> <!-- agregar botones de agregar o disminuir Tecnico responsable -->
<div class="flex flex-row items-center gap-x-2"> <div class="flex items-center gap-x-2">
<div class="example-button-container"> <div class="example-button-container">
<button (click)="onEventoAgregarPersonal()" mat-fab> <button (click)="onEventoAgregarPersonal()" mat-fab>
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
...@@ -59,70 +59,67 @@ ...@@ -59,70 +59,67 @@
</div> </div>
</div> </div>
<div class="w-full gap-4 mb-4"> <div class="w-full gap-4 mb-4 flex flex-col lg:flex-row ">
<!-- <div class="basis-3/4"> --> <div class="w-full flex flex-col lg:flex-row lg:basis-2/3 gap-4">
<div class="flex lg:flex-row sm:flex-col gap-x-2"> <mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <mat-label>Zona</mat-label>
<mat-label>Zona</mat-label> <mat-select formControlName="zonaPersonal" placeholder="[Seleccionar zona]" required>
<mat-select formControlName="zonaPersonal" placeholder="[Seleccionar zona]" required> <mat-option *ngFor="let option of this.zona_list" [value]="option.value">
<mat-option *ngFor="let option of this.zona_list" [value]="option.value"> {{option.viewValue}}
{{option.viewValue}} </mat-option>
</mat-option> </mat-select>
</mat-select> </mat-form-field>
</mat-form-field>
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-label>Sede designada</mat-label> <mat-label>Sede designada</mat-label>
<mat-select formControlName="sedePersonal" placeholder="[Seleccionar sede]" required> <mat-select formControlName="sedePersonal" placeholder="[Seleccionar sede]" required>
<mat-option *ngFor="let option of this.listSedesAtencion" [value]="option.value"> <mat-option *ngFor="let option of this.listSedesAtencion" [value]="option.value">
{{option.viewValue}} {{option.viewValue}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-label>Rango de fechas</mat-label> <mat-label>Rango de fechas</mat-label>
<mat-date-range-input [rangePicker]="picker"> <mat-date-range-input [rangePicker]="picker">
<input matStartDate formControlName="minFechaTrabajo" placeholder="Fecha inicial" readonly > <input matStartDate formControlName="minFechaTrabajo" placeholder="Fecha inicial" readonly >
<input matEndDate formControlName="maxFechaTrabajo" placeholder="Fecha Fin" readonly> <input matEndDate formControlName="maxFechaTrabajo" placeholder="Fecha Fin" readonly>
</mat-date-range-input> </mat-date-range-input>
<mat-datepicker-toggle matIconSuffix [for]="picker" [disabled]="datos_personal.controls['minFechaTrabajo'].disabled"></mat-datepicker-toggle> <mat-datepicker-toggle matIconSuffix [for]="picker" [disabled]="datos_personal.controls['minFechaTrabajo'].disabled"></mat-datepicker-toggle>
<mat-date-range-picker #picker></mat-date-range-picker> <mat-date-range-picker #picker></mat-date-range-picker>
</mat-form-field> </mat-form-field>
</div>
<div class="flex-col lg:flex-row lg:basis-1/3 gap-2" [ngStyle]="{ display: mostrarHoras ? 'flex' : 'none' }">
<mat-form-field appearance="outline" floatLabel="always">
<mat-label>Selecciona hora inicio</mat-label>
<input
matInput
[ngxMatTimepicker]="timepicker"
formControlName="minHoraTrabajo"
placeholder="00:00"
/>
<ngx-mat-timepicker-toggle matIconSuffix [for]="timepicker"></ngx-mat-timepicker-toggle>
<ngx-mat-timepicker #timepicker></ngx-mat-timepicker>
</mat-form-field>
<div class="gap-x-2" [ngStyle]="{ display: mostrarHoras ? 'flex' : 'none' }"> <mat-form-field appearance="outline" floatLabel="always">
<mat-form-field class="w-full" appearance="outline" floatLabel="always"> <mat-label>Selecciona hora fin</mat-label>
<mat-label>Selecciona hora inicio</mat-label> <input
<input matInput
matInput [ngxMatTimepicker]="timepicker2"
[ngxMatTimepicker]="timepicker" formControlName="maxHoraTrabajo"
formControlName="minHoraTrabajo" placeholder="00:00"
placeholder="00:00" />
/> <ngx-mat-timepicker-toggle matIconSuffix [for]="timepicker2"></ngx-mat-timepicker-toggle>
<ngx-mat-timepicker-toggle matIconSuffix [for]="timepicker"></ngx-mat-timepicker-toggle> <ngx-mat-timepicker #timepicker2></ngx-mat-timepicker>
<ngx-mat-timepicker #timepicker></ngx-mat-timepicker> </mat-form-field>
</mat-form-field> </div>
<mat-form-field class="w-full" appearance="outline" floatLabel="always">
<mat-label>Selecciona hora fin</mat-label>
<input
matInput
[ngxMatTimepicker]="timepicker2"
formControlName="maxHoraTrabajo"
placeholder="00:00"
/>
<ngx-mat-timepicker-toggle matIconSuffix [for]="timepicker2"></ngx-mat-timepicker-toggle>
<ngx-mat-timepicker #timepicker2></ngx-mat-timepicker>
</mat-form-field>
</div>
</div>
<!--</div>-->
</div> </div>
<!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------> <!------------------------------------------------------------------------- DATOS GENERALES ------------------------------------------------------------------------------>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> <!--</div>-->
<mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[95vw] sm:w-[90vw] md:w-[75vw]"> <mat-card appearance="outlined" class="mt-4 flex flex-col gap-2.5 text-[#222] !shadow-xl w-[95vw] sm:w-[90vw] md:w-[75vw]">
<mat-card-header class="flex flex-col items-start w-full"> <mat-card-header class="flex flex-col items-start w-full">
<mat-label class="text-[1.1em] font-bold"> <mat-label class="text-[1.1em] font-bold">
......
...@@ -128,6 +128,11 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -128,6 +128,11 @@ export class ConformidadComponent implements AfterViewInit {
// VIEWCHILD // VIEWCHILD
//INICIALIZACION DE VARIABLES UTILIZABLES //INICIALIZACION DE VARIABLES UTILIZABLES
t_facturacion_electronica_link = environment.facturacion_electronica_link;
horizon_services_link = environment.horizon_services_link;
ID_CARPETA_DRIVE_LOGISTICA = environment.ID_CARPETA_DRIVE_LOGISTICA;
ID_CARPETA_DRIVE_LOGISTICA_ELECTRICISTA = environment.ID_CARPETA_DRIVE_LOGISTICA_ELECTRICISTA;
ID_CARPETA_DRIVE_LOGISTICA_GASFITERIA = environment.ID_CARPETA_DRIVE_LOGISTICA_GASFITERIA;
opcionEnvironmnet : boolean = environment.isProduction; opcionEnvironmnet : boolean = environment.isProduction;
personal_list: any = []; personal_list: any = [];
...@@ -242,6 +247,13 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -242,6 +247,13 @@ export class ConformidadComponent implements AfterViewInit {
Notiflix.Loading.standard('Inicializando...'); Notiflix.Loading.standard('Inicializando...');
console.log(this.t_facturacion_electronica_link);
console.log(this.horizon_services_link);
console.log(this.ID_CARPETA_DRIVE_LOGISTICA_ELECTRICISTA);
console.log(this.ID_CARPETA_DRIVE_LOGISTICA_GASFITERIA);
console.log(this.ID_CARPETA_DRIVE_LOGISTICA);
const [ const [
personal, personal,
sede, sede,
...@@ -399,7 +411,7 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -399,7 +411,7 @@ export class ConformidadComponent implements AfterViewInit {
//AGREGAR UN TECNICO //AGREGAR UN TECNICO
onEventoAgregarPersonal(){ onEventoAgregarPersonal(){
this.agregarFormControl(this.datos_personal,'tecnicoPersonal'+this.listPersonal.length,new FormControl(null,Validators.required)); this.agregarFormControl(this.datos_personal,'tecnicoPersonal'+this.listPersonal.length,new FormControl(null,Validators.required));
this.agregarFormControl(this.datos_personal,'areaPersonal'+this.listPersonal.length,new FormControl<string>('' ,Validators.required)); //this.agregarFormControl(this.datos_personal,'areaPersonal'+this.listPersonal.length,new FormControl<string>('' ,Validators.required));
this.listPersonal.push({ index: this.listPersonal.length , id: 0 , nombre: '' }); // Agregar uno más this.listPersonal.push({ index: this.listPersonal.length , id: 0 , nombre: '' }); // Agregar uno más
} }
...@@ -418,7 +430,7 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -418,7 +430,7 @@ export class ConformidadComponent implements AfterViewInit {
}else{ }else{
this.listPersonal.pop(); // Eliminar el ultimo elemento del array this.listPersonal.pop(); // Eliminar el ultimo elemento del array
this.removerFormControl(this.datos_personal,'tecnicoPersonal'+this.listPersonal.length); this.removerFormControl(this.datos_personal,'tecnicoPersonal'+this.listPersonal.length);
this.removerFormControl(this.datos_personal,'areaPersonal'+this.listPersonal.length); //this.removerFormControl(this.datos_personal,'areaPersonal'+this.listPersonal.length);
} }
} }
...@@ -428,7 +440,7 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -428,7 +440,7 @@ export class ConformidadComponent implements AfterViewInit {
const codigoPer = event.value; const codigoPer = event.value;
const personal_list = this.personal_list; const personal_list = this.personal_list;
const personal_datos = personal_list.find((item: any) => item.codper === codigoPer); const personal_datos = personal_list.find((item: any) => item.codper === codigoPer);
const areaControl = this.datos_personal.get('areaPersonal'+elemento.index); //const areaControl = this.datos_personal.get('areaPersonal'+elemento.index);
const validarRepetido = this.listPersonal.find((item: any) => item.id === codigoPer && item.index != elemento.index); const validarRepetido = this.listPersonal.find((item: any) => item.id === codigoPer && item.index != elemento.index);
if(validarRepetido){ if(validarRepetido){
...@@ -448,12 +460,12 @@ export class ConformidadComponent implements AfterViewInit { ...@@ -448,12 +460,12 @@ export class ConformidadComponent implements AfterViewInit {
this.listPersonal[elemento.index].id = codigoPer; this.listPersonal[elemento.index].id = codigoPer;
this.listPersonal[elemento.index].nombre = personal_datos.nombre; this.listPersonal[elemento.index].nombre = personal_datos.nombre;
if(Object.keys(personal_datos).length > 0){ /*if(Object.keys(personal_datos).length > 0){
areaControl?.setValue(personal_datos.descargo); areaControl?.setValue(personal_datos.descargo);
}else{ }else{
areaControl?.setValue('Sin Cargo'); areaControl?.setValue('Sin Cargo');
} }
areaControl?.updateValueAndValidity(); areaControl?.updateValueAndValidity();*/
} }
......
export const environment = { export const environment = {
isProduction: true, isProduction: true,
//trismegisto_services_link: 'https://tp-services.sacooliveros.edu.pe',
t_asistencia_rest_link: 'https://tp-rest.sacooliveros.edu.pe', t_asistencia_rest_link: 'https://tp-rest.sacooliveros.edu.pe',
redireccionamiento: 'https://fichaonline.sacooliveros.edu.pe:8000/trismegisto-apis/api/v1', redireccionamiento: 'https://fichaonline.sacooliveros.edu.pe:8000/trismegisto-apis/api/v1',
facturacion_electronica_link: 'https://fichaonline.sacooliveros.edu.pe:8080/FacturacionElectronicaSIIAA', facturacion_electronica_link: 'https://fichaonline.sacooliveros.edu.pe:8080/FacturacionElectronicaSIIAA',
......
export const environment = { export const environment = {
isProduction: false, isProduction: false,
//trismegisto_services_link: 'https://tp-services.sacooliveros.edu.pe',
t_asistencia_rest_link: 'http://localhost:8080/tasistencia-rest',
redireccionamiento: 'https://fichaonline.sacooliveros.edu.pe:8000/trismegisto-apis/api/v1', redireccionamiento: 'https://fichaonline.sacooliveros.edu.pe:8000/trismegisto-apis/api/v1',
t_asistencia_rest_link: 'http://localhost:8080/tasistencia-rest',
//t_asistencia_rest_link: 'https://tp-rest.sacooliveros.edu.pe',
facturacion_electronica_link: 'http://localhost:8080/FacturacionElectronicaSIIAA', facturacion_electronica_link: 'http://localhost:8080/FacturacionElectronicaSIIAA',
//facturacion_electronica_link: 'http://test.sacooliveros.edu.pe:8080/FacturacionElectronicaSIIAAFP',
horizon_services_link: 'http://localhost:8080/trismegisto-api-horizons', horizon_services_link: 'http://localhost:8080/trismegisto-api-horizons',
//horizon_services_link : 'http://test.sacooliveros.edu.pe:8080/trismegisto-api-horizons',
ID_CARPETA_DRIVE_LOGISTICA:'1zYWsmpIAKR6nBmO5dnnBSAHJr81img0s', ID_CARPETA_DRIVE_LOGISTICA:'1zYWsmpIAKR6nBmO5dnnBSAHJr81img0s',
CORREO_DRIVE_LOGISTICA : 'trismegisto.logistica@sacooliveros.edu.pe', CORREO_DRIVE_LOGISTICA : 'trismegisto.logistica@sacooliveros.edu.pe',
opcion : 1, opcion : 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment