Skip to content

Commit

Permalink
ars jira estable
Browse files Browse the repository at this point in the history
  • Loading branch information
llvllariox committed Jun 29, 2022
1 parent 422e536 commit 967a8f0
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .firebase/hosting.ZGlzdFxtYXBhcw.cache
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ assets/js/bootstrap.min.js.map,1656429597377,043d6638bd3f6dac7e56e7a0b1e3c8839bf
assets/js/custom.js,1656429597378,2c23ced121b226086300ccb603696d161343648014abe38030e9a9c0e8801108
assets/js/jquery-3.4.1.slim.min.js,1656429597378,c354e7944c61e501036fd2ce9ad8aec5015a3a231cca6ef67b12461fc5fa0060
assets/js/popper.min.js,1656429597379,f0e94fefea660260a1fa18d4a9cfe294f61841037adb42e3fe1aad1d2d2b4b45
735.d6a4e98f0d660d79.js,1656514777343,b75869434a9842d2b7da5b091ce263fb1815a32d2992541d0527571d5e0e9c9a
index.html,1656514777757,cd0c1d8a0c9a23277d00d7fc705aac9d7b2bc996e8d067a5bc2638a3f47546b8
3rdpartylicenses.txt,1656514777344,4be780a669b78ae6d9ad019e8b1cac64718ef8bcedbea2bed7d4c66705fe9c71
runtime.ab5517e2b0b6d4e8.js,1656514777333,8403bcc40965b81916e42022611b0e14d88170c914fafdabd9d20d414c53ebc3
styles.a40abe86a08f7e00.css,1656514777333,dfcaaef9f6e1a209b129afae9ed48318091d4c1d6d63c30553f70899eaf29786
polyfills.866e92911208a092.js,1656514777333,2d8b240969aed550dc9afaa4838f1fdb4ed5a4bb7b31796ba7bf5e8d9de54fdf
399.cac8b4185ba8f705.js,1656514777344,83360e97fe232a0c1242c183e379cd92b6b0bd221e9a92dcc59a3c51d7a16943
159.9dab8dba1ed7393c.js,1656514777334,b227e357b7d6e03b42f5f441d2f30452a7a5d606dedc46bc45b8638a57c91abc
main.7abefa7204616012.js,1656514777333,29c4d001ffb2f4e2447d75b5952e356ea606964ebbd003ac150f3542697fb425
735.d6a4e98f0d660d79.js,1656515825059,b75869434a9842d2b7da5b091ce263fb1815a32d2992541d0527571d5e0e9c9a
3rdpartylicenses.txt,1656515825068,4be780a669b78ae6d9ad019e8b1cac64718ef8bcedbea2bed7d4c66705fe9c71
index.html,1656515825479,861acd8e28b635d5445780dbdb9e50b1ad1eefff2c4b05508a9630d3a72760bb
runtime.ab5517e2b0b6d4e8.js,1656515825059,8403bcc40965b81916e42022611b0e14d88170c914fafdabd9d20d414c53ebc3
styles.a40abe86a08f7e00.css,1656515825059,dfcaaef9f6e1a209b129afae9ed48318091d4c1d6d63c30553f70899eaf29786
polyfills.866e92911208a092.js,1656515825058,2d8b240969aed550dc9afaa4838f1fdb4ed5a4bb7b31796ba7bf5e8d9de54fdf
399.cac8b4185ba8f705.js,1656515825069,83360e97fe232a0c1242c183e379cd92b6b0bd221e9a92dcc59a3c51d7a16943
159.9dab8dba1ed7393c.js,1656515825068,b227e357b7d6e03b42f5f441d2f30452a7a5d606dedc46bc45b8638a57c91abc
main.d26cde825a23de88.js,1656515825058,d0cb06561010f99f0495350ee2a843c920f235e8b565068783c1371c29eb3b72
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ export class GenerarArsGfacComponent implements OnInit {
const data = reader.result;

workBook = XLSX.read(data, { type: 'binary', cellDates: true });
// if (workBook.SheetNames[0] !== 'Detalle Tareas'){
// this.estadoTar = 4;
// this.sweetAlerService.mensajeError('Archivo Invalido', 'El archivo seleccionado no corresponde a Tareas');
// this.jsonDataTar = null;
// return;
// }
if (workBook.SheetNames[0] !== 'Sheet0'){
this.estadoTar = 4;
this.sweetAlerService.mensajeError('Archivo Invalido', 'El archivo seleccionado no corresponde a Tareas');
this.jsonDataTar = null;
return;
}
this.jsonDataTar = workBook.SheetNames.reduce((initial, name) => {

const sheet = workBook.Sheets[name];
Expand Down
24 changes: 24 additions & 0 deletions src/app/components/ver-ars-jira/ver-ars-jira.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@
<!-- <td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{req.jira.fechaDeInicio|fechas}}</td> -->
<!-- <td class="small text-dark text-left" scope="col" style="width: 350px;text-overflow: ellipsis;">{{req.descripcion}}</td> -->
</tr>
<tr *ngFor="let jira of arsJiraService.jsonDataJiraSinArsService; let i = index" class="" style="background-color: rgb(255, 255, 255)">

<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<!-- <td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td> -->
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">-</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{jira.tipoDeIncidencia}}</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{jira.clave}}</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{jira.responsable}}</td>
<td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{jira.estado}}</td>
<!-- <td class="small text-dark text-left" scope="col" style="width: 50px;text-overflow: ellipsis;">{{req.jira.fechaDeInicio|fechas}}</td> -->
<!-- <td class="small text-dark text-left" scope="col" style="width: 350px;text-overflow: ellipsis;">{{req.descripcion}}</td> -->
</tr>

</tbody>
</table>
Expand Down
60 changes: 58 additions & 2 deletions src/app/components/ver-ars-jira/ver-ars-jira.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class VerArsJiraComponent implements OnInit {

// Se establecen anchos de las columnas
worksheet.getColumn(1).width = 19;
worksheet.getColumn(2).width = 85;
worksheet.getColumn(2).width = 60;
worksheet.getColumn(3).width = 15;
worksheet.getColumn(4).width = 14;
worksheet.getColumn(5).width = 16;
Expand All @@ -48,6 +48,15 @@ export class VerArsJiraComponent implements OnInit {
worksheet.getColumn(17).width = 50;
worksheet.getColumn(18).width = 24;

worksheet.autoFilter = {
from: 'A1',
to: 'R1',
}

worksheet.views = [
{state: 'frozen', xSplit: 2, ySplit: 1}
];

const headerCS = [
'Nro. Requerimiento','Descripción','Etapa','Estado','Línea de Servicio','Origen',
'Solicitante','Código Externo','Req. Origen','Responsable ARS','Fecha Recepción',
Expand Down Expand Up @@ -97,6 +106,7 @@ export class VerArsJiraComponent implements OnInit {

]);


// row.getCell(2).style = {numFmt: '#,##0.00'};
// row.getCell(3).style = {numFmt: '#,##0.00'};
row.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
Expand All @@ -120,7 +130,53 @@ export class VerArsJiraComponent implements OnInit {


});



//se muestran JIRA sin ARS
this.arsJiraService.jsonDataJiraSinArsService.forEach(d => {
let row = worksheet.addRow([
'-' ,
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
'-',
d.tipoDeIncidencia,
d.clave,
d.responsable,
d.estado

]);
row.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(2).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(3).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(4).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(5).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(6).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(7).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(8).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(9).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(10).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(11).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(12).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(13).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(14).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(15).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(16).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(17).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
row.getCell(18).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };


});

workbook.xlsx.writeBuffer().then((data) => {
let blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
fs.saveAs(blob, `ARS-JIRA_${this.hoy}.xlsx`);
Expand Down
42 changes: 42 additions & 0 deletions src/app/services/ars-jira.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class ArsJiraService {
jsonDataReqService;
jsonDataJiraService;
jsonDataHitosService;
jsonDataJiraSinArsService;
infoCargada = false;
conFact = true;
fechaInformes: string;
Expand Down Expand Up @@ -43,6 +44,7 @@ export class ArsJiraService {

console.log('ARS-JIRA SERVICE');
this.AddJiraToReq();
this.buscarJiraSinARS();
console.log(this.jsonDataReqService);
console.log(this.jsonDataJiraService);

Expand Down Expand Up @@ -88,4 +90,44 @@ export class ArsJiraService {
}

}

buscarJiraSinARS() {

let JiraSinARS = [];
for (let jira of this.jsonDataJiraService.Sheet0) {
let req = [];
req = this.jsonDataReqService.Requerimientos.find((e) => e.codigoExterno === jira.clave);

if(req){
// console.log('existe ', req);
}else{
// console.log('no existe ', jira.clave);
JiraSinARS.push(jira);
}


}
console.log(JiraSinARS);
// JiraSinARS.filter(x => x !== '')
this.jsonDataJiraSinArsService = JiraSinARS.slice(1);
console.log(this.jsonDataJiraSinArsService);

// // se agregan JIRA a los requerimientos como un arreglo
// let x = 0;
// // tslint:disable-next-line: prefer-const

// for (let jira of this.jsonDataJiraService.Sheet0) {


// for (let req of this.jsonDataReqService.Requerimientos) {

// if (req.codigoExterno === jira.clave) {
// console.log('existe' + req.codigoExterno );
// }
// }
// if ()
// x++;
// }

}
}

0 comments on commit 967a8f0

Please sign in to comment.