Newer
Older
<!-- This file is part of the project Pinsis-Portal.
Copyright (C),2018, by C3SL(Centro de Computação Científica e
Software Live)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<section class="register-page" lang="pt">
<div class="row">
<div class="mx-auto col-12 col-md-6 blank-square">
<form #form="ngForm" (ngSubmit)="onSubmit(form.value)">
<h2>Dados da máquina</h2>
<div class="text-input">
<div style="display: block;">Número de série: </div>
<input type="text" name="serial_number" [(ngModel)]="machineData.serial_number" id="serial_number">
</div>
<div class="text-input">
<div style="display: block;">Sala:</div>
<div><input type="text" name="room" [(ngModel)]="machineData.room" id="room"></div>
</div>
<div class="text-input">
<div style="display: block;">Data da última manutenção:</div>
<div>
<input type="text" name="date_last_maintenance_day" size="2" style="width:auto" [(ngModel)]="machineData.date_last_maintenance.day" id="date_last_maintenance_day">
<input type="text" name="date_last_maintenance_month" size="2" style="width:auto" [(ngModel)]="machineData.date_last_maintenance.month" id="date_last_maintenance_month">
<input type="text" name="date_last_maintenance_year" size="4" style="width:auto" [(ngModel)]="machineData.date_last_maintenance.year" id="date_last_maintenance_year">
<p style="color:red; font-size: small; display:none;" id="date_last_maintenance_error_msg">Data inválida</p>
</div>
</div>
<div class="text-input">
<div style="display: block;">Data da próxima manutenção:</div>
<div>
<input type="text" name="date_next_maintenance_day" size="2" style="width:auto" [(ngModel)]="machineData.date_next_maintenance.day" id="date_next_maintenance_day">
<input type="text" name="date_next_maintenance_month" size="2" style="width:auto" [(ngModel)]="machineData.date_next_maintenance.month" id="date_next_maintenance_month">
<input type="text" name="date_next_maintenance_year" size="4" style="width:auto" [(ngModel)]="machineData.date_next_maintenance.year" id="date_next_maintenance_year">
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<p style="color:red; font-size: small; display:none;" id="date_next_maintenance_error_msg">Data inválida</p>
</div>
</div>
<div class="text-input">
<div style="display: block;">Estado da máquina:</div>
<input type="text" name="Status" [(ngModel)]="machineData.Status" id="Status">
</div>
<h2>Endereço</h2>
<div class="text-input">
<div style="display: block;">Rua:</div>
<input type="text" name="address" [(ngModel)]="machineData.address" id="address">
</div>
<div class="text-input">
<div style="display: block;">Número:</div>
<input type="text" name="address_number" [(ngModel)]="machineData.address_number" id="address_number">
</div>
<div class="text-input">
<div style="display: block;">Bairro:</div>
<input type="text" name="district" [(ngModel)]="machineData.district" id="district">
</div>
<div class="text-input">
<div style="display: block;">Cidade:</div>
<input type="text" name="city" [(ngModel)]="machineData.city" id="city">
</div>
<div class="text-input">
<div style="display: block;">Estado:</div>
<input type="text" name="state" [(ngModel)]="machineData.state" id="state">
</div>
<div>
<label class="options">
<div (click)="scanQRCode()">Escanear QR code</div>
</label>
<label class="options" style="border-color: #ff0000;" id="image_upload_button">
Adicionar Imagem <input type="file" name="image" (change)="onFileSelect($event)" style="display: none;">
</label>
<label class="options">
<div (click)="getLocation()">Geolocalização</div>
</label>
</div>
<div>
<label class="selected-image">Imagem selecionada:
<p style="display: inline;" id="selected_file">{{machineData.image.name}}</p>
</label>
<!-- Botão submit -->
<button type="submit" align="right" class="submit-button">Confirmar</button>
</div>
</form>
<div class="d-none d-sm-block col-md-1"></div>