Browse Source

Anadi las tecnicas para la seccion de artesanias (ahora sale para los artesanos seleccionados ahi)

carlos.diaz44 3 years ago
parent
commit
cbd4e2a684
1 changed files with 12 additions and 13 deletions
  1. 12
    13
      www/index.html

+ 12
- 13
www/index.html View File

254
                             //'title':'${Artesano.Nombre}','esp': '${info}'
254
                             //'title':'${Artesano.Nombre}','esp': '${info}'
255
                             //Tries to pass all the info of each artesano into a new page, the page that display this information is 'artesano.html', not to be confused with 'artesanias.html' or 'artesanos.html'(current page)
255
                             //Tries to pass all the info of each artesano into a new page, the page that display this information is 'artesano.html', not to be confused with 'artesanias.html' or 'artesanos.html'(current page)
256
                             //And puts this into the 'item' variable
256
                             //And puts this into the 'item' variable
257
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '' } })" tappable>
257
+                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica 1"]}' } })" tappable>
258
                         <div class="title">${Artesano.Nombre}</div>
258
                         <div class="title">${Artesano.Nombre}</div>
259
                     </ons-list-item>`);
259
                     </ons-list-item>`);
260
 
260
 
394
                                      email = lot[2],
394
                                      email = lot[2],
395
                                      esp = lot[3],
395
                                      esp = lot[3],
396
                                      redes = lot[4],
396
                                      redes = lot[4],
397
-                                     tecnicas = '';
397
+                                     tecnicas = lot[5];
398
 
398
 
399
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
399
+                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
400
                              }
400
                              }
401
 
401
 
402
 
402
 
591
                             }
591
                             }
592
                         }
592
                         }
593
 
593
 
594
+                        if(tecnicas.trim() != ''){
595
+                            if(tecnicas.includes(";", 0)){
596
+                                tecnicas = tecnicas.replace(/;/g,", ");
597
+                                data+='Técnicas que usan: '+tecnicas+'<br>';
598
+                            }
599
+                            else {
600
+                                data+='Técnicas que usan: '+tecnicas+'<br>';
601
+                            }
602
+                        }
594
                         //console.log("Las redes son..."+this.data.redes);
603
                         //console.log("Las redes son..."+this.data.redes);
595
                         //Here it's making sure theres something in municipio and writing their municipio into the page
604
                         //Here it's making sure theres something in municipio and writing their municipio into the page
596
                         if(mun.trim() != ""){
605
                         if(mun.trim() != ""){
640
                             console.log("no tiene nada");
649
                             console.log("no tiene nada");
641
                         }
650
                         }
642
 
651
 
643
-                        if(tecnicas.trim() != ''){
644
-                            if(tecnicas.includes(";", 0)){
645
-                                tecnicas = tecnicas.replace(/;/g,", ");
646
-                                data+='Tecnicas que usan: '+tecnicas+'<br>';
647
-                            }
648
-                            else {
649
-                                data+='Tecnicas que usan: '+tecnicas+'<br>';
650
-                            }
651
-                        }
652
-
653
                         //This is the part that allows eveything (data) to be displayed
652
                         //This is the part that allows eveything (data) to be displayed
654
                         document.getElementById("all").innerHTML = `${data}`;
653
                         document.getElementById("all").innerHTML = `${data}`;
655
 
654