ecra principal
This commit is contained in:
8
.idea/appInsightsSettings.xml
generated
8
.idea/appInsightsSettings.xml
generated
@@ -22,10 +22,10 @@
|
|||||||
<InsightsFilterSettings>
|
<InsightsFilterSettings>
|
||||||
<option name="connection">
|
<option name="connection">
|
||||||
<ConnectionSetting>
|
<ConnectionSetting>
|
||||||
<option name="appId" value="PLACEHOLDER" />
|
<option name="appId" value="com.example.pap_teste" />
|
||||||
<option name="mobileSdkAppId" value="" />
|
<option name="mobileSdkAppId" value="1:476421715902:android:4147ab5f1cde601e1aebef" />
|
||||||
<option name="projectId" value="" />
|
<option name="projectId" value="namesa-429c1" />
|
||||||
<option name="projectNumber" value="" />
|
<option name="projectNumber" value="476421715902" />
|
||||||
</ConnectionSetting>
|
</ConnectionSetting>
|
||||||
</option>
|
</option>
|
||||||
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
<option name="signal" value="SIGNAL_UNSPECIFIED" />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
|
alias(libs.plugins.google.services)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -37,6 +38,9 @@ dependencies {
|
|||||||
implementation(libs.material)
|
implementation(libs.material)
|
||||||
implementation(libs.activity)
|
implementation(libs.activity)
|
||||||
implementation(libs.constraintlayout)
|
implementation(libs.constraintlayout)
|
||||||
|
implementation(platform(libs.firebase.bom))
|
||||||
|
implementation("com.google.firebase:firebase-firestore")
|
||||||
|
implementation("com.google.firebase:firebase-auth")
|
||||||
testImplementation(libs.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(libs.ext.junit)
|
androidTestImplementation(libs.ext.junit)
|
||||||
androidTestImplementation(libs.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
|||||||
@@ -11,6 +11,16 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Pap_teste">
|
android:theme="@style/Theme.Pap_teste">
|
||||||
|
<activity
|
||||||
|
android:name=".DetalhesReservasActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:label="Detalhes das reservas"
|
||||||
|
android:theme="@style/Theme.Pap_teste" />
|
||||||
|
<activity
|
||||||
|
android:name=".GerirMesasActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:label="Editar mesas"
|
||||||
|
android:theme="@style/Theme.Pap_teste" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".EstablishmentDashboardActivity"
|
android:name=".EstablishmentDashboardActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
@@ -66,6 +76,11 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="Partilhar reserva"
|
android:label="Partilhar reserva"
|
||||||
android:theme="@style/Theme.Pap_teste" />
|
android:theme="@style/Theme.Pap_teste" />
|
||||||
|
<activity
|
||||||
|
android:name=".AccountCreatedActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:label="Conta criada"
|
||||||
|
android:theme="@style/Theme.Pap_teste" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class BloqueioHorarioActivity extends AppCompatActivity {
|
public class BloqueioHorarioActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class BloqueioHorarioActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class CheckInAntecipadoActivity extends AppCompatActivity {
|
public class CheckInAntecipadoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class CheckInAntecipadoActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,18 @@ public class ClientDashboardActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
TextView txtGreeting = findViewById(R.id.txtClientGreeting);
|
TextView txtGreeting = findViewById(R.id.txtClientGreeting);
|
||||||
TextView txtStatus = findViewById(R.id.txtClientStatus);
|
TextView txtStatus = findViewById(R.id.txtClientStatus);
|
||||||
|
TextView txtRole = findViewById(R.id.txtClientRole);
|
||||||
TextView txtReservationStatus = findViewById(R.id.txtReservationStatus);
|
TextView txtReservationStatus = findViewById(R.id.txtReservationStatus);
|
||||||
TextView txtReservationSubtitle = findViewById(R.id.txtReservationSubtitle);
|
TextView txtReservationSubtitle = findViewById(R.id.txtReservationSubtitle);
|
||||||
|
Button btnBack = findViewById(R.id.btnVoltar);
|
||||||
|
|
||||||
String actionMode = getIntent().getStringExtra(MainActivity.EXTRA_ACTION_MODE);
|
String actionMode = getIntent().getStringExtra(MainActivity.EXTRA_ACTION_MODE);
|
||||||
String displayName = getIntent().getStringExtra(MainActivity.EXTRA_DISPLAY_NAME);
|
String displayName = getIntent().getStringExtra(MainActivity.EXTRA_DISPLAY_NAME);
|
||||||
|
String role = getIntent().getStringExtra(MainActivity.EXTRA_ROLE);
|
||||||
|
|
||||||
boolean isNewAccount = "CRIAR".equalsIgnoreCase(actionMode);
|
boolean isNewAccount = "CRIAR".equalsIgnoreCase(actionMode);
|
||||||
txtGreeting.setText(String.format("Olá, %s", displayName != null ? displayName : "convidado"));
|
txtGreeting.setText(String.format("Olá, %s", displayName != null ? displayName : "convidado"));
|
||||||
|
txtRole.setText(String.format("Função: %s", role != null ? role : "CLIENTE"));
|
||||||
txtStatus.setText(isNewAccount
|
txtStatus.setText(isNewAccount
|
||||||
? "Conta criada com sucesso! Configure as suas preferências para começarmos."
|
? "Conta criada com sucesso! Configure as suas preferências para começarmos."
|
||||||
: "Bom tê-lo de volta! Já deixámos tudo pronto para a sua próxima reserva.");
|
: "Bom tê-lo de volta! Já deixámos tudo pronto para a sua próxima reserva.");
|
||||||
@@ -67,6 +71,10 @@ public class ClientDashboardActivity extends AppCompatActivity {
|
|||||||
btnShare.setOnClickListener(v ->
|
btnShare.setOnClickListener(v ->
|
||||||
startActivity(new Intent(this, PartilharReservaActivity.class))
|
startActivity(new Intent(this, PartilharReservaActivity.class))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (btnBack != null) {
|
||||||
|
btnBack.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mantemos este método caso seja útil no futuro para feedback rápido.
|
// Mantemos este método caso seja útil no futuro para feedback rápido.
|
||||||
|
|||||||
@@ -26,12 +26,15 @@ public class EstablishmentDashboardActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
TextView txtTitle = findViewById(R.id.txtEstabTitle);
|
TextView txtTitle = findViewById(R.id.txtEstabTitle);
|
||||||
TextView txtSubtitle = findViewById(R.id.txtEstabSubtitle);
|
TextView txtSubtitle = findViewById(R.id.txtEstabSubtitle);
|
||||||
|
TextView txtRole = findViewById(R.id.txtEstabRole);
|
||||||
|
|
||||||
String actionMode = getIntent().getStringExtra(MainActivity.EXTRA_ACTION_MODE);
|
String actionMode = getIntent().getStringExtra(MainActivity.EXTRA_ACTION_MODE);
|
||||||
String displayName = getIntent().getStringExtra(MainActivity.EXTRA_DISPLAY_NAME);
|
String displayName = getIntent().getStringExtra(MainActivity.EXTRA_DISPLAY_NAME);
|
||||||
|
String role = getIntent().getStringExtra(MainActivity.EXTRA_ROLE);
|
||||||
|
|
||||||
boolean isNewAccount = "CRIAR".equalsIgnoreCase(actionMode);
|
boolean isNewAccount = "CRIAR".equalsIgnoreCase(actionMode);
|
||||||
txtTitle.setText(displayName != null ? displayName : "Estabelecimento");
|
txtTitle.setText(displayName != null ? displayName : "Estabelecimento");
|
||||||
|
txtRole.setText(String.format("Função: %s", role != null ? role : "ADMIN"));
|
||||||
txtSubtitle.setText(isNewAccount
|
txtSubtitle.setText(isNewAccount
|
||||||
? "Perfil criado. Configure horários, mesas e abra reservas."
|
? "Perfil criado. Configure horários, mesas e abra reservas."
|
||||||
: "Dashboard operacional. Acompanhe as reservas em tempo real.");
|
: "Dashboard operacional. Acompanhe as reservas em tempo real.");
|
||||||
@@ -40,6 +43,9 @@ public class EstablishmentDashboardActivity extends AppCompatActivity {
|
|||||||
Button btnBlockTime = findViewById(R.id.btnCriarBloqueio);
|
Button btnBlockTime = findViewById(R.id.btnCriarBloqueio);
|
||||||
Button btnStaff = findViewById(R.id.btnGestaoStaff);
|
Button btnStaff = findViewById(R.id.btnGestaoStaff);
|
||||||
Button btnReports = findViewById(R.id.btnVerRelatorios);
|
Button btnReports = findViewById(R.id.btnVerRelatorios);
|
||||||
|
Button btnGerirMesas = findViewById(R.id.btnGerirMesas);
|
||||||
|
Button btnDetalhesReservas = findViewById(R.id.btnDetalhesReservas);
|
||||||
|
Button btnBack = findViewById(R.id.btnVoltar);
|
||||||
|
|
||||||
btnOpenWalkIns.setOnClickListener(v ->
|
btnOpenWalkIns.setOnClickListener(v ->
|
||||||
startActivity(new Intent(this, ListaEsperaActivity.class))
|
startActivity(new Intent(this, ListaEsperaActivity.class))
|
||||||
@@ -56,6 +62,18 @@ public class EstablishmentDashboardActivity extends AppCompatActivity {
|
|||||||
btnReports.setOnClickListener(v ->
|
btnReports.setOnClickListener(v ->
|
||||||
startActivity(new Intent(this, RelatoriosActivity.class))
|
startActivity(new Intent(this, RelatoriosActivity.class))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
btnGerirMesas.setOnClickListener(v ->
|
||||||
|
startActivity(new Intent(this, GerirMesasActivity.class))
|
||||||
|
);
|
||||||
|
|
||||||
|
btnDetalhesReservas.setOnClickListener(v ->
|
||||||
|
startActivity(new Intent(this, DetalhesReservasActivity.class))
|
||||||
|
);
|
||||||
|
|
||||||
|
if (btnBack != null) {
|
||||||
|
btnBack.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mantemos este método caso seja útil no futuro para feedback rápido.
|
// Mantemos este método caso seja útil no futuro para feedback rápido.
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class ExplorarRestaurantesActivity extends AppCompatActivity {
|
public class ExplorarRestaurantesActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class ExplorarRestaurantesActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class FavoritosActivity extends AppCompatActivity {
|
public class FavoritosActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class FavoritosActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class GestaoStaffActivity extends AppCompatActivity {
|
public class GestaoStaffActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class GestaoStaffActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class ListaEsperaActivity extends AppCompatActivity {
|
public class ListaEsperaActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class ListaEsperaActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.pap_teste;
|
package com.example.pap_teste;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -15,14 +16,26 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import com.google.firebase.FirebaseApp;
|
||||||
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
|
import com.google.firebase.firestore.FirebaseFirestore;
|
||||||
|
import com.google.firebase.firestore.SetOptions;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
public static final String EXTRA_ACTION_MODE = "extra_action_mode";
|
public static final String EXTRA_ACTION_MODE = "extra_action_mode";
|
||||||
public static final String EXTRA_DISPLAY_NAME = "extra_display_name";
|
public static final String EXTRA_DISPLAY_NAME = "extra_display_name";
|
||||||
public static final String EXTRA_EMAIL = "extra_email";
|
public static final String EXTRA_EMAIL = "extra_email";
|
||||||
|
public static final String EXTRA_ACCOUNT_TYPE = "extra_account_type";
|
||||||
|
public static final String EXTRA_ROLE = "extra_role";
|
||||||
|
private static final String PREFS_NAME = "pap_prefs";
|
||||||
|
private static final String KEY_HAS_CREATED_ACCOUNT = "has_created_account";
|
||||||
|
|
||||||
private enum AccountType {CLIENTE, ESTABELECIMENTO}
|
public enum AccountType {CLIENTE, ESTABELECIMENTO}
|
||||||
private enum AccountAction {ENTRAR, CRIAR}
|
public enum AccountAction {ENTRAR, CRIAR}
|
||||||
|
|
||||||
private AccountType selectedAccountType = AccountType.CLIENTE;
|
private AccountType selectedAccountType = AccountType.CLIENTE;
|
||||||
private AccountAction selectedAccountAction = AccountAction.ENTRAR;
|
private AccountAction selectedAccountAction = AccountAction.ENTRAR;
|
||||||
@@ -35,6 +48,13 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private EditText inputName;
|
private EditText inputName;
|
||||||
private EditText inputEmail;
|
private EditText inputEmail;
|
||||||
private EditText inputPassword;
|
private EditText inputPassword;
|
||||||
|
private EditText inputOwnerPhone;
|
||||||
|
private EditText inputEstablishmentName;
|
||||||
|
private EditText inputEstablishmentEmail;
|
||||||
|
private EditText inputEstablishmentPhone;
|
||||||
|
private boolean hasCreatedAccount;
|
||||||
|
private FirebaseAuth firebaseAuth;
|
||||||
|
private FirebaseFirestore firestore;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -47,10 +67,15 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
FirebaseApp.initializeApp(this);
|
||||||
|
firebaseAuth = FirebaseAuth.getInstance();
|
||||||
|
firestore = FirebaseFirestore.getInstance();
|
||||||
|
|
||||||
bindViews();
|
bindViews();
|
||||||
setupTypeToggle();
|
setupTypeToggle();
|
||||||
setupActionToggle();
|
setupActionToggle();
|
||||||
setupPrimaryAction();
|
setupPrimaryAction();
|
||||||
|
enforceFirstAccountCreation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindViews() {
|
private void bindViews() {
|
||||||
@@ -62,6 +87,10 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
inputName = findViewById(R.id.inputName);
|
inputName = findViewById(R.id.inputName);
|
||||||
inputEmail = findViewById(R.id.inputEmail);
|
inputEmail = findViewById(R.id.inputEmail);
|
||||||
inputPassword = findViewById(R.id.inputPassword);
|
inputPassword = findViewById(R.id.inputPassword);
|
||||||
|
inputOwnerPhone = findViewById(R.id.inputOwnerPhone);
|
||||||
|
inputEstablishmentName = findViewById(R.id.inputEstablishmentName);
|
||||||
|
inputEstablishmentEmail = findViewById(R.id.inputEstablishmentEmail);
|
||||||
|
inputEstablishmentPhone = findViewById(R.id.inputEstablishmentPhone);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupTypeToggle() {
|
private void setupTypeToggle() {
|
||||||
@@ -96,6 +125,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
private void updateTypeButtons() {
|
private void updateTypeButtons() {
|
||||||
setSelectedState(btnCliente, selectedAccountType == AccountType.CLIENTE);
|
setSelectedState(btnCliente, selectedAccountType == AccountType.CLIENTE);
|
||||||
setSelectedState(btnEstabelecimento, selectedAccountType == AccountType.ESTABELECIMENTO);
|
setSelectedState(btnEstabelecimento, selectedAccountType == AccountType.ESTABELECIMENTO);
|
||||||
|
updateInputVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateActionButtons() {
|
private void updateActionButtons() {
|
||||||
@@ -105,44 +135,93 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setSelectedState(Button button, boolean isSelected) {
|
private void setSelectedState(Button button, boolean isSelected) {
|
||||||
|
int selectedTextColor = Color.WHITE;
|
||||||
|
int defaultTextColor = Color.parseColor("#231F1F");
|
||||||
button.setBackgroundResource(isSelected ? R.drawable.tab_selected : R.drawable.tab_unselected);
|
button.setBackgroundResource(isSelected ? R.drawable.tab_selected : R.drawable.tab_unselected);
|
||||||
button.setTextColor(isSelected ? Color.WHITE : Color.parseColor("#00001A"));
|
button.setTextColor(isSelected ? selectedTextColor : defaultTextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePrimaryActionState() {
|
private void updatePrimaryActionState() {
|
||||||
boolean creatingAccount = selectedAccountAction == AccountAction.CRIAR;
|
boolean creatingAccount = selectedAccountAction == AccountAction.CRIAR;
|
||||||
btnPrimaryAction.setText(creatingAccount ? "Criar Conta" : "Entrar");
|
btnPrimaryAction.setText(creatingAccount ? "Criar Conta" : "Entrar");
|
||||||
|
updateInputVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateInputVisibility() {
|
||||||
|
boolean creatingAccount = selectedAccountAction == AccountAction.CRIAR;
|
||||||
|
boolean isEstablishment = selectedAccountType == AccountType.ESTABELECIMENTO;
|
||||||
|
|
||||||
|
inputName.setHint(isEstablishment ? "Nome do proprietário" : "O seu nome");
|
||||||
|
inputEmail.setHint(isEstablishment ? "Email do proprietário" : "Email");
|
||||||
|
|
||||||
inputName.setVisibility(creatingAccount ? View.VISIBLE : View.GONE);
|
inputName.setVisibility(creatingAccount ? View.VISIBLE : View.GONE);
|
||||||
|
inputOwnerPhone.setVisibility(creatingAccount && isEstablishment ? View.VISIBLE : View.GONE);
|
||||||
|
inputEstablishmentName.setVisibility(creatingAccount && isEstablishment ? View.VISIBLE : View.GONE);
|
||||||
|
inputEstablishmentEmail.setVisibility(creatingAccount && isEstablishment ? View.VISIBLE : View.GONE);
|
||||||
|
inputEstablishmentPhone.setVisibility(creatingAccount && isEstablishment ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handlePrimaryAction() {
|
private void handlePrimaryAction() {
|
||||||
String email = inputEmail.getText().toString().trim();
|
String email = inputEmail.getText().toString().trim();
|
||||||
String password = inputPassword.getText().toString().trim();
|
String password = inputPassword.getText().toString().trim();
|
||||||
String providedName = inputName.getText().toString().trim();
|
String providedName = inputName.getText().toString().trim();
|
||||||
|
String ownerPhone = inputOwnerPhone.getText().toString().trim();
|
||||||
|
String establishmentName = inputEstablishmentName.getText().toString().trim();
|
||||||
|
String establishmentEmail = inputEstablishmentEmail.getText().toString().trim();
|
||||||
|
String establishmentPhone = inputEstablishmentPhone.getText().toString().trim();
|
||||||
|
|
||||||
|
if (selectedAccountAction == AccountAction.ENTRAR && !hasCreatedAccount) {
|
||||||
|
Toast.makeText(this, "Crie uma conta para começar a usar a app.", Toast.LENGTH_SHORT).show();
|
||||||
|
selectedAccountAction = AccountAction.CRIAR;
|
||||||
|
updateActionButtons();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
|
if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) {
|
||||||
Toast.makeText(this, "Preencha email e palavra-passe.", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Preencha email e palavra-passe.", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedAccountAction == AccountAction.CRIAR && TextUtils.isEmpty(providedName)) {
|
boolean creatingAccount = selectedAccountAction == AccountAction.CRIAR;
|
||||||
Toast.makeText(this, "Indique o seu nome para criar conta.", Toast.LENGTH_SHORT).show();
|
|
||||||
return;
|
if (creatingAccount) {
|
||||||
|
if (selectedAccountType == AccountType.CLIENTE && TextUtils.isEmpty(providedName)) {
|
||||||
|
Toast.makeText(this, "Indique o seu nome para criar conta.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedAccountType == AccountType.ESTABELECIMENTO) {
|
||||||
|
boolean missingOwner = TextUtils.isEmpty(providedName) || TextUtils.isEmpty(ownerPhone);
|
||||||
|
boolean missingEstablishment = TextUtils.isEmpty(establishmentName)
|
||||||
|
|| TextUtils.isEmpty(establishmentEmail)
|
||||||
|
|| TextUtils.isEmpty(establishmentPhone);
|
||||||
|
|
||||||
|
if (missingOwner || missingEstablishment) {
|
||||||
|
Toast.makeText(this, "Preencha os dados do proprietário e do estabelecimento.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String fallbackName = !TextUtils.isEmpty(providedName) ? providedName : deriveNameFromEmail(email);
|
String fallbackName = !TextUtils.isEmpty(providedName) ? providedName : deriveNameFromEmail(email);
|
||||||
Intent nextScreen;
|
String resolvedRole = getRoleForSelectedType();
|
||||||
|
|
||||||
if (selectedAccountType == AccountType.CLIENTE) {
|
if (creatingAccount) {
|
||||||
nextScreen = new Intent(this, ClientDashboardActivity.class);
|
createAccountInFirebase(
|
||||||
} else {
|
email,
|
||||||
nextScreen = new Intent(this, EstablishmentDashboardActivity.class);
|
password,
|
||||||
|
providedName,
|
||||||
|
ownerPhone,
|
||||||
|
establishmentName,
|
||||||
|
establishmentEmail,
|
||||||
|
establishmentPhone,
|
||||||
|
fallbackName,
|
||||||
|
resolvedRole
|
||||||
|
);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextScreen.putExtra(EXTRA_ACTION_MODE, selectedAccountAction.name());
|
signInExistingAccount(email, password, fallbackName, resolvedRole);
|
||||||
nextScreen.putExtra(EXTRA_DISPLAY_NAME, fallbackName);
|
|
||||||
nextScreen.putExtra(EXTRA_EMAIL, email);
|
|
||||||
startActivity(nextScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String deriveNameFromEmail(String email) {
|
private String deriveNameFromEmail(String email) {
|
||||||
@@ -157,4 +236,206 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
String rest = candidate.length() > 1 ? candidate.substring(1) : "";
|
String rest = candidate.length() > 1 ? candidate.substring(1) : "";
|
||||||
return firstLetter + rest;
|
return firstLetter + rest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void enforceFirstAccountCreation() {
|
||||||
|
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
hasCreatedAccount = prefs.getBoolean(KEY_HAS_CREATED_ACCOUNT, false);
|
||||||
|
|
||||||
|
if (!hasCreatedAccount) {
|
||||||
|
selectedAccountAction = AccountAction.CRIAR;
|
||||||
|
Toast.makeText(this, "Crie uma conta para começar a usar a app.", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
updateActionButtons();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void markAccountCreated() {
|
||||||
|
hasCreatedAccount = true;
|
||||||
|
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
|
||||||
|
prefs.edit().putBoolean(KEY_HAS_CREATED_ACCOUNT, true).apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getRoleForSelectedType() {
|
||||||
|
return selectedAccountType == AccountType.ESTABELECIMENTO ? "ADMIN" : "CLIENTE";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildDocumentId(String email) {
|
||||||
|
return email.replace(".", "_").replace("@", "_at_");
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean ensureFirebaseReady() {
|
||||||
|
boolean ready = firebaseAuth != null && firestore != null;
|
||||||
|
if (!ready) {
|
||||||
|
Toast.makeText(this, "Ligue-se ao Firebase para continuar.", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
return ready;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void signInExistingAccount(String email, String password, String fallbackName, String resolvedRole) {
|
||||||
|
if (!ensureFirebaseReady()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
firebaseAuth.signInWithEmailAndPassword(email, password)
|
||||||
|
.addOnSuccessListener(authResult ->
|
||||||
|
fetchAccountAndNavigate(email, fallbackName, resolvedRole)
|
||||||
|
)
|
||||||
|
.addOnFailureListener(e ->
|
||||||
|
Toast.makeText(this, "Não foi possível iniciar sessão: " + e.getMessage(), Toast.LENGTH_SHORT).show()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createAccountInFirebase(
|
||||||
|
String email,
|
||||||
|
String password,
|
||||||
|
String providedName,
|
||||||
|
String ownerPhone,
|
||||||
|
String establishmentName,
|
||||||
|
String establishmentEmail,
|
||||||
|
String establishmentPhone,
|
||||||
|
String fallbackName,
|
||||||
|
String resolvedRole
|
||||||
|
) {
|
||||||
|
if (!ensureFirebaseReady()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
firebaseAuth.createUserWithEmailAndPassword(email, password)
|
||||||
|
.addOnSuccessListener(result -> {
|
||||||
|
if (!hasCreatedAccount) {
|
||||||
|
markAccountCreated();
|
||||||
|
}
|
||||||
|
String finalDisplayName = selectedAccountType == AccountType.ESTABELECIMENTO && !TextUtils.isEmpty(establishmentName)
|
||||||
|
? establishmentName
|
||||||
|
: fallbackName;
|
||||||
|
String uid = result.getUser() != null ? result.getUser().getUid() : null;
|
||||||
|
|
||||||
|
persistAccountInFirebase(
|
||||||
|
email,
|
||||||
|
providedName,
|
||||||
|
resolvedRole,
|
||||||
|
ownerPhone,
|
||||||
|
establishmentName,
|
||||||
|
establishmentEmail,
|
||||||
|
establishmentPhone,
|
||||||
|
uid,
|
||||||
|
() -> {
|
||||||
|
Intent createdScreen = new Intent(this, AccountCreatedActivity.class);
|
||||||
|
createdScreen.putExtra(EXTRA_ACTION_MODE, selectedAccountAction.name());
|
||||||
|
createdScreen.putExtra(EXTRA_DISPLAY_NAME, finalDisplayName);
|
||||||
|
createdScreen.putExtra(EXTRA_EMAIL, email);
|
||||||
|
createdScreen.putExtra(EXTRA_ACCOUNT_TYPE, selectedAccountType.name());
|
||||||
|
createdScreen.putExtra(EXTRA_ROLE, resolvedRole);
|
||||||
|
startActivity(createdScreen);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.addOnFailureListener(e ->
|
||||||
|
Toast.makeText(this, "Falha ao criar conta: " + e.getMessage(), Toast.LENGTH_SHORT).show()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fetchAccountAndNavigate(String email, String fallbackName, String resolvedRole) {
|
||||||
|
if (firestore == null) {
|
||||||
|
Toast.makeText(this, "Firebase indisponível.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String documentId = buildDocumentId(email);
|
||||||
|
firestore.collection("users")
|
||||||
|
.document(documentId)
|
||||||
|
.get()
|
||||||
|
.addOnSuccessListener(snapshot -> {
|
||||||
|
if (snapshot == null || !snapshot.exists()) {
|
||||||
|
Toast.makeText(this, "Conta não encontrada no Firebase.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String accountTypeInFirebase = snapshot.getString("accountType");
|
||||||
|
if (accountTypeInFirebase != null
|
||||||
|
&& !accountTypeInFirebase.equalsIgnoreCase(selectedAccountType.name())) {
|
||||||
|
Toast.makeText(this, "Tipo de conta não corresponde ao registo no Firebase.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String displayNameFromDb = snapshot.getString("displayName");
|
||||||
|
String establishmentName = snapshot.getString("establishmentName");
|
||||||
|
String ownerName = snapshot.getString("ownerName");
|
||||||
|
String roleFromDb = snapshot.getString("role");
|
||||||
|
|
||||||
|
String finalDisplayName = !TextUtils.isEmpty(establishmentName)
|
||||||
|
? establishmentName
|
||||||
|
: !TextUtils.isEmpty(displayNameFromDb) ? displayNameFromDb
|
||||||
|
: !TextUtils.isEmpty(ownerName) ? ownerName
|
||||||
|
: fallbackName;
|
||||||
|
|
||||||
|
String finalRole = !TextUtils.isEmpty(roleFromDb) ? roleFromDb : resolvedRole;
|
||||||
|
|
||||||
|
Intent nextScreen = selectedAccountType == AccountType.CLIENTE
|
||||||
|
? new Intent(this, ClientDashboardActivity.class)
|
||||||
|
: new Intent(this, EstablishmentDashboardActivity.class);
|
||||||
|
|
||||||
|
nextScreen.putExtra(EXTRA_ACTION_MODE, selectedAccountAction.name());
|
||||||
|
nextScreen.putExtra(EXTRA_DISPLAY_NAME, finalDisplayName);
|
||||||
|
nextScreen.putExtra(EXTRA_EMAIL, email);
|
||||||
|
nextScreen.putExtra(EXTRA_ACCOUNT_TYPE, selectedAccountType.name());
|
||||||
|
nextScreen.putExtra(EXTRA_ROLE, finalRole);
|
||||||
|
startActivity(nextScreen);
|
||||||
|
})
|
||||||
|
.addOnFailureListener(e ->
|
||||||
|
Toast.makeText(this, "Erro ao verificar conta no Firebase.", Toast.LENGTH_SHORT).show()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void persistAccountInFirebase(
|
||||||
|
String ownerEmail,
|
||||||
|
String ownerName,
|
||||||
|
String role,
|
||||||
|
String ownerPhone,
|
||||||
|
String establishmentName,
|
||||||
|
String establishmentEmail,
|
||||||
|
String establishmentPhone,
|
||||||
|
String uid,
|
||||||
|
Runnable onSuccess
|
||||||
|
) {
|
||||||
|
if (firestore == null) {
|
||||||
|
Toast.makeText(this, "Firebase indisponível.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String documentId = buildDocumentId(ownerEmail);
|
||||||
|
Map<String, Object> payload = new HashMap<>();
|
||||||
|
if (!TextUtils.isEmpty(uid)) {
|
||||||
|
payload.put("uid", uid);
|
||||||
|
}
|
||||||
|
payload.put("email", ownerEmail);
|
||||||
|
payload.put("displayName", ownerName);
|
||||||
|
payload.put("role", role);
|
||||||
|
payload.put("accountType", selectedAccountType.name());
|
||||||
|
payload.put("createdAt", System.currentTimeMillis());
|
||||||
|
|
||||||
|
if (selectedAccountType == AccountType.ESTABELECIMENTO) {
|
||||||
|
payload.put("ownerName", ownerName);
|
||||||
|
payload.put("ownerEmail", ownerEmail);
|
||||||
|
payload.put("ownerPhone", ownerPhone);
|
||||||
|
payload.put("establishmentName", establishmentName);
|
||||||
|
payload.put("establishmentEmail", establishmentEmail);
|
||||||
|
payload.put("establishmentPhone", establishmentPhone);
|
||||||
|
}
|
||||||
|
|
||||||
|
firestore.collection("users")
|
||||||
|
.document(documentId)
|
||||||
|
.set(payload, SetOptions.merge())
|
||||||
|
.addOnSuccessListener(unused ->
|
||||||
|
{
|
||||||
|
Toast.makeText(this, "Conta guardada na cloud.", Toast.LENGTH_SHORT).show();
|
||||||
|
if (onSuccess != null) {
|
||||||
|
onSuccess.run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.addOnFailureListener(e ->
|
||||||
|
Toast.makeText(this, "Não foi possível guardar na cloud.", Toast.LENGTH_SHORT).show()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class NovaReservaActivity extends AppCompatActivity {
|
public class NovaReservaActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,15 @@ public class NovaReservaActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class PartilharReservaActivity extends AppCompatActivity {
|
public class PartilharReservaActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,10 @@ public class PartilharReservaActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import androidx.core.graphics.Insets;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
public class RelatoriosActivity extends AppCompatActivity {
|
public class RelatoriosActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -20,7 +22,10 @@ public class RelatoriosActivity extends AppCompatActivity {
|
|||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button back = findViewById(R.id.btnVoltar);
|
||||||
|
if (back != null) {
|
||||||
|
back.setOnClickListener(v -> finish());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,3 +16,7 @@
|
|||||||
</ripple>
|
</ripple>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#00001A" />
|
<solid android:color="#444444" />
|
||||||
<corners android:radius="10dp" />
|
<corners android:radius="10dp" />
|
||||||
</shape>
|
</shape>
|
||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".BloqueioHorarioActivity">
|
tools:context=".BloqueioHorarioActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloBloqueio"
|
android:id="@+id/txtTituloBloqueio"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".CheckInAntecipadoActivity">
|
tools:context=".CheckInAntecipadoActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloCheckin"
|
android:id="@+id/txtTituloCheckin"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,23 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".ClientDashboardActivity">
|
tools:context=".ClientDashboardActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/clientScroll"
|
android:id="@+id/clientScroll"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
@@ -42,6 +53,16 @@
|
|||||||
android:textColor="#4D4D4D"
|
android:textColor="#4D4D4D"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtClientRole"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="Função: CLIENTE"
|
||||||
|
android:textColor="#0066CC"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -8,11 +8,22 @@
|
|||||||
android:background="#F2F2F2"
|
android:background="#F2F2F2"
|
||||||
tools:context=".EstablishmentDashboardActivity">
|
tools:context=".EstablishmentDashboardActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintEnd_toEndOf="parent">
|
||||||
@@ -41,6 +52,16 @@
|
|||||||
android:textColor="#5F5F5F"
|
android:textColor="#5F5F5F"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtEstabRole"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="Função: ADMIN"
|
||||||
|
android:textColor="#2E7D32"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -240,6 +261,26 @@
|
|||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="#00001A" />
|
android:textColor="#00001A" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnGerirMesas"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:background="@drawable/btn_light_border"
|
||||||
|
android:text="Editar mesas"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="#00001A" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnDetalhesReservas"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:background="@drawable/btn_light_border"
|
||||||
|
android:text="Detalhes das reservas"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="#00001A" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnCriarBloqueio"
|
android:id="@+id/btnCriarBloqueio"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -307,3 +348,6 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".ExplorarRestaurantesActivity">
|
tools:context=".ExplorarRestaurantesActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloExplorar"
|
android:id="@+id/txtTituloExplorar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".FavoritosActivity">
|
tools:context=".FavoritosActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloFavoritos"
|
android:id="@+id/txtTituloFavoritos"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".GestaoStaffActivity">
|
tools:context=".GestaoStaffActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloGestaoStaff"
|
android:id="@+id/txtTituloGestaoStaff"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".ListaEsperaActivity">
|
tools:context=".ListaEsperaActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloListaEspera"
|
android:id="@+id/txtTituloListaEspera"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@drawable/bg_tabs"
|
android:background="@drawable/bg_tabs"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:padding="3dp">
|
android:padding="3dp">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -79,10 +79,11 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/btn_light"
|
||||||
android:text="Cliente"
|
android:text="Cliente"
|
||||||
android:textSize="5pt"
|
android:textAllCaps="false"
|
||||||
android:background="@drawable/tab_selected"
|
android:textColorLink="#231F1F"
|
||||||
android:textAllCaps="false" />
|
android:textSize="5pt" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnEstabelecimento"
|
android:id="@+id/btnEstabelecimento"
|
||||||
@@ -91,16 +92,16 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/tab_unselected"
|
android:background="@drawable/tab_unselected"
|
||||||
android:text="Estabelecimento"
|
android:text="Estabelecimento"
|
||||||
android:textSize="5pt"
|
android:textAllCaps="false"
|
||||||
android:textAllCaps="false" />
|
android:textSize="5pt" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:background="@drawable/bg_tabs"
|
android:background="@drawable/bg_tabs"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:padding="3dp">
|
android:padding="3dp">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -108,20 +109,20 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="Entrar"
|
|
||||||
android:textSize="5pt"
|
|
||||||
android:background="@drawable/tab_selected"
|
android:background="@drawable/tab_selected"
|
||||||
android:textAllCaps="false" />
|
android:text="Entrar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textSize="5pt" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnCriarConta"
|
android:id="@+id/btnCriarConta"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="Criar Conta"
|
|
||||||
android:textSize="5pt"
|
|
||||||
android:background="@drawable/tab_unselected"
|
android:background="@drawable/tab_unselected"
|
||||||
android:textAllCaps="false" />
|
android:text="Criar Conta"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textSize="5pt" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
@@ -129,11 +130,11 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:hint="O seu nome"
|
|
||||||
android:background="@drawable/input_bg"
|
android:background="@drawable/input_bg"
|
||||||
|
android:hint="O seu nome"
|
||||||
|
android:inputType="textPersonName"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/inputEmail"
|
android:id="@+id/inputEmail"
|
||||||
@@ -145,26 +146,70 @@
|
|||||||
android:inputType="textEmailAddress"
|
android:inputType="textEmailAddress"
|
||||||
android:padding="12dp" />
|
android:padding="12dp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/inputOwnerPhone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:hint="Telefone do proprietário"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/inputEstablishmentName"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:hint="Nome do estabelecimento"
|
||||||
|
android:inputType="textCapWords"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/inputEstablishmentEmail"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:hint="Email do estabelecimento"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/inputEstablishmentPhone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/input_bg"
|
||||||
|
android:hint="Telefone do estabelecimento"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/inputPassword"
|
android:id="@+id/inputPassword"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:inputType="textPassword"
|
|
||||||
android:hint="Palavra-passe"
|
|
||||||
android:background="@drawable/input_bg"
|
android:background="@drawable/input_bg"
|
||||||
android:padding="12dp"/>
|
android:hint="Palavra-passe"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:padding="12dp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnFinalCriarConta"
|
android:id="@+id/btnFinalCriarConta"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:text="Entrar"
|
|
||||||
android:textColor="#FFF"
|
|
||||||
android:background="@drawable/btn_primary"
|
android:background="@drawable/btn_primary"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="Entrar"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:padding="12dp"/>
|
android:textColor="#FFF" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".NovaReservaActivity">
|
tools:context=".NovaReservaActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloNovaReserva"
|
android:id="@+id/txtTituloNovaReserva"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".PartilharReservaActivity">
|
tools:context=".PartilharReservaActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloPartilhar"
|
android:id="@+id/txtTituloPartilhar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,17 @@
|
|||||||
android:background="#F7F7F7"
|
android:background="#F7F7F7"
|
||||||
tools:context=".RelatoriosActivity">
|
tools:context=".RelatoriosActivity">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnVoltar"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Voltar"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtTituloRelatorios"
|
android:id="@+id/txtTituloRelatorios"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -16,7 +27,7 @@
|
|||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#000"
|
android:textColor="#000"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/btnVoltar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="32dp" />
|
||||||
@@ -37,3 +48,6 @@
|
|||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
|
alias(libs.plugins.google.services) apply false
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,8 @@ appcompat = "1.7.1"
|
|||||||
material = "1.13.0"
|
material = "1.13.0"
|
||||||
activity = "1.11.0"
|
activity = "1.11.0"
|
||||||
constraintlayout = "2.2.1"
|
constraintlayout = "2.2.1"
|
||||||
|
firebaseBom = "33.7.0"
|
||||||
|
googleServices = "4.4.2"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
@@ -18,7 +20,9 @@ appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "a
|
|||||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||||
|
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebaseBom" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user