|
10 | 10 | font-size: 1.2rem; |
11 | 11 | } |
12 | 12 | .is-invalid { |
13 | | - border-color: #dc3545 !important; |
14 | | - box-shadow: 0 0 4px #dc3545; |
15 | | -} |
| 13 | + border-color: #dc3545 !important; |
| 14 | + box-shadow: 0 0 4px #dc3545; |
| 15 | + } |
| 16 | + |
| 17 | + /* Transaction history table styling */ |
| 18 | + .table-responsive { |
| 19 | + border: 1px solid #dee2e6; |
| 20 | + border-radius: 5px; |
| 21 | + margin-bottom: 20px; |
| 22 | + } |
| 23 | + |
| 24 | + .thead-dark th { |
| 25 | + background-color: #343a40; |
| 26 | + color: #ffffff; |
| 27 | + border-color: #454d55; |
| 28 | + font-weight: 600; |
| 29 | + font-size: 0.9rem; |
| 30 | + } |
| 31 | + |
| 32 | + .table-striped tbody tr:nth-of-type(odd) { |
| 33 | + background-color: rgba(0, 123, 255, 0.05); |
| 34 | + } |
| 35 | + |
| 36 | + .table-hover tbody tr:hover { |
| 37 | + background-color: rgba(0, 123, 255, 0.1); |
| 38 | + } |
| 39 | + |
| 40 | + .badge { |
| 41 | + font-size: 0.8rem; |
| 42 | + padding: 0.4em 0.6em; |
| 43 | + } |
| 44 | + |
| 45 | + .badge-success { |
| 46 | + background-color: #28a745; |
| 47 | + } |
| 48 | + |
| 49 | + .badge-warning { |
| 50 | + background-color: #ffc107; |
| 51 | + color: #212529; |
| 52 | + } |
| 53 | + |
| 54 | + .badge-danger { |
| 55 | + background-color: #dc3545; |
| 56 | + } |
| 57 | + |
| 58 | + .badge-secondary { |
| 59 | + background-color: #6c757d; |
| 60 | + } |
| 61 | + |
| 62 | + .transaction-history h3 { |
| 63 | + margin-bottom: 20px; |
| 64 | + color: #495057; |
| 65 | + border-bottom: 2px solid #007bff; |
| 66 | + padding-bottom: 10px; |
| 67 | + } |
16 | 68 | </style> |
17 | 69 | {% endblock %} |
18 | 70 | {% block heading %} |
|
103 | 155 | </div> |
104 | 156 | </form> |
105 | 157 |
|
| 158 | + <!-- User Transaction History --> |
| 159 | + {% if user.is_authenticated and user_transactions %} |
| 160 | + <div class="row transaction-history" style="margin-top: 30px;"> |
| 161 | + <div class="col-sm-12"> |
| 162 | + <h3><i class="fa fa-history"></i> Your Transaction History</h3> |
| 163 | + <div class="table-responsive"> |
| 164 | + <table class="table table-striped table-hover"> |
| 165 | + <thead class="thead-dark"> |
| 166 | + <tr> |
| 167 | + <th><i class="fa fa-calendar"></i> Payment Date</th> |
| 168 | + <th><i class="fa fa-receipt"></i> Transaction ID</th> |
| 169 | + <th><i class="fa fa-calendar-check"></i> Subscription End Date</th> |
| 170 | + <th><i class="fa fa-university"></i> Institute Name</th> |
| 171 | + <th><i class="fa fa-file-text"></i> GST Number</th> |
| 172 | + <th><i class="fa fa-info-circle"></i> Status</th> |
| 173 | + </tr> |
| 174 | + </thead> |
| 175 | + <tbody> |
| 176 | + {% for transaction in user_transactions %} |
| 177 | + <tr> |
| 178 | + <td>{{ transaction.payment_date|date:"d M Y" }}</td> |
| 179 | + <td> |
| 180 | + <small class="text-muted">{{ transaction.transaction_id }}</small> |
| 181 | + </td> |
| 182 | + <td>{{ transaction.subscription_end_date|date:"d M Y" }}</td> |
| 183 | + <td>{{ transaction.institute_name }}</td> |
| 184 | + <td>{{ transaction.gst_number }}</td> |
| 185 | + <td> |
| 186 | + {% if transaction.order_status == 'CHARGED' %} |
| 187 | + <span class="badge badge-success"> |
| 188 | + <i class="fa fa-check"></i> Paid |
| 189 | + </span> |
| 190 | + {% elif transaction.order_status == 'PENDING' or transaction.order_status == 'PENDING_VBV' or transaction.order_status == 'AUTHORIZING' %} |
| 191 | + <span class="badge badge-warning"> |
| 192 | + <i class="fa fa-clock-o"></i> Pending |
| 193 | + </span> |
| 194 | + {% elif transaction.order_status == 'NO_TRANSACTION' %} |
| 195 | + <span class="badge badge-secondary"> |
| 196 | + <i class="fa fa-exclamation"></i> No Payment |
| 197 | + </span> |
| 198 | + {% else %} |
| 199 | + <span class="badge badge-danger"> |
| 200 | + <i class="fa fa-times"></i> Failed |
| 201 | + </span> |
| 202 | + {% endif %} |
| 203 | + </td> |
| 204 | + </tr> |
| 205 | + {% endfor %} |
| 206 | + </tbody> |
| 207 | + </table> |
| 208 | + </div> |
| 209 | + </div> |
| 210 | + </div> |
| 211 | + {% elif user.is_authenticated %} |
| 212 | + <div class="row" style="margin-top: 30px;"> |
| 213 | + <div class="col-sm-12"> |
| 214 | + <div class="alert alert-info"> |
| 215 | + <i class="fa fa-info-circle"></i> No transaction history found for your account. |
| 216 | + </div> |
| 217 | + </div> |
| 218 | + </div> |
| 219 | + {% endif %} |
| 220 | + |
106 | 221 | <div id="paymentMsg"> |
107 | 222 |
|
108 | 223 | </div> |
|
0 commit comments