Skip to content
Snippets Groups Projects
Commit b5ab8450 authored by Dante Aléo's avatar Dante Aléo :pouting_cat:
Browse files

Merge branch...

Merge branch '106-fazer-o-prompt-da-geolocalizacao-aparecer-no-android-apenas-ao-clicar-no-botao' into 'development'

Resolve "Fazer o prompt da geolocalização aparecer no android apenas ao clicar no botão"

Closes #106

See merge request !123
parents 9235b236 5060ba09
No related branches found
No related tags found
1 merge request!123Resolve "Fazer o prompt da geolocalização aparecer no android apenas ao clicar no botão"
......@@ -255,7 +255,6 @@ export class EditMachineComponent implements OnInit {
while(Android.getSign() < 0){}
if ((serial = Android.getResult()) != ""){
alert(serial);
this.machineSerial =serial;
this.searchMachine(this.machineS );
}
......
......@@ -17,7 +17,7 @@
<span class="container search_machine">
<div class="" style="display:flex;">
<div class="container-search" >
<div class="col-12 col-sm-4 container photosS-btn">
<img src="assets/images/{{machineS.imagePath}}" alt="Avatar" class="img"/>
......
......@@ -64,6 +64,14 @@
}
.container-search{
display:flex;
@media screen and (max-width: $break-small) {
display:inline;
}
}
.photos-page {
hyphens: auto;
......@@ -154,20 +162,38 @@
//Card que encapsula a imagem para o resultado de procurar
.photosS-btn {
align-items: center;
background-color: #b0cfed;
padding: 5px;
align-items: center;
background-color: #b0cfed;
padding: 5px;
@media scream and (max-width: $break-large){
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
@media screen and (max-width: $break-small) {
border-top-left-radius: 8px !important;
border-top-right-radius: 8px;
}
}
.text{
float:right;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
background-color: #b0cfed;
@media scream and ( max-width: $break-large){
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
@media screen and (max-width: $break-small) {
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
}
.search{
......
......@@ -86,7 +86,7 @@ export class RegisterEquipmentComponent implements OnInit {
private async valid() {
var v = true
for (let i in this.machineData) {
var x = document.getElementById(i)
if (this.machineData[i] === '') {
......@@ -213,7 +213,7 @@ export class RegisterEquipmentComponent implements OnInit {
this.machineData.image = new File([''], "empty");
this.machineData.imagePath = '';
this.machineData.id = 0;
this._router.navigate(['/edicao-equipamentos'])
},
......@@ -227,10 +227,22 @@ export class RegisterEquipmentComponent implements OnInit {
scanQRCode () {
Android.scanBarcode();
alert(Android.result());
this.machineData.serial_number = Android.result();
var serial;
if (typeof (Android) !== 'undefined'){
Android.scanBarcode();
while(Android.getSign() < 0){}
if ((serial = Android.getResult()) != ""){
alert("Número de Série: " + Android.getResult());
this.machineData.serial_number = Android.getResult();
}
} else {
alert("Disponivel apenas para dispositivos moveis.")
}
}
onFileSelect (event) {
......@@ -243,6 +255,10 @@ export class RegisterEquipmentComponent implements OnInit {
getLocation() {
if (typeof (Android) !== 'undefined'){
Android.geolocationPrompt();
}
console.log("getting location");
var self = this;
......@@ -256,6 +272,7 @@ export class RegisterEquipmentComponent implements OnInit {
navigator.geolocation.getCurrentPosition((position: Position) => {
if (position) {
alert("Preenchendo endereço.");
console.log("Latitude: " + position.coords.latitude +
"Longitude: " + position.coords.longitude);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment