Skip to content
Snippets Groups Projects
register-equipment.component.html 6.82 KiB
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">

Your Name's avatar
Your Name committed
		<!--<div class="d-none d-sm-block col-md-1"></div>-->
		<div class="mx-auto col-12 col-md-6 blank-square">

                <form #form="ngForm" (ngSubmit)="onSubmit(form.value)">
bruna.c's avatar
bruna.c committed

                    <h2>Dados da máquina</h2>
                    <!-- Número de série e Sala -->
                    <div class="row">
bruna.c's avatar
bruna.c committed

                        <div class="text-input">
Your Name's avatar
Your Name committed
                            Número de série: 
                            <!--<span style="color:red; display: none;" id="serial_number_error_msg">*</span>-->
                            <div><input type="text" name="serial_number" [(ngModel)]="machineData.serial_number" id="serial_number"></div>
                          </div>

                          <div class="text-input">
                            Sala:
Your Name's avatar
Your Name committed
                            <div><input type="text" name="room" [(ngModel)]="machineData.room" id="room"></div>
bruna.c's avatar
bruna.c committed

bruna.c's avatar
bruna.c committed

                    <!-- Data da última manutenção e próxima manutenção -->
                    <div class="row">
                      <div class="text-input">
                        Data da última manutenção:
Your Name's avatar
Your Name committed
													<input type="text" name="date_last_maintenance_day" size="2" [(ngModel)]="machineData.date_last_maintenance.day" id="date_last_maintenance_day">
Your Name's avatar
Your Name committed
													<input type="text" name="date_last_maintenance_month" size="2" [(ngModel)]="machineData.date_last_maintenance.month" id="date_last_maintenance_month">
Your Name's avatar
Your Name committed
													<input type="text" name="date_last_maintenance_year" size="4" [(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 class="text-input">
                        Data da próxima manutenção:
Your Name's avatar
Your Name committed
													<input type="text" name="date_next_maintenance_day" size="2" [(ngModel)]="machineData.date_next_maintenance.day" id="date_next_maintenance_day">
Your Name's avatar
Your Name committed
													<input type="text" name="date_next_maintenance_month" size="2" [(ngModel)]="machineData.date_next_maintenance.month" id="date_next_maintenance_month">
Your Name's avatar
Your Name committed
													<input type="text" name="date_next_maintenance_year" size="4" [(ngModel)]="machineData.date_next_maintenance.year" id="date_next_maintenance_year">
                          <p style="color:red; font-size: small; display:none;" id="date_next_maintenance_error_msg">Data inválida</p> 
                    <!-- Estado da máquina -->
bruna.c's avatar
bruna.c committed
                   <div class="row">
                      <div class="text-input">
                          Estado da máquina:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="Status" [(ngModel)]="machineData.Status" id="Status"></div>
bruna.c's avatar
bruna.c committed

                   <h2>Endereço</h2>

                   <!-- Rua e Número -->
bruna.c's avatar
bruna.c committed
                   <div class="row">
                      <div class="text-input">
                          Rua:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="address" [(ngModel)]="machineData.address" id="address"></div>
                      </div>
                      <div class="text-input">
                          Número:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="address_number" [(ngModel)]="machineData.address_number" id="address_number"></div>
                    <!-- Bairro e cidade -->
bruna.c's avatar
bruna.c committed
                   <div class="row">
                      <div class="text-input">
                          Bairro:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="district" [(ngModel)]="machineData.district" id="district"></div>
                      </div>
                      <div class="text-input">
                          Cidade:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="city" [(ngModel)]="machineData.city" id="city"></div>
bruna.c's avatar
bruna.c committed
                   <div class="row">
                      <div class="text-input">
                          Estado:
Your Name's avatar
Your Name committed
                          <div><input type="text" name="state" [(ngModel)]="machineData.state" id="state"></div>

                    <!-- Botão de QR code -->
                    <div class="row">
                      <label class="options">
                        <div (click)="scanQRCode()">Escanear QR code</div>
bruna.c's avatar
bruna.c committed
                      </label>

                      <!-- Botão upload imagem -->
Your Name's avatar
Your Name committed
                      <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>

bruna.c's avatar
bruna.c committed
											<label class="options">
                        <div (click)="getLocation()">Geolocalização</div>
                      </label>

                      <!--
                      <div class="input-group custom-file">
                        <input type="file" name="image" class="options" (change)="onFileSelect($event)">
                      </div>
                    </div>-->
Your Name's avatar
Your Name committed
                    </div>
                    <div class="row">
                      <label class="selected-image">Imagem selecionada: 
                        <p style="display: inline;" id="selected_file">{{machineData.image.name}}</p>
                      </label>
                    <!-- Botão submit  -->
                      <button type="submit" class="submit-button">Confirmar</button>

        <div class="d-none d-sm-block col-md-1"></div>
bruna.c's avatar
bruna.c committed
</section>