70. Manage store and add address frontend

Add Address

We will update the add_address.html file

add_address.html
{% extends 'base.html' %}
{% load static %}

{% block body %}

<main class="principal">
    <title>Add Address | Reserva</title>
  
      <section class="conta">
  
        <div class="conta__container">
          <div class="checkout__titulos">
            <p class="checkout__titulo">Add a new address</p>
          </div>
  
          <form
            class="conta__form"
            action="{% url 'add_address' %}"
            method="post"
          >
          {% csrf_token %}
            
          <div class="conta__item">
            <label for="street">Street</label>
            <input name="street" type="text" placeholder="Street"/>
          </div>
          <div class="conta__item">
              <label for="number">Number</label>
              <input name="number" type="number" placeholder="Number"/>
          </div>
          <div class="conta__item">
              <label for="apartment">Apartment</label>
              <input name="apartment" type="text" placeholder="Apartment"/>
          </div>
          <div class="conta__item">
              <label for="zip_code">Zip Code</label>
              <input name="zip_code" type="number" placeholder="Zip Code"/>
          </div>
          <div class="conta__item">
              <label for="city">City</label>
              <input name="city" type="text" placeholder="City"/>
          </div>
          <div class="conta__item">
              <label for="state">State</label>
              <input name="state" type="text" placeholder="State"/>
          </div>
  
            <button class="subtotal__botao" type="submit">
              Add address
            </button>
            <a class="esquecer_senha" href="{% url 'checkout' %}">Return to checkout</a>
          </form>
        </div>
      </section>
  </main>

{% endblock %}

Manage store

Next, we will update the manage_store.html file located in the 'internal' folder, following a structure similar to the one implemented in the login frontend.

Obs: To ensure the "Manage Store" option appears in the profile dropdown on the navigation bar (and grants access to the page), the logged-in user must belong to the "Team" group in the admin page.

Current user located in the 'Team' group
Desktop view
Mobile view

We will also update the export_report view function and the export_csv utility function to ensure that downloaded reports include their respective type names in the file names. This will make it easier to identify and organize the reports.

Last updated