index.html 5.93 KB
Newer Older
Administrator committed
1 2 3 4
{% extends "base.html" %}
{% load static %}

{% block additionnal_css %}
5
  <link rel="stylesheet" href="{% static "css/envelops.css" %}?v=1651853225">
Administrator committed
6 7 8 9 10 11
{% endblock %}

{% block additionnal_scripts %}
{% endblock %}

{% block content %}
12 13 14 15 16
<div id="admin_connexion_button">
  {%if must_identify %}
    {% include "common/conn_admin.html" %}
  {%endif%}
</div>
Administrator committed
17 18 19 20 21
<div id="envelop_cashing_error" class="alert--danger clearfix custom_alert" onClick="toggle_error_alert()">
    <div style="width: 90%" class="fl txtleft" id="error_alert_txt"></div>
    <div style="width: 10%" class="fr txtright"><i class="fas fa-times"></i></div>
</div>
<div id="envelop_cashing_success" class="alert--success clearfix custom_alert" onClick="toggle_success_alert()">
22
  <div style="width: 90%" class="fl txtleft success_alert_content">Enveloppe encaissée !</div>
Damien Moulard committed
23 24 25 26
  <div style="width: 10%" class="fr txtright"><i class="fas fa-times"></i></div>
</div>
<div id="envelop_deletion_success" class="alert--success clearfix custom_alert" onClick="toggle_deleted_alert()">
  <div style="width: 90%" class="fl txtleft">Enveloppe supprimée !</div>
Administrator committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
  <div style="width: 10%" class="fr txtright"><i class="fas fa-times"></i></div>
</div>

<section class="grid-2 has-gutter">
  <section id="cash">
    <h2 class="txtcenter">Enveloppes de liquide</h2>
    <div id="cash_envelops">

    </div>
  </section>

  <section id="ch">
    <h2 class="txtcenter">Enveloppes de chèques</h2>
    <div id="ch_envelops">

42 43 44
    </div>
  </section>
  <section id="archive_cash">
45
    <hr>
46 47 48 49 50 51
    <h2 class="txtcenter">Enveloppes de liquide archivées</h2>
    <div id="archive_cash_envelops" class="flex-container flex-column-reverse">

    </div>
  </section>
  <section id="archive_ch">
52
    <hr>
53 54 55
    <h2 class="txtcenter">Enveloppes de chèques archivées</h2>
    <div id="archive_ch_envelops" class="flex-container flex-column-reverse">

Administrator committed
56 57 58 59
    </div>
  </section>
</section>

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
<div id="templates" style="display:none;">
  <div id="modal_update_envelop">
    <div class="modal_update_envelop_content">
      <h3 class="envelop_name"></h3>
      <div class="envelop_lines"></div>
      <div class="envelop_comments_area">
        <p>Commentaires</p>
        <textarea class="envelop_comments"></textarea>
      </div>
    </div>
  </div>

  <div id="update_envelop_line_template">
    <div class="update_envelop_line">
      <div class="line_partner_name_container">
        <span class="line_number"></span>
        <span class="line_partner_name"></span>
      </div>
      <div class="line_partner_input_container">
        <input type="text" class="line_partner_amount" placeholder="Montant">
        <i class="fas fa-trash-alt fa-lg delete_envelop_line_icon"></i>
      </div>
      <div class="deleted_line_through"></div>
    </div>
  </div>
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147

  <div id="modal_add_to_envelop">
    <div class="modal_add_to_envelop_content">
      <h3>Ajouter un paiement ou des parts sociales</h3>
      <h4><i class="envelop_name"></i></h4>
      <hr>
      <div class="search_member_area">
        <h4>Rechercher un membre</h4>
        <form class="search_member_form" action="javascript:;" method="post">
          <input type="text" class="search_member_input" value="" placeholder="Nom ou numéro du coop..." required>
          <button type="submit" class="btn--primary" class="search_member_button">Recherche</button>
        </form>
      </div>
      <div class="search_member_results_area" style="display:none;">
        <div class="search_results_text">
          <p><i>Choisissez parmi les membres trouvés :</i></p>
        </div>
        <div class="search_member_results"></div>
      </div>
      <div class="add_to_envelop_lines_area" style="display:none;">
        <div class="add_to_envelop_lines">
        </div>
        <div class="validation_buttons">
          <button class="btn--primary add_payment_button">Ajouter le paiement à l'enveloppe</button>
          <button class="btn--primary add_shares_button">Ajouter des parts sociales </button>
        </div>
      </div>
    </div>
  </div>

  <div id="add_to_envelop_line_template">
    <div class="add_to_envelop_line">
      <div class="partner_name_container">
        <span class="line_partner_name"></span>
      </div>
      <div class="partner_input_container">
        <input type="text" class="line_partner_amount" placeholder="Montant">
        <div class="line_partner_amount_error">Le montant doit être un nombre entier.</div>
      </div>
    </div>
  </div>

  <div id="modal_confirm_add_payment">
    <p>
      Vous vous apprêtez à ajouter un paiement de <span class="confirm_add_payment_details amount"></span>
      du membre <span class="confirm_add_payment_details member"></span>
      à l'enveloppe <span class="confirm_add_payment_details envelop"></span>.
    </p>
    <p><i>
      <i class="fas fa-exclamation-triangle"></i> Avertissement si ce.tte membre a plusieurs factures d'ouvertes.<br/>
      Au moment de l'encaissement de l'enveloppe, ce paiement sera lié à la plus vieille facture ouverte de ce membre.
    </i></p>
  </div>

  <div id="modal_confirm_add_shares">
    <p>
      Vous vous apprêtez à ajouter pour <span class="confirm_add_payment_details amount"></span>€ de parts sociales
      au membre <span class="confirm_add_payment_details member"></span>.
    </p>
    <p>
      Le paiement sera ajouté à l'enveloppe <span class="confirm_add_payment_details envelop"></span>.
    </p>
  </div>
148 149
</div>

Administrator committed
150 151
<script src="{% static "js/pouchdb.min.js" %}"></script>
<script type="text/javascript">
152
        var must_identify = '{{must_identify}}';
Administrator committed
153 154 155 156 157 158 159 160 161
        var couchdb_dbname = '{{db}}';
        var couchdb_server = '{{couchdb_server}}' + couchdb_dbname;
        var dbc = new PouchDB(couchdb_dbname);
        var sync = PouchDB.sync(couchdb_dbname, couchdb_server, {
          live: true,
          retry: true,
          auto_compaction: false
        });
</script>
162 163
<script src="{% static "js/all_common.js" %}?v=1651853225"></script>
<script src="{% static "js/envelops.js" %}?v=1651853225"></script>
Administrator committed
164
{% endblock %}