Commit e5e2f19a4df88c8a16b91dfe4aed893148635dc6
1 parent
2146d35a
Mutli-pages
Showing
4 changed files
with
122 additions
and
132 deletions
Show diff stats
css/style.css
index.html
... | ... | @@ -23,26 +23,66 @@ |
23 | 23 | <a class="modal-action modal-close waves-effect btn-flat">Ça marche</a> |
24 | 24 | </div> |
25 | 25 | </div> |
26 | + <ul id="menuUtilisateur" class="dropdown-content"> | |
27 | + <li><a>Se déconnecter</a></li> | |
28 | + <li><a>Changer de mot de passe</a></li> | |
29 | + <li><a>Changer de carte</a></li> | |
30 | + <li class="prezSeul"><a>Gestion des utilisateurs</a></li> | |
31 | + </ul> | |
32 | + <div id="passerCarte" class="modal"> | |
33 | + <div class="modal-content"> | |
34 | + <h4>Passez la carte du client</h4> | |
35 | + <p>Veuillez passer la carte du client concerné pour finaliser l'action suivante : <strong>recharger 10 €</strong>.</p> | |
36 | + </div> | |
37 | + <div class="modal-footer"> | |
38 | + <a class="modal-action modal-close waves-effect waves-red btn-flat">Annuler</a> | |
39 | + </div> | |
40 | + </div> | |
41 | + <div id="soldeInsuffisant" class="modal"> | |
42 | + <div class="modal-content"> | |
43 | + <h4>Solde insuffisant</h4> | |
44 | + <p> | |
45 | + Le solde de la carte <strong>QUAELUY1RO</strong> n'est pas suffisant pour effectuer un paiement de 3,50 €.<br/> Solde actuel : 2,70 €<br/> Manquant : 0,80 €<br/> | |
46 | + </p> | |
47 | + </div> | |
48 | + <div class="modal-footer"> | |
49 | + <a href="#rechargement" class="modal-action modal-close waves-effect waves-green btn-flat">Recharger</a> | |
50 | + <a class="modal-action modal-close waves-effect waves-red btn-flat">Annuler</a> | |
51 | + </div> | |
52 | + </div> | |
53 | + | |
26 | 54 | <!-- Page --> |
27 | 55 | <nav class="red" role="navigation"> |
28 | 56 | <div class="nav-wrapper container"> |
29 | - <a id="logo-container" href="#" class="brand-logo">{{ nomApplication }}</a> | |
57 | + <a class="brand-logo" v-if="page == 'connexion'">10⁵</a> | |
58 | + <div class="left" v-else> | |
59 | + <a class="breadcrumb">10⁵</a> | |
60 | + <a class="breadcrumb" v-if="page == 'operations'">Opérations</a> | |
61 | + </div> | |
30 | 62 | <ul class="right hide-on-med-and-down"> |
31 | 63 | <li v-if="connecte"> |
32 | - <a class="dropdown-button" href="#!" data-activates="menuUtilisateur"> | |
64 | + <a class="dropdown-button" data-activates="menuUtilisateur"> | |
33 | 65 | <i class="material-icons">perm_identity</i> {{ login }} (<i class="material-icons">timer</i> {{ timer }}) |
34 | 66 | </a> |
35 | 67 | </li> |
36 | 68 | </ul> |
37 | - <ul id="nav-mobile" class="side-nav"> | |
38 | - <li><a href="#">TODO</a></li> | |
69 | + <ul class="side-nav"> | |
70 | + <li><a>TODO</a></li> | |
71 | + </ul> | |
72 | + </div> | |
73 | + <div class="col s12 red" v-show="page == 'operations'"> | |
74 | + <ul class="tabs red"> | |
75 | + <li class="tab col s3"><a href="#creation">Création</a></li> | |
76 | + <li class="tab col s3"><a href="#rechargement">Rechargement</a></li> | |
77 | + <li class="tab col s3"><a class="active" href="#paiement">Paiement</a></li> | |
78 | + <li class="tab col s3"><a href="#vidange">Vidange</a></li> | |
39 | 79 | </ul> |
40 | 80 | </div> |
41 | 81 | </nav> |
42 | 82 | |
43 | 83 | <div class="section no-pad-bot" id="main"> |
44 | - <div class="container"> | |
45 | - <br><br><br> | |
84 | + <br><br><br> | |
85 | + <div class="container" v-show="page == 'connexion'"> | |
46 | 86 | <h4>Se connecter</h4> |
47 | 87 | <h5>Avec votre identifiant et votre mot de passe</h5> |
48 | 88 | <div class="row"> |
... | ... | @@ -60,7 +100,7 @@ |
60 | 100 | </div> |
61 | 101 | </div> |
62 | 102 | <div class="row"> |
63 | - <a href="#!" class="btn-large waves-effect waves-light disabled" @click="connecter" :class="{'disabled': !peutConnecter}">Se connecter</a> | |
103 | + <a class="btn-large waves-effect waves-light disabled" @click="connecter" :class="{'disabled': !peutConnecter}">Se connecter</a> | |
64 | 104 | </div> |
65 | 105 | </form> |
66 | 106 | </div> |
... | ... | @@ -69,8 +109,75 @@ |
69 | 109 | <p>Passez-la simplement devant le lecteur</p> |
70 | 110 | </div> |
71 | 111 | </div> |
112 | + | |
113 | + <div class="container" v-show="page == 'operations'"> | |
114 | + <div class="row center"> | |
115 | + <div id="creation"> | |
116 | + <h5>Créer un nouveau client</h5> | |
117 | + <div class="row"> | |
118 | + <form class="col s12"> | |
119 | + <div class="input-field col s12"> | |
120 | + <input type="number" name="solde"> | |
121 | + <label for="solde">Solde initial (€)</label> | |
122 | + </div> | |
123 | + <div class="row center"> | |
124 | + <a class="btn-large waves-effect waves-light">Créer</a> | |
125 | + </div> | |
126 | + </form> | |
127 | + </div> | |
128 | + </div> | |
129 | + <div id="rechargement"> | |
130 | + <h5>Recharger un client</h5> | |
131 | + <div class="row"> | |
132 | + <form class="col s12"> | |
133 | + <div class="input-field col s12"> | |
134 | + <input type="number" name="credit"> | |
135 | + <label for="credit">Crédit (€)</label> | |
136 | + </div> | |
137 | + <div class="row center"> | |
138 | + <a class="btn-large waves-effect waves-light btn modal-trigger">Recharger</a> | |
139 | + </div> | |
140 | + </form> | |
141 | + </div> | |
142 | + </div> | |
143 | + <div id="paiement"> | |
144 | + <h5>Vendre à un client</h5> | |
145 | + <div class="row"> | |
146 | + <form class="col s12"> | |
147 | + <div id="grilleBieres"> | |
148 | + <div class="row"> | |
149 | + <div class="col s4"><a class="waves-effect waves-light btn">1</a></div> | |
150 | + <div class="col s4"><a class="waves-effect waves-light btn">2</a></div> | |
151 | + <div class="col s4"><a class="waves-effect waves-light btn">3</a></div> | |
152 | + </div> | |
153 | + <div class="row"> | |
154 | + <div class="col s4"><a class="waves-effect waves-light btn">4</a></div> | |
155 | + <div class="col s4"><a class="waves-effect waves-light btn">5</a></div> | |
156 | + <div class="col s4"><a class="waves-effect waves-light btn">6</a></div> | |
157 | + </div> | |
158 | + </div> | |
159 | + <div class="row"> | |
160 | + <div class="input-field col s12"> | |
161 | + <input type="number" name="prix"> | |
162 | + <label for="prix">Prix (€)</label> | |
163 | + </div> | |
164 | + </div> | |
165 | + <div class="row center"> | |
166 | + <a class="btn-large waves-effect waves-light">Payer</a> | |
167 | + </div> | |
168 | + </form> | |
169 | + </div> | |
170 | + </div> | |
171 | + <div id="vidange"> | |
172 | + <h5>Vider le contenu de la carte d'un client</h5> | |
173 | + <div class="row center"> | |
174 | + <a class="btn-large waves-effect waves-light">Vider</a> | |
175 | + </div> | |
176 | + </div> | |
177 | + </div> | |
178 | + </div> | |
72 | 179 | </div> |
73 | - </div> | |
180 | + | |
74 | 181 | <footer class="page-footer red"> |
75 | 182 | <div class="footer-copyright"> |
76 | 183 | <div class="container"> | ... | ... |
js/init.js
... | ... | @@ -20,7 +20,7 @@ $(function(){ |
20 | 20 | var app = new Vue({ |
21 | 21 | el: 'body', |
22 | 22 | data: { |
23 | - nomApplication: "10⁵", | |
23 | + page: 'connexion', | |
24 | 24 | connecte: false, |
25 | 25 | erreurTitre: '', |
26 | 26 | erreurMessage: '', |
... | ... | @@ -54,7 +54,8 @@ var app = new Vue({ |
54 | 54 | that.droit = donnees.droit |
55 | 55 | that.jeton = donnees.jeton |
56 | 56 | that.connecte = that.date |
57 | - that.toast("Correctement identifié en tant que " + that.login + " pour 10 minutes") | |
57 | + that.toast("Correctement identifié en tant que " + that.login + " pour " + JETON_DUREE/60+ " minutes") | |
58 | + that.page = 'operations' | |
58 | 59 | break; |
59 | 60 | |
60 | 61 | case "identifiants_invalides": |
... | ... | @@ -74,7 +75,9 @@ var app = new Vue({ |
74 | 75 | }, |
75 | 76 | timer: function() { |
76 | 77 | var secondes = this.connecte + JETON_DUREE - this.date |
77 | - return Math.floor(secondes/60) + ':' + (secondes % 60) | |
78 | + var minutes = Math.floor(secondes/60) | |
79 | + var secondes = secondes % 60 | |
80 | + return minutes + ':' + (secondes < 10 ? '0' : '') + secondes | |
78 | 81 | } |
79 | 82 | }, |
80 | 83 | }) | ... | ... |
main.html deleted
... | ... | @@ -1,119 +0,0 @@ |
1 | -<!-- Réutilisable --> | |
2 | -<ul id="menuUtilisateur" class="dropdown-content"> | |
3 | - <li><a href="#!">Se déconnecter</a></li> | |
4 | - <li><a href="#!">Changer de mot de passe</a></li> | |
5 | - <li><a href="#!">Changer de carte</a></li> | |
6 | - <li class="prezSeul"><a href="#!">Gestion des utilisateurs</a></li> | |
7 | -</ul> | |
8 | -<div id="passerCarte" class="modal"> | |
9 | - <div class="modal-content"> | |
10 | - <h4>Passez la carte du client</h4> | |
11 | - <p>Veuillez passer la carte du client concerné pour finaliser l'action suivante : <strong>recharger 10 €</strong>.</p> | |
12 | - </div> | |
13 | - <div class="modal-footer"> | |
14 | - <a href="#!" class="modal-action modal-close waves-effect waves-red btn-flat">Annuler</a> | |
15 | - </div> | |
16 | -</div> | |
17 | -<div id="soldeInsuffisant" class="modal"> | |
18 | - <div class="modal-content"> | |
19 | - <h4>Solde insuffisant</h4> | |
20 | - <p> | |
21 | - Le solde de la carte <strong>QUAELUY1RO</strong> n'est pas suffisant pour effectuer un paiement de 3,50 €.<br/> Solde actuel : 2,70 €<br/> Manquant : 0,80 €<br/> | |
22 | - </p> | |
23 | - </div> | |
24 | - <div class="modal-footer"> | |
25 | - <a href="#rechargement" class="modal-action modal-close waves-effect waves-green btn-flat">Recharger</a> | |
26 | - <a href="#!" class="modal-action modal-close waves-effect waves-red btn-flat">Annuler</a> | |
27 | - </div> | |
28 | -</div> | |
29 | - | |
30 | -<!-- Page --> | |
31 | -<nav class="red" role="navigation"> | |
32 | - <div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">10⁵</a> | |
33 | - <ul class="right hide-on-med-and-down"> | |
34 | - <li><a class="dropdown-button" href="#!" data-activates="menuUtilisateur"><i class="material-icons">perm_identity</i> vigou (<i class="material-icons">timer</i> 3:12)</a></li> | |
35 | - </ul> | |
36 | - | |
37 | - <ul id="nav-mobile" class="side-nav"> | |
38 | - <li><a href="#">TODO</a></li> | |
39 | - </ul> | |
40 | - <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a> | |
41 | - </div> | |
42 | - <div class="col s12 red"> | |
43 | - <ul class="tabs red"> | |
44 | - <li class="tab col s3"><a href="#creation">Création</a></li> | |
45 | - <li class="tab col s3"><a href="#rechargement">Rechargement</a></li> | |
46 | - <li class="tab col s3"><a class="active" href="#paiement">Paiement</a></li> | |
47 | - <li class="tab col s3"><a href="#vidange">Vidange</a></li> | |
48 | - </ul> | |
49 | - </div> | |
50 | -</nav> | |
51 | -<div class="section no-pad-bot" id="main"> | |
52 | - <div class="container"> | |
53 | - <br><br><br> | |
54 | - <div class="row center"> | |
55 | - <div id="creation"> | |
56 | - <h5>Créer un nouveau client</h5> | |
57 | - <div class="row"> | |
58 | - <form class="col s12"> | |
59 | - <div class="input-field col s12"> | |
60 | - <input type="number" id="solde"> | |
61 | - <label for="solde">Solde initial (€)</label> | |
62 | - </div> | |
63 | - <div class="row center"> | |
64 | - <a href="#!" id="creer" class="btn-large waves-effect waves-light">Créer</a> | |
65 | - </div> | |
66 | - </form> | |
67 | - </div> | |
68 | - </div> | |
69 | - <div id="rechargement"> | |
70 | - <h5>Recharger un client</h5> | |
71 | - <div class="row"> | |
72 | - <form class="col s12"> | |
73 | - <div class="input-field col s12"> | |
74 | - <input type="number" id="credit"> | |
75 | - <label for="credit">Crédit (€)</label> | |
76 | - </div> | |
77 | - <div class="row center"> | |
78 | - <a href="#passerCarte" id="recharger" class="btn-large waves-effect waves-light btn modal-trigger">Recharger</a> | |
79 | - </div> | |
80 | - </form> | |
81 | - </div> | |
82 | - </div> | |
83 | - <div id="paiement"> | |
84 | - <h5>Vendre à un client</h5> | |
85 | - <div class="row"> | |
86 | - <form class="col s12"> | |
87 | - <div id="grilleBieres"> | |
88 | - <div class="row"> | |
89 | - <div class="col s4"><a onclick="vendu()" class="waves-effect waves-light btn">1</a></div> | |
90 | - <div class="col s4"><a class="waves-effect waves-light btn">2</a></div> | |
91 | - <div class="col s4"><a class="waves-effect waves-light btn">3</a></div> | |
92 | - </div> | |
93 | - <div class="row"> | |
94 | - <div class="col s4"><a class="waves-effect waves-light btn">4</a></div> | |
95 | - <div class="col s4"><a class="waves-effect waves-light btn">5</a></div> | |
96 | - <div class="col s4"><a class="waves-effect waves-light btn">6</a></div> | |
97 | - </div> | |
98 | - </div> | |
99 | - <div class="row"> | |
100 | - <div class="input-field col s12"> | |
101 | - <input type="number" id="prix"> | |
102 | - <label for="prix">Prix (€)</label> | |
103 | - </div> | |
104 | - </div> | |
105 | - <div class="row center"> | |
106 | - <a href="#!" id="payer" onclick="soldeInsuffisant()" class="btn-large waves-effect waves-light">Payer</a> | |
107 | - </div> | |
108 | - </form> | |
109 | - </div> | |
110 | - </div> | |
111 | - <div id="vidange"> | |
112 | - <h5>Vider le contenu de la carte d'un client</h5> | |
113 | - <div class="row center"> | |
114 | - <a href="#!" id="payer" class="btn-large waves-effect waves-light">Vider</a> | |
115 | - </div> | |
116 | - </div> | |
117 | - </div> | |
118 | - </div> | |
119 | -</div> |